From patchwork Mon Feb 27 14:00:18 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: 657041 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2375789wrb; Mon, 27 Feb 2023 06:17:39 -0800 (PST) X-Google-Smtp-Source: AK7set9blmw2WXJkfAoIDE7GkOt6rhZj0HJkEQvoIaV42w3nk6JB2K5gBQft0L0rytDvRxMPJQNl X-Received: by 2002:a05:6214:1c09:b0:537:6416:fc2b with SMTP id u9-20020a0562141c0900b005376416fc2bmr48309181qvc.52.1677507459049; Mon, 27 Feb 2023 06:17:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507459; cv=none; d=google.com; s=arc-20160816; b=HxKUimxCmWcUb0bhOPRtx9/Z8KFP/N2qUVdJg1GjOZ7S/eqZyjDOqQ2TgUFzrkIyu9 qXAg+4fVYKkU1RigP9CFBM4oy3APfiRjs8Kht8hJDJbXmfM0cXqXNtoRyBXsFAa6HsIu C7QfBa6ErjWaUSiTezLYR2171zG7OnXykwVmCpjyvGu72xJdZW6QWgOuItNS6tC/wAm1 M5JdoBnt3Tns3aeXUzAfqAiRDw+uU3cpvk7kUJmec5FYpz+5oNzMKhQzM4aTL3UsG6iO LEBVklNHQDEx5cEHOTbbTpZyvWARW2bZBOI6reFsrgC3ynGv4vXKkPF7Q115d7pf//cJ MtNA== 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:to:from :dkim-signature; bh=pRJteGTjU6unOMeXfZg7XjDzKuedaKAslOkcjAGgIUc=; b=0DPYB9OUxYdVSH/PO/D5mcWDEZ6zxxW/ijym7KnUQ0fWiGkLnLjPtRuLM8D/Lx412U Da/Zu0iuVYFSJt2B9Tl5m6n4botFbH7fONcTpf4itchWJ23Z8HT8qCR724S7/8hA62Ih oIMm7wyCNJFwrIwoCFeyYpJQCe+LPuWI9u6mMPHM9BxxGbBPVQHuOGZGpqKzBo+xJag6 9uhoM7lMKhPNlEbPy9YSRwc9Y2NjA4f4ROa73F1lRgZkf1fV7eXcPxUAxZ2FIh625eNg Ie/p3ydS5XDCconJmBeh5U18ilmAS8Pe1zDfYNzXe+igai6SGleo8eEczb+igDi247pI 9S8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EK5334E7; 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 t10-20020a0cb38a000000b0056ea32a496asi6545279qve.576.2023.02.27.06.17.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:17:39 -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=EK5334E7; 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 1pWe5M-0004CE-2e; Mon, 27 Feb 2023 09:02:36 -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 1pWe5C-0002pU-HF for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:26 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5A-0007jU-4k for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:26 -0500 Received: by mail-wr1-x42e.google.com with SMTP id l25so6349102wrb.3 for ; Mon, 27 Feb 2023 06:02:23 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=pRJteGTjU6unOMeXfZg7XjDzKuedaKAslOkcjAGgIUc=; b=EK5334E7+UWy1wIEtXdvtNEx0Xim5fl3Wp97jlZd0VXvmOPrhivWmIuyudzoJXaW20 RAXK2cDeKpCJNkpmd7WSaYjVeuX4aV3YrtTkX/MNwhVkK4HYP6yxm9ZwjECBUogPoiyB +BW4wN1yi/78su8vdgAjoMknKwH5hLVGtWVunt0prEUfP4zKFjnwJI7/3iKvEuMaM2es y+dRMcZc5bM3HUFXID9i3QiyQQsveSRIHOLcPjC+dSx0D+uS6wCEe9gYMHrdI7GlMswE JRn+PFRbMv/U7wWQfHcKs9wxQrF0wWPGXW3fJND6G8xUIIZzdPCiS01BkXbTNrcY33UR +l0A== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pRJteGTjU6unOMeXfZg7XjDzKuedaKAslOkcjAGgIUc=; b=5VD9LS6IKeD9e7LcBrNZseTJ+uPbAxzX2zBQwUBBD7xn4dY88kMtsGgFVq+v2PpyLf 2mgTtnC/7iTzcElNY49JUTVPmbIMhqFlNeM6JzE6q13pkQGfFhTV8WHX8hpEf4bWI9Xx ed4z9ufCqQQntAyLE28qG6NAHxiA/8YdcugvuADS6UnBhIZz8+Y86f5de/kiWdcDHiGS wf8+QQe9q6A4d7ttgjLZomFlQF02+7B+pJWU06+xaRWKEPWahIdQNg6R9oPRXNQavKG6 ppDcmWmKb680Sr8yk0IJcG4fXBBG5QkHEl0M3H2JZPqX6WO00WRtIfoSaN3rUGblR8W1 WS1A== X-Gm-Message-State: AO0yUKUEXIZCWCAm7l/iYXJLWUqOIVOqrBvm07gwWtIFDbtt7OT90fdm TVgUNrD8TETIRaT0PaOHP7HDmfTLEQlA7cEt X-Received: by 2002:a5d:500d:0:b0:2c8:50bf:2137 with SMTP id e13-20020a5d500d000000b002c850bf2137mr7352422wrt.46.1677506542237; Mon, 27 Feb 2023 06:02:22 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i13-20020adfe48d000000b002c5539171d1sm7274652wrm.41.2023.02.27.06.02.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:02:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 011/126] target/hppa: Extract system helpers to sys_helper.c Date: Mon, 27 Feb 2023 15:00:18 +0100 Message-Id: <20230227140213.35084-2-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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=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 Reviewed-by: Richard Henderson Message-Id: <20221217173219.8715-3-philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- target/hppa/meson.build | 1 + target/hppa/op_helper.c | 77 ----------------------------- target/hppa/sys_helper.c | 101 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 77 deletions(-) create mode 100644 target/hppa/sys_helper.c diff --git a/target/hppa/meson.build b/target/hppa/meson.build index fb90aed5de..81b4b4e617 100644 --- a/target/hppa/meson.build +++ b/target/hppa/meson.build @@ -16,6 +16,7 @@ hppa_softmmu_ss = ss.source_set() hppa_softmmu_ss.add(files( 'machine.c', 'mem_helper.c', + 'sys_helper.c', )) target_arch += {'hppa': hppa_ss} diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index f5905c9fc2..32c27c66b2 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -24,7 +24,6 @@ #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" #include "qemu/timer.h" -#include "sysemu/runstate.h" #include "trace.h" G_NORETURN void HELPER(excp)(CPUHPPAState *env, int excp) @@ -209,79 +208,3 @@ target_ureg HELPER(read_interval_timer)(void) return qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) >> 2; #endif } - -#ifndef CONFIG_USER_ONLY -void HELPER(write_interval_timer)(CPUHPPAState *env, target_ureg val) -{ - HPPACPU *cpu = env_archcpu(env); - uint64_t current = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); - uint64_t timeout; - - /* Even in 64-bit mode, the comparator is always 32-bit. But the - value we expose to the guest is 1/4 of the speed of the clock, - so moosh in 34 bits. */ - timeout = deposit64(current, 0, 34, (uint64_t)val << 2); - - /* If the mooshing puts the clock in the past, advance to next round. */ - if (timeout < current + 1000) { - timeout += 1ULL << 34; - } - - cpu->env.cr[CR_IT] = timeout; - timer_mod(cpu->alarm_timer, timeout); -} - -void HELPER(halt)(CPUHPPAState *env) -{ - qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); - helper_excp(env, EXCP_HLT); -} - -void HELPER(reset)(CPUHPPAState *env) -{ - qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); - helper_excp(env, EXCP_HLT); -} - -target_ureg HELPER(swap_system_mask)(CPUHPPAState *env, target_ureg nsm) -{ - target_ulong psw = env->psw; - /* - * Setting the PSW Q bit to 1, if it was not already 1, is an - * undefined operation. - * - * However, HP-UX 10.20 does this with the SSM instruction. - * Tested this on HP9000/712 and HP9000/785/C3750 and both - * machines set the Q bit from 0 to 1 without an exception, - * so let this go without comment. - */ - env->psw = (psw & ~PSW_SM) | (nsm & PSW_SM); - return psw & PSW_SM; -} - -void HELPER(rfi)(CPUHPPAState *env) -{ - env->iasq_f = (uint64_t)env->cr[CR_IIASQ] << 32; - env->iasq_b = (uint64_t)env->cr_back[0] << 32; - env->iaoq_f = env->cr[CR_IIAOQ]; - env->iaoq_b = env->cr_back[1]; - cpu_hppa_put_psw(env, env->cr[CR_IPSW]); -} - -void HELPER(getshadowregs)(CPUHPPAState *env) -{ - env->gr[1] = env->shadow[0]; - env->gr[8] = env->shadow[1]; - env->gr[9] = env->shadow[2]; - env->gr[16] = env->shadow[3]; - env->gr[17] = env->shadow[4]; - env->gr[24] = env->shadow[5]; - env->gr[25] = env->shadow[6]; -} - -void HELPER(rfi_r)(CPUHPPAState *env) -{ - helper_getshadowregs(env); - helper_rfi(env); -} -#endif diff --git a/target/hppa/sys_helper.c b/target/hppa/sys_helper.c new file mode 100644 index 0000000000..4bb4cf611c --- /dev/null +++ b/target/hppa/sys_helper.c @@ -0,0 +1,101 @@ +/* + * Helpers for HPPA system instructions. + * + * Copyright (c) 2016 Richard Henderson + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "exec/exec-all.h" +#include "exec/helper-proto.h" +#include "qemu/timer.h" +#include "sysemu/runstate.h" + +void HELPER(write_interval_timer)(CPUHPPAState *env, target_ureg val) +{ + HPPACPU *cpu = env_archcpu(env); + uint64_t current = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); + uint64_t timeout; + + /* + * Even in 64-bit mode, the comparator is always 32-bit. But the + * value we expose to the guest is 1/4 of the speed of the clock, + * so moosh in 34 bits. + */ + timeout = deposit64(current, 0, 34, (uint64_t)val << 2); + + /* If the mooshing puts the clock in the past, advance to next round. */ + if (timeout < current + 1000) { + timeout += 1ULL << 34; + } + + cpu->env.cr[CR_IT] = timeout; + timer_mod(cpu->alarm_timer, timeout); +} + +void HELPER(halt)(CPUHPPAState *env) +{ + qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); + helper_excp(env, EXCP_HLT); +} + +void HELPER(reset)(CPUHPPAState *env) +{ + qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); + helper_excp(env, EXCP_HLT); +} + +target_ureg HELPER(swap_system_mask)(CPUHPPAState *env, target_ureg nsm) +{ + target_ulong psw = env->psw; + /* + * Setting the PSW Q bit to 1, if it was not already 1, is an + * undefined operation. + * + * However, HP-UX 10.20 does this with the SSM instruction. + * Tested this on HP9000/712 and HP9000/785/C3750 and both + * machines set the Q bit from 0 to 1 without an exception, + * so let this go without comment. + */ + env->psw = (psw & ~PSW_SM) | (nsm & PSW_SM); + return psw & PSW_SM; +} + +void HELPER(rfi)(CPUHPPAState *env) +{ + env->iasq_f = (uint64_t)env->cr[CR_IIASQ] << 32; + env->iasq_b = (uint64_t)env->cr_back[0] << 32; + env->iaoq_f = env->cr[CR_IIAOQ]; + env->iaoq_b = env->cr_back[1]; + cpu_hppa_put_psw(env, env->cr[CR_IPSW]); +} + +void HELPER(getshadowregs)(CPUHPPAState *env) +{ + env->gr[1] = env->shadow[0]; + env->gr[8] = env->shadow[1]; + env->gr[9] = env->shadow[2]; + env->gr[16] = env->shadow[3]; + env->gr[17] = env->shadow[4]; + env->gr[24] = env->shadow[5]; + env->gr[25] = env->shadow[6]; +} + +void HELPER(rfi_r)(CPUHPPAState *env) +{ + helper_getshadowregs(env); + helper_rfi(env); +} From patchwork Mon Feb 27 14:00:19 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: 656990 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2369367wrb; Mon, 27 Feb 2023 06:06:46 -0800 (PST) X-Google-Smtp-Source: AK7set+uQjnDd5E8GH5q+k2aITmxO6fqonB40xNd4z6QD676/QDXC4EZ9pZ534TWeltD7vAwhIRY X-Received: by 2002:ad4:5aac:0:b0:56e:b251:a8e7 with SMTP id u12-20020ad45aac000000b0056eb251a8e7mr48493289qvg.2.1677506805973; Mon, 27 Feb 2023 06:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506805; cv=none; d=google.com; s=arc-20160816; b=FqyvrX37tCfrH2DGK+rBp/kBsGZzm1s1/Lmx6DqQgicMYS8qKFJuNIN3tdNQbARHW+ j6EzAq0JOAQ+iICAE9LiZTlO6SXNZ20VWVG9gjMm2iQpCU5m7l+RWWjI6soAtF51M8KE 9xxhXb60k5Heg34UnrK/9NeUa64MwkOZmmXEQxNHakStjBf95RXWQZDXmATpDhHiX91B 7SJa+6R9bjopFx0efWrrv+ph01IqNIAVRdWeVwdo0cN/lq1qon14qNiv+rh768ZiFnnZ 5NeaS7/RBbSNdjHbz7xzZsnSZFZ7lYyMgGYjf2Q0ZPnxl4so4HlyFypYxWvKa2tPSHEq VrXw== 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:to:from :dkim-signature; bh=lxxzLsd3yF3kfI56WcuQb5ERK6fyn4U1SAh24VP+mo4=; b=B+VN13QdmVSTWIpfozWjGIipcNNrEfHrD0g9F0+l3UzuK8Idbcx7h3A5rovYKlJQLp NeUi4WSIrEL5U/crxs3nNGKS9GUgeTJUtly0YAIKeg2IzB8gekX2TzgJfy81NUAYJsps PzaaKbIYW48BlMNygR8UtToqQ8MHs3n5xWHmBXuppT8L3nXiwripQcVi/QbgGZc3nNA1 69mMyTOs9PX/f0sSvDspyD+xiNmykQLsLHQANHCtSsQGZn7e/uXTYlmiflpTz+kW3xY8 JmmFtCF1vLFa5MnueHQQjlS3AjMyvdG8H8lQyJDkEgtoW6y02q9bWBisaze2VtR+2pxC gV6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SokdXwTg; 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 d9-20020a0ce449000000b00572108b4396si6291481qvm.163.2023.02.27.06.06.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:06:45 -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=SokdXwTg; 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 1pWe5N-0004Q0-Me; Mon, 27 Feb 2023 09:02:37 -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 1pWe5H-0003cA-OW for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:31 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5F-0007jz-Vy for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:31 -0500 Received: by mail-wm1-x331.google.com with SMTP id m25-20020a7bcb99000000b003e7842b75f2so3887387wmi.3 for ; Mon, 27 Feb 2023 06:02:29 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=lxxzLsd3yF3kfI56WcuQb5ERK6fyn4U1SAh24VP+mo4=; b=SokdXwTgz0uwQy66TiLT20ejeTrSXUtyvxtc5MmnLDSnKiOYR+xhgwvZq4q8NaZgXt SpwJsbzhFPlb4bjqD+ZWXLYFfD5Mlz6YUByvkC2YAj0gRx/yzR9+eiF3BWC6xJ2fbT4k 6r654/njrolo8DC4drQbI6qJIOstirJJq5A8eZK1LSU1rgSKXlZhM32HxkGDX1/n1wEs kkstsO/P/AjG3ILDvEw09xDdQaKDdhwpEY/QjYrfRH3Dq6W0kJgI8TrJ8C5BBw0H+1PU aeJbCRlQIv9xUte0fXkMhcAcwqQs2Ujac3Uk0D8f9sNqqPMGes06pkllNQts91r0dvdL d6rw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lxxzLsd3yF3kfI56WcuQb5ERK6fyn4U1SAh24VP+mo4=; b=qV4/BbN7EzHpkOgWJfxxHq/W4Akg4CvNeve4RqL0viqnJK7ArBn8T7VqxtlPuXzAEg hTydd87+q6INNIjeourJID632sbRpGGzalzM2MSxHO/cXXpOLDRkXDQ/mwpCvajuyRJ9 5eeK1TLNER8GK4hCezqoB/VQUcaQe8pw7qeS9fWza4rFdW6+Buje263+6V8Jbpb20CsU pP8sBZRLH5XkmUc566uivyYjW6aK/EsjPYxUKw74p12jzp+MWyS4vVSrEX8gCgJ0t1fc 0wM0krHihfmu3SM08xYgDm2hYIHxJVxP1QYopGVeRyJ7eQfhR3s59uJ48Mj3IBnUuXnK ef0Q== X-Gm-Message-State: AO0yUKXkqj76/GrHn9G0w1QZPQcLlfSLodHcT6Ynh0Qa4pC+Pn6f7y+u Ej4I90tYr+ugHgiUIh59vzyYYfF7SxzwdmHR X-Received: by 2002:a05:600c:4e41:b0:3eb:25ff:3446 with SMTP id e1-20020a05600c4e4100b003eb25ff3446mr8484657wmq.4.1677506548129; Mon, 27 Feb 2023 06:02:28 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p13-20020a1c544d000000b003e208cec49bsm19265602wmi.3.2023.02.27.06.02.26 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:02:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 012/126] target/alpha: Remove obsolete STATUS document Date: Mon, 27 Feb 2023 15:00:19 +0100 Message-Id: <20230227140213.35084-3-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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=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 Likely out of sync: last update is from 2008 (commit d1412eb240), 12 years ago. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221217172907.8364-2-philmd@linaro.org> --- target/alpha/STATUS | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 target/alpha/STATUS diff --git a/target/alpha/STATUS b/target/alpha/STATUS deleted file mode 100644 index 6c9744569e..0000000000 --- a/target/alpha/STATUS +++ /dev/null @@ -1,28 +0,0 @@ -(to be completed) - -Alpha emulation structure: -cpu.h : CPU definitions globally exported -exec.h : CPU definitions used only for translated code execution -helper.c : helpers that can be called either by the translated code - or the QEMU core, including the exception handler. -op_helper.c : helpers that can be called only from TCG -helper.h : TCG helpers prototypes -translate.c : Alpha instructions to micro-operations translator - -Code translator status: -The Alpha CPU instruction emulation should be quite complete with the -limitation that the VAX floating-point load and stores are not tested. -The 4 MMU modes are implemented. - -Linux user mode emulation status: -a few programs start to run. Most crash at a certain point, dereferencing a -NULL pointer. It seems that the UNIQUE register is not initialized properly. -It may appear that old executables, not relying on TLS support, run but -this is to be proved... - -Full system emulation status: -* Alpha PALCode emulation is in a very early stage and is not sufficient - to run any real OS. The alpha-softmmu target is not enabled for now. -* no hardware platform description is implemented -* there might be problems in the Alpha PALCode dedicated instructions - that would prevent to use a native PALCode image. From patchwork Mon Feb 27 14:00:20 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: 657021 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373079wrb; Mon, 27 Feb 2023 06:13:01 -0800 (PST) X-Google-Smtp-Source: AK7set908CYMsKpZnsSmDxVUTgiCbxZaiDF084g+6ybItBZOHL4vsqVwIENZZf4/WTMgtS5fSx8D X-Received: by 2002:ad4:5cad:0:b0:56f:fe48:682b with SMTP id q13-20020ad45cad000000b0056ffe48682bmr49696300qvh.15.1677507181291; Mon, 27 Feb 2023 06:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507181; cv=none; d=google.com; s=arc-20160816; b=vnx9pXQv1YE7gf79SdhQBWTx7WqZvdha5wCoWp9qQBoDZJk/ActWGWG2a0/plr1N15 O+dKoCJTy8WUcttoXB6yD2ecRmE0mj5VLzFjStYHh9qLB2l7R7v4vYRauGfiYN01+fYa Xb4Wwuc7ATvVVozvRVMJMTeb1NkfDMHN74+uZFhVDwal7ZLLkrgrSiglWTgWTvHWStEt xqG6FlitX9UjMEFfB3IaXRHuijH+x+OizNYxwmnSUdoEEHZYDbGEkEzVlTm1cWtcnW4w 14iIC6q8Unqy+mB2qQZkc0Cg0yBZ9T8vK2cIc1Q49VJQYzdux7EPTRsP8QvUFidQAP64 kohA== 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:to:from :dkim-signature; bh=9GFKdcMFj1FbbqNf8MLldWaJ19+a9ZLIPHXMk3Oc+v8=; b=xZCTjgchMEtV93tu/x03B+kBiwmyEndM8Ex5pqEAMISZmp07bPySN7QehvLLrI+7Ox grVC8ZRDHdptxUKxeDqvIBDZx30wR/1TFZVGrhtl2D9glzuRMMAvB0+sJpGo8WpXkBWL gXU5trJWbcrWIakoar5op2uTvIMr9DvEpsk/S9TpeztPbVmxAgoc8t+D/ZY+QdqO4NGM 8y0YeA904S0zU6xdicE6jwvl5Bp9j/DW0IVYiUzbsy/5/PWFSHRDqOZwlBFk4R1ayHJC 7Y8T+o01T4K0xgmZXXpROxpOfkcLQK2t0Vit77987F1qJPsab1+26dS21rICgUtKmcBo G9ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pn29liBz; 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 bs32-20020a05620a472000b00742566c8a80si7100056qkb.46.2023.02.27.06.13.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:13:01 -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=Pn29liBz; 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 1pWe5O-0004c2-DG; Mon, 27 Feb 2023 09:02:38 -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 1pWe5M-0004KL-LS for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:36 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5K-0007kC-OP for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:36 -0500 Received: by mail-wm1-x329.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so7219829wmb.5 for ; Mon, 27 Feb 2023 06:02:34 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9GFKdcMFj1FbbqNf8MLldWaJ19+a9ZLIPHXMk3Oc+v8=; b=Pn29liBznCh3bqVJxqECr5BumQu8BUlkpI3mE9+x0hpk6dzhZDMjSwt3AneR1e7lEL kom7tO9oF13fUsuiLTaVRsHxXQg+d0vvlu7ow5P/GvWx3t+rpJGtOyPkDdRK/xJ4zsas FhJRQfuBzuyS30HDSW4LXA07e0m+LwGMlG+8WRHg6qC8Sazi/rZd/GuTqtimyL0i4Kiy oodetQj6TMvojP0aFZFt88n/ProeK1+bV6AYqR0wnvx6FUd2RRPUC8agzMZ0ufWjaHiC I7/5aJfstMD73riOMpmr0zOEF/qV/buxyfxIijrXKq7H6jEFg14AnYkIGUcEH+7ClBmO SOFQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9GFKdcMFj1FbbqNf8MLldWaJ19+a9ZLIPHXMk3Oc+v8=; b=xomgrT7u/5SJ4z6cf2nHWkIGTAnm+tBN+In40787f0fafPjyQF2bzOQUIf0u6uVno4 SAmbJp6eaqK7Ksr4EkjtPGs38yCDxMxsvYFUgEtcWu3dxAMgyNcVZfUxqDJWb3OD3QV9 J9N6vdkF5BMWCybEpFCjVIigU4e9WtCtLbRPfttYJPhVBUoXUPFiACqDH32l5lpR309K 7cm/uK+LRdiw0kYasPK/gm1v42Io3GF5ofX3+owH8P6dgK8IpPis34rcljKXCBzDF8I7 5tBY+7CC2Y2kYdUDksTo+SDZU4fKOoHnIc048aIrwK53cphI/05AqOEj7bS36Hwj1gFz RDwg== X-Gm-Message-State: AO0yUKWQFutRGEgGkVeL6aPyuGt/iGF4jz9c+Rm5s2F4gxc+QLhyUO3G yOjr9YK7DpAcWnhKXwBSADrjdPr/lzl50XrQ X-Received: by 2002:a05:600c:1c93:b0:3ea:e4f8:be09 with SMTP id k19-20020a05600c1c9300b003eae4f8be09mr9823781wms.30.1677506553076; Mon, 27 Feb 2023 06:02:33 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l16-20020a5d6690000000b002c559626a50sm7047023wru.13.2023.02.27.06.02.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:02:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 013/126] target/loongarch/cpu: Remove unused "sysbus.h" header Date: Mon, 27 Feb 2023 15:00:20 +0100 Message-Id: <20230227140213.35084-4-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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=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 From: Bernhard Beschow The cpu is used in both user and system emulation context while sysbus.h is system-only. Remove it since it's not needed anyway. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221217172907.8364-3-philmd@linaro.org> --- target/loongarch/cpu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index e35cf65597..3882e970b4 100644 --- a/target/loongarch/cpu.h +++ b/target/loongarch/cpu.h @@ -13,7 +13,6 @@ #include "hw/registerfields.h" #include "qemu/timer.h" #include "exec/memory.h" -#include "hw/sysbus.h" #include "cpu-csr.h" #define IOCSRF_TEMP 0 From patchwork Mon Feb 27 14:00:21 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: 656981 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2367080wrb; Mon, 27 Feb 2023 06:03:38 -0800 (PST) X-Google-Smtp-Source: AK7set+3TKYYsCjrcGIVUhuVP9ck+E4Z6VEABW00/l1YuAKGxiVMsDpTvamBoXbbkYdpifTftyk3 X-Received: by 2002:a05:622a:54f:b0:3bb:8a14:badd with SMTP id m15-20020a05622a054f00b003bb8a14baddmr15138039qtx.29.1677506618105; Mon, 27 Feb 2023 06:03:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506618; cv=none; d=google.com; s=arc-20160816; b=W0HZJx6WyDB5GuUWF7LVeYNyAm4ch/biewOdbo5ZaScFlhWCbt1vfvlUDrAlYebXP2 nuQvNBx7WKw5Z2QftPUzloLC/ucMb7ri1A/TdQ7WroSzeovUjs4kVBsIZap/Sz4ad5tY HV8tH1jlg9XFa8ZctJU0FCEqCTqbJ7tTpXZyUMqfV/pndWR4PM+zcS4dKEEn85PdLzQW kgoq/maYjrwUhubZNLdvRudRAX8xzLb52JVHaKn1eVuXzo/oKiayx9pGc0FSMgeZKnMR vUNdGVr4gZPKGlyO/CRF7E1yx3jo7QDbLH6zdQDgasIt6b9f5VrLpJug6Jrh52w6SrvE rmhQ== 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:to:from :dkim-signature; bh=dyOSqHs1vt2kt+dP0iK9GebMvSPiNAmBiWh+egaSUqo=; b=cOnZlvzdnQjJpbXJgpKLTddKfiLSSZy8zNmUEWahuJGXLXVg7o0PUDg4os8wC4BtIw lMO6Q/yzin5TYGHYO0uXWTycV38vYi0RIp9dBbk4dFchFUoNBEvGdhLCzsT7C4fTx8jk NlnGq7ORwOUMeu1GAux/8diYxqQKeQwA0ei85iO1tS8gkz/VILM7dGZ6FRo4AVOC12Ti Q1YbS9xKGdkQo/ePkXWkOfyYrbMElDSyTxV7RsEp//H8H5uY5lCX9Qf/i/6duQJX/Kj7 nLtWMmIS2Ug6Slu9WLH2FrxpUFXKTubH9QWeaS+uzj4SX54yatKstIx0KaGdSdNSHBMw dnJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xatNRMwv; 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 w16-20020a05622a135000b003b85d8a96d6si6707136qtk.708.2023.02.27.06.03.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:03:38 -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=xatNRMwv; 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 1pWe5b-0005ft-Ip; Mon, 27 Feb 2023 09:02:52 -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 1pWe5U-0005YE-0Z for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:47 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5Q-0007ls-AY for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:43 -0500 Received: by mail-wr1-x42c.google.com with SMTP id q16so6355546wrw.2 for ; Mon, 27 Feb 2023 06:02:39 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=dyOSqHs1vt2kt+dP0iK9GebMvSPiNAmBiWh+egaSUqo=; b=xatNRMwvWjy/uGgrBVDh5KVFZjhCFNn+ojsaEin6g8dbamJ7I1qhinKPwE2GXrZGJA Ucadwv6mhbu95gj4xZgCPQDqfNM/u9vjzKAAv1hYY/SXuzQ7uAXWj0cgXJvGiH2UQKpQ LYPTltYnMCAXaINmezsyEasjy7BcKLW3MbKE9xMuESXZnjwXLcL1RF3cmYIjh0+Lo+kj KRdgDxYrk7zdxeNYpkJZ/Rq96z6KJW53DDU2YZI7ilTdB5+enFWMlTYZlw2EACpbQfm4 iSmhmxaEeXGa/YEfZjFRAilkgri7nsXHe2R3wcRzS8xsX/Djn6NZEhPz6rUfMb64xd2I 7Oqw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dyOSqHs1vt2kt+dP0iK9GebMvSPiNAmBiWh+egaSUqo=; b=lvI7uw+B91xhpm8V7I8Idai6e30u6wIWYtD8pWSMxUoC8a8OKYntqbu2EaWHeLUKbo MNeWdU8VoGYnxFeR2pWCKnAoSOKpLcFQJDo4Kbct0zrw0xJnHmZo/sT1ovRO7RnvlW6X F4XEJXkgR5E72+UFu8L99v8JTekFreY0SOT87dk0dQ+Sow+V50Jtc2hTxj0bJbFbsv5Q SQ7zohC5LzUYm12kpHcu40r+Xg6yYfQfkOmJDKPQzQLYuJ6y1URp9PQwksrw1xs9mCQE 3FjtUGVKk2jv9a/JZjdBQQZT2qs4qAQ9uxS6on9HCGt3WwHH+rsJA1teMKVIoir7MDnD QeoA== X-Gm-Message-State: AO0yUKVOW3dK/rI0grSznvgNT0O0nlVVA8QTimJaB1+EERuu/pzA8jVK ujNbGKO+8oSnEemWTlhShr+jS3iV3Druq+uR X-Received: by 2002:a5d:4905:0:b0:2c6:e7f6:49af with SMTP id x5-20020a5d4905000000b002c6e7f649afmr17919688wrq.27.1677506558758; Mon, 27 Feb 2023 06:02:38 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id k11-20020a5d524b000000b002c573a6216fsm7030812wrc.37.2023.02.27.06.02.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:02:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 014/126] target/loongarch/cpu: Restrict "memory.h" header to sysemu Date: Mon, 27 Feb 2023 15:00:21 +0100 Message-Id: <20230227140213.35084-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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=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 Missed in 0093b9a5ee ("target/loongarch: Adjust functions and structure to support user-mode") while cleaning commit f84a2aacf5 ("target/loongarch: Add LoongArch IOCSR instruction"). Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221217172907.8364-4-philmd@linaro.org> --- target/loongarch/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 3882e970b4..d60693fafe 100644 --- a/target/loongarch/cpu.h +++ b/target/loongarch/cpu.h @@ -12,7 +12,9 @@ #include "fpu/softfloat-types.h" #include "hw/registerfields.h" #include "qemu/timer.h" +#ifndef CONFIG_USER_ONLY #include "exec/memory.h" +#endif #include "cpu-csr.h" #define IOCSRF_TEMP 0 From patchwork Mon Feb 27 14:00:22 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: 656989 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2368851wrb; Mon, 27 Feb 2023 06:06:02 -0800 (PST) X-Google-Smtp-Source: AK7set9pTAugvJruXTtsVCkRKOXNmO4+qUUKREuVR8X5ITWcvJ23+ZbeUqDTFJll8a7xOS+cVgMO X-Received: by 2002:ac8:5895:0:b0:3b9:bd05:bde1 with SMTP id t21-20020ac85895000000b003b9bd05bde1mr27808124qta.8.1677506762624; Mon, 27 Feb 2023 06:06:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506762; cv=none; d=google.com; s=arc-20160816; b=J90+hOxBZFaWe8GWt++XciaAxXYd219HgCwC+tfW5L938Tay+qfEQM+sIaJWA+bJuR 4GafUEUVo3JFYRconnr+TA44dBNvtCjYNwr7pG/C+uha9vFSPRNG9MzewqIGbg4lKpbt dKwhNI8ODeSvy8q62wkFScBrIoso8rpUIe2WtVUPteTfkl4Ep123jZdYUa6kNq1Lgl39 3uL3LGFlN7wTZFt3Q8iIqVYuyLRXk1i6aquIqT2sj1YIlfIwFGHrbibM5LU3dSUKySo8 UWVsSnwl1KDrbKDiPZ78IkCJL3+8CvU5GANru/WgzhHeA/GsVBM2dZ3iMuRDqYiZAhdB 7uhA== 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:to:from :dkim-signature; bh=5G5C159PYFBj84gcvHOzkkmU2rOSmahVuhSDYc1h7Xg=; b=sRveZR75sPJZ+5uIe6GC/z/LZxolZImenDrA1dhnF8VyOzKQyJQYWiwJ4CIR9f9jm+ 0Q6XQ5GHdcyfXSS4z5vGm4pHdQdPQfOm5bqCpljaFOz0m96VZeEN1J30osXOiiB1E8A0 COQytjPMTWBEmPEICCsVD1UHnxF59DsCnI9iCdN4A82KvqwneZrwdEU0zERraeUNZRU6 HwAibMeJK2llARWddBhL3OQawTJ9WY/so8qnocmIAM4fEGxibpvEfS8AKyAjKq1RREek f9/eF+FgfBR8Aag8mlv6SoeUcSrRU9gahSA9VDVjqFHGKKfk7RZFyFmpPeBe+gdpmHC7 Nacg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KdUZki1f; 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 t3-20020a05622a148300b003bfc4664a75si6563772qtx.795.2023.02.27.06.06.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:06:02 -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=KdUZki1f; 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 1pWe5d-0005oF-D1; Mon, 27 Feb 2023 09:02:54 -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 1pWe5X-0005aP-RE for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:49 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5V-0007ls-KH for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:47 -0500 Received: by mail-wr1-x42c.google.com with SMTP id q16so6356007wrw.2 for ; Mon, 27 Feb 2023 06:02:45 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=5G5C159PYFBj84gcvHOzkkmU2rOSmahVuhSDYc1h7Xg=; b=KdUZki1f85S7vwSomeohgLOjcBziFnF7RklkFygeGbmhJ8Fo17KxNR1sNdCaIBcjDK 8m1isKsWNvBzST6LBV8q8M8o9P8JIF6ND2rJc3Car8UxDjWOJu8+46eMa9HasnUOn/1j jG2BtuVTcgtgT+xqvjE9PNuvHXC4DXVBqBLw6DiCcgEGWqlPHF/EOwH+filETgCCmBVd PuuIG4i9qsnP3MWEDO3Zx6UHhqK28Z45Ba9BXARkusxj0V3FhOZjZcoS5b9ASsPWfay7 H0drE2X2g6ueF+FVfrFmM/xDT+4IyR9I1AzZMc7ZUN0fspPnR3P7DUBez1qC0Pu1oh9K CWuQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5G5C159PYFBj84gcvHOzkkmU2rOSmahVuhSDYc1h7Xg=; b=D3pE1dGSdU3PdTuFeumoot8zu3BAJiKLOOFSUqPkoBWVSmobMfp9GBLwlWp5cVm7rw Af4Fio0HcVUthotAhTUnjZybNLuzmiuUAGTo6sJ+kGLwfdh+0DlCrCsAt1iE3GKZSJZn 76/VrtcsbtwjpVI3LqlW/tX/ISEGpyYUlp+DIfFLGHDTW/DlXoFQwPlyQaQohmSAQqsj l8GZQIU1GHTjlvxCPdbjNlFSNIQD+IN5SBv7Kj2YkSicnV8GkZndAXp7OduGCvtGAiDg 5PhMogpIsMukPVOjkjZ9XmkdE5E3vjdCGw6CjyQACbITlPjowPlu5Zt0r/dNmRsIL6St 1WJw== X-Gm-Message-State: AO0yUKUq7uKoIfFmfyy6MPKU9mZU3qG1WyTOirvu5t6wq/wIX9zBOFeE Vu1KWebS25EpohnaF9zNZha3t3mANbzLxiNG X-Received: by 2002:adf:ee85:0:b0:2ca:c865:51b3 with SMTP id b5-20020adfee85000000b002cac86551b3mr3455459wro.12.1677506564387; Mon, 27 Feb 2023 06:02:44 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j12-20020a5d464c000000b002c71a32394dsm7232764wrs.64.2023.02.27.06.02.43 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:02:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 015/126] target/ppc/internal: Restrict MMU declarations to sysemu Date: Mon, 27 Feb 2023 15:00:22 +0100 Message-Id: <20230227140213.35084-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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=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 The 'hwaddr' type is only available / meaningful on system emulation. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221217172907.8364-5-philmd@linaro.org> --- target/ppc/internal.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/ppc/internal.h b/target/ppc/internal.h index 337a362205..901bae6d39 100644 --- a/target/ppc/internal.h +++ b/target/ppc/internal.h @@ -242,9 +242,12 @@ static inline int prot_for_access_type(MMUAccessType access_type) g_assert_not_reached(); } +#ifndef CONFIG_USER_ONLY + /* PowerPC MMU emulation */ typedef struct mmu_ctx_t mmu_ctx_t; + bool ppc_xlate(PowerPCCPU *cpu, vaddr eaddr, MMUAccessType access_type, hwaddr *raddrp, int *psizep, int *protp, int mmu_idx, bool guest_visible); @@ -266,6 +269,8 @@ struct mmu_ctx_t { int nx; /* Non-execute area */ }; +#endif /* !CONFIG_USER_ONLY */ + /* Common routines used by software and hardware TLBs emulation */ static inline int pte_is_valid(target_ulong pte0) { From patchwork Mon Feb 27 14:00:23 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: 657038 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2374832wrb; Mon, 27 Feb 2023 06:16:04 -0800 (PST) X-Google-Smtp-Source: AK7set97JpW57+ZgE8R+pkTI2URM2QUK6c5P+crvC+qa+69wM51QSdlYl5z0raXFn72DrarKtlK5 X-Received: by 2002:a54:4005:0:b0:384:3ed8:29be with SMTP id x5-20020a544005000000b003843ed829bemr476909oie.37.1677507363837; Mon, 27 Feb 2023 06:16:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507363; cv=none; d=google.com; s=arc-20160816; b=V0aacQiJ8ZTxx0Bi35iBfVbaEU6uxcruozNc+XqWobZIbDcORHhkkNdHLHlUhjXRcL MvMJO+W6bdY36Vk7sdoXGJ2RvpvvVfryE/eA0xyLnwb4nStIiQHrl68y4PlAcQg22n/t xSHx6rTo2I4+94mJANgvoPwLTJFSih3LvZc/Yjd6eP5Z2gWrMddcttMkhj3iacllvOTW WJVSjaNeBlFjWQIqI73tz1e24Thg3sIS8TttzHNJ5XJVy9l88uuOnFgJpkGbAiczpf87 w47vOVGITlByydh7taheUqXcap9GxxBbuIXebJsICuAAdBj23DLmOcscJlUmpR3DB70S jV1Q== 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:to:from :dkim-signature; bh=OzWzaioajWSO5A1qlKtPG+UbJxPA3WTaVWjRJY3kTww=; b=W+FMfQ0GxRm0EU4ioNUVzTL8PmBOOHordgOwWdKzV9KhjioIhHPDe3FiKnO5htCjdc bhDZ5nhkv+Bqfx57xzzB24IniPA3ML6LmRH15aRyz2+gaASxW0uIFG8QPizi02a3EjzO 9jNKp0IY/33fCokAoRgAh2NduwPmtJ5qRU7k+6DfvqZBOMU59XYneKQ3ejbcxi1lEl0V PjqUIe7PRB+YOu1QreO02/Ueh1Fe7RBdzpZ9gKRJMiT32vYMYIcoCAQ5rTHQdb0S0VcL adbdJVcyGsqyRg0fXewiLPoWthFwTsQKr2FVk2MD8Nz6SPIoyTgxFYjTPD+3WFRJGlua jWew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=skcorPZK; 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 bj18-20020a05620a191200b0073b338a9ad7si6514153qkb.572.2023.02.27.06.16.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:16:03 -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=skcorPZK; 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 1pWe5j-00066V-DR; Mon, 27 Feb 2023 09:02:59 -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 1pWe5d-0005u1-IP for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:57 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5b-0007mb-Cy for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:02:52 -0500 Received: by mail-wr1-x42b.google.com with SMTP id r7so6337359wrz.6 for ; Mon, 27 Feb 2023 06:02:50 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OzWzaioajWSO5A1qlKtPG+UbJxPA3WTaVWjRJY3kTww=; b=skcorPZKIZCv01EVMQySJB0ARqk1y4xhHGoffVokrjDQZ0aYD9uJyeE+/nJEeGQbA8 zxXu2RQZUXvoKu7FAHH8DMLRuRqczcyjACsno8feVybJGB0aJmfoKEBfdcV//vsLivZf pmhcBGnG9+HWdzXDKf9xmD8pIDGtnJomwk5BMRYgUQ0ZBrVYQLe29HrzKLrrvTN+9jQ6 mSHsqAtgpy9PnMkRnH45Ec+BoZbhVpcQU+lXAjb+jDnIHNRhI6BcEI8HWxXv9UP4rYYI 5xgW/9yAVrmRbdfEOSZ8ATVoctU5yyQAicqFvObX/wgwzXlfyo1tp+rVMAR30HgCjyfa Ke1w== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OzWzaioajWSO5A1qlKtPG+UbJxPA3WTaVWjRJY3kTww=; b=ODxFJOi9JCmqf6Z3IprI5dmzCFa3o7zy6FdFhGZwCBWNS0CQMPDcfH1x8O8e+gxAbu 3Ae5iA9zIwluy5olF9/7ErlyfZbnxEP6cmkUnQFsVhhUZqDi2mjS3mzCXSA/hHZTHcHk TFma38HJq3kpSDwcWIjXCuPyKuvFtIpDsIx828aDm7PyYCUadlra77t7pd5fUnEMcSxN gndXdHX3dcSbGrMgvDb66PoWh6/cVyKFFLD9Qnvag4mcOemLFApwZ73eIw1HTh0Q5Mwm Qw3bfhHJUyD186yk7siuz+U0ocrHQBXjMGusTUlzVfUiR25rnvN/TPEJmCdmbVfLMyJJ bzXg== X-Gm-Message-State: AO0yUKXdT8AL0mKfJa44mJ8QaAZo1Gd92PAF6PUbrWYIYe7GC0iPO5ij Bh5N2vhRytX6nPzC1NP8ClsoubddPw4TVGFr X-Received: by 2002:adf:f48d:0:b0:2c7:fc9:c51c with SMTP id l13-20020adff48d000000b002c70fc9c51cmr14502215wro.9.1677506569583; Mon, 27 Feb 2023 06:02:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i14-20020a05600c354e00b003e91b9a92c9sm9683708wmq.24.2023.02.27.06.02.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:02:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 016/126] target/ppc/kvm: Remove unused "sysbus.h" header Date: Mon, 27 Feb 2023 15:00:23 +0100 Message-Id: <20230227140213.35084-7-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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=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 Nothing requires SysBus declarations here. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221217172907.8364-6-philmd@linaro.org> --- target/ppc/kvm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/ppc/kvm.c b/target/ppc/kvm.c index 7c25348b7b..78f6fc50cd 100644 --- a/target/ppc/kvm.c +++ b/target/ppc/kvm.c @@ -32,7 +32,6 @@ #include "sysemu/device_tree.h" #include "mmu-hash64.h" -#include "hw/sysbus.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_cpu_core.h" #include "hw/hw.h" From patchwork Mon Feb 27 14:00:24 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: 657008 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2371109wrb; Mon, 27 Feb 2023 06:09:29 -0800 (PST) X-Google-Smtp-Source: AK7set/IpzCihr56lSR65rcROyXk70CkIqSFmxsysXKDUa+aVxRmor23I8HPmELPOyQtO4pCs02l X-Received: by 2002:ac8:5fc5:0:b0:3b6:3995:2ec2 with SMTP id k5-20020ac85fc5000000b003b639952ec2mr30545312qta.19.1677506969807; Mon, 27 Feb 2023 06:09:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506969; cv=none; d=google.com; s=arc-20160816; b=PGwDp4AmaI4FEftI/h6qZ7JFDdfK9hVtFc9Zj0tRrHntchPud3eN5ujpsy2cLidrFk kOzVY7dggl/8YawqPpYuNbpg2cfEFVMUi6OTYsN5GNMnNABGi5t7SrN/pqqaKFtGYW0M gGYYtBqKnvmAZHKId2k0nhL4OiikZVYfHjmvQtT0ef5WbT0IA0q0NTkUkfj4AekWIuMd 8GqWogWKKYztfk4VFiWbszOdjO7Q09lqNPMb+uF3UHgh0qxHjv+GmGWO+ubNYw3EwPdP tnQ7kEdPI4IpsgNLHcA6ZpiruR/79ETJFqD+A69KpmUmxQUka2ETy7uwmxFsScT1KwUy HRTA== 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:to:from :dkim-signature; bh=CnNTwGg0MOHmmdkp5WuNV0U9bN887LNmRf50zWb625Q=; b=v8ifpysNdyN+Zt74k3HLxn7kuQd6/kO0GVFyDbnX2V51/Q9OdEawU4tlmulSQw8DKl vH9B4QKVzfdQ1ntPdpw+3Eyurn+bZFUg3RLpvc6UMEWdPwDVQNVPpcXfNBTKqdVHmv0a 3wXy+J6+1evlZUwjFSIdT9svhZiUIXHMXj5lFnC+OClMFj028p0TohNjlKIZxgXcKBpe 1C4N9h5+6QkrkLKD3T7qmCrNyOb4odpWQlS1kvi5umEtqNU+BFntGM1va9Wp4Lc/RZSF An0o4VCOh7moBPNYGl1/3HwzhQUHFhaZKsuoMymQf9euK9fFABLzizO5DTjO2O9m5Gpn vzrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FvMEFzMD; 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 c2-20020a05622a024200b003bd1bc10387si7040358qtx.796.2023.02.27.06.09.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:09:29 -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=FvMEFzMD; 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 1pWe5n-0006bR-Kq; Mon, 27 Feb 2023 09:03:03 -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 1pWe5k-0006GH-J1 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:01 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5i-0007nM-Cm for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:00 -0500 Received: by mail-wr1-x42b.google.com with SMTP id bv17so6344495wrb.5 for ; Mon, 27 Feb 2023 06:02:57 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=CnNTwGg0MOHmmdkp5WuNV0U9bN887LNmRf50zWb625Q=; b=FvMEFzMD6nP31jvey53rzuudU0DLaM0R0Vcnn6OAGpsytt1sbW+ps5824Hzpub2G8V uM1IVbbrya90jYjjwHm8gaE/3+aTSIz2BEm05vZuJ0PptKzKD+dtpJA5g0c0yDfanvOd e3WvV25WRDLSAj8GujXb04mhCdyRMSsxgVw8LohnwAjfIGhREqPiCsiL8xQUXEPq28ub +fBCY0c35H09jm63Kuvt+mGNHZKLXG9EiLYkZF22/WgbnkRnTN91GE2Rou4MPbBB3/8P EaW8O9Qjlr8BBtqNZwyWdOjxgaXGHmxP/QZEWV5zXcUsJTNiq1KlJNjxWTk/GnVyZrYH Vqiw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CnNTwGg0MOHmmdkp5WuNV0U9bN887LNmRf50zWb625Q=; b=j57yhCdFGeVZUqEN1eD78opxmy9svNzQRXVX23iTi4CZwMBfhQPAoRGEa3dq1zekMU UOtqHL5hYwlkwZrUey7/nVgU9n/dgY6+OjIsHvsQMYxh99MC9cK0lKhZeuVMRnnDfXY1 JBcYU39+B5NsX2LUSFiQ+6fp0bxrMyK+vBIDRkckSbV1lsEdGwzw3T7gNKQSxScUlf6M UsAFvw0lRoi9FPuEeWcVzZQbJJIk4qLMMQQpHVBfQSJLZjzP4AulRmcUL382bKxos004 zCIQxGamYjnAqaOUyzXRgtewEErJaWkezJWtXXKj5co3RmHcuNAcdd9oZK5N4HFdbQie Bfjw== X-Gm-Message-State: AO0yUKX+/Ceb2V/7CCdvRT7BrGozK/XAIOdV0WFosSur4D4mnWpdQUR2 Jdc1dJYKA9iFUn+oR1PksNlijvtGGwLmCd9H X-Received: by 2002:a5d:6990:0:b0:2c7:ea8:8afc with SMTP id g16-20020a5d6990000000b002c70ea88afcmr14401929wru.59.1677506576457; Mon, 27 Feb 2023 06:02:56 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id v16-20020a5d4a50000000b002c5526234d2sm7304998wrs.8.2023.02.27.06.02.53 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:02:55 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 017/126] target/ppc: Fix warning with clang-15 Date: Mon, 27 Feb 2023 15:00:24 +0100 Message-Id: <20230227140213.35084-8-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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=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 From: Pierrick Bouvier When compiling for windows-arm64 using clang-15, it reports a sometimes uninitialized variable. This seems to be a false positive, as a default case guards switch expressions, preventing to return an uninitialized value, but clang seems unhappy with assert(0) definition. Change code to g_assert_not_reached() fix the warning. Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230221153006.20300-5-pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/dfp_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/ppc/dfp_helper.c b/target/ppc/dfp_helper.c index cc024316d5..5967ea07a9 100644 --- a/target/ppc/dfp_helper.c +++ b/target/ppc/dfp_helper.c @@ -121,7 +121,7 @@ static void dfp_set_round_mode_from_immediate(uint8_t r, uint8_t rmc, case 3: /* use FPSCR rounding mode */ return; default: - assert(0); /* cannot get here */ + g_assert_not_reached(); } } else { /* r == 1 */ switch (rmc & 3) { @@ -138,7 +138,7 @@ static void dfp_set_round_mode_from_immediate(uint8_t r, uint8_t rmc, rnd = DEC_ROUND_HALF_DOWN; break; default: - assert(0); /* cannot get here */ + g_assert_not_reached(); } } decContextSetRounding(&dfp->context, rnd); From patchwork Mon Feb 27 14:00:25 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: 657026 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373177wrb; Mon, 27 Feb 2023 06:13:09 -0800 (PST) X-Google-Smtp-Source: AK7set+4NKyFWB4PfcY024c95SHkLMGVk74InnUtWtz9DjMM+exEf/Ci/0KfU9xgTdDpuN5No0sg X-Received: by 2002:a05:622a:81:b0:3bf:daae:7f34 with SMTP id o1-20020a05622a008100b003bfdaae7f34mr4284142qtw.41.1677507189434; Mon, 27 Feb 2023 06:13:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507189; cv=none; d=google.com; s=arc-20160816; b=NiZIy5Q8XBwAnA3WuWh6pZICov96yOGw/0hjml+6O3rjP+ErNucL5sKp3i46rrEyen UDLTYXyVu/P081W7/KFe3rkIO93varMkP4tCzCjc4PU1C7laFqlGUHC78obOWJnWalvF Yo074aOteKHgwmd2xduhWUlH02wX4HshXEbbe1i4a56kQPlMQa7a/gBaii7wSTCGf24Z CMjW55ibAl384wC3n2kBRm00LExaTjav401De7mOtEFZ5LJTKv2ZPym40/DP9w3NpwNF 3waUtkNvy8qrDTGEyfccFlU0ysroieRxm64uph/ob46ecTS+MWS+BCH7epX5nyUTezEn F5Og== 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:to:from :dkim-signature; bh=Euo1mVZ9KQXkgUiufbSnGXc0i86rjJnd2lRq6TKk/1o=; b=FtYLDP1FftN5BVT0uk+2FRGINtr+A0ihvGxg3noAn7wcUqPA7wsojJ0bv0a8ftggYE 1SwP/VV4Bmp3IaxzaPElJkyz4+eorr1Bd3OGXAX7DoJ2xIseho9Pvs0C2dZ7ib9PPn5K 9vMeJzI2TQvPYD3YApCxs/JCYG2Mfzizf1+4vZ7KMrDB7o3/LCx+o3XRVmucB2WMlRp0 tNcj1p5TRohjGOZ6P6y9US6J5afr66tZaKx+of5YeVwSbEPPhkOaHzjOXjy+XqoMtV4a 74bVmaOTB7uXCkoQk0kF4f0NeTHt39QOEO/V7WHb6NyTaH6ywVstT3ThXXjDq6bW8mbL srFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E0RRjZnr; 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 j18-20020ac85c52000000b003bccff19a72si6728685qtj.486.2023.02.27.06.13.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:13:09 -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=E0RRjZnr; 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 1pWe68-0007BG-Tz; Mon, 27 Feb 2023 09:03:25 -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 1pWe5p-0006pB-Qg for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:13 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5o-0007oR-0b for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:05 -0500 Received: by mail-wm1-x32e.google.com with SMTP id j19-20020a05600c191300b003eb3e1eb0caso2597366wmq.1 for ; Mon, 27 Feb 2023 06:03:03 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Euo1mVZ9KQXkgUiufbSnGXc0i86rjJnd2lRq6TKk/1o=; b=E0RRjZnrRwwziaI2CnaIHuFEfLmr2FzdKF3m86mnBPsxHTyAWUK/5NOAdFJ03Exx2r ozBH+VpHJplyJyWqCSxXmkAP1nskiaZuSW+Lg5WjBJBe6Iyi3vESMwHtBDT0i7jP2YS7 UW6rrtY/Knvp5PnM+3Dw8dx6bhpW+cS7BHQO/XJ8BnZfRs4X0CSB+IJKWhn1L8Tbq0uN WFlm1VCWwC6XbB/StvwXz8ZrHt1ZhHpHbSmWwKpDXccfgqWZGq5xK6fK3IVfzuj6irju Xf/YX+qIay2AbDHD0jtPJgVy/9L40Dwx1QhLZQ0ERrZ0t22DSpPl7GOg2l77j8pwHFfH eRlQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Euo1mVZ9KQXkgUiufbSnGXc0i86rjJnd2lRq6TKk/1o=; b=Y8uCK5nku5SaR3aH24hn2AruXe+XjfxD33HNDmwlrT7R7WZKJrkSGyANHmGv8sDesT hI3tQ1eb461JRrHVyeUf5vhPo5lRkp8j9BhBddb/i6Xtvv6BJwkyWo5RQnm9tZZdIp5K Max/5sknqHzj//DxfY1+sFR29szlkuOBy3mXa0nlipFWB3cf/WMkk+WH0cL5bOrIYt2V 2FqC/ndmoogk4oGzr2Mfm9MuHizJ3weJZItguwhARk4U25XOBzPUrSb5FsPCK8i6t/pm CZPeydLiLV/OJgZX3dwhZkyAzxbLflP2kCHNa2LySIwis4QHq7JpHwN2IeBw1dprmfYu Xhaw== X-Gm-Message-State: AO0yUKVA7mAd2Mk/b30rYLRCmp5qVVUvVUYVImNiDhR8n/xgnSp7lKuM KcTdM7pt7fK15Jk1GHgpJxrJlmP7Mj08r18L X-Received: by 2002:a05:600c:331b:b0:3df:e4b4:de69 with SMTP id q27-20020a05600c331b00b003dfe4b4de69mr18232984wmp.27.1677506582217; Mon, 27 Feb 2023 06:03:02 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o19-20020a05600c379300b003e2052bad94sm12628345wmr.33.2023.02.27.06.03.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 018/126] target/riscv/cpu: Move Floating-Point fields closer Date: Mon, 27 Feb 2023 15:00:25 +0100 Message-Id: <20230227140213.35084-9-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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=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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221217172907.8364-7-philmd@linaro.org> --- target/riscv/cpu.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index d8e72c3e7c..31537fc05f 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -148,7 +148,6 @@ typedef struct PMUCTRState { struct CPUArchState { target_ulong gpr[32]; target_ulong gprh[32]; /* 64 top bits of the 128-bit registers */ - uint64_t fpr[32]; /* assume both F and D extensions */ /* vector coprocessor state. */ uint64_t vreg[32 * RV_VLEN_MAX / 64] QEMU_ALIGNED(16); @@ -163,7 +162,10 @@ struct CPUArchState { target_ulong load_res; target_ulong load_val; + /* Floating-Point state */ + uint64_t fpr[32]; /* assume both F and D extensions */ target_ulong frm; + float_status fp_status; target_ulong badaddr; target_ulong bins; @@ -379,8 +381,6 @@ struct CPUArchState { target_ulong cur_pmmask; target_ulong cur_pmbase; - float_status fp_status; - /* Fields from here on are preserved across CPU reset. */ QEMUTimer *stimer; /* Internal timer for S-mode interrupt */ QEMUTimer *vstimer; /* Internal timer for VS-mode interrupt */ From patchwork Mon Feb 27 14:00:26 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: 657018 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373008wrb; Mon, 27 Feb 2023 06:12:53 -0800 (PST) X-Google-Smtp-Source: AK7set+/IY3pEjjxtB2pB4MaeoaKgQHVM7dLGjDJfrPUAlQlSGkjq2uxj9NQ8SCfcgzCcvn99Zmp X-Received: by 2002:a05:622a:19a9:b0:3b8:6ca4:bb23 with SMTP id u41-20020a05622a19a900b003b86ca4bb23mr46525626qtc.15.1677507172914; Mon, 27 Feb 2023 06:12:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507172; cv=none; d=google.com; s=arc-20160816; b=Ig8EZuKUlbwTa7aY3aozUetG172Mx5wurSb5ZnUuaIcWJNVcR2qEmrv/JUoqrsdZg5 AUBit1FJO4/lijpVIDe3OUbjIKnRxK0bPF7KRrY1dO8metJTaYZHMffl36L8tKLqCrr5 DOs+RWaDv3bmtBfCQCtIxEyNFaPqQO4KbvGi8UNFzNLhgZT2m8gw3UemvqZGpg4wkGKv XlaWXZA875YP2rji98p9lFi6M6rwnbOLM/3JSfTD1ArH52uuRdkHD2i1fcv34Yzyin23 gmq3bOM3ggyWKfeuTjOum1bMItwq61sSJKxw0po0waADtAOU22zJbFP/SmYx0ccgFkjL w1Tw== 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:to:from :dkim-signature; bh=qzq0cAFz/OvWPTXETUgRuS+JIwKOxMmsAnQXufewz8Q=; b=xTpbM2qyMnKUzNkPWPOL20tsyvy/4SVTG8dfzNIdeaLpm7VRvVFp90qKjQL248GBAp VZ92RQ8tFDgY9ZrkaHLv0kb4ktxWcYLSt+7n8YECm7c2lYfsaNeI3bACzv3ObGP5MlgJ 7UxBWcXRhIRAl08igM8qtNtc5pFaZnclugDxfHI926fzrHdjVBnSA42eY1ltuuEOzlSx 7p+POlyHIB6Y4rjhzaM4Ubx03z+/e0lpC2JScCccm0QnJ/iJXbOYuutvwv7LfpF5u7p2 b5TGyp6D7Bqb4NCHHuguOIJ+1jGcvoPU2NY1EMhD4lJnMIrewF2PPL30aMZkxcIbPV/l SZ8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jZMBEVgZ; 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 s14-20020ac85cce000000b003b6897946basi6852157qta.664.2023.02.27.06.12.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:12:52 -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=jZMBEVgZ; 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 1pWe68-0007Aq-Te; Mon, 27 Feb 2023 09:03:25 -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 1pWe5x-0006vw-6t for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:15 -0500 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5t-0007oi-US for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:12 -0500 Received: by mail-lf1-x134.google.com with SMTP id t11so8708221lfr.1 for ; Mon, 27 Feb 2023 06:03:09 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qzq0cAFz/OvWPTXETUgRuS+JIwKOxMmsAnQXufewz8Q=; b=jZMBEVgZHYpvDDDZDD3+rLVeBwpviInD7suyeE0MJJ+tCeiAXzHoorE+azOkoI3ofA 0IzlfyZqaMeZ/wnty5sY11yz65O0qXNPMqc5xaXIUJjjlJfgNByn2nldGjmAWAC/3I2s XPJ72on+LJJkPLN4qfzastSxwzV6EXjJ8ZovHJv32T1d9+t6mOlcXi8oLWJsvC9e2IhX pKSM4y1EE/phSGNFw2mwlSWUzw9pTY9c1cPonoqqbRez1RzN/ZbfeLuKQcNaisQ9CmRc C8fM+moGPloycHk8NghAlwYh2ZEE3sFIq6lpUh4pW1VKUo0eFMD2DCHoWyKt7a4MkVoB pgRw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qzq0cAFz/OvWPTXETUgRuS+JIwKOxMmsAnQXufewz8Q=; b=NkX28begoch0VbjhDaDJS+NZN3HpKhSN426S6pWgPIsE2vk/1e18HgOoHQz5Z1GrJP Wp/39wRHAp7GnSW4vH61XCWYqHjvzshU1kP7aSqkzAvRma80duEig44OWaYn+x7mwOZU rDYmP3zk59KmVb+G41nXDgNhyA+OUDOCuu89QyYVWHIecnhJx0Vy/AEmYWnUchXOvHj/ Gy+gy5rdtt7XZw6CSeZ2vHs5thKQ+Kcpm+1OCmqB1e0YwjHltXF3rwzC6jGDRKzKMkCN oEiLj7E+MTejwqGGHC213589yfMCa9WH1pnPtkE/iEkKS77v1pkwXWPUg1dVJgmhZNpO 97Sw== X-Gm-Message-State: AO0yUKUB2QZ71EGUR+XPh1kl1ox2kHvJFE5GPHXepD7ieO3WJpFoOZ9a OVtJmpx9HaTunvu7vYcQUQH7IKYJKqtD37GX X-Received: by 2002:ac2:5623:0:b0:4b6:f08e:1196 with SMTP id b3-20020ac25623000000b004b6f08e1196mr8648362lff.11.1677506587358; Mon, 27 Feb 2023 06:03:07 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id d8-20020a05600c34c800b003dc4480df80sm13617161wmq.34.2023.02.27.06.03.06 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 019/126] target/sparc/sysemu: Remove pointless CONFIG_USER_ONLY guard Date: Mon, 27 Feb 2023 15:00:26 +0100 Message-Id: <20230227140213.35084-10-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::134; envelope-from=philmd@linaro.org; helo=mail-lf1-x134.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=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 Commit caac44a52a ("target/sparc: Make sparc_cpu_tlb_fill sysemu only") restricted mmu_helper.c to system emulation. Checking whether CONFIG_USER_ONLY is defined is now pointless. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221217172907.8364-9-philmd@linaro.org> --- target/sparc/mmu_helper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index 158ec2ae8f..6e7f46f847 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -924,7 +924,6 @@ hwaddr sparc_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) return phys_addr; } -#ifndef CONFIG_USER_ONLY G_NORETURN void sparc_cpu_do_unaligned_access(CPUState *cs, vaddr addr, MMUAccessType access_type, int mmu_idx, @@ -942,4 +941,3 @@ G_NORETURN void sparc_cpu_do_unaligned_access(CPUState *cs, vaddr addr, cpu_raise_exception_ra(env, TT_UNALIGNED, retaddr); } -#endif /* !CONFIG_USER_ONLY */ From patchwork Mon Feb 27 14:00:27 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: 657034 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2374235wrb; Mon, 27 Feb 2023 06:14:57 -0800 (PST) X-Google-Smtp-Source: AK7set9IKSqNa4joSanMDzJuMaxV+twfcfWzNfVK5ajUE72pyhYwakdRdhSRnOfrGua1MFNYPgqY X-Received: by 2002:a05:6214:cc3:b0:56e:a918:a4ed with SMTP id 3-20020a0562140cc300b0056ea918a4edmr52048242qvx.1.1677507297502; Mon, 27 Feb 2023 06:14:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507297; cv=none; d=google.com; s=arc-20160816; b=pXCaqwCWh8e9G9rFVtCtARY+4bbZFoxI74oTvA2IY2x7EwVp6m+Y1th6qkVPPU598g 8YZmmM7Xn7Vd4PAvhHhRL7+57iPMOXzCpoXd/+ppd62hYM9/UybT2xrQTpTi4fwFbOeZ I6A5plFMAQv2YNEZCDPcRm3LDVMbmgJJwG3uT3RCc7u3XgB/D7zs+nYpprz7EQJqPHuz R/GCNlqSmYBVtRfzVkVf/S/z0gUxM2Qbqkr7PG5SxQBVUq7fkW5iwLwO+1JintSWLRQC 3Ehm9TuVqUASCEspHiRtG2ErULjSSQXfe1EAkKWF2HmAG5yaPYkzYgQC56lToGny6573 IWNg== 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:to:from :dkim-signature; bh=PasVDirs294RscXohIgiWTydLjXdrIBuzZcLem7x0wI=; b=eimH1bA8GUiN2HSP72ffQmYofD3UpmpkrmXJR2QxT/vzsGXJGgEpCnBOkhOjoazL3w BRMlnogl4Yo7bGJv/yv5NwD2ra4kyZR01nSXp0ZDwfji4Pcw/n3PbydLaPNxCogdQZ9x NyacGp+tDFuKuCwmo/WEiL4ntZNtjz0Nrox/GXbDZEu0WeJEu+Zv7KbmcPely0jr6cG0 CfgDUoiNEp3wTVllvUHM09ZKCdsnXwRElG2NIcBQyiyQmyKY/mAmC6KNWD5I7W7conc/ svVfgFaABq6ubg/5jwPR9l4fwUQ874N3I1DyI1P2GwxU7d8k0MWlVWX15yyGvn8gVMNr AHSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bzWW9yTE; 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 z15-20020a0cf00f000000b0056c0c962f48si6476839qvk.447.2023.02.27.06.14.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:14:57 -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=bzWW9yTE; 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 1pWe6A-0007L5-7Y; Mon, 27 Feb 2023 09:03:26 -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 1pWe5z-0006w5-RZ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:21 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe5y-0007p3-BC for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:15 -0500 Received: by mail-wm1-x32a.google.com with SMTP id j3so4316512wms.2 for ; Mon, 27 Feb 2023 06:03:13 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PasVDirs294RscXohIgiWTydLjXdrIBuzZcLem7x0wI=; b=bzWW9yTE3Uhs4Df6zF06t6/y3d/C+1dt0oD/qbedCmKwV7xCFqn6SwT2uLSffeaivG 2bbWItsx5hbt1wv6B0t2Sf9wWoJho8BplhFvVE7JXcHFv9EnSDsh68hWv7FoGCI8b0g2 2tzj/LQxJsWVb9G2L+Fcu+tDEfMi/lgq2jxqx9lLPqUABr+hUWPl16Tc0wqy5RyfbtaZ 4jNhqkNuhXpiKPOgZGWWPX5vwUhmfAwZeOhdclAI+oW2/Ii3u9OKwETnUSGZwvy4556h rmPJ2dPFgYCbTcj1j8h+cYFzXSuNjc48Tnbur1kKpg7SU6OAsv2yXql1LSMQ9bHc6OFP 0lLw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PasVDirs294RscXohIgiWTydLjXdrIBuzZcLem7x0wI=; b=W9MXWu9V8Ss1jzZytNKkkpHrkGyzyoOEe+9NDilzUMYufzNDwTzFi1C4jozYDeYC9/ 7QeIRi3IUnAsDiGNgmNlmhXDh0DzombIW9xK+AFpwTNXwsezHGL7TNukr27q0430Itv3 UdhXoRiBWi3ClZswhTSNFiWDsgIPpTrPU9xK6ttF8N5wDgqRuNk9gbrahh2cCNLR7lpO cwA47iG0d5e9P3nmV5lSeuBjcRsmfy2zlcp+kJSeu5kLOme3I2u4E3UY8v3kqZJoi9tT 8iZDVicZflyXbTtAVa15umh51cl3Wm1EUO6y/uiB49mVQxmb/LbvP2aW/0nYOmZ8SLMv ckPQ== X-Gm-Message-State: AO0yUKXTcW2BAck89y9xW7VIo2hNjmd+FcSqXUXsrOgWTmCDHa1RkFxb +Y8a5sjxMojRJRQ9rE7WkCg6LLoKbuVJSOXP X-Received: by 2002:a05:600c:44d2:b0:3ea:4af0:3475 with SMTP id f18-20020a05600c44d200b003ea4af03475mr12020929wmo.1.1677506592705; Mon, 27 Feb 2023 06:03:12 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o19-20020a05600c379300b003e2052bad94sm12628885wmr.33.2023.02.27.06.03.11 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 020/126] target/xtensa/cpu: Include missing "memory.h" header Date: Mon, 27 Feb 2023 15:00:27 +0100 Message-Id: <20230227140213.35084-11-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 Under system emulation, xtensa_cpu_initfn() calls memory_region_init_io(), itself declared in "exec/memory.h". Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20221217172907.8364-10-philmd@linaro.org> --- target/xtensa/cpu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c index 2dc8f2d232..acaf8c905f 100644 --- a/target/xtensa/cpu.c +++ b/target/xtensa/cpu.c @@ -35,6 +35,9 @@ #include "qemu/module.h" #include "migration/vmstate.h" #include "hw/qdev-clock.h" +#ifndef CONFIG_USER_ONLY +#include "exec/memory.h" +#endif static void xtensa_cpu_set_pc(CPUState *cs, vaddr value) From patchwork Mon Feb 27 14:00:28 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: 657044 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2376072wrb; Mon, 27 Feb 2023 06:18:15 -0800 (PST) X-Google-Smtp-Source: AK7set//9xwe0PJjAlCEW82FJWUHtMSQqwHTVaTuhxfmXz0NvOePVvSRHWUedfDIydwzOXt7tFvN X-Received: by 2002:a05:6214:2429:b0:56e:f05c:9c70 with SMTP id gy9-20020a056214242900b0056ef05c9c70mr47963355qvb.44.1677507495169; Mon, 27 Feb 2023 06:18:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507495; cv=none; d=google.com; s=arc-20160816; b=rB79bheQMCYaGFZspzhXVQ2akQcKvyjePcWbJ6pG+TYP643iH4IxxLum0P29mApCKw c4whzpfmlkUH6mmRCteHDBLi1eX8sgRnpylBhcwfW4T6NetQs0VoOaCmYH8LdK/XZAFC YzisoQ7MxfCXYkrPhaumocflgLQpSdef/oFQNJuyCs8iuRQ/W972pCPAbafWQMws5JGl yH3EIZk4hsiXz06gZyH6QUFmBE/2kZlFFTVX3yh5F2/1dFX6F9lXyzuPnPI5WkDHnvk1 OpDxrMy5mWsS2j/8butk210syJhjwlp5xF4byQLY1O4p9jc6WfOkeI3laq8K1A/dD13v k7YQ== 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:to:from :dkim-signature; bh=YB6GhDc8o2Ro4z8NqE3FKc8wK6B4wm3bzailT0lBjJU=; b=j3Nnl5JQD8EFNGsgYT8+yTr3fWrZJBccCGiDbvblUd2f9ikh3z0+V7qx6pVFtjdt1D CB0bFn1acmYdB5iskXRAqE0hiM5gCUriLqgzIy05iLV9Dc/zjccL7EZ3GJnXDd6LyM9E gF4P/E1SvBCkgFNb+ls4LpS1stVsnKveMWXSm+6gZKIz9r2v1wTxg9minvduwnElaZtt gCUFRro7/TOVXm/6OKBqaUTQHerOiOJFuBK5pvw0EM4gb6PpmVfTsUVjGyCrT66UNs/J aDjvwVFO2tytJ3Y7cEO/Ckf4poQtL7DTDMZ+bP3zxfeWjvsvMaetaoAM8XWXVotJ9/K7 JuTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wnTEVmg2; 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 e3-20020a0ce3c3000000b00571062ba12fsi6480005qvl.368.2023.02.27.06.18.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:18:15 -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=wnTEVmg2; 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 1pWe6B-0007au-JD; Mon, 27 Feb 2023 09:03:27 -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 1pWe66-0006y1-FG for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:23 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe63-0007pL-UR for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:21 -0500 Received: by mail-wm1-x332.google.com with SMTP id az36so4324949wmb.1 for ; Mon, 27 Feb 2023 06:03:19 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=YB6GhDc8o2Ro4z8NqE3FKc8wK6B4wm3bzailT0lBjJU=; b=wnTEVmg2NW4lps7TPlLTw8XoE5BjEdUi30K4RQ83P9lFQleB3EQkYm7pt4Ny7Pbp2+ HjBEGSd+OXHDIyZ55yIwk5RH6Ty1aNF/uGM+Y4Pz26kFhNhwj/76Ype2zGv/x7g67VPy iOIBMeU1okoxgjVdXK/NYlI7kKXWhQyXt8E0HTPU2kq2PPKyTTveNVrPkev8W/f0CqV/ ea606smX/6xAA1yYs5Ctf9cEN9fD57+So/pF1vztZJ3TmensC4Mfn7pmwTnRMYYyw82a 5+1xnd+N6TiX5YTZ/v7pfSgINnoHH3vFCh4ol3cf327WtRuhb/Ez+s4zsh35f+XQlUOy 8iLw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YB6GhDc8o2Ro4z8NqE3FKc8wK6B4wm3bzailT0lBjJU=; b=7YKt0PUDjvOIcYKUhBnttTrQTyHM7pS586yBtP8OrGBvp4xGp5j4dIeXejxRg+fVm6 RaZNsuDYEIu2dSAINDi6HW/D3TMPHCcLoxzGMI68d2Q6LmukR27L/xNsihR9wvUDexhz T2k9Z7nFareug/GxJ11A81Zdf/eHUBr1oJdcyPIax41rx3Nvv4YktYH/gtQb3pi3rYt4 WnCq6ywrRBqS16ZLyxcJV8kGwOSaSbzpDk0MI8ZHCQ8ESpEHTG3F5Cex7W3xjRvbFvTv LPKinZFF+S85U81a6CiwXvZZnYM1mO/KWnBMmz50WUHoM6XU632eBfMi6IRvXnMVUVg1 pOyg== X-Gm-Message-State: AO0yUKWMdK/vl8Y/cNjQ7dFK5A5NsIS3DsgYTYW/l7qQI65pR+i+n8y2 6VkhPLhXNjCjWtUM4YvTl35oCPnHUNX7jdSm X-Received: by 2002:a05:600c:4929:b0:3e2:6ec:7fb7 with SMTP id f41-20020a05600c492900b003e206ec7fb7mr18223080wmp.0.1677506597808; Mon, 27 Feb 2023 06:03:17 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a4-20020a5d5704000000b002c559843748sm7232200wrv.10.2023.02.27.06.03.16 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 021/126] target/tricore: Remove unused fields from CPUTriCoreState Date: Mon, 27 Feb 2023 15:00:28 +0100 Message-Id: <20230227140213.35084-12-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 Remove dead code: - unused fields in CPUTriCoreState - (unexisting) tricore_def_t structure - forward declaration of tricore_boot_info structure (declared in "hw/tricore/tricore.h", used once in hw/tricore/tricore_testboard.c). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Bastian Koppelmann Message-Id: <20230117184217.83305-1-philmd@linaro.org> --- target/tricore/cpu.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/target/tricore/cpu.h b/target/tricore/cpu.h index 3b9c533a7c..47d0ffb745 100644 --- a/target/tricore/cpu.h +++ b/target/tricore/cpu.h @@ -25,10 +25,6 @@ #include "qemu/cpu-float.h" #include "tricore-defs.h" -struct tricore_boot_info; - -typedef struct tricore_def_t tricore_def_t; - typedef struct CPUArchState { /* GPR Register */ uint32_t gpr_a[16]; @@ -179,16 +175,9 @@ typedef struct CPUArchState { uint32_t M3CNT; /* Floating Point Registers */ float_status fp_status; - /* QEMU */ - int error_code; - uint32_t hflags; /* CPU State */ /* Internal CPU feature flags. */ uint64_t features; - - const tricore_def_t *cpu_model; - void *irq[8]; - struct QEMUTimer *timer; /* Internal timer */ } CPUTriCoreState; /** From patchwork Mon Feb 27 14:00:29 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: 657027 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373866wrb; Mon, 27 Feb 2023 06:14:21 -0800 (PST) X-Google-Smtp-Source: AK7set9WlmUCUFpoD6BI+R1471D9FgBXTYWA+gtHsvrrmTzqrJ4Hmm6X96halGXp3oqJb1HRDE2/ X-Received: by 2002:a05:6214:c8e:b0:569:1753:bb29 with SMTP id r14-20020a0562140c8e00b005691753bb29mr47764135qvr.42.1677507260888; Mon, 27 Feb 2023 06:14:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507260; cv=none; d=google.com; s=arc-20160816; b=G5lYiDq3i9DaoJyaFmNoVcFPNLXMaxOxACJnAbNd1PqOW4zFhhQh1y3LULdIZMuESB Xd9r0cog1KS73GOfWNlajsEiJBdHlxC/qyLJx3pqrrqO/1QklpL3QLkXUDBNSqarDmmo saU+Ed46QZle5Bxsom6ssdi3/MryKqV+/6sgblwfOtbj4mLyGO0kLlQPDCz+6OyIMDAl ai8Arcd1NyPNsgo4k22Uq4Ku1NcqHkmlR65kkF8UVkQ1jxS5PwdwJ4wA+3BqyLvsDow1 kdbFzGiFbRB5vPpUUUEde0F/9jfz0FKkW7uLLG6IkiCkvtdseIjIHtEE25c5Sfq8FJIb RKqw== 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:to:from :dkim-signature; bh=mvnDqPFrZmQX328ErtChnfMcQ4qhPU9eJ1iYjOq8AGU=; b=jyb+YdTPFPu6bLo5TYgkwO1RHOnj8N8MjNAJ//3JltQHcAUBRKVIjpW8RXJyh9xs30 CbhEFz/CYieLbKc4xxS93tOfsWPIZ2TUVKq7M/T/Pw2hvJ1baOOAJE1fGf0rES3Q0kNH 9aQS9A50zAjftbngXtNQXJYPzcyVN+Ku4fdzPPAUisA8MPXXFjFXVFQ3j01EgyjZG+9a xZKHu1xUicWfpGvKguM9N5bsYT3xs9RSPQalkMD2f5ikx9c4y7pak7KGDPRo7stlyvUV 7VvBz77tf0Xw7P6UOb3jvf4ZmivrRfEFKJYul2tTmSXYY3bUK2c/Tuh1QveH9BGDHagl YmJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ImBTBUUV; 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 y9-20020a0c9a89000000b0056ebfdbf223si6191055qvd.120.2023.02.27.06.14.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:14:20 -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=ImBTBUUV; 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 1pWe6C-0007mN-IG; Mon, 27 Feb 2023 09:03:28 -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 1pWe6A-0007UF-PS for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:26 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe68-0007pv-T1 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:26 -0500 Received: by mail-wr1-x436.google.com with SMTP id l1so3292542wry.12 for ; Mon, 27 Feb 2023 06:03:24 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mvnDqPFrZmQX328ErtChnfMcQ4qhPU9eJ1iYjOq8AGU=; b=ImBTBUUV2ccDVsIEdJJ9VvJpN7pxQFVtimnEBsAwcMbpx7nXDDtlQLb5oCgKhIudSu BCeu9krAH8ZyK7HlprGuJgBo6Y0OEmP766RnXxkZK0y7zKB1YYyDNcayZfcTlDcVVFa4 eAHJrvUHEsfD8qNK8jcgH9ydltP/7eOoaz6vWleBLCInzyfNAu/t/WzMGXNqNr6Y2zxm BqCApTxiYViAhogFkcACu+FmU1vgwu3Cs+pzTETzxoK2m/ivwqVs51a/GOSx/m/wpCF6 IPaxvEAIkY5QyLsmdIOxUrq/aYBCWpkoi32jKbJwStvgdQKXD1RTmg06P6HXZA5+//jQ Le+w== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mvnDqPFrZmQX328ErtChnfMcQ4qhPU9eJ1iYjOq8AGU=; b=H5EyzqBKieC8+SgFwZMtDH1wo/TGmiZt2M4TUNUjXi9Ock1RD+cK9tgGKCGcaNNmMm S5ypJ2lTdsKNTVNkejJ2REBd1D+zTvJxjrR8SOSIgb0Gkc+ltOysw2w6ahKSbklmb4AA /+pzYHVuOibGCZw7lKRbaO6CG569ifMUh4Dax5TQX+qjFYW5dPtOWlsuoWIby6PKw7t9 8O5FRc6PO0P5/S0eiyaw6i2xJmPZRRBSQ6L97ofgQLiEmnh86VXbmm7SvIw13C8sOvEF QXDMI1A63MC43Ndet+YW68jfb5xnYtywmlE2nzh14Gsu5gAEBJg5p5iF7Gjp1mkaAnNI 3PsA== X-Gm-Message-State: AO0yUKWzQ1a6Y6FdsmoNPaouD1ortcS/uloOtDjNgbT0Xawy4F57Ozl6 17oHCX9antfQ+az4dYVhRmxqpk7t9jGfWV0K X-Received: by 2002:adf:cd87:0:b0:2c7:1e3b:2d46 with SMTP id q7-20020adfcd87000000b002c71e3b2d46mr8029714wrj.17.1677506603086; Mon, 27 Feb 2023 06:03:23 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a4-20020a5d5704000000b002c559843748sm7232417wrv.10.2023.02.27.06.03.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:22 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 022/126] qom/object_interfaces: Fix QAPI headers included Date: Mon, 27 Feb 2023 15:00:29 +0100 Message-Id: <20230227140213.35084-13-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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=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 Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-qom.h" header in a user-emulation-only build. Commit f375026606 ("qom: Factor out user_creatable_process_cmdline") incorrectly added a dependency on this "qapi/qapi-commands-qom.h" header (the QMP handlers are still defined in qom/qom-qmp-cmds.c). Remove it, and add "qapi/qmp/qobject.h" which declares qobject_unref. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221220115709.18508-1-philmd@linaro.org> --- qom/object_interfaces.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c index f94b6c3193..7d31589b04 100644 --- a/qom/object_interfaces.c +++ b/qom/object_interfaces.c @@ -2,8 +2,8 @@ #include "qemu/cutils.h" #include "qapi/error.h" -#include "qapi/qapi-commands-qom.h" #include "qapi/qapi-visit-qom.h" +#include "qapi/qmp/qobject.h" #include "qapi/qmp/qdict.h" #include "qapi/qmp/qerror.h" #include "qapi/qmp/qjson.h" From patchwork Mon Feb 27 14:00:30 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: 657049 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2376446wrb; Mon, 27 Feb 2023 06:19:00 -0800 (PST) X-Google-Smtp-Source: AK7set+zYaIFJoZnjZewltsj0dgZKpmYGCCdtBZCSoF5W2gqveRy5HSeKo9VJ+/9V3J3QVEQA+sZ X-Received: by 2002:a05:622a:28b:b0:3b9:b497:109e with SMTP id z11-20020a05622a028b00b003b9b497109emr14652536qtw.18.1677507540688; Mon, 27 Feb 2023 06:19:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507540; cv=none; d=google.com; s=arc-20160816; b=CYhxTE5DszG9r7vgrLMy81sfv4X5tusPWWAsZQ9ahTfjIlfXUJ6y2ebMdgtXKKzpDi h2uCMvV+trQt0e4AVizeirhYZ6FyLzQdRH/6WLI/SfsEdHV74rk9gotRljgKG1CxQ6cB PhbUKOgG8Ui2fzDkEue5ms7KbLPhddzdA+RGL2kDR1A2s3mBB3sjRkhq/1IrANJ1Rgyf thR4/85EvhuUic4tNsMi6SN7yxO3ZJNA1HCD3TlJyEgagyVp+GuZif8elMvltK+5TAIB N8HH+IEXSonCNlZnj6qxcvLYoyehLA7GEsAqobA88oHT5qH3f6m7/PzeZtYFh8BUr6ij 0rXA== 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:to:from :dkim-signature; bh=hNlq0z7v8fGXrKo5qebTFeTRFjOGloH/Fy/CTfeeYb4=; b=lEG2sktRejwKGb8b4/ha3cBjeG3+umKhFw18CXU++ftFtnLDoNtnEp54YK0ViVgDaw wZQynIJ17ByJ5TA/NQvJoZNm9MdFkzXEElCTpvnJdtRUh0mxQjttI23PPVOIhw0X5ffW 7D0KHSm4Z+RIAzHjcbLAz45W1chM0ZqvswlBa7G64nkY29IR+8L/TrrcDtUmbqTQb7SW AckztXhzOHv+hCs8a3ROJjrBvW6sfbmzHVYSlJwTKNbtZAVU59s7yPtWTmRq7WLpLkbT gAYxc0MWJ7Kfdm/oziaG3ai8C/F8FMUnyo6qXwIU1jEtOZs3aAp9oNhD6t16/gFNh0Qr y2Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S5TiaoVt; 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 i7-20020ac85c07000000b003bfba5b73fesi6947368qti.369.2023.02.27.06.19.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:19:00 -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=S5TiaoVt; 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 1pWe6L-0000Aw-5m; Mon, 27 Feb 2023 09:03:37 -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 1pWe6F-00089c-Tw for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:34 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe6E-0007p3-93 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:31 -0500 Received: by mail-wm1-x32a.google.com with SMTP id j3so4317185wms.2 for ; Mon, 27 Feb 2023 06:03:29 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hNlq0z7v8fGXrKo5qebTFeTRFjOGloH/Fy/CTfeeYb4=; b=S5TiaoVtTAkBeGgcrvMhUebnHH5RtdvsUAPo/ZRtG0xSYFyrBj5WxX15hhGwLpag+s peq1EqRNwF3EAX1xloGnUPZaiCEk5aQmgn0dt4wuYzKMLOVcNpnvvpYMZONMbyiY7nZ1 EGOIt/KXOWu3D/lXrmbIfzIrJyjXia4DLTFAaHbxO4FkQOskiFhBePMZwrzJvDnmgFEP /0+QBgBa960xArDwjcMrv/6od04SK7dMYwuU/3r6okMx5CXgbCIPFvuq+iUXYIB0gJ5f HAvAyZ5Z748XWMce0eoT/XKko/dYzGAv63sLVi/WndjeYl4+oSgijH713ep1QQWmxUwY 6xqQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hNlq0z7v8fGXrKo5qebTFeTRFjOGloH/Fy/CTfeeYb4=; b=ADGWfLSt1MlzLxJ6L8uoyzxUNhJwKbT/TSFyuiQ+vFal4exKXBSWHTS5IiwgoXEsc/ i8Hev6vWA3NeXo8KvkU+X4WnNUbIHvrU7xaUrgGgzVDczY+gJcKAVNdPeHLmqqZBY2l9 jinsvUBwQijDQzxteM8vlm/hJv+VWR+orrjNTTQ3doxGOnNrAQc0eVDOc6p1ElkqU9x9 We1MHHkrEamn1lz8cAeYKs61DVK49IBCEIId7Hr08WwOtluQnJmCeKeQPcU6eb+hK8A7 M+oSCDnrgwbYqK/htdgEOVoFAOKU1Yyx1CwDrMsLspxbR4kzQlCqJmTqsbh5IBuOeUsN yuoA== X-Gm-Message-State: AO0yUKXEh9O9MdLb2X4RkstlfRsaBKVcv6LmtyU7qSYLqTNWPQejyuur rpporUFJ1xJZBunhU7jKN7t+/9TjSuvleeWR X-Received: by 2002:a05:600c:929:b0:3df:3bd6:63e5 with SMTP id m41-20020a05600c092900b003df3bd663e5mr18215721wmp.12.1677506609033; Mon, 27 Feb 2023 06:03:29 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m21-20020a7bcb95000000b003e21f959453sm9368241wmi.32.2023.02.27.06.03.28 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 023/126] trace: Do not try to include QMP commands in user emulation binaries Date: Mon, 27 Feb 2023 15:00:30 +0100 Message-Id: <20230227140213.35084-14-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 QMP is not available on user emulation; there is not monitor. Besides, since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the qapi-commands-trace.h header in a user-emulation-only build. Remove the QMP trace commands from qemu-user binaries. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson Message-Id: <20221220150417.26751-1-philmd@linaro.org> --- trace/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/trace/meson.build b/trace/meson.build index d565948b09..8e80be895c 100644 --- a/trace/meson.build +++ b/trace/meson.build @@ -89,4 +89,6 @@ if 'ftrace' in get_option('trace_backends') trace_ss.add(files('ftrace.c')) endif trace_ss.add(files('control.c')) -trace_ss.add(files('qmp.c')) +if have_system or have_tools or have_ga + trace_ss.add(files('qmp.c')) +endif From patchwork Mon Feb 27 14:00:31 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: 656983 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2367480wrb; Mon, 27 Feb 2023 06:04:07 -0800 (PST) X-Google-Smtp-Source: AK7set/I2aD4CRKhMa371uLcJnJpRnMs8pVA5oynZIqQ32U9s6vQSJnMWXdD7v/70C6IZaaRT6mW X-Received: by 2002:a05:6122:1793:b0:3f5:919a:948d with SMTP id o19-20020a056122179300b003f5919a948dmr23409086vkf.8.1677506647171; Mon, 27 Feb 2023 06:04:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506647; cv=none; d=google.com; s=arc-20160816; b=rYd4X6wJxYpyxrJtBd8zbdIaJZ7Q1PKyw7DBgUGXsFhuq7ffpGKJdV2LRLVRieBdn1 iWALpqb5km1lYU8LKDPowRTb+ShLtzFdRYZEaD7GoTIcq6IxYePFFxizj2fK4CkXdrUN HAodUl7mm3P2PV/4WZpP+aF/sCSYt36WlK8Z5POHT4Qx7NJuUJSsicTiwHl+yjibnnje 23FeVVGRydSobt2sNQN8UGIOctvL+QZX14/3MH369bUdvSNr9yzIMnmowMII5lQfgMwe o19QrN+hLYi39Eq/FW3yNX94De7rJEDORImGc5U/2QQU+8UzNM+tw1AHxoQlV6pFA5ef R9yg== 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:to:from :dkim-signature; bh=w35//Xi+HiFDJb401HrXFg/UrizCqNe+LmSJMze6aS0=; b=dnyOjXxhanlX0Dj8AYdZvHbMzXJau+QwyTxvVHWrN2h61i5ejLNielDEbhe26oTbP7 F+l/c4WzS+gg29Zd9qgqI4+2X4LdVvwoZVjk3gHpD8dwOcnTdMIP8bf3t+1xDsFrObjL q5DKspmj73fVOTHWET3dYhPQ4LYqIdMEpIFnHi1jeL6Y/UPOgTFmSNVucu1uhiCWuPzM 2M7ZA0/dBzWfH8AcqRuLVVjble7TTiEJGB7/Xt+qmGm0Z0imuYh0ih8GrW2LAGsnbeGq jMri9AkwrJfD+AYxkky2pQw2uBI1iF4hNdLEcB+G3jGaIyLVWzg0kYxKHu1mPdCnrRfR MGOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MxMY4xgP; 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 q67-20020a1fa746000000b004118456cc15si2333239vke.26.2023.02.27.06.04.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:04:07 -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=MxMY4xgP; 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 1pWe6N-0000YN-El; Mon, 27 Feb 2023 09:03:39 -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 1pWe6L-0000GM-F5 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:37 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe6J-0007r5-RI for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:37 -0500 Received: by mail-wr1-x434.google.com with SMTP id e37so3867675wri.10 for ; Mon, 27 Feb 2023 06:03:35 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=w35//Xi+HiFDJb401HrXFg/UrizCqNe+LmSJMze6aS0=; b=MxMY4xgPCbQcLjKGmcMG96NOl/DEJvs6McEitkcUOL3yq1O8Y89Lh9l8jZQDnHL982 XLcRYgCwxAeiPdBGAHcmA4pZawdNJ+vM/iDGLSYeSyCKa4elMhcHcp+WPUYo1Gi894OF kvBPL5+dRB0TGYB7eNiUoHgzAtYfPPEC+mBiyPP+cxph/TseunILZFP6BwY8lb5vC6b0 srwPlnbx4WA5j4dTiMFpJlIjoDSYg1MtlstDkIWV10iwS5X8ArSpp19/yrdb8LmBQVC1 CX+T+yYs55aNVM3flIKCvqY+NC4dDQq0EWMt44Oy6q2sHZiR2dx9fORUyeoVGMo+GlKm gSlw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w35//Xi+HiFDJb401HrXFg/UrizCqNe+LmSJMze6aS0=; b=fTJa2WgyTP89/70Nj2wXalpWnmv0WAeljUQSwPWAl9JkszvWdN7/UqjkqoU0EIK2dW BZYEEQ9bviDWPNO5Zl+0DFaOw7Hi6RRf+6Br2Fcar0flBW5mTV4lR+ZK6Nm/Z2aWlVFZ ngbUBfHv6OTHEDsEIQgYeDJvX7MbIdZEpcVhMZ1pgd62aiufKl7npU37gFuihpID93IG wwSC5gLoapEnR4r8IRLwGZ0JjmbvlVcWJsp81wBxnifwDbhvSpgKBGXVshO/FzoS6lzk BKl4F/1QHu22XKk81GBf+gsox8Tp7Phu9jG7E/WuN5LR/0dUJuP/0l1/bcfgn4qkVqhq s64g== X-Gm-Message-State: AO0yUKXNnXSRscGJxc7xyzvInMAXPTO5yLJ/MhAiDlOO2Mb5jEloDRDh D2wxw9ik7zm5cnILb7h1pkBp5mkmahIElKv2 X-Received: by 2002:a05:6000:144e:b0:2cb:29eb:a35e with SMTP id v14-20020a056000144e00b002cb29eba35emr3237924wrx.11.1677506614134; Mon, 27 Feb 2023 06:03:34 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t1-20020a5d6a41000000b002c70a68111asm7316419wrw.83.2023.02.27.06.03.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 024/126] exec: Remove unused 'qemu/timer.h' timer Date: Mon, 27 Feb 2023 15:00:31 +0100 Message-Id: <20230227140213.35084-15-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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=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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221219170806.60580-2-philmd@linaro.org> --- accel/tcg/cpu-exec.c | 1 - accel/tcg/translate-all.c | 1 - include/exec/gen-icount.h | 1 - include/sysemu/cpus.h | 1 - tcg/tcg.c | 1 - 5 files changed, 5 deletions(-) diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5357608b14..29b9bdac38 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -28,7 +28,6 @@ #include "exec/exec-all.h" #include "tcg/tcg.h" #include "qemu/atomic.h" -#include "qemu/timer.h" #include "qemu/rcu.h" #include "exec/log.h" #include "qemu/main-loop.h" diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 9e925c10f3..84f129337b 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -49,7 +49,6 @@ #include "exec/translator.h" #include "qemu/bitmap.h" #include "qemu/qemu-print.h" -#include "qemu/timer.h" #include "qemu/main-loop.h" #include "qemu/cacheinfo.h" #include "exec/log.h" diff --git a/include/exec/gen-icount.h b/include/exec/gen-icount.h index c57204ddad..166170b08e 100644 --- a/include/exec/gen-icount.h +++ b/include/exec/gen-icount.h @@ -2,7 +2,6 @@ #define GEN_ICOUNT_H #include "exec/exec-all.h" -#include "qemu/timer.h" /* Helpers for instruction counting code generation. */ diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h index 1bace3379b..0535a4c68a 100644 --- a/include/sysemu/cpus.h +++ b/include/sysemu/cpus.h @@ -1,7 +1,6 @@ #ifndef QEMU_CPUS_H #define QEMU_CPUS_H -#include "qemu/timer.h" #include "sysemu/accel-ops.h" /* register accel-specific operations */ diff --git a/tcg/tcg.c b/tcg/tcg.c index a4a3da6804..9822c65ea8 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -34,7 +34,6 @@ #include "qemu/cutils.h" #include "qemu/host-utils.h" #include "qemu/qemu-print.h" -#include "qemu/timer.h" #include "qemu/cacheflush.h" #include "qemu/cacheinfo.h" From patchwork Mon Feb 27 14:00:32 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: 657005 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370751wrb; Mon, 27 Feb 2023 06:08:59 -0800 (PST) X-Google-Smtp-Source: AK7set/L5H7Pdktmn7AlcBcD6pEnqdgeLfeVpiT3Bb5aFPMCDjgtBebpsZfH60X7MgUJvRFFcruA X-Received: by 2002:a05:622a:552:b0:3bf:c83d:5d4c with SMTP id m18-20020a05622a055200b003bfc83d5d4cmr13897685qtx.64.1677506939461; Mon, 27 Feb 2023 06:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506939; cv=none; d=google.com; s=arc-20160816; b=QrK2lDblLXo8c/hSZel7/bPnfi6/D+x5fgdfZEwlC/9H0BU+Mu1473PDu6gTsfwOYK hPkkCPfOF1D7oLDe0uBAI0rVR7lHhAP+ClReNTNLYHbQyjzyVuERAhd415tqh8sWprG1 HojIuF6PNJwGlOwD8mrvZmPgIOBbxsPUXL9dUx3IRKpVcRBRywHtdcX+u+o7UuuOoTLk xK6IjPNKKR1AoouybDFL0sPx9ngLPp45zox1CeClUgmpTpyEOO/feP/92papd3DhjFbO MaDU7k3eQ6JicBUIBpKZM1bQvkuCAiLEpSPxgPZc/GdQrA009sZJsF813Lss3Z9acVGd BB+w== 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:to:from :dkim-signature; bh=svJiyNintebHpCD+9KuodOncD9FeucYY+coMyA+NL+8=; b=bNZTEy5Lgp66qYWJc+XSl5M2+7stlgq1ZP2XHXmqJwJWTKHax1JYotaYKMSz6/ug3i zD7zZqwGFoR/vPSXIx4ZJRfCjMidIGOtjQe8OvFUwAHmlAHjfAE3k4ME7AnqZ/tFHnVs cDDufnV0BJkkr09IVfWFkdr5LQ4VOf6mFbukiV8A7fwULad4LgfeEHq5HlgsO4A4fXj9 Bz0b5YUj9+bxEQuhaipv+P03ix75X3THrewX26Jks3UHsUr9gzBdx8LdyeMgFORMVHJc vnONY1kAQjhcpTA21YA+CR1XfKHInwZvKKVM4mo5uGRXs32Jd32eZUDswr6vfkEfSCQT MdEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lptX7Dl1; 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 e12-20020ac84e4c000000b003be3742814fsi6897220qtw.586.2023.02.27.06.08.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:59 -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=lptX7Dl1; 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 1pWe6U-0000lN-Vo; Mon, 27 Feb 2023 09:03:47 -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 1pWe6Q-0000f3-Cb for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:45 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe6O-0007sj-UX for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:42 -0500 Received: by mail-wr1-x42c.google.com with SMTP id r18so6363185wrx.1 for ; Mon, 27 Feb 2023 06:03:40 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=svJiyNintebHpCD+9KuodOncD9FeucYY+coMyA+NL+8=; b=lptX7Dl1iyuywvsS+lpERxaj6sq7NegYKh6BOoqB9I3KqMDzIJv+Ck137VFqum9NMu xghr7EYaJAMnRENl7i8lR2lJ60TdbHdmQPqrP0I11O/dbG3podBzV0/PgI+pUOTrdR5l EpBd5rDU24HntkEvORBiiqXnzuQ/P5sAzwwdAs7+qcm39e3sPaRSMOzJZR1M7jXJ+sDv SIAlNUQS1fIB5V8lfmvrzqMh/5QtRqHQ7/rwjjnCkLmyJ81sQpt0K8oeha+qni8prRcT eGeHlzM4U5Mzv9/xtzLugX+f6GkN5hPgJCLm+bOYxjsK9g2/7zLc3RJhQnK7/4Lms2T3 LSyA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=svJiyNintebHpCD+9KuodOncD9FeucYY+coMyA+NL+8=; b=FKdTezGRkSDsk9pHB/gMlC22G0ZM0oilCD8jGe3bpi1u7yjheXabogBgAE8Phn81i5 NfXf8lTDRFVGdz/ZVf9sUlnhxfMt2gMo8CIYGz39iao6g0V5n+RbStt5ykpB2F4zEFuh KTZRO+LVY6BJ4Vc7apEDq8Tt9klTNO2KQbwOweBVOWAOHVkaaU78/1w4iQ2FmK5DchVk Hj0NDGzXmumw+x+SyLK5NEkUdjkOduVtJq9ebV27wHkDJLE6U7VXSyTWXB9QOREHXwwK tlSG/pZzMSD/oAyHTiTi8WN7cHaX+Fxq9pY3cGzYplBK9iSehDKlTI+TySL3GvELSVxT rgyg== X-Gm-Message-State: AO0yUKXAOWnQiMdQoAwvn8XRZIYDFsLToIVtK0MUeCzF5rvAu/b7t7vX r1b5wSZ7xgi/7NJBBijQnptHFHVZkht+gOz3 X-Received: by 2002:a5d:59ca:0:b0:2c5:518a:f6e0 with SMTP id v10-20020a5d59ca000000b002c5518af6e0mr6236432wry.6.1677506619118; Mon, 27 Feb 2023 06:03:39 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id s4-20020a5d6a84000000b002c551f7d452sm7297064wru.98.2023.02.27.06.03.38 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 025/126] tcg: Silent -Wmissing-field-initializers warning Date: Mon, 27 Feb 2023 15:00:32 +0100 Message-Id: <20230227140213.35084-16-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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=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 Silent when compiling with -Wextra: tcg/i386/tcg-target.opc.h:34:1: warning: missing field 'args_ct' initializer [-Wmissing-field-initializers] DEF(x86_punpckl_vec, 1, 2, 0, IMPLVEC) ^ ../tcg/tcg-common.c:30:66: note: expanded from macro 'DEF' { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags }, ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id: <20221220143532.24958-2-philmd@linaro.org> --- tcg/tcg-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/tcg-common.c b/tcg/tcg-common.c index aa0c4f60c9..35e7616ae9 100644 --- a/tcg/tcg-common.c +++ b/tcg/tcg-common.c @@ -27,7 +27,7 @@ TCGOpDef tcg_op_defs[] = { #define DEF(s, oargs, iargs, cargs, flags) \ - { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags }, + { #s, oargs, iargs, cargs, iargs + oargs + cargs, flags, NULL }, #include "tcg/tcg-opc.h" #undef DEF }; From patchwork Mon Feb 27 14:00:33 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: 656994 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370069wrb; Mon, 27 Feb 2023 06:07:51 -0800 (PST) X-Google-Smtp-Source: AK7set+hBOpQRqa7lPc8fgGjrwas2VgLlSa38Mz/wDR7FubQpJ8dLMXQDHeDV/2xduOWTZ+AHOBv X-Received: by 2002:ac8:5790:0:b0:3bf:bafa:a208 with SMTP id v16-20020ac85790000000b003bfbafaa208mr20067343qta.16.1677506871610; Mon, 27 Feb 2023 06:07:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506871; cv=none; d=google.com; s=arc-20160816; b=iaGRZgQeafgmnZhFGsXiBoHWTdmYTZLujJr4RyaLDJPJPzreABA2yW1oN+KKwbvcw6 5fpR1pKc5mkUbBoPpE3/J8ul0aF+Qppl+LF2gKTOp0GE1c7y82RbVlfsDrg8hkobNMZ3 PAQmDjITjtqkh5wTyIkK3UR9DwTF2SJHuQD3hvhZ9rtWXcqzvEkdg0NIRYUGUrwYdtM7 GWzTBdqeQQlSUZQojz9LHwyJLpmJp2TVWIPrvgAFBzs0miyAVMtaJtVqaazQZeJzus+w qGCNLystI7fT1itpQIzstrqHS28XWun3KqiEzf9FX8h7ajF1KwIyZS7YKiJuCHIDxzus lwEA== 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:to:from :dkim-signature; bh=3T9UbW8I9A0yfvG+yJvRZjmnRJP1MBpZUv/14zFw1WE=; b=boCUBYCe619kxecjSbS6+2BCtrSWesNxmgwX25IbEKx3UAiuIHEMNQ88lb+N9o4kqQ hycfvRhC00Wue7zCGEmfSkM6uZj1wXc9P28MvtNwQlaO0n07p6aeGTUO/qqskU6ZESHe Ro0qF0XGknobYvzR8OM/B40CODiCd74cEY3pwdH9wWIRgufbeWG740xi3sKBlCtFB425 YIYAYFyRBw77kWfjKbDAJTn/1UjSkmBq7fOg4YCKSIoY+nUNiWV3QAz7wSCTu1hxYhjo siCnJmYPkhudMp4P1SaMeJqEDjgDllh6Q3HWij9VXB0v8jYoDHHzkd+Tj/GZWensJN8J kvIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hOYliEGO; 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 r13-20020ae9d60d000000b0071d94250f64si6069124qkk.346.2023.02.27.06.07.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:07:51 -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=hOYliEGO; 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 1pWe6Y-0000sb-7Q; Mon, 27 Feb 2023 09:03:50 -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 1pWe6W-0000on-64 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:48 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe6U-0007t9-LG for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:47 -0500 Received: by mail-wr1-x431.google.com with SMTP id r7so6341297wrz.6 for ; Mon, 27 Feb 2023 06:03:46 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3T9UbW8I9A0yfvG+yJvRZjmnRJP1MBpZUv/14zFw1WE=; b=hOYliEGODC4JBFj+J8wwjSqW/Vt/61381+kM8K2rmBzkYDwFRVwydeFK8bSfY5ubLH N7l1bkzrAr6aWMrxb9UIVfaj6VD1TR7Hq/2ZUUfzEuv6DIXzwCa7SOVA4LnrNjlj4qzh s4GNzHm5E5y15l/ny4r/cKiE8WARgAJ4i5AYaVSVBOeZFibxyWHlZYX7sRIzCzzf1qM7 MwpBGXovtkSe4htbOiQbV1g1x5uKOvDJoEQAA3ZLS5qzcD0FHib/81rovd4HDv86WAut HsuohbeRiFYTyGAjRWct3B3RSz5g53QA8e5R5HaocMPjyShJ3wvbodO9UGSfB8TUpbQe LdGA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3T9UbW8I9A0yfvG+yJvRZjmnRJP1MBpZUv/14zFw1WE=; b=KAY2BdQC4YOrcTw3nAEAB6tm0EXxE9VzbllHs/Tlw0J69OiyzNbmGZiO4oXgI1qTWI aFZRMU3WKsS0xAoGcZ9y0IrDrnM42VdmDuzvCX069fxyFaQQ+74TfkcpRd2GFrngxutX JQRkISNNEfHS3PVthX4Qxg/uW3o+9X0WBn7K6p/l8pW3AMpZXyc9QB+XIHpBE2Ijjr03 Bp48boZKp6swSiLVz030SUsyrSLqWwnG/jwfjdXwWq6rtov4rFOkieLQlOJ6mG1bnyv4 tSZIJQljZtW+rrSONYFFu/+DZ/bIgZ4+M95paN47dLfmwtzmV4c4YNFBo8X3vVkM4Iv9 uIsQ== X-Gm-Message-State: AO0yUKUT/QwLinTksq4IwezGpUfG4jXOxPxXjKV1qHtkPS7wom+VhqTl SG/XaqraTN/gn+FwH4AcoNGb5iVGQ4ouhnlA X-Received: by 2002:adf:f04e:0:b0:2c7:17a5:8687 with SMTP id t14-20020adff04e000000b002c717a58687mr9881532wro.0.1677506624523; Mon, 27 Feb 2023 06:03:44 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j8-20020a056000124800b002c71d206329sm7171921wrx.55.2023.02.27.06.03.43 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 026/126] tcg/tcg-op-gvec: Remove unused "qemu/main-loop.h" header Date: Mon, 27 Feb 2023 15:00:33 +0100 Message-Id: <20230227140213.35084-17-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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=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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221219170806.60580-3-philmd@linaro.org> --- tcg/tcg-op-gvec.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tcg/tcg-op-gvec.c b/tcg/tcg-op-gvec.c index 079a761b04..aacedd3e15 100644 --- a/tcg/tcg-op-gvec.c +++ b/tcg/tcg-op-gvec.c @@ -21,7 +21,6 @@ #include "tcg/tcg.h" #include "tcg/tcg-op.h" #include "tcg/tcg-op-gvec.h" -#include "qemu/main-loop.h" #include "tcg/tcg-gvec-desc.h" #define MAX_UNROLL 4 From patchwork Mon Feb 27 14:00:34 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: 657002 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370445wrb; Mon, 27 Feb 2023 06:08:26 -0800 (PST) X-Google-Smtp-Source: AK7set+enRTsnQIaUv8mBpdfN90n7mFlt9CpKT4mJ383dwhk6IHPrwcmuAmbEAlfn0F3iXkGjj0n X-Received: by 2002:a05:6214:21a9:b0:572:80ea:5fc7 with SMTP id t9-20020a05621421a900b0057280ea5fc7mr19171394qvc.41.1677506906655; Mon, 27 Feb 2023 06:08:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506906; cv=none; d=google.com; s=arc-20160816; b=xmiDpGAEsg6evtferhyr73zRguTOGLXoYIbB1naj2lf+v0+uvrl4AzCwREQb5I1+3M RmfYPhpJC0rPvDtE1+Eg26ACYeX1MS0WpaoZxlinK09ZlcRzvSBHO6mmbmXpa5sHNPYR ekaR8YJKzmEc4JVeiL8PPsV7faWmczdG22RRkTPdis//jUy0b0Iigd9aQb98YkqaX0wC QZRJJXIDCFhSEYzB4ez1y7cIBKynbKYGVq5L662ngT4DDeXmdDEANzAGAaSs/vMcSgUq 4Mj7mRqGr2aVHRBsQx9F2m/Jjsy39oykRwqAOF0A1VlufxkWZUfkpy9GsYSS3IacH6vQ aQeg== 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:to:from :dkim-signature; bh=ZbrlCySEnnG6Or/L4AbHY+cZysuiDWdTS3h4vO+aAsw=; b=Z2IqUhqz2pJhb8Yphus8rzoPY62AWPmYtwY07rH6/bknsVHX+YEguYGPE/ttdJBoko RfGLEnUPQxlqnLuXCjfdcLeh/4d4v83Nyqh2+V9ogucSnSuolBiOl37YUDqcQQJ4c7VJ wKxvMDhQVsfwDw4uL3hDJOQ/lUa+OzPtDPAxTfHa8GZZMqE4TpkN3pUT+LliWHnQ3aC/ nkAvB/ssj67TvBbbJJBqN8ktzyexNGt5mnuJXObGHb/KAWRqQzRBWLCPQIfHBqeouA9W LKs+eO73mAfaKX2w8uKoieJvhkIJMVlDyl1ogYbgDRg7iVe0+fIFnPt/9OVIcWXtFguj HIRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HNnVKnox; 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 b2-20020a0c9b02000000b0056e9df88b38si6199817qve.386.2023.02.27.06.08.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:26 -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=HNnVKnox; 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 1pWe6g-00010k-An; Mon, 27 Feb 2023 09:04:00 -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 1pWe6b-0000zx-Mo for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:53 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe6Z-0007v9-Ov for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:53 -0500 Received: by mail-wr1-x436.google.com with SMTP id bt28so6337849wrb.8 for ; Mon, 27 Feb 2023 06:03:51 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ZbrlCySEnnG6Or/L4AbHY+cZysuiDWdTS3h4vO+aAsw=; b=HNnVKnoxQb2E3HyaC7oSUHz+KMVddvwm5nx+VWQTbFYqfkxZjk5YuBF6983FianNst 8wUiAuq4+aIwzCTwqNbGHcoCDyN91omhLpEm7vGzHVEVF4geKJJz4HJx2hAfOZzVMj43 p2YmbjfwnwEdM7KMPKOkAevbnVClkiVikrKxvg0LG1aebuaCltHOFAXstyGxOnB3fVCC X7GuQPAxoD8XAhdNS9+WnWX7N5L3bOf4VNflfF9yv9yy53zLoLuBzCdGYMMrRpfIHovc zNwduqx6p/ZeU/cT+JbgaEDVBluL+1cquECWxRQWbj7lqifnnKDSX3T1XqDaI53JXiZD DjzA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZbrlCySEnnG6Or/L4AbHY+cZysuiDWdTS3h4vO+aAsw=; b=vOrFFC1N0YEBw/J00FpTSnsf72PP4EzDxz7I/X8SVmJz+E8uMhCAnX/jVPGhNIWIRA mbD3sEmguDtBC1vtEFOoAuwqWht+VBcZ7+7fodjZ+lAp0HF00KNi4krif+aoZyoL0nnT q8DdvGBYhJv6/i49bAxsWNNoW8SzZJ8ODsLLz6LKNzawxh6RLJX12NK4WvoMlo/hJjVO XskgdExYNV2mDR/z2lxWdBODYlTJaNiRVcZQvKS0Higi/eFPx1+OMjctkPTmm9yYxU5C dKrEBzMobeWAxQFmdHWgAtWvCnlp1/QG/KZr4I6QqicDh5qdZgkMcCBE52lsSMc76/Rt TXHg== X-Gm-Message-State: AO0yUKWDVJo/karJtLt+Zc8MrqqxezMdrYCEAu15sbqzhiJK9xdJ7cFO FWMMvfePD/y0hkOieX5Lzal88xEg4Yf+f4Wh X-Received: by 2002:adf:f444:0:b0:2ca:c865:51c4 with SMTP id f4-20020adff444000000b002cac86551c4mr3919698wrp.0.1677506629832; Mon, 27 Feb 2023 06:03:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l9-20020adffe89000000b002c59e001631sm7256712wrr.77.2023.02.27.06.03.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 027/126] accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation Date: Mon, 27 Feb 2023 15:00:34 +0100 Message-Id: <20230227140213.35084-18-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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=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 Since commit a0e61807a3 ("qapi: Remove QMP events and commands from user-mode builds") we don't generate the "qapi-commands-machine.h" header in a user-emulation-only build. Rename 'hmp.c' as 'monitor.c' and move the QMP functions from cpu-exec.c (which is always compiled) to monitor.c (which is only compiled when system-emulation is selected). Reviewed-by: Richard Henderson Message-Id: <20221219170806.60580-4-philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/cpu-exec.c | 88 +---------------------------------- accel/tcg/hmp.c | 14 ------ accel/tcg/internal.h | 3 ++ accel/tcg/meson.build | 2 +- accel/tcg/monitor.c | 106 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 112 insertions(+), 101 deletions(-) delete mode 100644 accel/tcg/hmp.c create mode 100644 accel/tcg/monitor.c diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 29b9bdac38..5c9e30a803 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -20,7 +20,6 @@ #include "qemu/osdep.h" #include "qemu/qemu-print.h" #include "qapi/error.h" -#include "qapi/qapi-commands-machine.h" #include "qapi/type-helpers.h" #include "hw/core/tcg-cpu-ops.h" #include "trace.h" @@ -63,8 +62,8 @@ typedef struct SyncClocks { #define MAX_DELAY_PRINT_RATE 2000000000LL #define MAX_NB_PRINTS 100 -static int64_t max_delay; -static int64_t max_advance; +int64_t max_delay; +int64_t max_advance; static void align_clocks(SyncClocks *sc, CPUState *cpu) { @@ -1071,86 +1070,3 @@ void tcg_exec_unrealizefn(CPUState *cpu) tlb_destroy(cpu); g_free_rcu(cpu->tb_jmp_cache, rcu); } - -#ifndef CONFIG_USER_ONLY - -static void dump_drift_info(GString *buf) -{ - if (!icount_enabled()) { - return; - } - - g_string_append_printf(buf, "Host - Guest clock %"PRIi64" ms\n", - (cpu_get_clock() - icount_get()) / SCALE_MS); - if (icount_align_option) { - g_string_append_printf(buf, "Max guest delay %"PRIi64" ms\n", - -max_delay / SCALE_MS); - g_string_append_printf(buf, "Max guest advance %"PRIi64" ms\n", - max_advance / SCALE_MS); - } else { - g_string_append_printf(buf, "Max guest delay NA\n"); - g_string_append_printf(buf, "Max guest advance NA\n"); - } -} - -HumanReadableText *qmp_x_query_jit(Error **errp) -{ - g_autoptr(GString) buf = g_string_new(""); - - if (!tcg_enabled()) { - error_setg(errp, "JIT information is only available with accel=tcg"); - return NULL; - } - - dump_exec_info(buf); - dump_drift_info(buf); - - return human_readable_text_from_str(buf); -} - -HumanReadableText *qmp_x_query_opcount(Error **errp) -{ - g_autoptr(GString) buf = g_string_new(""); - - if (!tcg_enabled()) { - error_setg(errp, "Opcode count information is only available with accel=tcg"); - return NULL; - } - - tcg_dump_op_count(buf); - - return human_readable_text_from_str(buf); -} - -#ifdef CONFIG_PROFILER - -int64_t dev_time; - -HumanReadableText *qmp_x_query_profile(Error **errp) -{ - g_autoptr(GString) buf = g_string_new(""); - static int64_t last_cpu_exec_time; - int64_t cpu_exec_time; - int64_t delta; - - cpu_exec_time = tcg_cpu_exec_time(); - delta = cpu_exec_time - last_cpu_exec_time; - - g_string_append_printf(buf, "async time %" PRId64 " (%0.3f)\n", - dev_time, dev_time / (double)NANOSECONDS_PER_SECOND); - g_string_append_printf(buf, "qemu time %" PRId64 " (%0.3f)\n", - delta, delta / (double)NANOSECONDS_PER_SECOND); - last_cpu_exec_time = cpu_exec_time; - dev_time = 0; - - return human_readable_text_from_str(buf); -} -#else -HumanReadableText *qmp_x_query_profile(Error **errp) -{ - error_setg(errp, "Internal profiler not compiled"); - return NULL; -} -#endif - -#endif /* !CONFIG_USER_ONLY */ diff --git a/accel/tcg/hmp.c b/accel/tcg/hmp.c deleted file mode 100644 index bb67941420..0000000000 --- a/accel/tcg/hmp.c +++ /dev/null @@ -1,14 +0,0 @@ -#include "qemu/osdep.h" -#include "qemu/error-report.h" -#include "qapi/error.h" -#include "qapi/qapi-commands-machine.h" -#include "exec/exec-all.h" -#include "monitor/monitor.h" - -static void hmp_tcg_register(void) -{ - monitor_register_hmp_info_hrt("jit", qmp_x_query_jit); - monitor_register_hmp_info_hrt("opcount", qmp_x_query_opcount); -} - -type_init(hmp_tcg_register); diff --git a/accel/tcg/internal.h b/accel/tcg/internal.h index 6edff16fb0..130d7fd564 100644 --- a/accel/tcg/internal.h +++ b/accel/tcg/internal.h @@ -64,4 +64,7 @@ static inline target_ulong log_pc(CPUState *cpu, const TranslationBlock *tb) #endif } +extern int64_t max_delay; +extern int64_t max_advance; + #endif /* ACCEL_TCG_INTERNAL_H */ diff --git a/accel/tcg/meson.build b/accel/tcg/meson.build index 77740b1a0d..aeb20a6ef0 100644 --- a/accel/tcg/meson.build +++ b/accel/tcg/meson.build @@ -18,7 +18,7 @@ specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files( 'cputlb.c', - 'hmp.c', + 'monitor.c', )) tcg_module_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: files( diff --git a/accel/tcg/monitor.c b/accel/tcg/monitor.c new file mode 100644 index 0000000000..1450e160e9 --- /dev/null +++ b/accel/tcg/monitor.c @@ -0,0 +1,106 @@ +/* + * SPDX-License-Identifier: LGPL-2.1-or-later + * + * QEMU TCG monitor + * + * Copyright (c) 2003-2005 Fabrice Bellard + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qapi/type-helpers.h" +#include "qapi/qapi-commands-machine.h" +#include "monitor/monitor.h" +#include "sysemu/cpus.h" +#include "sysemu/cpu-timers.h" +#include "sysemu/tcg.h" +#include "internal.h" + + +static void dump_drift_info(GString *buf) +{ + if (!icount_enabled()) { + return; + } + + g_string_append_printf(buf, "Host - Guest clock %"PRIi64" ms\n", + (cpu_get_clock() - icount_get()) / SCALE_MS); + if (icount_align_option) { + g_string_append_printf(buf, "Max guest delay %"PRIi64" ms\n", + -max_delay / SCALE_MS); + g_string_append_printf(buf, "Max guest advance %"PRIi64" ms\n", + max_advance / SCALE_MS); + } else { + g_string_append_printf(buf, "Max guest delay NA\n"); + g_string_append_printf(buf, "Max guest advance NA\n"); + } +} + +HumanReadableText *qmp_x_query_jit(Error **errp) +{ + g_autoptr(GString) buf = g_string_new(""); + + if (!tcg_enabled()) { + error_setg(errp, "JIT information is only available with accel=tcg"); + return NULL; + } + + dump_exec_info(buf); + dump_drift_info(buf); + + return human_readable_text_from_str(buf); +} + +HumanReadableText *qmp_x_query_opcount(Error **errp) +{ + g_autoptr(GString) buf = g_string_new(""); + + if (!tcg_enabled()) { + error_setg(errp, + "Opcode count information is only available with accel=tcg"); + return NULL; + } + + tcg_dump_op_count(buf); + + return human_readable_text_from_str(buf); +} + +#ifdef CONFIG_PROFILER + +int64_t dev_time; + +HumanReadableText *qmp_x_query_profile(Error **errp) +{ + g_autoptr(GString) buf = g_string_new(""); + static int64_t last_cpu_exec_time; + int64_t cpu_exec_time; + int64_t delta; + + cpu_exec_time = tcg_cpu_exec_time(); + delta = cpu_exec_time - last_cpu_exec_time; + + g_string_append_printf(buf, "async time %" PRId64 " (%0.3f)\n", + dev_time, dev_time / (double)NANOSECONDS_PER_SECOND); + g_string_append_printf(buf, "qemu time %" PRId64 " (%0.3f)\n", + delta, delta / (double)NANOSECONDS_PER_SECOND); + last_cpu_exec_time = cpu_exec_time; + dev_time = 0; + + return human_readable_text_from_str(buf); +} +#else +HumanReadableText *qmp_x_query_profile(Error **errp) +{ + error_setg(errp, "Internal profiler not compiled"); + return NULL; +} +#endif + +static void hmp_tcg_register(void) +{ + monitor_register_hmp_info_hrt("jit", qmp_x_query_jit); + monitor_register_hmp_info_hrt("opcount", qmp_x_query_opcount); +} + +type_init(hmp_tcg_register); From patchwork Mon Feb 27 14:00:35 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: 657014 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2371887wrb; Mon, 27 Feb 2023 06:10:50 -0800 (PST) X-Google-Smtp-Source: AK7set/0JFdCLadUEcvsxk+luRZV+lJS5ZoDuzK1MfrKSZRSc+aRsQz5nBUhHXDznXCGEt2d68oO X-Received: by 2002:a05:6214:c22:b0:56c:858:6c00 with SMTP id a2-20020a0562140c2200b0056c08586c00mr39548899qvd.32.1677507050702; Mon, 27 Feb 2023 06:10:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507050; cv=none; d=google.com; s=arc-20160816; b=cdTKrKAPgxdiK/prsOAPmy1T/kDtN5sDFwm4fdydmEYrb1C/1+3OLJkCZx2H/6gIU1 +VmKzuachthMDAbQ5HROwyptraY+yBT3eKhn7v+L3StG0yuEQ2Se4rbZ55G5HHQPADW6 wPVlmn+TqOJEbiIAej1rETjvqNTEAg0rKUgRQUUod7WMSKWvEtlKmPF5tx+UOLQBPo0H A+IF1tes+3tuIGWSZ5hJ5Hq9cOK8uzou521WAgE1lEI6sB9GfG7cMdxSQoOtgtHrQAv8 sLJQULxrB08jFwdb/dte4nPk1qbWstLbVj8MqalfXZ9jcSA5VGRs8bTkJZCQYtH6QfEF AKxg== 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:to:from :dkim-signature; bh=vpl9vEKMKT9/BEtmXepusmjvuZlR1l2LpRiJAanevzY=; b=kVn8GSmiQ+yuPWHQytiLzvNNrErGzFWDJpQkRF/HVcqrbibL6a1Xgn5OGEk1XZ5TCY uL1UuUh3pT1mtCsx85IEEAOmakvvCri83UdS2stZvzud3yc9bmioIewFziCyz0z9tppI tAwfLwDdJpN1IUQLq6hnyF8ATzRr+j3G0b+Bh5UXiT0unWe4GVNfuOkmECZKMoEBcYn4 1eAQMGMukVnTW1ttvKn2/tEWTKf3YIbQ/Wmx5I1rI8hXT6TgEJwjLIhn1gRoEjmIwYYp Qxwo6+YQYXo7XxUsEtinKSdBY5/7SluzndSwxoajdGAzQMxA3A7KKuK10v30RCiBTqaK LnMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wJ5irwSV; 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 g4-20020a0ce4c4000000b005353d269016si6642093qvm.304.2023.02.27.06.10.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:10:50 -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=wJ5irwSV; 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 1pWe6v-0001HB-CK; Mon, 27 Feb 2023 09:04:13 -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 1pWe6g-00010q-Gr for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:00 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe6f-0007w2-32 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:03:58 -0500 Received: by mail-wm1-x335.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so7224255wmb.5 for ; Mon, 27 Feb 2023 06:03:56 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=vpl9vEKMKT9/BEtmXepusmjvuZlR1l2LpRiJAanevzY=; b=wJ5irwSVwkTY6kNKdbWMgUt8i/u+4FdmCL3S7VTKfrQ02EKejvcSlYJpaqbnAHnAtA 0gEz4QClNTEWPP0YJGYUc2NRiXDhf2ZAQbdVTTBaH9umDry9cYxB4EiHDp0mlyOy+qm5 stga3JIQ3m/wb0qMDTm/h83b4+bELumi2+mCchZjSjhpxKfg0e64hQLtWQ9gnZN66uYh N0n4V5aE1zCFKRQqshL9MowH534iaBlROAoc2/PVER0xytWMr3wvVYlkAvA5Y0Fc+9xl mZV1izB0A2+5aYHFjbAd5NRVzyrVhCOpDffI01vg/eDXUuBiYZ7Og3DCkbbsuEmBzmSw SlzQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vpl9vEKMKT9/BEtmXepusmjvuZlR1l2LpRiJAanevzY=; b=5QsIfU8NlVrCcsFNfifXV+oH9GLFiHVrizy0Jk6QPR+h6SrIRElfaXkCPuf4ixDQ/W EHHYq8ky+cPANuFTpDMT9lO+o/cEZlAnHgXfpvfxRYFFZZT/LBAaJSVDLEjs4+WdijuJ 4ZW7Kg/zzSrl7W+4wdLbVw+jGDcauvqnXMojn6Gerb2kxtPgA4/JfGj8pc9LPMRcsZt+ EVkIEQcsFcV3GRXzVUn6EFijtE1f4bPrbBGJVhn2fNK9r8ie25m0THXy4aPFlfYU+qZG /MLuv3vM4fsSuiwQtU/X3ApmBP1gC0D2dqCtBu216b30RYnVhIFU7vqAX+Jph+5gJL9a Blow== X-Gm-Message-State: AO0yUKXV02e1s/Qk+oOIs0LEy7CpusoYZQCLOhpZzBqQdGqZNZ8MolYm /DUoY4p1PaHix2CcdDqXA094KuTS4TzLy7cm X-Received: by 2002:a05:600c:44d6:b0:3eb:19e7:b291 with SMTP id f22-20020a05600c44d600b003eb19e7b291mr8296914wmo.11.1677506635259; Mon, 27 Feb 2023 06:03:55 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id d8-20020a05600c34c800b003dc4480df80sm13619424wmq.34.2023.02.27.06.03.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 028/126] accel/xen: Remove dead code Date: Mon, 27 Feb 2023 15:00:35 +0100 Message-Id: <20230227140213.35084-19-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=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 Unused since introduction in commit 04b0de0ee8 ("xen: factor out common functions"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Acked-by: Paul Durrant Message-Id: <20230215153451.30626-1-philmd@linaro.org> --- accel/xen/xen-all.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c index 69aa7d018b..c1b697a8bd 100644 --- a/accel/xen/xen-all.c +++ b/accel/xen/xen-all.c @@ -23,16 +23,6 @@ #include "migration/global_state.h" #include "hw/boards.h" -//#define DEBUG_XEN - -#ifdef DEBUG_XEN -#define DPRINTF(fmt, ...) \ - do { fprintf(stderr, "xen: " fmt, ## __VA_ARGS__); } while (0) -#else -#define DPRINTF(fmt, ...) \ - do { } while (0) -#endif - bool xen_allowed; xc_interface *xen_xc; From patchwork Mon Feb 27 14:00:36 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: 657006 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370761wrb; Mon, 27 Feb 2023 06:09:00 -0800 (PST) X-Google-Smtp-Source: AK7set/m5UWBVES/HXCTh4iJ+hKMl3NzVHWYujT1QyR2PN3yp7z6XeArdING5g3u7vB9jGWZdFBl X-Received: by 2002:a05:622a:1648:b0:3b9:e0b2:9a49 with SMTP id y8-20020a05622a164800b003b9e0b29a49mr44007417qtj.60.1677506939809; Mon, 27 Feb 2023 06:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506939; cv=none; d=google.com; s=arc-20160816; b=lUommo3pLk6t+2pPb8wbakeydIKVJyh8qjzqmTzqiD4muTc0cNFXHe1wSol1lQF5an nqvpczRB0wzgJ8TTAH4Xyv6Nki6PQt3Szdq+MTmYhnfjl4hTsqh950abV5NljAUguxyH 4DPQ4WzdtnqlV6v2T1Ji2c2LoutbTsexaMk51GyqtgJPPOtWOFlIAd6p/ou8z/uKwayC guP+cNjQwEfY/ow34DP3e7ppOokUlHI6es0ayGiqgl2QumPtgjuFOUbUCnZdDKvcJURn g6Ankr/5z0ZNpc/a6msR/XZYy/2n2qaoulv3aYGq/rp82GyeNcU+0hmdDovKpLQzTd3q djEA== 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:to:from :dkim-signature; bh=5kASCm86qS5mH9bMZLw45mjOputGQxu7Ksj6xUnov3Y=; b=VSLthRuG8XAplJtqxyi1VA8Vba/py3+crW+02nqsea2mfufr82OUixJZlqU3hAyb0c /Rm/nOYz41MIjc4WIMCpwBYSxLuP6eZ+GYd0AZ2xzMx9/BbHQXVM/VuWXuFKTMj8gB8+ JCQIg1d2/JmK9l7T/NhxZnLTRP++igxmQlXdYj60XQGDJNesJZu4hBkgSYrXRn8Z7pCz OaCByBUt+N0bAUdm9CVaLet6bWR1agvTc2eFH2pnxAH4B4kSWZdxSxV0KUgpBaAbRPka 2XaPho/1EN0EPn6X/WNxHFUA2rVYThGy4AuGJa/57VCIGC2c2mfmpOcrBxx70ydoyNcb AvOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DlJi9cub; 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 t10-20020ac8588a000000b003ba1f0994b3si6293868qta.193.2023.02.27.06.08.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:59 -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=DlJi9cub; 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 1pWe6v-0001HC-Cc; Mon, 27 Feb 2023 09:04:13 -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 1pWe6m-00013x-Ej for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:09 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe6k-0007wd-MT for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:04 -0500 Received: by mail-wm1-x32c.google.com with SMTP id m14-20020a7bce0e000000b003e00c739ce4so3885133wmc.5 for ; Mon, 27 Feb 2023 06:04:02 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=5kASCm86qS5mH9bMZLw45mjOputGQxu7Ksj6xUnov3Y=; b=DlJi9cub52j163cUeyRCLo6dXhHnCdbZ5/ppIhZcrPJ34+QMb2KDbR9X2jh/3AgmJA I5Z8a5W84nT2aJeB4MLEBMj6phvOMDnkmqNMazzoHZbs/GlsvsKAC/dO4A0Uul+p+HL5 DO/BBOO18lEDyAeKh+z1ZuY/hTTcgk6/0pE5LHBZNIMMmqkK2MylQeqZsp+0ig4tUaXE C1MFZFABa4O6FA1uzJ5rMqaR7+FDtsqBbDLhy4HE0is87LfesKI8t9wf+MfF+Kraj5e9 KYK2ioNl8qSgI/7Tbr9KVal9LCfCx4o7BHDFNAzlpt1TO537tKjjPvCLpUtIsdVdt96s Axfw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5kASCm86qS5mH9bMZLw45mjOputGQxu7Ksj6xUnov3Y=; b=r/++WMYLXaURiuWndCBJZB0azYQK0+8BPxvxTHdni78mZOXK04/AQYopTvw4aiSOWG Lq/XEiE6rh/mC0gNQvX7oAvmNqpWB6+0LjPEDwDdsO9Pm1zRCNOpZwB/1TbgpAAeV8oL WLekZgZX9O27EznXUWJVouzIovZh0y222dlwwEexIKB84HLnfTqhOJb7Zgn+7rVJt0Cg RInSpLQ700ER5EAEr9FI+Nvu1FP/x5Oc1JQ+X636Lg6XvjZ02hA8J7SD1Z9uJYFob26q 25MS52Z9TJ5WkfZFZlwPtNGT2ukkA+I6LIWzAKjtC24oKfgC+kF+Qg6B3H4gvapdh7YY IFwA== X-Gm-Message-State: AO0yUKX6dBKsHlnw3eT8bbEFu5AhhtSH3YpNyx9JhPXdASmZCq6hqH/c xunP4j2mecCyW44m0zCapzIIuUkihb3uSFkJ X-Received: by 2002:a05:600c:4da2:b0:3ea:bc08:b63e with SMTP id v34-20020a05600c4da200b003eabc08b63emr10631414wmp.2.1677506640929; Mon, 27 Feb 2023 06:04:00 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z23-20020a1c4c17000000b003e2066a6339sm9029832wmf.5.2023.02.27.06.03.59 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:03:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 029/126] accel/kvm: Silent -Wmissing-field-initializers warning Date: Mon, 27 Feb 2023 15:00:36 +0100 Message-Id: <20230227140213.35084-20-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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=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 Silent when compiling with -Wextra: ../accel/kvm/kvm-all.c:2291:17: warning: missing field 'num' initializer [-Wmissing-field-initializers] { NULL, } ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id: <20221220143532.24958-3-philmd@linaro.org> --- accel/kvm/kvm-all.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 79b3d58a9c..86f7523833 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2361,13 +2361,13 @@ static int kvm_init(MachineState *ms) static const char upgrade_note[] = "Please upgrade to at least kernel 2.6.29 or recent kvm-kmod\n" "(see http://sourceforge.net/projects/kvm).\n"; - struct { + const struct { const char *name; int num; } num_cpus[] = { { "SMP", ms->smp.cpus }, { "hotpluggable", ms->smp.max_cpus }, - { NULL, } + { /* end of list */ } }, *nc = num_cpus; int soft_vcpus_limit, hard_vcpus_limit; KVMState *s; From patchwork Mon Feb 27 14:00:37 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: 657073 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380962wrb; Mon, 27 Feb 2023 06:27:59 -0800 (PST) X-Google-Smtp-Source: AK7set9YTEGsiqOajR3aN5+vmgIFtK+i4lrtauQXJWuAbgstXhNivRPXJi17jrBpZkBZk55hF3Y/ X-Received: by 2002:a05:6214:2027:b0:56e:a0eb:9b28 with SMTP id 7-20020a056214202700b0056ea0eb9b28mr53624615qvf.3.1677508078980; Mon, 27 Feb 2023 06:27:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508078; cv=none; d=google.com; s=arc-20160816; b=e27Uk53rS9oMz+BVrtWwlBKz4Yw1muya4xk5024uT6TUH6ENccA1wfVp4w5ZpRAPvi kVrlYguOQPdtaiMm1tMZGC2+twS3rdSCKx32bLWQdgYeebMLUNvWyp9BtlopXWXeVvoZ A0anXpdtNN63jD2FnOFxFQJgWkYaRXVbxIJESH088kj21ySvaU+pkopzwon/Ze8T+psZ E0aRA1KoidxcT/vmRt2YoDYbjd1QHfAM7924/Q5+aZ4lZjS/9HrrUKW57vxDOdXF2WK0 RWbAsHGRwdBlPW73ps7feLMtK5X43ZM8SaFrk4sKIXK/CswejU91aEMFSw0eGiOaeuWa y5Pg== 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:to:from :dkim-signature; bh=CnN1bti1BVbfMA3pVea86tfxztwo7BnR5XFtex2Mw6k=; b=CCY5U0PEHEBQvUJoMhTkHT/L9Y6Ql+IKG6RimGen98vxCdy2SdFdXrgW3HXat2NkMA NtwXapH3PNdN19PIvAgTvt81VoKyqzLk1LBM7YFHRvdaQWUGCuAkq2Ap45A308gZ/uhj EnNfSyAFeQJqqrB6A122pCHQ321KJGAi1mW2YLiBhxMHT0U/R+A3bjyRNnrqF4v+WTk/ A/YkMArloV6beL3DkPzJ9WAdmhO+NBfjU9fmORFxk8dyVJAPNT74nKbItK/I0r70ynn8 0vLpIIKKqIqCTRBD1rRjEYcfFoy8zWRCWuKxu9O/Nrj1W4EguRx7XPfKxJt1S0fMbpN9 lQtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bz4NjgRc; 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 w11-20020a0ce10b000000b0057111221a51si6214265qvk.332.2023.02.27.06.27.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:27: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=Bz4NjgRc; 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 1pWe6w-0001Ln-Dz; Mon, 27 Feb 2023 09:04:14 -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 1pWe6r-00016K-91 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:09 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe6p-0007y7-Ma for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:08 -0500 Received: by mail-wr1-x42b.google.com with SMTP id bx12so3187544wrb.11 for ; Mon, 27 Feb 2023 06:04:07 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=CnN1bti1BVbfMA3pVea86tfxztwo7BnR5XFtex2Mw6k=; b=Bz4NjgRcD6QwVWwJfkFGmOpxVDhZ3qzEI2U8ikRalPpfoYSgXrjtRT2EBdsqldrS1D ItwBexyQDqVZtzXxR+szBKFAVLBx0gnoCE/XF9ItrxV3fjo7/1pYKQTxhXYvko/zFQUR c2A71czY3/PiZVvDo+iHLTLLt18ekSjABrXj8aQAEKD4M1IXDY4gyj1dhtO2e2GwoSS6 T+TxEUKhc457pc/YoY874oX6lL4UAemcEEgzkl01ZRRkP04Yvl1u2ce7FeqjR5/7DHmS 3HWBkSVhKfoGLYbSFbeNZYgpOS1aQGGh95MSddrlSs1SuPzJssrcC+xPnjTwb8lMpQOQ bV+g== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CnN1bti1BVbfMA3pVea86tfxztwo7BnR5XFtex2Mw6k=; b=lZgobpQtn7eSPhcuvsJ0+gmDyl4dIea1cuw9JpvvTj+DiYAj7LB5T0eJEU4sbezBf9 nFc2M1xwdGB+93L97q5cPc2V4exhBBJg0XHWjcLdOTUKpkpGlDQqCOaXnuZG8CAWt+iy TihFpIvekK3FKTIlNHT1Oy+KU6x6g/bxYbdVBgdCsPk0q9b5Q951nCDPi7nXEUG4Crsz xtCSPr/U8pwC5dOyoUrUSZVd2JYCiOOU/x+mVWvte2vXHMpI57BwrO1/vxS+bnT6vzn2 dF4Lx7t7GbOZHz15+vi7/HlHCx8a00K0pMVpo2ftJ7GHpu+feR6VnU/iFsxdvCHHk/Ds c6hw== X-Gm-Message-State: AO0yUKVD76WVpVfkdHw2BtjPxxujQ02zKbeJunYHwPPLtPq+mKFOw2Uu KUAwH01C89f10I5MpYm0d5HiZoDelGeSjOOC X-Received: by 2002:a05:6000:1372:b0:2ca:9950:718 with SMTP id q18-20020a056000137200b002ca99500718mr4405822wrz.52.1677506646219; Mon, 27 Feb 2023 06:04:06 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id c18-20020adfed92000000b002c54c9bd71fsm7343997wro.93.2023.02.27.06.04.05 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 030/126] sysemu/kvm: Remove CONFIG_USER_ONLY guard Date: Mon, 27 Feb 2023 15:00:37 +0100 Message-Id: <20230227140213.35084-21-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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=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 User emulation shouldn't really include this header; if included these declarations are guarded by CONFIG_KVM_IS_POSSIBLE. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221216220738.7355-2-philmd@linaro.org> --- include/sysemu/kvm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index e9a97eda8c..c8281c07a7 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -471,10 +471,8 @@ uint64_t kvm_arch_get_supported_msr_feature(KVMState *s, uint32_t index); void kvm_set_sigmask_len(KVMState *s, unsigned int sigmask_len); -#if !defined(CONFIG_USER_ONLY) int kvm_physical_memory_addr_from_host(KVMState *s, void *ram_addr, hwaddr *phys_addr); -#endif #endif /* NEED_CPU_H */ From patchwork Mon Feb 27 14:00:38 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: 656988 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2368514wrb; Mon, 27 Feb 2023 06:05:32 -0800 (PST) X-Google-Smtp-Source: AK7set+RCpXYKW1UdQ2kXHaC6LDSUu1KTjLtnV6URh4J/WFuY9EAnUqLj1GE24UVpD5uaZEUtNYB X-Received: by 2002:ac2:597a:0:b0:4de:3f1e:cdc4 with SMTP id h26-20020ac2597a000000b004de3f1ecdc4mr2019660lfp.13.1677506732735; Mon, 27 Feb 2023 06:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506732; cv=none; d=google.com; s=arc-20160816; b=zQBgq2fOtaDJwvdU9ZVW3LfwbzN5PoZm6agmAx9Qvvile43ETKakrAlU3cZMSIz4/P Sbe+otoRRspfLcjZ1P+Dodgia45T1xlVXcoYrjHg+5BM+E/VjHmwF949d2FnpNiZyk1o 1pxkd1vWQecau/QoPGkPwJZNPDUdIIajykLfWtpMSNXiU/LXGuO/y13CAFkfZCjc/3oG bL8jsGVPQhT+C7RvmX5AugtL4gY+D6+GOqf2/gts+GKpLxD7n7MbruGqpOj2HzZDdGhR B1fx0BAUQqh1W6YwSyj0nSViGwDQSyD2323j26KBxIKokQ2qHGD45qoad1EAR29i/mRR aNuA== 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:to:from :dkim-signature; bh=J7FGyxdwy1SGBIKGBhr3nGSPcWRWCDFQvC3mBKovUG4=; b=tyEqd47UUQJkhlM/d8b8/nbyRSR3riXK1IdhH7/YhScSSaNym7SF0azK3rfjuoDtCK MGUmfXcJjXZ0NRM3lpc4Yvtin8aM8dh6VdJDcFzaF4eR1IG41SsNcDl3K0wvdywYIqwh LBNbY4YnBAIPK5zhyVvtb30BdQJ9pEiJIWAN/YpJ/DgeuaBeCo0kFCwNRDATX2FQPzIa hyRUJ0/hct6c4cDRs6YFNQ1XCtaubN94JxeRbHpGj5STfrYt+JVnLfzvPT/clct57YGu ioLn5Lu3w/Uox6k3yCvgip9NwkSbwxwTHu20hD/hVlfRPSECcUhpe1kzns+PSHIlW4Bb berQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sIAgOTwX; 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 a19-20020ac25213000000b004e02e4e8e78si1777146lfl.295.2023.02.27.06.05.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:05:32 -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=sIAgOTwX; 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 1pWe6z-0001YX-Be; Mon, 27 Feb 2023 09:04:17 -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 1pWe6x-0001S2-UG for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:15 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe6v-0007yU-Ll for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:15 -0500 Received: by mail-wr1-x435.google.com with SMTP id bv17so6349800wrb.5 for ; Mon, 27 Feb 2023 06:04:13 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=J7FGyxdwy1SGBIKGBhr3nGSPcWRWCDFQvC3mBKovUG4=; b=sIAgOTwX5pk90/zMSos6O2xr9+V1DaTx3ktdffEOdkcE1LHfK3wrHZGe21Kuk7L70f xNq8Qo3Lio57K8xZVNC4OsGWhxk+ewcrVNRk3qX3KIFQaM4ZsR/iZbswAuG+4NB6rfAS B0orKovewsHkWJ19Z7M1TnqBrZBHefB0v8UfVDSJII/z4UCt0b+AWFsCua3aoSntLImA qwjk1/cfzTbRZ+r9lJl11HhYZGO2Gi1qD62yk6vrusORxiFkfRJOAyHR+LxgG74JcsYw 9+NBGij2v7GE1or8Y986sLBp6kPuScUEczmKQOCPLDTWw2K6EokwWyoqUbPhpbE5Iiy8 wydg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J7FGyxdwy1SGBIKGBhr3nGSPcWRWCDFQvC3mBKovUG4=; b=4CcDk8biC2sW5Y9uQzhLfw+JmSKU4Tgz+V6gmHxxGc6wkyQTu714bsRuwTifp4E7aD Qr7xC+pbaLJVNa8nQ46pOGccs44vpBjn+SD1x1NVMXwKnVEgr5a7LLdBPQyOd8iET+wG rBlcKt18+Yc4RkoH6OR+2mzrTGgG8VHaI0JaqRVoA6jbKpLaG4qXZU9JNQfk4kosWbb/ cNSc8IYy+HqxJgDhGqEROsQhBOxVxFw62ZZK884nS0GCB4B82hKMgqdwB7EsNoW3bJud zjxueAIs5Nt+5X/cjKbKPtYvb8a/E36uqhOG/zRyhctLEOo5LdutbiIMbj5cIuaeps6C gdHA== X-Gm-Message-State: AO0yUKVOxnN0N5LneVCS3opzHJO5y7tG4dEq6u8EDauFy7ohl1Dvf1Ke +w0IClEGZrNMVzK2wYAMgt0xsS9YqlGaz9P4 X-Received: by 2002:a5d:5148:0:b0:2c7:1755:30bb with SMTP id u8-20020a5d5148000000b002c7175530bbmr9917605wrt.10.1677506651402; Mon, 27 Feb 2023 06:04:11 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i14-20020a5d55ce000000b002c559405a1csm7097077wrw.20.2023.02.27.06.04.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:10 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 031/126] replay: Extract core API to 'exec/replay-core.h' Date: Mon, 27 Feb 2023 15:00:38 +0100 Message-Id: <20230227140213.35084-22-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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=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 replay API is used deeply within TCG common code (common to user and system emulation). Unfortunately "sysemu/replay.h" requires some QAPI headers for few system-specific declarations, example: void replay_input_event(QemuConsole *src, InputEvent *evt); Since commit c2651c0eaa ("qapi/meson: Restrict UI module to system emulation and tools") the QAPI header defining the InputEvent is not generated anymore. To keep it simple, extract the 'core' replay prototypes to a new "exec/replay-core.h" header which we include in the TCG code that doesn't need the rest of the replay API. Reviewed-by: Pavel Dovgalyuk Message-Id: <20221219170806.60580-5-philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + accel/tcg/cpu-exec.c | 2 +- accel/tcg/tcg-all.c | 2 +- accel/tcg/translator.c | 2 +- accel/tcg/user-exec-stub.c | 2 +- cpu.c | 2 +- gdbstub/gdbstub.c | 2 +- hw/core/ptimer.c | 2 +- include/exec/replay-core.h | 80 ++++++++++++++++++++++++++++++++++ include/sysemu/replay.h | 67 ++-------------------------- stubs/replay.c | 2 +- tests/unit/ptimer-test-stubs.c | 2 +- util/guest-random.c | 2 +- 13 files changed, 95 insertions(+), 73 deletions(-) create mode 100644 include/exec/replay-core.h diff --git a/MAINTAINERS b/MAINTAINERS index 5c1ee41139..6f1d230027 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3236,6 +3236,7 @@ S: Supported F: replay/* F: block/blkreplay.c F: net/filter-replay.c +F: include/exec/replay-core.h F: include/sysemu/replay.h F: docs/devel/replay.rst F: docs/system/replay.rst diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index 5c9e30a803..ef557e57aa 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -36,7 +36,7 @@ #include "sysemu/cpus.h" #include "exec/cpu-all.h" #include "sysemu/cpu-timers.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "sysemu/tcg.h" #include "exec/helper-proto.h" #include "tb-jmp-cache.h" diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 30b503fb22..5dab1ae9dd 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -25,7 +25,7 @@ #include "qemu/osdep.h" #include "sysemu/tcg.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "sysemu/cpu-timers.h" #include "tcg/tcg.h" #include "qapi/error.h" diff --git a/accel/tcg/translator.c b/accel/tcg/translator.c index 1cf404ced0..15d11fabc5 100644 --- a/accel/tcg/translator.c +++ b/accel/tcg/translator.c @@ -16,7 +16,7 @@ #include "exec/log.h" #include "exec/translator.h" #include "exec/plugin-gen.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" /* Pairs with tcg_clear_temp_count. To be called by #TranslatorOps.{translate_insn,tb_stop} if diff --git a/accel/tcg/user-exec-stub.c b/accel/tcg/user-exec-stub.c index 968cd3ca60..874e1f1a20 100644 --- a/accel/tcg/user-exec-stub.c +++ b/accel/tcg/user-exec-stub.c @@ -1,6 +1,6 @@ #include "qemu/osdep.h" #include "hw/core/cpu.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" bool enable_cpu_pm = false; diff --git a/cpu.c b/cpu.c index 44df16231f..2e9f931249 100644 --- a/cpu.c +++ b/cpu.c @@ -33,7 +33,7 @@ #endif #include "sysemu/tcg.h" #include "sysemu/kvm.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "exec/cpu-common.h" #include "exec/exec-all.h" #include "exec/translate-all.h" diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c index c3fbc31123..fb9c49e0fd 100644 --- a/gdbstub/gdbstub.c +++ b/gdbstub/gdbstub.c @@ -48,7 +48,7 @@ #include "sysemu/runstate.h" #include "semihosting/semihost.h" #include "exec/exec-all.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "internals.h" diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index eb5ba1aff7..e03165febf 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -10,7 +10,7 @@ #include "hw/ptimer.h" #include "migration/vmstate.h" #include "qemu/host-utils.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "sysemu/cpu-timers.h" #include "sysemu/qtest.h" #include "block/aio.h" diff --git a/include/exec/replay-core.h b/include/exec/replay-core.h new file mode 100644 index 0000000000..244c77acce --- /dev/null +++ b/include/exec/replay-core.h @@ -0,0 +1,80 @@ +/* + * QEMU replay core API + * + * Copyright (c) 2010-2015 Institute for System Programming + * of the Russian Academy of Sciences. + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#ifndef EXEC_REPLAY_H +#define EXEC_REPLAY_H + +#include "qapi/qapi-types-replay.h" + +extern ReplayMode replay_mode; + +/* Replay process control functions */ + +/* Enables recording or saving event log with specified parameters */ +void replay_configure(struct QemuOpts *opts); +/* Initializes timers used for snapshotting and enables events recording */ +void replay_start(void); +/* Closes replay log file and frees other resources. */ +void replay_finish(void); +/* Adds replay blocker with the specified error description */ +void replay_add_blocker(const char *feature); +/* Returns name of the replay log file */ +const char *replay_get_filename(void); + +/* + * Start making one step in backward direction. + * Used by gdbstub for backwards debugging. + * Returns true on success. + */ +bool replay_reverse_step(void); +/* + * Start searching the last breakpoint/watchpoint. + * Used by gdbstub for backwards debugging. + * Returns true if the process successfully started. + */ +bool replay_reverse_continue(void); +/* + * Returns true if replay module is processing + * reverse_continue or reverse_step request + */ +bool replay_running_debug(void); +/* Called in reverse debugging mode to collect breakpoint information */ +void replay_breakpoint(void); +/* Called when gdb is attached to gdbstub */ +void replay_gdb_attached(void); + +/* Interrupts and exceptions */ + +/* Called by exception handler to write or read exception processing events */ +bool replay_exception(void); +/* + * Used to determine that exception is pending. + * Does not proceed to the next event in the log. + */ +bool replay_has_exception(void); +/* + * Called by interrupt handlers to write or read interrupt processing events. + * Returns true if interrupt should be processed. + */ +bool replay_interrupt(void); +/* + * Tries to read interrupt event from the file. + * Returns true, when interrupt request is pending. + */ +bool replay_has_interrupt(void); + +/* Processing data from random generators */ + +/* Saves the values from the random number generator */ +void replay_save_random(int ret, void *buf, size_t len); +/* Loads the saved values for the random number generator */ +int replay_read_random(void *buf, size_t len); + +#endif diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h index 6e5ab09f71..08aae5869f 100644 --- a/include/sysemu/replay.h +++ b/include/sysemu/replay.h @@ -1,8 +1,8 @@ -#ifndef REPLAY_H -#define REPLAY_H +#ifndef SYSEMU_REPLAY_H +#define SYSEMU_REPLAY_H /* - * replay.h + * QEMU replay (system interface) * * Copyright (c) 2010-2015 Institute for System Programming * of the Russian Academy of Sciences. @@ -12,9 +12,9 @@ * */ +#include "exec/replay-core.h" #include "qapi/qapi-types-misc.h" #include "qapi/qapi-types-run-state.h" -#include "qapi/qapi-types-replay.h" #include "qapi/qapi-types-ui.h" #include "block/aio.h" @@ -45,8 +45,6 @@ typedef enum ReplayCheckpoint ReplayCheckpoint; typedef struct ReplayNetState ReplayNetState; -extern ReplayMode replay_mode; - /* Name of the initial VM snapshot */ extern char *replay_snapshot; @@ -63,40 +61,6 @@ extern char *replay_snapshot; void replay_mutex_lock(void); void replay_mutex_unlock(void); -/* Replay process control functions */ - -/*! Enables recording or saving event log with specified parameters */ -void replay_configure(struct QemuOpts *opts); -/*! Initializes timers used for snapshotting and enables events recording */ -void replay_start(void); -/*! Closes replay log file and frees other resources. */ -void replay_finish(void); -/*! Adds replay blocker with the specified error description */ -void replay_add_blocker(const char *feature); -/* Returns name of the replay log file */ -const char *replay_get_filename(void); -/* - * Start making one step in backward direction. - * Used by gdbstub for backwards debugging. - * Returns true on success. - */ -bool replay_reverse_step(void); -/* - * Start searching the last breakpoint/watchpoint. - * Used by gdbstub for backwards debugging. - * Returns true if the process successfully started. - */ -bool replay_reverse_continue(void); -/* - * Returns true if replay module is processing - * reverse_continue or reverse_step request - */ -bool replay_running_debug(void); -/* Called in reverse debugging mode to collect breakpoint information */ -void replay_breakpoint(void); -/* Called when gdb is attached to gdbstub */ -void replay_gdb_attached(void); - /* Processing the instructions */ /*! Returns number of executed instructions. */ @@ -106,22 +70,6 @@ int replay_get_instructions(void); /*! Updates instructions counter in replay mode. */ void replay_account_executed_instructions(void); -/* Interrupts and exceptions */ - -/*! Called by exception handler to write or read - exception processing events. */ -bool replay_exception(void); -/*! Used to determine that exception is pending. - Does not proceed to the next event in the log. */ -bool replay_has_exception(void); -/*! Called by interrupt handlers to write or read - interrupt processing events. - \return true if interrupt should be processed */ -bool replay_interrupt(void); -/*! Tries to read interrupt event from the file. - Returns true, when interrupt request is pending */ -bool replay_has_interrupt(void); - /* Processing clocks and other time sources */ /*! Save the specified clock */ @@ -143,13 +91,6 @@ int64_t replay_read_clock(ReplayClockKind kind, int64_t raw_icount); ? replay_save_clock((clock), (value), icount_get_raw_locked()) \ : (value)) -/* Processing data from random generators */ - -/* Saves the values from the random number generator */ -void replay_save_random(int ret, void *buf, size_t len); -/* Loads the saved values for the random number generator */ -int replay_read_random(void *buf, size_t len); - /* Events */ /*! Called when qemu shutdown is requested. */ diff --git a/stubs/replay.c b/stubs/replay.c index 9d5b4be339..42c92e4acb 100644 --- a/stubs/replay.c +++ b/stubs/replay.c @@ -1,5 +1,5 @@ #include "qemu/osdep.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" ReplayMode replay_mode; diff --git a/tests/unit/ptimer-test-stubs.c b/tests/unit/ptimer-test-stubs.c index f5e75a96b6..f2bfcede93 100644 --- a/tests/unit/ptimer-test-stubs.c +++ b/tests/unit/ptimer-test-stubs.c @@ -10,7 +10,7 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" #include "migration/vmstate.h" #include "ptimer-test.h" diff --git a/util/guest-random.c b/util/guest-random.c index 23643f86cc..a24d27624c 100644 --- a/util/guest-random.c +++ b/util/guest-random.c @@ -14,7 +14,7 @@ #include "qapi/error.h" #include "qemu/guest-random.h" #include "crypto/random.h" -#include "sysemu/replay.h" +#include "exec/replay-core.h" static __thread GRand *thread_rand; From patchwork Mon Feb 27 14:00:39 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: 656996 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370240wrb; Mon, 27 Feb 2023 06:08:05 -0800 (PST) X-Google-Smtp-Source: AK7set/YN0ha1TzDUl+ygVrn26sEaOgDt71yxdu7spqIoJd5srYMGYFElmeXP2VgtBWE6gleg3u9 X-Received: by 2002:a2e:b818:0:b0:295:b29f:a661 with SMTP id u24-20020a2eb818000000b00295b29fa661mr1762917ljo.4.1677506885106; Mon, 27 Feb 2023 06:08:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506885; cv=none; d=google.com; s=arc-20160816; b=gbkysjo76aMPdi5Nc6oV7P97Z9Mcsx3a5ImBh+VAP1Kj8faKH3Bh9HxVEK8TMGZZ9y tj0IUYuaKwTNWlaM9r3/OujNIv57/Rf6ThxB4c1KTJuxy3F10J46iLQETIqHgpUHTHk/ 4BfsQAaFmkHOlxfdt+nfkCoSjkq4ke49Ix2gNZ7DHGey77iLb8PCSQzx3UB7bpwHDxi9 atIYFMYxNyxAxsO1yWie1XDGnisDZYNlmi1Z3dwyWNs4Lc7uKnwssuZVit+YKt/CNGDy RB7SUAJloalxyWes8gmfPaMQkLGU2GNntsnaJ7GyUzRq6Kk/2Sqn/TBeUP42Z5ZoqFhb GpFw== 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:to:from :dkim-signature; bh=GNz/wLv9q/CfxjcpxtTBilmbJ9v6EOOZzvA1J/LwMtM=; b=fyr8vZyE/92udyHVIV+1XyFRFDNV6RbWg6t2+5Haddk+grw0FvFq79VVOx4tm/t9nW vSBafuAgkFZ0XTWappkL/6iQ2ibYOFuvf6111z6nA5HOWV075foGUjP9A0ajijVtdqOm ge5fM9HDz6krzF0SfvE5n5WQ+/lGTDmcfwTLQ/IX2LzygyD3CpjAUYskvTnard/+gflX q9yFJhE3P73sBjWGa8fY8Ep5Ds5UzjZm502i96K2fGnikJE6nhBS+/ChB9C5L/SCHusu +CdncD6TsmpDu/+loYdXES2d37sv1sK8waQGoFiA3kA1lKRQEpgC3YIDihGHEF+E7Wis hQlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Odx3syVm; 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 f18-20020a2e5112000000b00295a3a8cb92si3872209ljb.102.2023.02.27.06.08.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:05 -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=Odx3syVm; 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 1pWe75-0001uQ-Lw; Mon, 27 Feb 2023 09:04: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 1pWe71-0001ho-KK for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:21 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe70-0007yy-2f for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:19 -0500 Received: by mail-wm1-x32a.google.com with SMTP id k37so4348479wms.0 for ; Mon, 27 Feb 2023 06:04:17 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GNz/wLv9q/CfxjcpxtTBilmbJ9v6EOOZzvA1J/LwMtM=; b=Odx3syVmuCGIBKq3/o7UAqCa8u0n6jaxtSaiLwKlGtkKDGtqaAC20iFglLpKIH8Ra2 068kxEDwfa5kWKbHr1wK3F7CVbBcaflV3XGDblUarDmnN5sBlsbSGmCKuTkGA4QARPkY YiqStzcOXP3U5MLVl2xh4HskR1VufteKPA4rAf7AHdZs4hpQsmLQxs0rw7xz/fZaV3b/ 3az7BBJx8XNHv2xl2FP+qHdhhpCZI+H6nPKWnLYtrJVgaHkELROLY+DyLwCcEjiTS9c4 0UKBeqtYkOUAiZ0DsXM1J5qC0gNLMSx8rO5Sof5/vD5PeGWMBJl5Mma4pf9n4kg+dXoC SYdA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GNz/wLv9q/CfxjcpxtTBilmbJ9v6EOOZzvA1J/LwMtM=; b=WGLVu7rMUZ0+iq6MKnKdqsPnE1JHk+Pm8/AxLj4EWVRB6oksj8wKRLJUiJz6WhMUKS 6XAowhQR/WzPFXuGYPayR6rPoyymJPW11fO1yCbUuUO9gF6w+sj2BQ/sgB2q5AiTPVzE LkkjwYmdpr404k6Wv6uoJ2QTb3TMu8zY7O6yeKe0JH9sM5G21+BG2Lx2a8ghFKjGYkgQ /kUhqPqcHQ+S/xPpNNKjOa1+dWZ3X2SFJZafqyYq4Jnwu6quWvV2TSx6PfQpuw/gbc04 mri/7mFGY+p9W6hCEiRRrebz1AhMbfYZduw2SZESiClA5y7KH+n81lhR/j0WHfy2RBAS CpTQ== X-Gm-Message-State: AO0yUKW9EyUSYzV9buZnV/+vSleWhefGQSp/E0feYBAaXUo1K80X3JlL 8vDvoSB2LcHJV6kJHANlNP6XvyDGpl7Qfbqq X-Received: by 2002:a05:600c:251:b0:3ea:f73e:9d8a with SMTP id 17-20020a05600c025100b003eaf73e9d8amr11387470wmj.30.1677506656572; Mon, 27 Feb 2023 06:04:16 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id s2-20020a5d6a82000000b002c53cc7504csm7396758wru.78.2023.02.27.06.04.15 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:16 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 032/126] tests/unit: Restrict machine-smp.c test to system emulation Date: Mon, 27 Feb 2023 15:00:39 +0100 Message-Id: <20230227140213.35084-23-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221219170806.60580-6-philmd@linaro.org> --- tests/unit/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/meson.build b/tests/unit/meson.build index ffa444f432..51f453e6c4 100644 --- a/tests/unit/meson.build +++ b/tests/unit/meson.build @@ -46,7 +46,6 @@ tests = { 'test-uuid': [], 'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 'hw/core/ptimer.c'], 'test-qapi-util': [], - 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], 'test-interval-tree': [], } @@ -134,6 +133,7 @@ if have_system 'test-util-sockets': ['socket-helpers.c'], 'test-base64': [], 'test-bufferiszero': [], + 'test-smp-parse': [qom, meson.project_source_root() / 'hw/core/machine-smp.c'], 'test-vmstate': [migration, io], 'test-yank': ['socket-helpers.c', qom, io, chardev] } From patchwork Mon Feb 27 14:00:40 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: 657039 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2375299wrb; Mon, 27 Feb 2023 06:16:48 -0800 (PST) X-Google-Smtp-Source: AK7set+k0xRHqltaN7jzCt43qqn0j+/94hiZ6ObblvcA2HyKgjTYk/TJjUJUE6WB7lucXIYRIdx7 X-Received: by 2002:ad4:5765:0:b0:56c:61:7499 with SMTP id r5-20020ad45765000000b0056c00617499mr46932808qvx.23.1677507408564; Mon, 27 Feb 2023 06:16:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507408; cv=none; d=google.com; s=arc-20160816; b=giZ0yWb2dasetKgYjn+6OhYNWSNAK8y0RI6+zzPzzeH+7rablaF3+JBzrhcx3TujCz 0BBpFzVS/GBphnWDLChQQZILaR/+ThM6dOVcreiheeAYu5m9LxBpZXRSRWwbqhXY2AEn 8yJ/dv0MCjs30ogzg5+AqL3Yorw/s61DAU8JGu0l4wSX70UgoTfs5bu9/ojGQ5igQCts Lp+5ho0v2j8xjXvqaoWT8LlQ9a1fC5uqSFs4GwfNYoj/gsq0rhUoquUuTfnKWi1ZIrtQ YgdqLlWR80UtimSfknJdUsPCq8TUc5KvlLjhA/QEfK+ovIK8637/I9YPVPiuoGEZtMdA RfDw== 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:to:from :dkim-signature; bh=aN47Fsd6Vw3ECvj3+90qDL+aYtdX8f7tcZ4eVa1EoMQ=; b=tAdUdt8jzk/NjPjJ0boSdHmuq/EnyLViowySQzErobDSRDmRryHSg7pruJmRzFqD4K isRsokBA6pIawPKqTioXC5/RWlsUIFzCLg4Lej1GXM+xk567Ob1mvlxh+3E7G+NGPGmg hLGw76IejImu8Ptgyx2t7lqQXSJU0D9DSBucVH1hoI0jyIOQefuHYy/UzNVuniqnsqls hVA896ubaLxKM5MfYIuBkhqfvNlhZ6DugHA2U9dxsep5u2ZN3F7sR3C8Mgxu3ulMbQ7L 7Ep+J+dYRGkFDLRc2J51vDVtUA1hCspbR5XnUX1zC2/CVCJRugx4dA3dCsh751VeBeFo r5Sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="p/Tde3Hu"; 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 v12-20020a0ce1cc000000b0056ea39b7a00si6488508qvl.226.2023.02.27.06.16.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:16:48 -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="p/Tde3Hu"; 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 1pWe79-0002E0-9E; Mon, 27 Feb 2023 09:04:27 -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 1pWe77-00024A-F3 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:25 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe75-0007zH-PV for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:25 -0500 Received: by mail-wr1-x436.google.com with SMTP id v16so3542510wrn.0 for ; Mon, 27 Feb 2023 06:04:23 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aN47Fsd6Vw3ECvj3+90qDL+aYtdX8f7tcZ4eVa1EoMQ=; b=p/Tde3Hu8yniS6549l1aYU6/xHK0lSw1eRySnJRsntXDQgpTj1txhl873rr6p5fk8g XpHy90nEtu3kKcHBiozEkvCQOtk6l1zC8gc8PnGl0Xib2nZZI0tX3n8WXtRsUAyewiQ9 7wHjdTFKlbicFJBjNU9jdWfSBDQwBYMUMUnPIWdzFUic+fpbSJ6wATb3lbtT5AXxiGAT dv8AswEmqIMNAJK7Eahh/4fqklrNUrBeKtin4DIS75iuco2WRuF8xaxJ60b+TcdHpefj QCSwQ0NmYkDOwUHmsi4QOz3Df1e22G5hq7h0oLYUybWVKeDt+pzqEJWoYMGmsaaDHQAU HxPA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aN47Fsd6Vw3ECvj3+90qDL+aYtdX8f7tcZ4eVa1EoMQ=; b=h8U0zUXq/DmtohyzyKunSz8yu0EunsFpJVrp12qC9R0/uskOGCTpDTkd73gHi1Smr1 i1uqh/35wSRwEaaefx/IC0Y2urnhYC/7KvH4Q6dGop7jy3zd79PHQLDHRDZdhM64njHt 0hJOJjCFQ7F/L7j+FrulRpq0Zb/GbjcEiUJa2w0tyHTdrISW0AKsrSqavA82J/i68xii NwyZjZt91Hme2/cCKDC8khICZP78ah6pSw49X3MsUTzHVnD/3WHFAnwkj6o0xl9OQnpC rlltQcJHTk3zjbtjyorxqEDUUpOztRwE3x3DZ1RrVqORvU8w+SfK5TGzGTMK527ULTLD 6IVg== X-Gm-Message-State: AO0yUKUt7VOD1+tHxbimYABFsZDzkFAxfTtuZ2awXJeYzkbjECUwIVhv ZajPp1eV/XIghmrx7w5+3CMxeWFMA6pYIPot X-Received: by 2002:a5d:6147:0:b0:2c9:ed98:c3bd with SMTP id y7-20020a5d6147000000b002c9ed98c3bdmr5039607wrt.60.1677506662045; Mon, 27 Feb 2023 06:04:22 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id v14-20020adfedce000000b002c7b229b1basm7232685wro.15.2023.02.27.06.04.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 033/126] softmmu: Silent -Wmissing-field-initializers warning Date: Mon, 27 Feb 2023 15:00:40 +0100 Message-Id: <20230227140213.35084-24-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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=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 Silent when compiling with -Wextra: ../softmmu/vl.c:886:12: warning: missing field 'flags' initializer [-Wmissing-field-initializers] { NULL }, ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Message-Id: <20221220143532.24958-4-philmd@linaro.org> --- softmmu/vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/vl.c b/softmmu/vl.c index 6e526d95bb..f5b9912c57 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -883,7 +883,7 @@ static const QEMUOption qemu_options[] = { #define ARCHHEADING(text, arch_mask) #include "qemu-options.def" - { NULL }, + { /* end of list */ } }; typedef struct VGAInterfaceInfo { From patchwork Mon Feb 27 14:00:41 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: 657013 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2371876wrb; Mon, 27 Feb 2023 06:10:50 -0800 (PST) X-Google-Smtp-Source: AK7set928wrud4gXf6x+1jXx4bZoBuCP3+QoVl23lp9VRFzyl1MAmfk1FvJbkb+rLa+zFIKQIi7+ X-Received: by 2002:a81:6a07:0:b0:536:e120:cad8 with SMTP id f7-20020a816a07000000b00536e120cad8mr19113612ywc.33.1677507050108; Mon, 27 Feb 2023 06:10:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507050; cv=none; d=google.com; s=arc-20160816; b=jB9XfqEezvYPlhl+EN4xytx2CIkT1EMhlDxr9iIr1Vbi5MYRUQM+JYJTL5lNDyQum4 pNsgxWQNYEJvgDEvkvEFvDInTq9kWV5TU5oMb7uhkmwAzNiHFq0NiGnCSSoLf71EQo7m l1HT3Fiz7OMrHyzkcrsxIMgg3/+yX/tj/hjKB3+eF2Aho6x97HPx/xLDIz6XT3HCzZjU iRoGClxFZdhsXFQ7G0iIn5OuUBasarC8EOLcBpfHp/SbyAK+S7dVNL9lzeVyuGBvQ36m X/tOPQe/y6KqlYnhsnMwY93ezg7NUOG2RWrQW5nZuk5V9NRbTeLp5s1xatyMZIxJs2Vl d7mg== 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:to:from :dkim-signature; bh=38W4UiDAICI2++ja9liSOeGGxvlrpX6fxnvMtxyJoAc=; b=KHh9bhAziwHkjpPoAN+u5KjK0OTYgvLPIb5CSj0aUBQJWDnQ42joCvxJIjM72U7WdP Y1zWnwmFViZtlqh3uAx2EKqCe2dZYfMIqyR5qVboDpj3qRvjPjHWiSDQUzJqdk2N9+Bt JATmEfX9VLehymVFSySQzjCwbAP07AkBxZrHgExyB1fDr4TpXJpc9uqt7aNtpxjs74Ty ZkzeH12q1jGU9jHnjCICeH60E2iVrF7sRhmqpponYFemogdjk8mG3CE39OlH7bPtodyl +1u0GZOWylw9xPmG+sC6lgNHJfywT+Fnqb7xAUCuto88bTgLqKwbiDj8YIPxilRDWnh/ +Cww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XWi4rpBg; 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 j9-20020a05620a410900b0073b6c3f3ee6si6299952qko.193.2023.02.27.06.10.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:10:50 -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=XWi4rpBg; 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 1pWe7K-0002t8-Sk; Mon, 27 Feb 2023 09:04:38 -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 1pWe7G-0002bF-2h for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:36 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7B-0007zX-5B for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:31 -0500 Received: by mail-wr1-x42c.google.com with SMTP id r7so6344153wrz.6 for ; Mon, 27 Feb 2023 06:04:28 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=38W4UiDAICI2++ja9liSOeGGxvlrpX6fxnvMtxyJoAc=; b=XWi4rpBggKjVz6W/nW4vUYltZsKq0RlPXkkS99gBC3sY20GcQpqbChHRFSE6RGFXgk NkBq2azWgKXnVRfNMdy+G3NS6GsX7pLeA7MzTSyJu5llJYG4VjVV5ETFiOCoyUEqPAbu G2uyJD028uJHgwK94IoHWiZVnif9nmPcbymQ0sbuvQFtgw5wETrH3tsSiLNB25V1g/FR 5NcYIFpLA9Et4POplC+UhP7LpTrqs90TpV7zQZ+7ccondlqSLUnib6g4PqZLmikN0D1d S681ZmOHJO2L2M8aVcPl3rVcRMU6aDShw90HFVm7bgDuV3n4QJzStord2Uuf3wjvoGbH oFUw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=38W4UiDAICI2++ja9liSOeGGxvlrpX6fxnvMtxyJoAc=; b=1ZSmmHwHiOIS+/pnXNQnKWrKolAxRBm2RwPz3jN4kC4hHL6+uGao7kr31mr1p6TT2X 0zjGgkCwUi6A7BCaJGAM9hZKaYgVjerzsUIZJc8a1PuWDFUrDWWXeixoXuR/HwBeO5lE pt8e2JfLIjveeWFSWZued5IzO3OUr/sPsHkHp3NBmAlPjQzw9AqiUVKXYwe0NL1r3kIV jzCa57AQNFk9eBonp4WzvwURY64XkBqOynyl6K4e2jTtaaLHGPVY0b2jFQpsqX5G78xm rrVorAiBXG0qvdR9WCOaH1dS72tIXGgjAQCM+vxjpg5fX5FewGyrLfyiB1hk+USWJkSx SIvQ== X-Gm-Message-State: AO0yUKXYG4G5ueOSHrtx7/i8kfo9MiNjmQ3g1TdFd+kJFaG3zMmV01Lw q/Ryxg8hX18BnovrD/ebvYmxOLGk2K8PYf5z X-Received: by 2002:adf:e64d:0:b0:2c5:6cfe:aabf with SMTP id b13-20020adfe64d000000b002c56cfeaabfmr21407775wrn.9.1677506667088; Mon, 27 Feb 2023 06:04:27 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m21-20020a7bcb95000000b003e21f959453sm9371031wmi.32.2023.02.27.06.04.26 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:26 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 034/126] softmmu: Extract watchpoint API from physmem.c Date: Mon, 27 Feb 2023 15:00:41 +0100 Message-Id: <20230227140213.35084-25-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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=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 The watchpoint API is specific to TCG system emulation. Move it to a new compile unit. The inlined stubs are used for user-mode and non-TCG accelerators. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221209141254.68662-1-philmd@linaro.org> --- MAINTAINERS | 1 + include/hw/core/cpu.h | 2 +- softmmu/meson.build | 3 +- softmmu/physmem.c | 191 ------------------------------------ softmmu/watchpoint.c | 220 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 224 insertions(+), 193 deletions(-) create mode 100644 softmmu/watchpoint.c diff --git a/MAINTAINERS b/MAINTAINERS index 6f1d230027..75dccf0b4e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -123,6 +123,7 @@ M: Richard Henderson R: Paolo Bonzini S: Maintained F: softmmu/cpus.c +F: softmmu/watchpoint.c F: cpus-common.c F: page-vary.c F: page-vary-common.c diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 56cbe9e678..a5aa44d12c 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -948,7 +948,7 @@ static inline bool cpu_breakpoint_test(CPUState *cpu, vaddr pc, int mask) return false; } -#ifdef CONFIG_USER_ONLY +#if !defined(CONFIG_TCG) || defined(CONFIG_USER_ONLY) static inline int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, int flags, CPUWatchpoint **watchpoint) { diff --git a/softmmu/meson.build b/softmmu/meson.build index 1828db149c..0180577517 100644 --- a/softmmu/meson.build +++ b/softmmu/meson.build @@ -8,7 +8,8 @@ specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files( )]) specific_ss.add(when: ['CONFIG_SOFTMMU', 'CONFIG_TCG'], if_true: [files( - 'icount.c' + 'icount.c', + 'watchpoint.c', )]) softmmu_ss.add(files( diff --git a/softmmu/physmem.c b/softmmu/physmem.c index cb998cdf23..df54b917a9 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -781,197 +781,6 @@ AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx) return cpu->cpu_ases[asidx].as; } -/* Add a watchpoint. */ -int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, - int flags, CPUWatchpoint **watchpoint) -{ - CPUWatchpoint *wp; - vaddr in_page; - - /* forbid ranges which are empty or run off the end of the address space */ - if (len == 0 || (addr + len - 1) < addr) { - error_report("tried to set invalid watchpoint at %" - VADDR_PRIx ", len=%" VADDR_PRIu, addr, len); - return -EINVAL; - } - wp = g_malloc(sizeof(*wp)); - - wp->vaddr = addr; - wp->len = len; - wp->flags = flags; - - /* keep all GDB-injected watchpoints in front */ - if (flags & BP_GDB) { - QTAILQ_INSERT_HEAD(&cpu->watchpoints, wp, entry); - } else { - QTAILQ_INSERT_TAIL(&cpu->watchpoints, wp, entry); - } - - in_page = -(addr | TARGET_PAGE_MASK); - if (len <= in_page) { - tlb_flush_page(cpu, addr); - } else { - tlb_flush(cpu); - } - - if (watchpoint) - *watchpoint = wp; - return 0; -} - -/* Remove a specific watchpoint. */ -int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, vaddr len, - int flags) -{ - CPUWatchpoint *wp; - - QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { - if (addr == wp->vaddr && len == wp->len - && flags == (wp->flags & ~BP_WATCHPOINT_HIT)) { - cpu_watchpoint_remove_by_ref(cpu, wp); - return 0; - } - } - return -ENOENT; -} - -/* Remove a specific watchpoint by reference. */ -void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint) -{ - QTAILQ_REMOVE(&cpu->watchpoints, watchpoint, entry); - - tlb_flush_page(cpu, watchpoint->vaddr); - - g_free(watchpoint); -} - -/* Remove all matching watchpoints. */ -void cpu_watchpoint_remove_all(CPUState *cpu, int mask) -{ - CPUWatchpoint *wp, *next; - - QTAILQ_FOREACH_SAFE(wp, &cpu->watchpoints, entry, next) { - if (wp->flags & mask) { - cpu_watchpoint_remove_by_ref(cpu, wp); - } - } -} - -#ifdef CONFIG_TCG -/* Return true if this watchpoint address matches the specified - * access (ie the address range covered by the watchpoint overlaps - * partially or completely with the address range covered by the - * access). - */ -static inline bool watchpoint_address_matches(CPUWatchpoint *wp, - vaddr addr, vaddr len) -{ - /* We know the lengths are non-zero, but a little caution is - * required to avoid errors in the case where the range ends - * exactly at the top of the address space and so addr + len - * wraps round to zero. - */ - vaddr wpend = wp->vaddr + wp->len - 1; - vaddr addrend = addr + len - 1; - - return !(addr > wpend || wp->vaddr > addrend); -} - -/* Return flags for watchpoints that match addr + prot. */ -int cpu_watchpoint_address_matches(CPUState *cpu, vaddr addr, vaddr len) -{ - CPUWatchpoint *wp; - int ret = 0; - - QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { - if (watchpoint_address_matches(wp, addr, len)) { - ret |= wp->flags; - } - } - return ret; -} - -/* Generate a debug exception if a watchpoint has been hit. */ -void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, - MemTxAttrs attrs, int flags, uintptr_t ra) -{ - CPUClass *cc = CPU_GET_CLASS(cpu); - CPUWatchpoint *wp; - - assert(tcg_enabled()); - if (cpu->watchpoint_hit) { - /* - * We re-entered the check after replacing the TB. - * Now raise the debug interrupt so that it will - * trigger after the current instruction. - */ - qemu_mutex_lock_iothread(); - cpu_interrupt(cpu, CPU_INTERRUPT_DEBUG); - qemu_mutex_unlock_iothread(); - return; - } - - if (cc->tcg_ops->adjust_watchpoint_address) { - /* this is currently used only by ARM BE32 */ - addr = cc->tcg_ops->adjust_watchpoint_address(cpu, addr, len); - } - QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { - if (watchpoint_address_matches(wp, addr, len) - && (wp->flags & flags)) { - if (replay_running_debug()) { - /* - * replay_breakpoint reads icount. - * Force recompile to succeed, because icount may - * be read only at the end of the block. - */ - if (!cpu->can_do_io) { - /* Force execution of one insn next time. */ - cpu->cflags_next_tb = 1 | CF_LAST_IO | CF_NOIRQ | curr_cflags(cpu); - cpu_loop_exit_restore(cpu, ra); - } - /* - * Don't process the watchpoints when we are - * in a reverse debugging operation. - */ - replay_breakpoint(); - return; - } - if (flags == BP_MEM_READ) { - wp->flags |= BP_WATCHPOINT_HIT_READ; - } else { - wp->flags |= BP_WATCHPOINT_HIT_WRITE; - } - wp->hitaddr = MAX(addr, wp->vaddr); - wp->hitattrs = attrs; - - if (wp->flags & BP_CPU && cc->tcg_ops->debug_check_watchpoint && - !cc->tcg_ops->debug_check_watchpoint(cpu, wp)) { - wp->flags &= ~BP_WATCHPOINT_HIT; - continue; - } - cpu->watchpoint_hit = wp; - - mmap_lock(); - /* This call also restores vCPU state */ - tb_check_watchpoint(cpu, ra); - if (wp->flags & BP_STOP_BEFORE_ACCESS) { - cpu->exception_index = EXCP_DEBUG; - mmap_unlock(); - cpu_loop_exit(cpu); - } else { - /* Force execution of one insn next time. */ - cpu->cflags_next_tb = 1 | CF_LAST_IO | CF_NOIRQ | curr_cflags(cpu); - mmap_unlock(); - cpu_loop_exit_noexc(cpu); - } - } else { - wp->flags &= ~BP_WATCHPOINT_HIT; - } - } -} - -#endif /* CONFIG_TCG */ - /* Called from RCU critical section */ static RAMBlock *qemu_get_ram_block(ram_addr_t addr) { diff --git a/softmmu/watchpoint.c b/softmmu/watchpoint.c new file mode 100644 index 0000000000..279129dd1c --- /dev/null +++ b/softmmu/watchpoint.c @@ -0,0 +1,220 @@ +/* + * CPU watchpoints + * + * Copyright (c) 2003 Fabrice Bellard + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, see . + */ + +#include "qemu/osdep.h" +#include "qemu/main-loop.h" +#include "exec/exec-all.h" +#include "exec/translate-all.h" +#include "sysemu/tcg.h" +#include "sysemu/replay.h" +#include "hw/core/tcg-cpu-ops.h" +#include "hw/core/cpu.h" + +/* Add a watchpoint. */ +int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, + int flags, CPUWatchpoint **watchpoint) +{ + CPUWatchpoint *wp; + vaddr in_page; + + /* forbid ranges which are empty or run off the end of the address space */ + if (len == 0 || (addr + len - 1) < addr) { + error_report("tried to set invalid watchpoint at %" + VADDR_PRIx ", len=%" VADDR_PRIu, addr, len); + return -EINVAL; + } + wp = g_malloc(sizeof(*wp)); + + wp->vaddr = addr; + wp->len = len; + wp->flags = flags; + + /* keep all GDB-injected watchpoints in front */ + if (flags & BP_GDB) { + QTAILQ_INSERT_HEAD(&cpu->watchpoints, wp, entry); + } else { + QTAILQ_INSERT_TAIL(&cpu->watchpoints, wp, entry); + } + + in_page = -(addr | TARGET_PAGE_MASK); + if (len <= in_page) { + tlb_flush_page(cpu, addr); + } else { + tlb_flush(cpu); + } + + if (watchpoint) { + *watchpoint = wp; + } + return 0; +} + +/* Remove a specific watchpoint. */ +int cpu_watchpoint_remove(CPUState *cpu, vaddr addr, vaddr len, + int flags) +{ + CPUWatchpoint *wp; + + QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { + if (addr == wp->vaddr && len == wp->len + && flags == (wp->flags & ~BP_WATCHPOINT_HIT)) { + cpu_watchpoint_remove_by_ref(cpu, wp); + return 0; + } + } + return -ENOENT; +} + +/* Remove a specific watchpoint by reference. */ +void cpu_watchpoint_remove_by_ref(CPUState *cpu, CPUWatchpoint *watchpoint) +{ + QTAILQ_REMOVE(&cpu->watchpoints, watchpoint, entry); + + tlb_flush_page(cpu, watchpoint->vaddr); + + g_free(watchpoint); +} + +/* Remove all matching watchpoints. */ +void cpu_watchpoint_remove_all(CPUState *cpu, int mask) +{ + CPUWatchpoint *wp, *next; + + QTAILQ_FOREACH_SAFE(wp, &cpu->watchpoints, entry, next) { + if (wp->flags & mask) { + cpu_watchpoint_remove_by_ref(cpu, wp); + } + } +} + +/* + * Return true if this watchpoint address matches the specified + * access (ie the address range covered by the watchpoint overlaps + * partially or completely with the address range covered by the + * access). + */ +static inline bool watchpoint_address_matches(CPUWatchpoint *wp, + vaddr addr, vaddr len) +{ + /* + * We know the lengths are non-zero, but a little caution is + * required to avoid errors in the case where the range ends + * exactly at the top of the address space and so addr + len + * wraps round to zero. + */ + vaddr wpend = wp->vaddr + wp->len - 1; + vaddr addrend = addr + len - 1; + + return !(addr > wpend || wp->vaddr > addrend); +} + +/* Return flags for watchpoints that match addr + prot. */ +int cpu_watchpoint_address_matches(CPUState *cpu, vaddr addr, vaddr len) +{ + CPUWatchpoint *wp; + int ret = 0; + + QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { + if (watchpoint_address_matches(wp, addr, len)) { + ret |= wp->flags; + } + } + return ret; +} + +/* Generate a debug exception if a watchpoint has been hit. */ +void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, + MemTxAttrs attrs, int flags, uintptr_t ra) +{ + CPUClass *cc = CPU_GET_CLASS(cpu); + CPUWatchpoint *wp; + + assert(tcg_enabled()); + if (cpu->watchpoint_hit) { + /* + * We re-entered the check after replacing the TB. + * Now raise the debug interrupt so that it will + * trigger after the current instruction. + */ + qemu_mutex_lock_iothread(); + cpu_interrupt(cpu, CPU_INTERRUPT_DEBUG); + qemu_mutex_unlock_iothread(); + return; + } + + if (cc->tcg_ops->adjust_watchpoint_address) { + /* this is currently used only by ARM BE32 */ + addr = cc->tcg_ops->adjust_watchpoint_address(cpu, addr, len); + } + QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { + if (watchpoint_address_matches(wp, addr, len) + && (wp->flags & flags)) { + if (replay_running_debug()) { + /* + * replay_breakpoint reads icount. + * Force recompile to succeed, because icount may + * be read only at the end of the block. + */ + if (!cpu->can_do_io) { + /* Force execution of one insn next time. */ + cpu->cflags_next_tb = 1 | CF_LAST_IO | CF_NOIRQ + | curr_cflags(cpu); + cpu_loop_exit_restore(cpu, ra); + } + /* + * Don't process the watchpoints when we are + * in a reverse debugging operation. + */ + replay_breakpoint(); + return; + } + if (flags == BP_MEM_READ) { + wp->flags |= BP_WATCHPOINT_HIT_READ; + } else { + wp->flags |= BP_WATCHPOINT_HIT_WRITE; + } + wp->hitaddr = MAX(addr, wp->vaddr); + wp->hitattrs = attrs; + + if (wp->flags & BP_CPU && cc->tcg_ops->debug_check_watchpoint && + !cc->tcg_ops->debug_check_watchpoint(cpu, wp)) { + wp->flags &= ~BP_WATCHPOINT_HIT; + continue; + } + cpu->watchpoint_hit = wp; + + mmap_lock(); + /* This call also restores vCPU state */ + tb_check_watchpoint(cpu, ra); + if (wp->flags & BP_STOP_BEFORE_ACCESS) { + cpu->exception_index = EXCP_DEBUG; + mmap_unlock(); + cpu_loop_exit(cpu); + } else { + /* Force execution of one insn next time. */ + cpu->cflags_next_tb = 1 | CF_LAST_IO | CF_NOIRQ + | curr_cflags(cpu); + mmap_unlock(); + cpu_loop_exit_noexc(cpu); + } + } else { + wp->flags &= ~BP_WATCHPOINT_HIT; + } + } +} From patchwork Mon Feb 27 14:00:42 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: 657001 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370441wrb; Mon, 27 Feb 2023 06:08:26 -0800 (PST) X-Google-Smtp-Source: AK7set+40+THJxP4MLo4Cs3oMbncKAzhpoUFqSKvdXHEa5PwirTDkaGVGd/e3LoaVtqVVmIYKYVF X-Received: by 2002:a05:622a:19a6:b0:3b9:bc8c:c20f with SMTP id u38-20020a05622a19a600b003b9bc8cc20fmr14603157qtc.26.1677506906362; Mon, 27 Feb 2023 06:08:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506906; cv=none; d=google.com; s=arc-20160816; b=e2MZisWAobO1iUc2nU+KduC07GQWnism8hVZCx1yUKdRdCRRLVCzg+DQm/a5zV5aTb F7/i95ewlex9AtlPDULUkC15cm025Qo4Muh7I7CtAuj7a5eHxGQ4w5esnPa7gQlxoHw4 cfBxiudpAECZdz4xtZbnRcSzaP2GJl5UwxYdQZI8CKggd9qpzqaUjFwR7C2a7MgG7sij PkAk0kkYjh9zuS2o2onGO/fy0TY32Gn1LzaoNNjyKXS9GL5DZcMyCmlq0DrMQK2GzE9s v744OXi4l2W6b3cspawCBQDilHSsVMV2t2G5YPwtk2VxmiX/VFZw3+HQFQGYQ5yPIeov iSzQ== 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:to:from :dkim-signature; bh=L/MEORMaWwsIW0OPJMEmwpwT73YawX+aPFL1yN3FA/c=; b=EewLQpjd5goTOuAAVMlIO4d137GJdaFayUDd8RzT3NeAkQc0FZOwes5PPAbXZx2KG3 zuXIVZx6VHYeGM8EQzA4MKdOz6jKKkiCEbJYI4CFltv43SYKGcl+xRcBMcrVnYHjb27q aNBt83avY7N9TPTQaTwsCUhlbtxlUf7yA8k9w8hqT4+AB76BalfABLBlUpFGG5HraAxf 9wzAxAEacgLPx/Tmk2/HWrUw1b7QiwcUwjxmdUY/cVvmq48XxAPi5Zjzcymrn4BRY5DE V6kZ8fbwELl05eA0kWdJlE5J6z5/CliA+WEL7Xq2trU8TZIHkEnIQyzjtLOZPVzqhYMi mEXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KSl5dTDt; 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 o21-20020a05622a009500b003a695bcdb56si6833217qtw.234.2023.02.27.06.08.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:26 -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=KSl5dTDt; 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 1pWe7K-0002ow-8h; Mon, 27 Feb 2023 09:04:38 -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 1pWe7I-0002bO-CK for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:36 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7G-0007zp-NT for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:36 -0500 Received: by mail-wr1-x430.google.com with SMTP id t15so6342858wrz.7 for ; Mon, 27 Feb 2023 06:04:34 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=L/MEORMaWwsIW0OPJMEmwpwT73YawX+aPFL1yN3FA/c=; b=KSl5dTDth1soWlS4XeTFdFL85g1ju4W2aYC8sabeYe/GgRaoKE5e8XmkB8AVGYrYaI MvaEnmz/q24gU3gLAF340V5+sU7bc5ioU8X7adzLGk4YEx0mgYalyMrV+EDZZS9GNg/m usjJDtZTlSs+GP7EQMK6wDyLxlFSzAigF8sSv6Pt8RA7cb2lyhNCt0jVgCJnvexFa38N iDmf8/+WESScK+mxO6uLmdPstuz9rQPPowUvdDyiZM9aG4va7niUhpiZg/irCxDidsZC IxsC76yvGwNur2U9aYkD2LGL6/sMqwPYzBVicC25caK4qzxC5W9aPAdHqv6/jraNXYNJ 6U+Q== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=L/MEORMaWwsIW0OPJMEmwpwT73YawX+aPFL1yN3FA/c=; b=Z+WP+/oYp2iqwRVlBJInAyKVvY+WtoIYjD4KxQWih+zpux61tGOt5aXM0ksSc2iy9w btPmEZROLVHPI+R4Cfujg+2+R1wB9Qyl3w6RkbCkcqMDUnsnb9FD9c/M3QqhWixFYZ9a Mw4oAboGlFhuzfjOSMw2KGpUUI/PBBldhA3NR9gJ3+zD/jdGlEmbP2DmR2q02f95IpRN /KEXAsDRpemKdUvufwriLI1O3zUPDPdy5lV0MJ3+mxeWRO7xlMKNZIsR1/vyDbKyEByh 8xozLYTOJn6Zrkh4lZs61jzJTPZumWF7wqSCBTNR3KuMWdA9p33khj37xLUt0eVPq8LW tVuQ== X-Gm-Message-State: AO0yUKWq18hK/C4gWynU6RJqO138Xm6yc7DN/e7kL4Go93zoAr5RZc84 tJV0OJ8xQpS+Ot6JxP+8kDRQJz68dKsOkg6x X-Received: by 2002:a5d:4a50:0:b0:2c8:d399:1645 with SMTP id v16-20020a5d4a50000000b002c8d3991645mr6711073wrs.37.1677506672838; Mon, 27 Feb 2023 06:04:32 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id f3-20020a0560001b0300b002c70e60abd4sm7282177wrz.2.2023.02.27.06.04.31 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 035/126] qemu/typedefs: Sort in case-insensitive alphabetical order (again) Date: Mon, 27 Feb 2023 15:00:42 +0100 Message-Id: <20230227140213.35084-26-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 Following the recommendation added in commit a98c370c46 ("typedefs: (Re-)sort entries alphabetically"), and similarly to commit 64baadc272 ("Sort include/qemu/typedefs.h"), sort again the type definitions (in case-insensitive alphabetical order, using 'sort --ignore-case'). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230217141832.24777-2-philmd@linaro.org> --- include/qemu/typedefs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index c7c8a85315..df4b55ac65 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -49,6 +49,7 @@ typedef struct DeviceState DeviceState; typedef struct DirtyBitmapSnapshot DirtyBitmapSnapshot; typedef struct DisplayChangeListener DisplayChangeListener; typedef struct DriveInfo DriveInfo; +typedef struct DumpState DumpState; typedef struct Error Error; typedef struct EventNotifier EventNotifier; typedef struct FlatView FlatView; @@ -56,6 +57,7 @@ typedef struct FWCfgEntry FWCfgEntry; typedef struct FWCfgIoState FWCfgIoState; typedef struct FWCfgMemState FWCfgMemState; typedef struct FWCfgState FWCfgState; +typedef struct GraphicHwOps GraphicHwOps; typedef struct HostMemoryBackend HostMemoryBackend; typedef struct I2CBus I2CBus; typedef struct I2SCodec I2SCodec; @@ -90,10 +92,10 @@ typedef struct PCIDevice PCIDevice; typedef struct PCIEAERErr PCIEAERErr; typedef struct PCIEAERLog PCIEAERLog; typedef struct PCIEAERMsg PCIEAERMsg; -typedef struct PCIESriovPF PCIESriovPF; -typedef struct PCIESriovVF PCIESriovVF; typedef struct PCIEPort PCIEPort; typedef struct PCIESlot PCIESlot; +typedef struct PCIESriovPF PCIESriovPF; +typedef struct PCIESriovVF PCIESriovVF; typedef struct PCIExpressDevice PCIExpressDevice; typedef struct PCIExpressHost PCIExpressHost; typedef struct PCIHostDeviceAddress PCIHostDeviceAddress; @@ -106,6 +108,7 @@ typedef struct QBool QBool; typedef struct QDict QDict; typedef struct QEMUBH QEMUBH; typedef struct QemuConsole QemuConsole; +typedef struct QEMUCursor QEMUCursor; typedef struct QEMUFile QEMUFile; typedef struct QemuLockable QemuLockable; typedef struct QemuMutex QemuMutex; @@ -132,9 +135,6 @@ typedef struct VirtIODevice VirtIODevice; typedef struct Visitor Visitor; typedef struct VMChangeStateEntry VMChangeStateEntry; typedef struct VMStateDescription VMStateDescription; -typedef struct DumpState DumpState; -typedef struct GraphicHwOps GraphicHwOps; -typedef struct QEMUCursor QEMUCursor; /* * Pointer types From patchwork Mon Feb 27 14:00:43 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: 657092 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2384432wrb; Mon, 27 Feb 2023 06:34:42 -0800 (PST) X-Google-Smtp-Source: AK7set+YlZjR6J06exhdPrwmHvDwZqBcKVv26X8sWjXei+ZfeMt/j5lc+xPFF3aRL0UA1quvvFAc X-Received: by 2002:ac8:5c4c:0:b0:3bf:a70a:8ab4 with SMTP id j12-20020ac85c4c000000b003bfa70a8ab4mr35976440qtj.57.1677508481923; Mon, 27 Feb 2023 06:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508481; cv=none; d=google.com; s=arc-20160816; b=V1JOO7LMDqyhL8ZkZzZOMype/o2GD9jTfY06qmGkMqovBMo52FJz+kbMZAUmt3ZdTq QnKCEnC9ryTdzI94Mi2OVUvBPBVI30Yu4NO31lq+SdGTcATC/OxKdyIyx1qVEY+6hVQS CBewjdgeGuzBe6J9YlkSnRd31hOT0sv3Ogl31a4Z8S6OjUPZNmguDbOmXsvcm5YNed9m OOM6J+eLzTAQQnTKBWzswhfHzwpCIBdVhgkkv6o6LNn2DyPc3acJIIZXTwShuVLbyixy qMf/k6I1Y1fpVdN4qhn3ycCQepAKW55MfIms+SMSmXw7+lSygVA+6NdbUN22jsatT0oD wZ7g== 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:to:from :dkim-signature; bh=J75e6iaUq5SfZBqCcMITv6hWDAA6zO4plFjAUXOFWCk=; b=fqCaAnlGN2eASeNKfCld+SupMBooSS16yebpyYewGdkr/ZmiwHn9fx9oPSNYS29s2Q Z7TePGRieLtGnqW2RLljm+vsUJVE2rckC6TOiz+GVNvw/TrU/SWLXZYq/E7pfVcVDKq/ X8Awuv+5VTo/TKcxNLK6+fCUiP/8R3/WHUmzfY5gohwPAlgR4SeY+uDfP+vFrijWNa7+ Lx3SW29pdmkyxt0eQYonrKxaK9sYlykiteyHLg+UL4I56iLAt2yXPfF5ZkDVRkm2NR5R puL4Dg5UOI79HWJHwiY2xpiiMqbB76s3v+v+VJLq+aSOVT2AcFuQAZQLmyEEbZ/gmBee gSpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qp+rZ60A; 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 15-20020ac84e8f000000b003a811f3b81asi6693329qtp.169.2023.02.27.06.34.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:34:41 -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=Qp+rZ60A; 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 1pWe7S-0003KS-HR; Mon, 27 Feb 2023 09:04:46 -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 1pWe7N-00039a-Eg for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:41 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7L-00081h-T2 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:41 -0500 Received: by mail-wm1-x32a.google.com with SMTP id ay29-20020a05600c1e1d00b003e9f4c2b623so7238031wmb.3 for ; Mon, 27 Feb 2023 06:04:39 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=J75e6iaUq5SfZBqCcMITv6hWDAA6zO4plFjAUXOFWCk=; b=Qp+rZ60AVHSjydgOvgnScnhBt+eYngGNB0hHKjmIyH0+eAhLZ9sMFRfCQXlg2zQP60 gmdAQTGzInbdDkG+ZQ1cvJLaWF0MX9Zjd99fOQZXG27zuC8VUyVf6CUSYJgbjGrhkkxO a73uEgo+S9uD8z5bJmodD5MWuMlkztAf4JcAxUdCfKNqSHapXZsxKWTPzhcr1nh59uvi xJTR9+g8PXXEIZAJFJw2tpgezmq2tcA/nFEpkjqPhX1PJGHjxt9jvBYr84ojR8mC8jj1 QtSQWMUJzCrmHQmJGSFFBlilGKW4F5tD4YuwQ/KQfPEl6GcO6adZhh4qIdw9tqoQKqTo 5Ilg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J75e6iaUq5SfZBqCcMITv6hWDAA6zO4plFjAUXOFWCk=; b=Yz9tof8R1pSCiLJoot9+DFl81p6BkvtzAgC/zAuRDU6GJ9abdgL5OfcJmCFPsNRLJK j62GemcqRlxq9vviqNAvT/VXmgyl95BPV3ZR97D5WBC7GrQHhayjQW+0eNOakbPPh4Na Wd5DQHbi340+p+7LRTmiGDQjbZ4AKoUskDobi6gh3ZavyABrSaXEEhtwYZt74jED+PxU PwOOzZdabimzIFfCiyn3Nkl1Zg6Oz/R4qpLvNt9E8N0znfrKaJevtH9e/riS2X8BQJLx q926yXvE3gEMkp1DaVU9xrSltzknwk9CnVR5Ed/2BdrgUYjbkhHmLrL8VVrNghu2Qmk1 AKvQ== X-Gm-Message-State: AO0yUKUnslmfFe9rIHlj0f1otndabosTVMKAlgGhMJhp0VnNbfM46Ni9 +EMDDsEELnlxTm0jc4Pd536prXP4QfE+uxZA X-Received: by 2002:a05:600c:4aa7:b0:3e2:66b:e90e with SMTP id b39-20020a05600c4aa700b003e2066be90emr13600821wmp.10.1677506678275; Mon, 27 Feb 2023 06:04:38 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id k14-20020a05600c1c8e00b003eae73f0fc1sm10142742wms.18.2023.02.27.06.04.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 036/126] hw/nubus/nubus-device: Fix memory leak in nubus_device_realize Date: Mon, 27 Feb 2023 15:00:43 +0100 Message-Id: <20230227140213.35084-27-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 From: Mauro Matteo Cascella Local variable "name" is allocated through strdup_printf and should be freed with g_free() to avoid memory leak. Fixes: 3616f424 ("nubus-device: add romfile property for loading declaration ROMs") Signed-off-by: Mauro Matteo Cascella Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Laurent Vivier Message-Id: <20221222172915.671597-1-mcascell@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/nubus/nubus-device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/nubus/nubus-device.c b/hw/nubus/nubus-device.c index 0f1852f671..49008e4938 100644 --- a/hw/nubus/nubus-device.c +++ b/hw/nubus/nubus-device.c @@ -80,6 +80,7 @@ static void nubus_device_realize(DeviceState *dev, Error **errp) &error_abort); ret = load_image_mr(path, &nd->decl_rom); g_free(path); + g_free(name); if (ret < 0) { error_setg(errp, "could not load romfile \"%s\"", nd->romfile); return; From patchwork Mon Feb 27 14:00:44 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: 656992 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370026wrb; Mon, 27 Feb 2023 06:07:49 -0800 (PST) X-Google-Smtp-Source: AK7set+6sPcoRVe+Grpxm4toa5ZTgOmStIiX3ByGmKiCsahUOiVqv0/G+S/vAgqceGeoNHMx5mbu X-Received: by 2002:a05:6214:f2d:b0:56b:4e51:acd5 with SMTP id iw13-20020a0562140f2d00b0056b4e51acd5mr52069527qvb.12.1677506868926; Mon, 27 Feb 2023 06:07:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506868; cv=none; d=google.com; s=arc-20160816; b=raq04qev4G0u2kYSNISgCvQn/AbBRfxHumJ29RT8XDtyjgljQVKsytoBUR0UUInm7G MdDbXzqBOuwoJkVnqeyjsr4kro8Xi+YVJ0eCF8m65EC2L3Z5SPNh85sEDjBiQvN9jy37 2c/RMjLuC53B3vdCScJ3eGcpPKiGGPj+VL0IX92rKnxORETo1rCZIDKxjeSB5Igd7DJQ kZWMZ216gvSP+A4sgv31k/Crv6bp5sUW8S+pPrUpp2PDe7udfLBzsf7jeVAhFlqUo/yQ Ei6tB6mvMIIwASkFq8MHWs3thnGNi/6n8cMZZnB7z7jDyQEGy/fd2eyUAlXPzrlANPPd BNUQ== 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:to:from :dkim-signature; bh=hqZbA/VxjYps6TlZPucyPAJK2NQRYopiLwtGGc2bqQI=; b=XejsOEkuPWdYiuybNKtfESEWf6LwW1LPH/rOtaXrDV+Qj2f9tJBl31AoT1tbMB4ybP 5q9mYZgeIl6Z4slBxAYNcG9ukT1xv+Zsv0ND50EbnSSWvrxr4MrF1ytiwXEIA+VHQ5wg Mqx3C3BXMnONSKvauVSLDZVDpruIGG4wd9s0sOCjWEsEg6Aokn8yAvCE1F8cnuKRq+LT oRDszBVlOOYDC2OVpSATg10c7szBGclF2d66knJr6CqepGPQEbOYtuPup1v+Ez1twbt7 wvVpF+Lh+JR02nBbfrmYwJIO0Ak9PmFJ7VmK95prWhW+h4M6P26yja6Y0xAbZamuue60 hB0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iD9WZ4G4; 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 r9-20020a0c8d09000000b0056e9871bbc0si6887503qvb.23.2023.02.27.06.07.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:07:48 -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=iD9WZ4G4; 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 1pWe7T-0003Vp-PM; Mon, 27 Feb 2023 09:04:48 -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 1pWe7S-0003Mw-6A for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:46 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7Q-000827-Oy for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:45 -0500 Received: by mail-wr1-x430.google.com with SMTP id bw19so6310966wrb.13 for ; Mon, 27 Feb 2023 06:04:44 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hqZbA/VxjYps6TlZPucyPAJK2NQRYopiLwtGGc2bqQI=; b=iD9WZ4G4RiqSx4nmA1C7z2o4SR4zuBBqV2rnZoa/HXx9aBO3Iw/fHzINbxN0ekAlwq S8o6Z4Lhu2sF90EPpLjEHX9nh4NeRWGuIAxdHSHwnJQoAW1VPweXU8SJ17h/qx+4XoZP lnOA7f6bjSiKY1vbMeLvjI5Tv2Vg4TpEZbQZqA+DToBJ/mGqvUUZn7iLkpvdo2+0n5zD P9oq0VGKYeuXaNZmVjSbNBnCrMwCyo8jwSbGIzFP4RU9DqRQ9Du7vM8VFnqefW3sHoH6 q2Cy8ZCfXca7RQ+le46utAVRa1RkX3BWji4Wd1TyaaaSOCx/yWamAfozEBFXDh+9HdQu yEdw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hqZbA/VxjYps6TlZPucyPAJK2NQRYopiLwtGGc2bqQI=; b=fJhfOS+LC0cZc+Q7nEcwmNCb9XA1AJKlS8mtV5D5odqh1cVxndMyGKofSWLHZWuqM8 /SLE/ftIHWd1peYk8xEk/Inp/pXtusNRZmzjIfhWh8HpobFXFzID7ruGSrXLo9L7YhO7 pulkkJECmn5oJxJsA7JjdOwkp0QggGHnftnZpGSC7gwCo+6mDfMg5I+uv2uJQ/VXezM7 Br2V+oKLOShha4+nG/VW6US2ywpA0pc0oxyc4dnCoRmCBedO45QZEwbybJ0U2C4P0O/B fjb5O9V/FVI2p31jj5xCnTiUEl8VwOJufr5t1K43Hdwq6plCT9g2e7Y8BF7jUucVKHrD Y5hg== X-Gm-Message-State: AO0yUKXMp34uBtsW8XimLDE/Qj9TKU09qy7JCdmRFmLdSgN5mm2N5r7Z pSLhoLH4CrzH5/exQlh222ZZCM0AqrlJ4tH6 X-Received: by 2002:adf:ef06:0:b0:2c7:da1:4694 with SMTP id e6-20020adfef06000000b002c70da14694mr12989686wro.62.1677506683236; Mon, 27 Feb 2023 06:04:43 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id s2-20020adff802000000b002c706c754fesm7259928wrp.32.2023.02.27.06.04.42 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:42 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 037/126] hw/qdev: Constify DeviceState* argument of qdev_get_parent_bus() Date: Mon, 27 Feb 2023 15:00:44 +0100 Message-Id: <20230227140213.35084-28-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 The structure is accessed read-only by qdev_get_parent_bus(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230212224730.51438-2-philmd@linaro.org> --- hw/core/qdev.c | 2 +- include/hw/qdev-core.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index d759c4602c..43d863b0c5 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -330,7 +330,7 @@ bool qdev_machine_modified(void) return qdev_hot_added || qdev_hot_removed; } -BusState *qdev_get_parent_bus(DeviceState *dev) +BusState *qdev_get_parent_bus(const DeviceState *dev) { return dev->parent_bus; } diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 35fddb19a6..f5b3b2f89a 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -715,7 +715,7 @@ static inline void qdev_init_gpio_in_named(DeviceState *dev, void qdev_pass_gpios(DeviceState *dev, DeviceState *container, const char *name); -BusState *qdev_get_parent_bus(DeviceState *dev); +BusState *qdev_get_parent_bus(const DeviceState *dev); /*** BUS API. ***/ From patchwork Mon Feb 27 14:00:45 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: 656993 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370029wrb; Mon, 27 Feb 2023 06:07:49 -0800 (PST) X-Google-Smtp-Source: AK7set+gkxoCAx/ZfxmqLOQn82RKVNf5Ymy79uS7LMP69Tf4HKkmKqvCYgzhRI+KNkQ4mYML04BF X-Received: by 2002:a05:6214:d6a:b0:56e:b298:8e13 with SMTP id 10-20020a0562140d6a00b0056eb2988e13mr47275876qvs.25.1677506869314; Mon, 27 Feb 2023 06:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506869; cv=none; d=google.com; s=arc-20160816; b=z+G6c52jEzMVIct3p3xKAvSlHyFgGMisZcndJ7k3LT4G2hlfkc7S9peAPAwXvXg/Xu k6cVocbRBwzwBFrOxbxxts0sLhrJ7XdHaVvIi7DrPbf+W4hIdmaaP0HpyUOZxkbPJHZH TDP8Qm3SQckPLD+z4sKlL+8oyN1VTANj0WeahwEokrNN2dUUkXcc8WPOF2BaeiNe9zDp 9ir0vCiTMiLc8/wwgjP7OuCX4yAtnnw+f+6CEd2IewXtlzbwtHTXEvf1ZrIqBz1shOA9 iey/kz1z0XT/bWjuS95FK8xFmjPZpNgsMY5t3os0pGcbAVma+0m439sZt3WHs3j4Rn+q gUNg== 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:to:from :dkim-signature; bh=BY+O27vkTKz7VveF8F3o+v7d714AMEm3Jk9i5pC/EpA=; b=hoGsPWHmLR+ahB329Rwc/OKF1uU5l5wBVg6tQdvRh8oeuYZT7t/SP1DahasUJRPlkH RTM1hSQU05mr9BoG0l3YiSbEJT8VAU80GqIfUcIw9XXnn1FeC3xbw6eJNHQBDIM+gA76 i4nptqyYyzXPdnIx/+Pf0OkmI4+W0Rl4TzsCbwI/6z3IL6HWNL5gmzx5Zm2fDArplFK0 Kze63UElHDU/qp+sfhWjBzGUdkwH8Qcm7evLZqDbw16jVnJTzbBjG4Xjb9H4sgkNnv8g PSi5DH6j5IFQKfxglqJGerCTsalla+1lRZiss8wIWMBFgYy4FpIZ0pz2xdWqPkTIi3uU se2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dHcCV7Kj; 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 a19-20020a0cca93000000b0056c20827442si6515727qvk.485.2023.02.27.06.07.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:07:49 -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=dHcCV7Kj; 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 1pWe7i-0003rR-Eb; Mon, 27 Feb 2023 09:05:02 -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 1pWe7Y-0003ke-5J for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:53 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7W-00082X-El for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:51 -0500 Received: by mail-wr1-x435.google.com with SMTP id bv17so6352412wrb.5 for ; Mon, 27 Feb 2023 06:04:49 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BY+O27vkTKz7VveF8F3o+v7d714AMEm3Jk9i5pC/EpA=; b=dHcCV7Kjta0W2eSKYtRuURLnrNxhVybgIc7fmqDUNArr9FkdmB9cDOsrP2HfItAWox Qg+5eS9LALDQzN04N0rTtiOvnnEWFHHf396BTb4J/RnelZ1PXAho1O1QJAeO8OWpVbam L3fZtGVRBcV9E4qy6PgwalrMicprcP1bIJ3wE3/B41JVN37h1fdCVW41KRtvfWUdEwUV J2U4gptzJwo7g9C86eg1FwI49GWZ/W6wBIHAqZHZGxWT66CbNVSXgyYa/wPM6Mbm2JYt ZMNa/UQqSkZWIy/3rZ8V0CKIYAk6TlTCrN3pnr+rGNunRP1btUGLelUtw4LDjBYmC812 aXXA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BY+O27vkTKz7VveF8F3o+v7d714AMEm3Jk9i5pC/EpA=; b=vxiat1SMs++NdwKm028CCNOYrj6+Nxn83f7mBiRJhDLn4E83hS1gIduWNc96mL8baj n0vog/eB/rCRLNB2lY2uVdcjnzLOJRgVpZsFL3c0vcBGYnYtH0YMU7aa3CmeFBL5oCJG ZoG3vzkVz2pSH29jEvHbhmXO+NS2XY3dOtOARPVWh6VRpES3FRv+wxfE4LeHQlr9NS1u smuCJC/KK+yqZRMkssAvBwPIKOC8HzbObfnpwv+XBctlABIDIbpcS9CnkdIHF9G7VRTW 1SZA/I7MmKvFZ3tfBYpa6/Ic4eFNQzQTJKQW+nylOqZ8+M80YJTEczqYQiVl6ila7LCM nTdQ== X-Gm-Message-State: AO0yUKWtDNwjdgMNhng9nApU7L8iAT1f8ClqLItNlQh+RgxXwh3bdh00 mdgl1ap6x2l9PQiL0Gc38oH9k58mWIV06cOA X-Received: by 2002:a5d:4952:0:b0:2c6:e861:2a49 with SMTP id r18-20020a5d4952000000b002c6e8612a49mr20260197wrs.59.1677506688720; Mon, 27 Feb 2023 06:04:48 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p2-20020adfe602000000b002c561805a4csm7340780wrm.45.2023.02.27.06.04.47 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 038/126] hw/cpu: Extend CPUState::cluster_index documentation Date: Mon, 27 Feb 2023 15:00:45 +0100 Message-Id: <20230227140213.35084-29-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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=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 Copy part of the description of commit f7b78602fd ("accel/tcg: Add cluster number to TCG TB hash") in tcg_cpu_init_cflags(), improving a bit CPUState::cluster_index documentation. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-Id: <20230216142338.82982-2-philmd@linaro.org> --- accel/tcg/tcg-accel-ops.c | 13 ++++++++++++- include/hw/core/cpu.h | 2 ++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/accel/tcg/tcg-accel-ops.c b/accel/tcg/tcg-accel-ops.c index d9228fd403..aeb1cbaf65 100644 --- a/accel/tcg/tcg-accel-ops.c +++ b/accel/tcg/tcg-accel-ops.c @@ -44,7 +44,18 @@ void tcg_cpu_init_cflags(CPUState *cpu, bool parallel) { - uint32_t cflags = cpu->cluster_index << CF_CLUSTER_SHIFT; + uint32_t cflags; + + /* + * Include the cluster number in the hash we use to look up TBs. + * This is important because a TB that is valid for one cluster at + * a given physical address and set of CPU flags is not necessarily + * valid for another: + * the two clusters may have different views of physical memory, or + * may have different CPU features (eg FPU present or absent). + */ + cflags = cpu->cluster_index << CF_CLUSTER_SHIFT; + cflags |= parallel ? CF_PARALLEL : 0; cflags |= icount_enabled() ? CF_USE_ICOUNT : 0; cpu->tcg_cflags = cflags; diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index a5aa44d12c..7fd6657039 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -272,6 +272,8 @@ struct qemu_work_item; * to a cluster this will be UNASSIGNED_CLUSTER_INDEX; otherwise it will * be the same as the cluster-id property of the CPU object's TYPE_CPU_CLUSTER * QOM parent. + * Under TCG this value is propagated to @tcg_cflags. + * See TranslationBlock::TCG CF_CLUSTER_MASK. * @tcg_cflags: Pre-computed cflags for this cpu. * @nr_cores: Number of cores within this CPU package. * @nr_threads: Number of threads within this CPU. From patchwork Mon Feb 27 14:00:46 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: 657043 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2375877wrb; Mon, 27 Feb 2023 06:17:51 -0800 (PST) X-Google-Smtp-Source: AK7set94nX+wmznvgh3ZLVPB0I5Ax1F/dH59rEsdCfGzC3/jh3xn7GocNFZbWJ8rwcxZJ5y3wJa4 X-Received: by 2002:a05:622a:14ca:b0:3bf:dc7d:2221 with SMTP id u10-20020a05622a14ca00b003bfdc7d2221mr3252742qtx.47.1677507470867; Mon, 27 Feb 2023 06:17:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507470; cv=none; d=google.com; s=arc-20160816; b=GlJlMR5ZcakrLoTTRYc1kBX91ZWoUHlisIhbl6ntNHEd8lFf5mR+Jg5xNuCv9gNIcq DZ+Q8rAMQt+3o92+Er1zQ42QF/7dUBg6HDB8DGoXhSOaTELftlEuNFyY2T3fYE8TXxWq s7bKFa2xXChKW9K+V++BeHL23hnudGo2LRYDieX+uByY4UQAWYFitKw6fD2XOgT8Axvg KVAaBH9qWlumGlTHWWEZYG5ihxr4t3AqUhllq/kVuE9EyTB7IyT+DAFEG5cPT/t/PMcH lds8SiMExLTd+idGVPHnD7tZYEeyNL9aUtUUHNhuADUSgubIXSDrVPmGmzFH/RifVy+C KLcA== 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:to:from :dkim-signature; bh=mJyzaNmEWDD6f28J9cynPLyHkGzHEVC06BDnzv7dYkk=; b=ZYrIskEVAz96XJhCIWzKn0cDFn/RnavwnaLUuj4UKdc8VuePSLyEke8wf3Pnv3//FX Khsj1uS2ZcY4opwLE5U9mQoPxD62k0vkZpgumziwsRBaVKEPS6i4oFLgMCkAP4t5S3mQ KT549Dtnf9CpKDY//vp7zzVVIwbYmzv0kUg3YuItSqTVNn6/NjnQEoIf59AjFIJYJ40O AkIYDJFKgxc6fHUOG8Hq8ULv1ezMFxe4HbYUkebzUmnAzHrm8zUYJ1XTjObBrMjTcbUJ gOHAdt/ilVTZrAvVyqSxzORwXtHgUWiW8SJ4y/9PJEyJebS+ojv7IksPkGYxNJBLgkfP LC7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WjFxKdjr; 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 bs32-20020a05620a472000b00742566c8a80si7107593qkb.46.2023.02.27.06.17.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:17:50 -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=WjFxKdjr; 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 1pWe7p-0003wx-Qg; Mon, 27 Feb 2023 09:05:09 -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 1pWe7e-0003p6-OS for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:59 -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 1pWe7c-00082r-5d for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:04:58 -0500 Received: by mail-wm1-x32f.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so7226912wmb.5 for ; Mon, 27 Feb 2023 06:04:54 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mJyzaNmEWDD6f28J9cynPLyHkGzHEVC06BDnzv7dYkk=; b=WjFxKdjrjG++Bd4xLVGTUS/wop6IXH8EpHE/+cSKZG4py+vTfRUPNkvH6UavriKWJJ xhOoZiQqjmeU3Q9v2MIx7gdB9tHgoqFDqtWdEKLOLumjAWN/doYyPjBm7h/4wzDIw1/a DKacyAaYxmo8qYkWJ68sa43UU+gEtDS73cCBe6q/3JGoAgoEepCHfCK6MFKJowNQ7/1x aYiR7ro7TouxA0MFWrFCNwCPQrXoaRqkp608Kqlj/+ownQV9Qmb2iPSzwiJ7W0b7753I 7lwN6AEZrN57S+iUiYMo4Aq/K+OzvIcrg2Syd+8yzu9OC8qU0/wrG5kpWcVrRl27VyPH pC6A== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mJyzaNmEWDD6f28J9cynPLyHkGzHEVC06BDnzv7dYkk=; b=z92nAH6vvhx5/fx2MT6B0K3S8PhY9fa05e7B6QohtTW7hvo/FzDSOblIbA7KXq6yb2 zeXJnhhY0/0yxMOmb4eIlWUrDMvg9wIj1s7gV+al7u4Ld9OdCdwmi9NoD41xBZVDJuQo RKUqQKHu6hIVPrDgG2AfFx1zS9ik7nI1LP+MCoSBWjXWMWiR0NmXdtSmyuY+b1d9TMGW 8QoUXxZttAEJK7EQtZqjLuFy44a0KV4RuU5QLWH+JTfapqrMFXWG8oyrqKl4f0INhTVQ R5DUL73WAAtu6SAxLCfUPOm9uLN6zJNdAArgdRtbvXgmZfA3efj6eaJOpM1vO2DjnmNl +sKg== X-Gm-Message-State: AO0yUKUEZRk+1UBjLl9LZhjJTOpa0J5mZMyU+/IvbIZM24GhLkFbxT0S OQB6V21YG4D5w70OIbr7/NGe85EoegJ1W6/+ X-Received: by 2002:a05:600c:998:b0:3dc:5b88:e6dd with SMTP id w24-20020a05600c099800b003dc5b88e6ddmr19939204wmp.10.1677506693573; Mon, 27 Feb 2023 06:04:53 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id d21-20020a1c7315000000b003b47b80cec3sm12847780wmb.42.2023.02.27.06.04.52 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:53 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 039/126] hw/i386/x86: Reduce init_topo_info() scope Date: Mon, 27 Feb 2023 15:00:46 +0100 Message-Id: <20230227140213.35084-30-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-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=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 This function is not used anywhere outside this file, so we can delete the prototype from include/hw/i386/x86.h and make the function "static void". This fixes when building with -Wall and using Clang ("Apple clang version 14.0.0 (clang-1400.0.29.202)"): ../hw/i386/x86.c:70:24: error: static function 'MACHINE' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline] MachineState *ms = MACHINE(x86ms); ^ include/hw/i386/x86.h:101:1: note: use 'static' to give inline function 'init_topo_info' internal linkage void init_topo_info(X86CPUTopoInfo *topo_info, const X86MachineState *x86ms); ^ static include/hw/boards.h:24:49: note: 'MACHINE' declared here OBJECT_DECLARE_TYPE(MachineState, MachineClass, MACHINE) ^ Reported-by: Stefan Weil Suggested-by: Peter Maydell Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20221216220158.6317-6-philmd@linaro.org> --- hw/i386/x86.c | 2 +- include/hw/i386/x86.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 48be7a1c23..5f28dc8390 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -64,7 +64,7 @@ /* Physical Address of PVH entry point read from kernel ELF NOTE */ static size_t pvh_start_addr; -inline void init_topo_info(X86CPUTopoInfo *topo_info, +static void init_topo_info(X86CPUTopoInfo *topo_info, const X86MachineState *x86ms) { MachineState *ms = MACHINE(x86ms); diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index 62fa5774f8..5d3047a1d1 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -20,7 +20,6 @@ #include "exec/hwaddr.h" #include "qemu/notify.h" -#include "hw/i386/topology.h" #include "hw/boards.h" #include "hw/nmi.h" #include "hw/isa/isa.h" @@ -98,8 +97,6 @@ struct X86MachineState { #define TYPE_X86_MACHINE MACHINE_TYPE_NAME("x86") OBJECT_DECLARE_TYPE(X86MachineState, X86MachineClass, X86_MACHINE) -void init_topo_info(X86CPUTopoInfo *topo_info, const X86MachineState *x86ms); - uint32_t x86_cpu_apic_id_from_index(X86MachineState *pcms, unsigned int cpu_index); From patchwork Mon Feb 27 14:00:47 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: 657024 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373109wrb; Mon, 27 Feb 2023 06:13:03 -0800 (PST) X-Google-Smtp-Source: AK7set8PeVfMWLfrOqJEq02vNBd6f4nacCFyi/MettOe+mFjEnxQQNi3EDV2bguwt9lcAqEg0Za2 X-Received: by 2002:ad4:5966:0:b0:572:636d:626a with SMTP id eq6-20020ad45966000000b00572636d626amr14960438qvb.25.1677507183024; Mon, 27 Feb 2023 06:13:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507183; cv=none; d=google.com; s=arc-20160816; b=cPahPMZfHMQqJnvVt+mYQloX1D8Hvi9bcoGRmobYJ+gOtTmnL8Lrl9kzM8v7aUbBxX x1aTXKn0WPjI4Yu8VLsROSpEXqXEkq4w8bQJJ6d7mLMZv/Yur+cXr5ZAx9s3Q89cLV46 PHRcdMFR8RBTCA6/YP1VT0zqKytw8xqmmlYWmUDAawiPrjrdp3+saBMXLwl1Ms82nuwn mzbpew73GGG+FgoU7RQLZpCCovKDjP3y2iN01k/R4pW31cHeM8/7gx9SJCSjmT+4rThl SS87qErAhi2mV3EPARb1HDrRj8c9Zg8xKMcY6lyRb191/ydTCde7rSq8ey8kx6mNDkxg OfSg== 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:to:from :dkim-signature; bh=eh1VSyfv5tGj+acgtwNpwwVd0uyV2g7zvk5mN67oJa8=; b=T7Qw9ieBakh3YChPzr8nkaAt3ehVLOuBxervUC8XPqHMRveqrSL0b16itGQv5jYgJv FjgufCNLHQAB4jFGaj1vXnmbNVMhseBbHy0qkmGQnRNnNQypnvxh9aCmf2FEDaYV5YOg RmQmvUIjzO1QEseQVx40Sfh/gYTLy9Qi6TvzfJbt449MNHSbxi2GWtc4iJaxtZdmKV4T P8cRsNV76cZRMd3iI8QH65Rq0k4wMP6Rj9SIR/2HIaXTUdpiDaUudH3Dhze3h5Fzpo9T Ay8yHo+AnTHSP8vDMJCgPPOLMPqRqN+gha9edTQg7G8dejvxoOhUZ9OMp6j48B15MvK/ OZ2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="O1rI/ckD"; 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 t17-20020a0cb391000000b0056ee77ce402si5811985qve.534.2023.02.27.06.13.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:13:03 -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="O1rI/ckD"; 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 1pWe7t-00046K-8a; Mon, 27 Feb 2023 09:05:13 -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 1pWe7i-0003rs-CT for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:02 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7g-0007zX-Md for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:02 -0500 Received: by mail-wr1-x42c.google.com with SMTP id r7so6346206wrz.6 for ; Mon, 27 Feb 2023 06:05:00 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eh1VSyfv5tGj+acgtwNpwwVd0uyV2g7zvk5mN67oJa8=; b=O1rI/ckDnoWNTcZQM/zmyzCMFJZXn0yxabEsXttZa34A3WVveiEuzc4w4ug4EwW6ZX pztjpVOlJIQE61RzDp2eILJD52ZQ+NtMZE1/vQ0VXm/FQQpUeMJdk+eLC3qy7WVUEQUh Xq9MjAVy5p8fuN3VPhgBnlqWf0elRGLlA2Jq+AWNz4ig/s5dKmUGBm7X6gX68sz/bmkn gxsC/m3Kq9OUhng1eqwvEss8AC7YjgajyuHhZTSs+6MBxKdzUkGXVXM1McM+MzY4fJ0p M7l8OWzm4JsfkeZGg+f6uE/Gm26JktNeZmLYeMTEnjHZbnpKbse2V+grQrqpCJ3l4hig tjDw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eh1VSyfv5tGj+acgtwNpwwVd0uyV2g7zvk5mN67oJa8=; b=ZerSM0d1JDEberCRiohdU78EeIK64ksLnObs4rTqlGnZNItg3FnFOs85V9RfNJCQmS P0YI2NnwbgrPcW8YJzMOXyoDutDrpcdx2b+9c1AE3pwZia04auuHUz9gIp8u/McnRlAc Xuo8uTnmdq4bgE6O3G/ZBUJjn5AxfhYZhn18tfhNX3fra2Geix5uR7Gb5r5oTZUYm7ZB LUTOpgT3FIvcdpyq47EAuCedTtV+m88NsfXWxnPBPzLf/sZphoeurTQwyzO7AEZQmdHv uToR2X7/ESmU/YSCC38MrYFhwdn/Xs4gcNcZHEWJa4jGIAoK2wM22TQ/oJn59JyOBySR NgLw== X-Gm-Message-State: AO0yUKUqJk3ogk44ZmiETDAQ4DfOZ3KijeYrkdZpNzJB3w09/xJ5p9fX ChLQuthEung+XRGzOSkPDer7aDoxWffYRNkB X-Received: by 2002:a05:6000:10d0:b0:2cb:59ca:8671 with SMTP id b16-20020a05600010d000b002cb59ca8671mr2648718wrx.24.1677506699695; Mon, 27 Feb 2023 06:04:59 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a5-20020a5d4565000000b002c3f81c51b6sm7130135wrc.90.2023.02.27.06.04.58 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:04:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 040/126] hw/i386/ich9: Rename Q35_MASK to ICH9_MASK Date: Mon, 27 Feb 2023 15:00:47 +0100 Message-Id: <20230227140213.35084-31-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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=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 From: Bernhard Beschow The Q35_MASK macro is already defined by TYPE_Q35_HOST_DEVICE, so let TYPE_ICH9_LPC_DEVICE have its own one to prevent potential name clash. Signed-off-by: Bernhard Beschow Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-2-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/i386/ich9.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index 222781e8b9..36e0ccd16a 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -75,7 +75,7 @@ struct ICH9LPCState { qemu_irq gsi[GSI_NUM_PINS]; }; -#define Q35_MASK(bit, ms_bit, ls_bit) \ +#define ICH9_MASK(bit, ms_bit, ls_bit) \ ((uint##bit##_t)(((1ULL << ((ms_bit) + 1)) - 1) & ~((1ULL << ls_bit) - 1))) /* ICH9: Chipset Configuration Registers */ @@ -137,13 +137,13 @@ struct ICH9LPCState { #define ICH9_LPC_NB_PIRQS 8 /* PCI A-H */ #define ICH9_LPC_PMBASE 0x40 -#define ICH9_LPC_PMBASE_BASE_ADDRESS_MASK Q35_MASK(32, 15, 7) +#define ICH9_LPC_PMBASE_BASE_ADDRESS_MASK ICH9_MASK(32, 15, 7) #define ICH9_LPC_PMBASE_RTE 0x1 #define ICH9_LPC_PMBASE_DEFAULT 0x1 #define ICH9_LPC_ACPI_CTRL 0x44 #define ICH9_LPC_ACPI_CTRL_ACPI_EN 0x80 -#define ICH9_LPC_ACPI_CTRL_SCI_IRQ_SEL_MASK Q35_MASK(8, 2, 0) +#define ICH9_LPC_ACPI_CTRL_SCI_IRQ_SEL_MASK ICH9_MASK(8, 2, 0) #define ICH9_LPC_ACPI_CTRL_9 0x0 #define ICH9_LPC_ACPI_CTRL_10 0x1 #define ICH9_LPC_ACPI_CTRL_11 0x2 @@ -162,7 +162,7 @@ struct ICH9LPCState { #define ICH9_LPC_PIRQH_ROUT 0x6b #define ICH9_LPC_PIRQ_ROUT_IRQEN 0x80 -#define ICH9_LPC_PIRQ_ROUT_MASK Q35_MASK(8, 3, 0) +#define ICH9_LPC_PIRQ_ROUT_MASK ICH9_MASK(8, 3, 0) #define ICH9_LPC_PIRQ_ROUT_DEFAULT 0x80 #define ICH9_LPC_GEN_PMCON_1 0xa0 @@ -172,7 +172,7 @@ struct ICH9LPCState { #define ICH9_LPC_GEN_PMCON_LOCK 0xa6 #define ICH9_LPC_RCBA 0xf0 -#define ICH9_LPC_RCBA_BA_MASK Q35_MASK(32, 31, 14) +#define ICH9_LPC_RCBA_BA_MASK ICH9_MASK(32, 31, 14) #define ICH9_LPC_RCBA_EN 0x1 #define ICH9_LPC_RCBA_DEFAULT 0x0 From patchwork Mon Feb 27 14:00: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: 657066 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380386wrb; Mon, 27 Feb 2023 06:26:48 -0800 (PST) X-Google-Smtp-Source: AK7set9FI9whj5W0ywmTjWl143ME3YK+Y/2FJFyQ0QDCFYFkL8wPFJOrVVxLfIpmfT4afLvn4l+G X-Received: by 2002:ad4:5c84:0:b0:56e:f9a2:3eba with SMTP id o4-20020ad45c84000000b0056ef9a23ebamr53798016qvh.41.1677508008721; Mon, 27 Feb 2023 06:26:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508008; cv=none; d=google.com; s=arc-20160816; b=y8lL5mjfCtCynxp5Zhq276woo40kc5XkjFLaVEff2SK5a+vrNB4EiWqCFWUDOeiENH UmGtfzoq/Q9bI+Q3kIoAH8z8M+/YTXSvJk6DsZUlA79R32ZTX2awC3ww5JCodfzR2phS yYysFeHTuC1Zh/iSANOuZSS9+/pZwoy/mYYGc+ladTWKY5eW5w9/HaaSi9gvAwHwvkwY ZItcNgyZEYYQq3xVBSqFzJYz25PCfZrZ4ew+rlu3LKL3olgiHN720MbpUkgvizxs7jSp Z9jW9ikbwloViY38mbFBo7j59nDUYAV0AMSQfj6xctWQfJFTtnvPDDzDHPhQ2PvYKTVT vrhA== 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:to:from :dkim-signature; bh=AN153Vj8pXVM2GwG9IIVuPeVKK7hQugdeZLVdVf4s1A=; b=JwE10+mQcQrMZKeoukG+mLLjv4oxWObrhlBBc+jPCF8aZJSr5ub1mt04MJVR3G5eji 3UqMXY5HP6UnEACEIrjJzngvXrJ2I4f4COl17Av7R4bi0IBtjIyIDPChEDFbmM2/AYEm +9BcP5FiWZKwiUBHyoaz1ZDDrhQhaHe10PTpFKzF2oGMhdgCIQe/x+UozE69EBHnHW3n see3T75GWIPetVfxCblvauVSkg8J43auJaVxGXgPoJA0saHYsday0gbkoSIy1dlUuaXx sHAhW/qocT4oZNKjtjcSBXsmgKNNO1h95DCBQnZSxGgmDIkCuw0S0cBMh4wEoE8aIjAd FGnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=emCkhSLf; 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 j10-20020a0c9cca000000b0057237542cd4si6280903qvf.153.2023.02.27.06.26.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:26:48 -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=emCkhSLf; 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 1pWe7w-0004AX-Vd; Mon, 27 Feb 2023 09:05:17 -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 1pWe7p-0003yq-7G for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:09 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7n-0008EE-BC for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:08 -0500 Received: by mail-wr1-x42c.google.com with SMTP id r18so6369013wrx.1 for ; Mon, 27 Feb 2023 06:05:06 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=AN153Vj8pXVM2GwG9IIVuPeVKK7hQugdeZLVdVf4s1A=; b=emCkhSLfO5K+vBe0M1b7Rn6XHGx1cw7YftBd+Nm5Nqp78w5iqLEA6ZNAyCTTtxGJhn UAbNDYIlhVhIP3Px+kT7WXvvyJmxa4tSWJylKFTmovJNIXfMUNBjY8Nuk5miuT8xef6v PBNRhVwC/WGF+CTEsY2xG8y7n4O4EQN2W0Frmj2XJqUoSnDqwrYV4M1dQH4BXx0AAMO6 nH98SfLSqju7v4aKuLhWWElgZrmCL69DgwtHCPPp9yG92g6jH7/Q3UmkOg9dL1BD/K0J qhQu8OzyG9RgMVwe3CELSfLDvjpqQ4rDKQp5f9yqMkrIcgSsKg/TJFvkL23OaKjx/RfP R8gA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AN153Vj8pXVM2GwG9IIVuPeVKK7hQugdeZLVdVf4s1A=; b=ewue0StMFBXHc6MoSbumgnmZAm+tOL9ji353p6F4c100JYbtYPyZA8MokykyeD+0H/ daI0+r0KhBPIoegxDql0TORbnLq6MktSZS4IXxuvKKek4cHyKad8HboDU/UVGaSx96x9 cIPNgxgKsyqIMjcEMFn6jMiPdgd9C14WeFK9r2uflh5rw1urIyR9CNfYwsubksiuDbAG 0bUJ+d0x3GFSNag9H85vwITFW7Wg8CRayxbMXId7W5vvcXnV+LLBj6Lh6RYqm3+E1yrA hnGIC3YR2bYSZX701yHO8bzeJt6S38iWStmCjiVlOurKSJBm2EvRTuIZxH/ETXL4weiO Yi+A== X-Gm-Message-State: AO0yUKW1N54ntJoznLFCgxFPYNG7kNLTvcsSwEwliMw194Y2steClXDc y/L+XeKTgra74JzIMGaqIuKSI4q0O6NgX4iB X-Received: by 2002:a05:6000:50:b0:2c9:23c4:8f93 with SMTP id k16-20020a056000005000b002c923c48f93mr6419699wrx.57.1677506705028; Mon, 27 Feb 2023 06:05:05 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o19-20020a05600c379300b003e2052bad94sm12634096wmr.33.2023.02.27.06.05.04 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 041/126] hw/isa/lpc_ich9: Unexport PIRQ functions Date: Mon, 27 Feb 2023 15:00:48 +0100 Message-Id: <20230227140213.35084-32-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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=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 From: Bernhard Beschow No need to rely on the board to wire up the ICH9 PCI IRQs. All functions access private state of the LPC device which suggests that it should wire up the IRQs. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-3-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 3 --- hw/isa/lpc_ich9.c | 11 ++++++++--- include/hw/i386/ich9.h | 3 --- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 66cd718b70..5dfaeeed5f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -270,9 +270,6 @@ static void pc_q35_init(MachineState *machine) for (i = 0; i < GSI_NUM_PINS; i++) { qdev_connect_gpio_out_named(lpc_dev, ICH9_GPIO_GSI, i, x86ms->gsi[i]); } - pci_bus_irqs(host_bus, ich9_lpc_set_irq, ich9_lpc, ICH9_LPC_NB_PIRQS); - pci_bus_map_irqs(host_bus, ich9_lpc_map_irq); - pci_bus_set_route_irq_fn(host_bus, ich9_route_intx_pin_to_irq); isa_bus = ich9_lpc->isa_bus; if (x86ms->pic == ON_OFF_AUTO_ON || x86ms->pic == ON_OFF_AUTO_AUTO) { diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 1fba3c210c..54a8839cd2 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -259,7 +259,7 @@ static void ich9_lpc_update_apic(ICH9LPCState *lpc, int gsi) qemu_set_irq(lpc->gsi[gsi], level); } -void ich9_lpc_set_irq(void *opaque, int pirq, int level) +static void ich9_lpc_set_irq(void *opaque, int pirq, int level) { ICH9LPCState *lpc = opaque; int pic_irq, pic_dis; @@ -275,7 +275,7 @@ void ich9_lpc_set_irq(void *opaque, int pirq, int level) /* return the pirq number (PIRQ[A-H]:0-7) corresponding to * a given device irq pin. */ -int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx) +static int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx) { BusState *bus = qdev_get_parent_bus(&pci_dev->qdev); PCIBus *pci_bus = PCI_BUS(bus); @@ -286,7 +286,7 @@ int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx) return lpc->irr[PCI_SLOT(pci_dev->devfn)][intx]; } -PCIINTxRoute ich9_route_intx_pin_to_irq(void *opaque, int pirq_pin) +static PCIINTxRoute ich9_route_intx_pin_to_irq(void *opaque, int pirq_pin) { ICH9LPCState *lpc = opaque; PCIINTxRoute route; @@ -680,6 +680,7 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) { ICH9LPCState *lpc = ICH9_LPC_DEVICE(d); DeviceState *dev = DEVICE(d); + PCIBus *pci_bus = pci_get_bus(d); ISABus *isa_bus; if ((lpc->smi_host_features & BIT_ULL(ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT)) && @@ -728,6 +729,10 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) isa_bus_irqs(isa_bus, lpc->gsi); i8257_dma_init(isa_bus, 0); + + pci_bus_irqs(pci_bus, ich9_lpc_set_irq, d, ICH9_LPC_NB_PIRQS); + pci_bus_map_irqs(pci_bus, ich9_lpc_map_irq); + pci_bus_set_route_irq_fn(pci_bus, ich9_route_intx_pin_to_irq); } static bool ich9_rst_cnt_needed(void *opaque) diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index 36e0ccd16a..921e4c7ef6 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -9,9 +9,6 @@ #include "hw/acpi/ich9.h" #include "qom/object.h" -void ich9_lpc_set_irq(void *opaque, int irq_num, int level); -int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx); -PCIINTxRoute ich9_route_intx_pin_to_irq(void *opaque, int pirq_pin); void ich9_lpc_pm_init(PCIDevice *pci_lpc, bool smm_enabled); I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base); From patchwork Mon Feb 27 14:00:49 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: 657080 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381164wrb; Mon, 27 Feb 2023 06:28:28 -0800 (PST) X-Google-Smtp-Source: AK7set+9vPNSM4IckhBujBVi1RLkWFxAx3AlDIKH2OpoZgLRDiR/dl4v8dvn0X/4Tey58FQOdtY/ X-Received: by 2002:a05:6214:29c8:b0:56f:1b7e:d87f with SMTP id gh8-20020a05621429c800b0056f1b7ed87fmr44916769qvb.34.1677508108705; Mon, 27 Feb 2023 06:28:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508108; cv=none; d=google.com; s=arc-20160816; b=LstduK5xfzTsyPHn6LoPzcGk5yuSn/YURYD2Qif7UjEHtwVBKyltGspZjzdBP4nGqN p0vyC8T0De0aMgFVWmnuqARJcSXaaLwXGDdbFjf72rEE3Ee8eYLQG/TpK6do3R17HoxE /d8/uXgPpnJAycO2mPRfdF8b2f1wtipip/NlVzcI6/z2beI5SGw1BWYu3+FcIP0O60VF 2mlTcFuAkCh2ZQfHQmdhNSwlffbPWeO/FqDHkmcNiQ+XRNhqNvSSkAcUyCZX+ySt3jHd /Czxsb1f0HD8EmGtownJEdtueBMW8O2ilS27V+N8qT9V5teLRjkmYd/JsYLY2e5tXKPd Wj6w== 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:to:from :dkim-signature; bh=UXJl03FgLvsXYxtIMzGoPuJqJdkFHpVg6pSW+aXq01k=; b=J/QaWMrkpYMvkk+wCoFKZqPFhecz6h3CZZ9sWYfiUPEq9NbOlWrD46yTp6R1C/jcEs UiqmoUxeZUD68+Nl5/XpB+4Vh99ejqwfBMznjoSPP1qx+dB11FNDHBjFP7DtNTQKzhAw f7dTzx/sKQ9SA41Eimooj9McXjXzx1DuqwBZGXzv7XjGNVEWeejd6igN4kk00loZrpb9 gh2AD4Sgjp5N2PGoS+1jKYEQ2/q8vrWamx/aT36BVpEH2f/FypONOxwPqhtVsNzh3hu7 oAqBSqyw5BlPns3I6Z4RV4NV4NI2dLabVIFWpyqPjwknRSlKzkPvwZRInI+qgrISgxMU czdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OBaOOdlv; 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 j2-20020a0cf302000000b005710a8a20b6si6587454qvl.228.2023.02.27.06.28.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28:28 -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=OBaOOdlv; 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 1pWe80-0004Gk-W6; Mon, 27 Feb 2023 09:05:21 -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 1pWe7u-00048g-1R for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:15 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7r-0008F6-Np for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:13 -0500 Received: by mail-wm1-x32c.google.com with SMTP id p16so4296553wmq.5 for ; Mon, 27 Feb 2023 06:05:11 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UXJl03FgLvsXYxtIMzGoPuJqJdkFHpVg6pSW+aXq01k=; b=OBaOOdlvy80OLGrNxkLVXzBHKFFyLUeelYGYx5k5lvM2Chpmb6sSL8gOcxrXJUNI7U iyT6vLpK4g6HSATm8zzFZzVpH4j1OkvUGtNshAB8DSOFAXWF8fTcrVw4f6fH9l+p1LqR 2zF4lc5WVlCJbs0gWtG9j2y2J+QgTSiv2bkvX9qPR3nAB9xl419VmAk61jChe/u7afQw Sjlt4MHyq1iodwgunmhxJ2vmSqIsDaHFzmBx1TvCuF4lvG3Nk2N6OQF9CzMMTtcf18vw AUaMsmRqgjuwcBYUl7dBNTcsjMG1Kk5OkCSKn+hI6+Pz5dXlPJ2NL9PD83tBUe/YwPZC 86xA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UXJl03FgLvsXYxtIMzGoPuJqJdkFHpVg6pSW+aXq01k=; b=3Vin0RAbD5GNoowESKv16gd6EaAeLSVe9Q+YkK3KOhpDw1oXvKW10m17wBT9SdHGth IrVQPDtcOKPDf9JipaNj3zC2DtTIZ5c6+RzztpN8XJV+wvpY1IJrEn4KPTE3VeSl2HEY ryXNigcHoWwEhqSR7t0SEF5y13xa8cu8OdxuLB1AYefHd9C3qvL8VdpBpX60EO3YIMPR hu+D+eJl1GpXqhJlmy0Z19unGq10yBj7AjW3J5IBk/N0TyNOYEJheXHo7PFdIwjFOnFv RbZee+BNfalTO5YiYj1CpJjViq+3pkqgi0ehPmS1YmoAJ19KrwMd8ryPCNoit4WaXV/X 3R8w== X-Gm-Message-State: AO0yUKVsIyBdoUhRgWG4cywAL8MtcYhI436weDm2k5UtgaHfefQuSilN 61+hxlZqf3SK3zPelbD513QffwCwHLnmb1bv X-Received: by 2002:a05:600c:170a:b0:3eb:37ce:4c3d with SMTP id c10-20020a05600c170a00b003eb37ce4c3dmr5387715wmn.38.1677506710067; Mon, 27 Feb 2023 06:05:10 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id 13-20020a05600c020d00b003dc1d668866sm12800648wmi.10.2023.02.27.06.05.09 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 042/126] hw/isa/lpc_ich9: Eliminate ICH9LPCState::isa_bus Date: Mon, 27 Feb 2023 15:00:49 +0100 Message-Id: <20230227140213.35084-33-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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=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 From: Bernhard Beschow By using qdev_get_child_bus() we can eliminate ICH9LPCState::isa_bus and spare the ich9_lpc variable in pc_q35, too. Signed-off-by: Bernhard Beschow Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-4-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 4 +--- hw/isa/lpc_ich9.c | 5 +---- include/hw/i386/ich9.h | 3 --- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 5dfaeeed5f..5e3f7c7e86 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -132,7 +132,6 @@ static void pc_q35_init(MachineState *machine) GSIState *gsi_state; ISABus *isa_bus; int i; - ICH9LPCState *ich9_lpc; PCIDevice *ahci; ram_addr_t lowmem; DriveInfo *hd[MAX_SATA_PORTS]; @@ -265,12 +264,11 @@ static void pc_q35_init(MachineState *machine) /* irq lines */ gsi_state = pc_gsi_create(&x86ms->gsi, pcmc->pci_enabled); - ich9_lpc = ICH9_LPC_DEVICE(lpc); lpc_dev = DEVICE(lpc); for (i = 0; i < GSI_NUM_PINS; i++) { qdev_connect_gpio_out_named(lpc_dev, ICH9_GPIO_GSI, i, x86ms->gsi[i]); } - isa_bus = ich9_lpc->isa_bus; + isa_bus = ISA_BUS(qdev_get_child_bus(lpc_dev, "isa.0")); if (x86ms->pic == ON_OFF_AUTO_ON || x86ms->pic == ON_OFF_AUTO_AUTO) { pc_i8259_create(isa_bus, gsi_state->i8259_irq); diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 54a8839cd2..71f7c18a2e 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -710,8 +710,6 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) memory_region_init_io(&lpc->rcrb_mem, OBJECT(d), &rcrb_mmio_ops, lpc, "lpc-rcrb-mmio", ICH9_CC_SIZE); - lpc->isa_bus = isa_bus; - ich9_cc_init(lpc); apm_init(d, &lpc->apm, ich9_apm_ctrl_changed, lpc); @@ -818,8 +816,7 @@ static void ich9_send_gpe(AcpiDeviceIf *adev, AcpiEventStatusBits ev) static void build_ich9_isa_aml(AcpiDevAmlIf *adev, Aml *scope) { Aml *field; - ICH9LPCState *s = ICH9_LPC_DEVICE(adev); - BusState *bus = BUS(s->isa_bus); + BusState *bus = qdev_get_child_bus(DEVICE(adev), "isa.0"); Aml *sb_scope = aml_scope("\\_SB"); /* ICH9 PCI to ISA irq remapping */ diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index 921e4c7ef6..05464f6965 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -1,7 +1,6 @@ #ifndef HW_ICH9_H #define HW_ICH9_H -#include "hw/isa/isa.h" #include "hw/sysbus.h" #include "hw/i386/pc.h" #include "hw/isa/apm.h" @@ -64,8 +63,6 @@ struct ICH9LPCState { * triggers feature lockdown */ uint64_t smi_negotiated_features; /* guest-invisible, host endian */ - /* isa bus */ - ISABus *isa_bus; MemoryRegion rcrb_mem; /* root complex register block */ Notifier machine_ready; From patchwork Mon Feb 27 14:00:50 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: 657081 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381166wrb; Mon, 27 Feb 2023 06:28:29 -0800 (PST) X-Google-Smtp-Source: AK7set+i9vfP2Gznwf1GjGOcl75p97FYA75+4/D+zdBkfZCQ3lYa3duQGHL7eErktH3quI4zHy1Q X-Received: by 2002:a05:622a:18a6:b0:3bf:a7c1:46a9 with SMTP id v38-20020a05622a18a600b003bfa7c146a9mr37953740qtc.40.1677508109041; Mon, 27 Feb 2023 06:28:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508109; cv=none; d=google.com; s=arc-20160816; b=SPm9a094nzZtiFV9CttpbvK22Hhc3dTXroKWDoe8nQh0zgGosxCtWq3cu+QpZ3Ejfc MV2QJoYF27MMJlMa2KkV7wx6LblBB1pHXLkjxhXkgkTrs26qu2TNOe/QuExmvT0vkzAY rpYfsvDbpHk60phH3kBpH1/DxtGEl8E53OTN6mJfHOdRWJNfLuadbj/plNZ00o3/zIrO lUUV2m9rG49RUtcJZzuRx/72t0bsvHTdBkz1BXSzM6PG/ebDku7tE9T+W04ATjKyIPV7 sLOzlNUhJaTR23XIzqCWPXUDYn4KAaLbgUaNUhI/XdyK9q8FeSvgn8BLD7wGx3yYO95J cJFg== 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:to:from :dkim-signature; bh=hsqxNNnhQ7gTxIdnokXihLeuCOxh7TyQaqkWOyOK8ME=; b=AgxkvctczNLuhm4V3CFa0sJze5us6/RgsQMNtxRzybo85SGtjY/i2K22cJO8bkOCxW pldlYteSuljKocZXF82FcDciRGv6Ndq6ZJMu7iYawQWHFPEo8/wFd+iRz5EVG8szTxLR zpFfkrWbjB+0uIsxsiEa30fjs9QS1qGW3F5v4zQ738kT5pjns7WdttrY8jZC4/WOAKg6 JUWviXHmLPHwL8wZCaO2pmNGyuGk7xOzM423QcT2mQU9bziID89/qCtbjpOeOedLMCsA rpQypir3kWOATfcxuRDmdMVUUtFbRlkm1dYm0KjHkVYDNXdE8nNk4qehoW2rP2Ig0Aet //rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=sysjHBe1; 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 a5-20020ac85b85000000b003b68b54bf83si6531929qta.446.2023.02.27.06.28.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28:29 -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=sysjHBe1; 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 1pWe84-0004Ls-Rl; Mon, 27 Feb 2023 09:05:24 -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 1pWe7y-0004Eu-AZ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:19 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe7w-0008FX-Ma for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:18 -0500 Received: by mail-wr1-x435.google.com with SMTP id j2so6330434wrh.9 for ; Mon, 27 Feb 2023 06:05:16 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hsqxNNnhQ7gTxIdnokXihLeuCOxh7TyQaqkWOyOK8ME=; b=sysjHBe10hz+V51SritdZTcs1CRGP9d/nPK4pl09u+eHDG3ijBjlZd2EiBE47fXGqI lmSmWucTLJpSxplEkYEKyISxyW/7TerUNVw0yNSj/ebNownzUkb1Om+OjRo7W9UHIyd6 JPU0udsPVgT7Sf1fAVGD250FUqh4G13U4FFHiBtQu3b+a9/kicALM4ZbdeWfQ6YhtRwh 5p1hrjkxKgS1XfCXW7ASwdN3oqp0jtnDXqUASCgqxT63IUDhGZSaFR5zUZ7YwiPtldhJ FBw0oLTN9n2saa4Fuqz+VblVM0mpXs0oloy9NgG8fFL80LDNdS8ZAh+TWFbBMDJ9FEak P/7w== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hsqxNNnhQ7gTxIdnokXihLeuCOxh7TyQaqkWOyOK8ME=; b=C4KhNFEn3bNpCsmnuAcLd6zWucTh3gdht8P2fichxmxAYFtyH24J6CfZuHb/6ILLCA LjXTA9xGJJKVfq7Vg50VkJIHFzkGXWkPG7i1a3no9g/wPBy2eF2mM/5nSSV9aI5IDbgS WmIvC5mSC53oTxqDPxtmWoCzLP1hbGZbpakdOEQt3wY8iB8l4Z2p0dWCEtuTM2+5pij7 oHldC4nHhphhxFr8Hz6CO7h8l8FLbqq38TgIpQ+C+5U8AK/Q8M45ZhaH5wyFN7uxLQlK 2x8t2ocyebdYulz9/9psShBqlwCQBmt0t8seiJ2EQ/IF3kdBFHQoQCymzuJ6UZdfALEL VSCA== X-Gm-Message-State: AO0yUKUCXYxLEEU1xTVwEil5J/vGKxq/QStdG8V1Jmb2Q7x2mfeGL3C2 VMKz2wRSLAvRcWp4nobbCQbYh9y06UQByUTN X-Received: by 2002:adf:ec03:0:b0:2c9:850c:6b15 with SMTP id x3-20020adfec03000000b002c9850c6b15mr6041808wrn.41.1677506715237; Mon, 27 Feb 2023 06:05:15 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n31-20020a05600c3b9f00b003e8dcc67bdesm14299032wms.30.2023.02.27.06.05.14 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 043/126] hw/i2c/smbus_ich9: Move ich9_smb_set_irq() in front of ich9_smbus_realize() Date: Mon, 27 Feb 2023 15:00:50 +0100 Message-Id: <20230227140213.35084-34-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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=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 From: Bernhard Beschow This is a preparation for the next commit to make it cleaner. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-5-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/smbus_ich9.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c index 52ba77f3fc..d29c0f6ffa 100644 --- a/hw/i2c/smbus_ich9.c +++ b/hw/i2c/smbus_ich9.c @@ -80,6 +80,18 @@ static void ich9_smbus_write_config(PCIDevice *d, uint32_t address, } } +static void ich9_smb_set_irq(PMSMBus *pmsmb, bool enabled) +{ + ICH9SMBState *s = pmsmb->opaque; + + if (enabled == s->irq_enabled) { + return; + } + + s->irq_enabled = enabled; + pci_set_irq(&s->dev, enabled); +} + static void ich9_smbus_realize(PCIDevice *d, Error **errp) { ICH9SMBState *s = ICH9_SMB_DEVICE(d); @@ -125,18 +137,6 @@ static void ich9_smb_class_init(ObjectClass *klass, void *data) adevc->build_dev_aml = build_ich9_smb_aml; } -static void ich9_smb_set_irq(PMSMBus *pmsmb, bool enabled) -{ - ICH9SMBState *s = pmsmb->opaque; - - if (enabled == s->irq_enabled) { - return; - } - - s->irq_enabled = enabled; - pci_set_irq(&s->dev, enabled); -} - I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base) { PCIDevice *d = From patchwork Mon Feb 27 14:00:51 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: 657059 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2378874wrb; Mon, 27 Feb 2023 06:23:43 -0800 (PST) X-Google-Smtp-Source: AK7set9sPHF+fBu/Z7rykegmI2J9DNUFCqmo3JJQM1wsJZoD9s2i0cwq1vOD1NTcnh23pEnpx1iP X-Received: by 2002:a05:6214:19cf:b0:56b:eb9d:4342 with SMTP id j15-20020a05621419cf00b0056beb9d4342mr45050547qvc.49.1677507823773; Mon, 27 Feb 2023 06:23:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507823; cv=none; d=google.com; s=arc-20160816; b=ScsgSLHJ7wKqSYQbeL/KYj9E8KByCUFtfaI6A816yZ3COQyih5Ui7s5dnyEbLRxgkr fymLucaAjpL8eTUu/dtXxYC8tnDwtcnuMM2HevZ2C7qbcZIbaHb7ovYboFjOoLIogYrG P/OaaoFStlsBDHEiFETdtzvpES70u3y7psKZT9btou1eTT2YlIoAoTDAm+iWJ7KHCNCq PizCEX+zsWdU5newqmuVhrYGPmtcscVB+RN9FJONT8yhW4e5lxbDfH0gdqyzH1bkDYUT KAmPJzmVWtavlzMXYC9eeVbTKojNXJTN8/rlv4tyJvprMS7zWrf6n0I2q1j0S/O65ZNm TP0A== 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:to:from :dkim-signature; bh=YtYDhCyGHt282L/1vIUrdhgyJAf4ZI3L5X+30y37+H8=; b=kyFNGRC3stcYZralDMVeuED/B6RtiFhFzlz4s9UwmThEKmJeJ2eON7hi/t6RVxwEIB Ej6BdTpqrI7TiF3TnkTrmjUb3JedNob63EHcd/SrYbKM/zwpYzTtrtqss+Da+geXuQkW HYv98l2AR6jy7BmATfKkbdn07XHUoWELMnv5HGJ+ufZnU53kaH/JBMWSj2QLAeKK09WS JXSlBa6eny4Ymlv0yEnRtVWgrbFKZ8pPA9fwTmDXu+R4H5DWrkHIl+H4MqVCk5MUGfQa PJbwmOXqZPHpFrZspvMsDUdVtV31bYIIEA1Y7vyNYidVt4qYZyMzG6JbdLQ5g1qTRTz4 +tdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GY2QOl8h; 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 c16-20020a0ce150000000b0057116a70032si6378392qvl.495.2023.02.27.06.23.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:23:43 -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=GY2QOl8h; 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 1pWe8A-0004Su-E0; Mon, 27 Feb 2023 09:05:30 -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 1pWe84-0004M7-FZ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:24 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe82-0008IS-R4 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:24 -0500 Received: by mail-wr1-x432.google.com with SMTP id bt28so6343992wrb.8 for ; Mon, 27 Feb 2023 06:05:22 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=YtYDhCyGHt282L/1vIUrdhgyJAf4ZI3L5X+30y37+H8=; b=GY2QOl8hzK8Dh5rZ4XXkPnzYUnKF1XUuwr9aMVY8DPV5/21uZf49+bCyGY5qlY3SUx C60PFBcA+hiTb20NEHM7ZZMM13iwtj1jjJ9ENQLCpo8cX83WKjV7zAs1KP21w5rELYLd doL0IfTy+38pDK/HeZ0LREv6THrJkYIN0zC3yGdw2Ra3WbgJ6IcenV020ljE0ZmJMnVT p18SIxbayJfeMx6L0WThJpx7AvP5aUoRkNHju3ukiPs4QhJtx/BwxzDtXU3HpL6fBox/ xNhf13dzvr6EXyZZCjuPuzKUxkNGXUPF/tFipQ7iA+uQqqezEXNCpYVzKUGU+SDdYM9E 3cQg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YtYDhCyGHt282L/1vIUrdhgyJAf4ZI3L5X+30y37+H8=; b=oX2Sc2ZUFvrbjRJueNHgfA7qe/UTXmexf/h0BUmnF02glL2AIUm+Of0nDeZX/b+Ufh s4KsIHIroDnptkE4ahxd543KNjoMJsWU5ON6zP/a/djEgFSnIYojMHQCaJDctMNIKgAX cO7M0q1AQZ+Mu+P+lNvZDl4I7ZMGU5JGcC3A82S+8yEkVB6AQP0t2qdycF6S2T74o2Zh /z+nLLK7dPCIhAQKd/Z19iVlSYWJHV0PIjW7m5K1zuHAaJgUJ/MXVVB/wPU8MKDpMU6P rjFIzDHlx/+ih9sOjaF9mWaXOIYznc2cjr4C1bOFYnFjhykTwJTHkdTAXkYJVSO2wVjr Ew+Q== X-Gm-Message-State: AO0yUKWkhkzHod+pfgs8WGOvC8d1rv5OuFWEWyl1mu66N9IMLFpgRUB7 plB/rwTTDsMxhLzXlUVK4pP4clCpdPiPgUe/ X-Received: by 2002:adf:eacd:0:b0:2c7:107c:e172 with SMTP id o13-20020adfeacd000000b002c7107ce172mr12177639wrn.41.1677506720555; Mon, 27 Feb 2023 06:05:20 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t1-20020a5d6a41000000b002c70a68111asm7320333wrw.83.2023.02.27.06.05.19 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 044/126] hw/i2c/smbus_ich9: Inline ich9_smb_init() and remove it Date: Mon, 27 Feb 2023 15:00:51 +0100 Message-Id: <20230227140213.35084-35-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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=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 From: Bernhard Beschow ich9_smb_init() is a legacy init function, so modernize the code. Note that the smb_io_base parameter was unused. Signed-off-by: Bernhard Beschow Acked-by: Corey Minyard Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-6-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i2c/smbus_ich9.c | 13 +++---------- hw/i386/pc_q35.c | 11 ++++++++--- include/hw/i386/ich9.h | 1 - 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c index d29c0f6ffa..f0dd3cb147 100644 --- a/hw/i2c/smbus_ich9.c +++ b/hw/i2c/smbus_ich9.c @@ -105,6 +105,9 @@ static void ich9_smbus_realize(PCIDevice *d, Error **errp) pm_smbus_init(&d->qdev, &s->smb, false); pci_register_bar(d, ICH9_SMB_SMB_BASE_BAR, PCI_BASE_ADDRESS_SPACE_IO, &s->smb.io); + + s->smb.set_irq = ich9_smb_set_irq; + s->smb.opaque = s; } static void build_ich9_smb_aml(AcpiDevAmlIf *adev, Aml *scope) @@ -137,16 +140,6 @@ static void ich9_smb_class_init(ObjectClass *klass, void *data) adevc->build_dev_aml = build_ich9_smb_aml; } -I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base) -{ - PCIDevice *d = - pci_create_simple_multifunction(bus, devfn, true, TYPE_ICH9_SMB_DEVICE); - ICH9SMBState *s = ICH9_SMB_DEVICE(d); - s->smb.set_irq = ich9_smb_set_irq; - s->smb.opaque = s; - return s->smb.smbus; -} - static const TypeInfo ich9_smb_info = { .name = TYPE_ICH9_SMB_DEVICE, .parent = TYPE_PCI_DEVICE, diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 5e3f7c7e86..7137c38846 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -315,10 +315,15 @@ static void pc_q35_init(MachineState *machine) } if (pcms->smbus_enabled) { + PCIDevice *smb; + /* TODO: Populate SPD eeprom data. */ - pcms->smbus = ich9_smb_init(host_bus, - PCI_DEVFN(ICH9_SMB_DEV, ICH9_SMB_FUNC), - 0xb100); + smb = pci_create_simple_multifunction(host_bus, + PCI_DEVFN(ICH9_SMB_DEV, + ICH9_SMB_FUNC), + true, TYPE_ICH9_SMB_DEVICE); + pcms->smbus = I2C_BUS(qdev_get_child_bus(DEVICE(smb), "i2c")); + smbus_eeprom_init(pcms->smbus, 8, NULL, 0); } diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index 05464f6965..52ea116f44 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -9,7 +9,6 @@ #include "qom/object.h" void ich9_lpc_pm_init(PCIDevice *pci_lpc, bool smm_enabled); -I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base); void ich9_generate_smi(void); From patchwork Mon Feb 27 14:00:52 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: 656991 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2369522wrb; Mon, 27 Feb 2023 06:07:00 -0800 (PST) X-Google-Smtp-Source: AK7set+E974DjjGNVEBzXu0mEeKbMjBoq/9uWCNMLXW/7SNfPLQ9rW6ynl0qqAlBXnizu6c0ORWP X-Received: by 2002:a05:6214:268c:b0:537:7d76:ea7c with SMTP id gm12-20020a056214268c00b005377d76ea7cmr52966758qvb.25.1677506819962; Mon, 27 Feb 2023 06:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506819; cv=none; d=google.com; s=arc-20160816; b=bB39wznS31UBx6Nd39dF6T3q9a1C9g1ZX1zwYs7PwootVtvkyPSilTKmB8evBmbUBP VPsO1wKKgu24YXdBj05/7cTXWfa6GVgEIKjyXrusq18XB1vVoEwCdoYoVuf/KMseAVat ZxTFhFgN+8zloUB6jXXGowL8ABUUJ+Afyk5W4gfwSvKxwPMuOoTvblQFMEU9X3cLT8jA KuvUhGHgJ91TLesdPBGRJsHTcLZfC1T6Q2YYw0XeqvJ40yB0QBaKevsEFOGO/HyAubSX wroHJwmRHT2+3t2IQaO/L/evL4Fpwm3FE1DPSP9HLafNv/T0OkOM6ecdlGafHswYYlP7 MZ+w== 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:to:from :dkim-signature; bh=BJTUsUKHk/43En4guI7CyHdqY+UTTyfFYiqMtxXnikM=; b=LcnOAEXzII24lolzw1Aksp+FPYAxMVWPREgMMi/2idyA9yc8S6LMIALShOsNmBeJnl /9vzN1b+bCssPwCvJ9I21Ggf4/I8cYjAQrpmB1gV817iHdxoS3GMmV5XmfFk2NnGBxK8 KRKpTUB1d/GDdAmHRGBsCzQHjfV43OkUrFpm88Hr0W0NFBIE0oa7hz8RtaNTs6RPLsOp wIA/n2rYvK93Z3uVpjI6vtQQ4cQmzZ+XrHJwWt45VhQXUL3HXvNB4XLpT6K69Fi5KqTL +98xIuM54jDDnEXEkHPQeZAowcXU4u7nE6yE4CgNgWThtJmEebh/WoIzgz6fc/qc+78x gXHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TfPqU46O; 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 t6-20020a0cde06000000b00571167471dfsi6144881qvk.578.2023.02.27.06.06.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:06:59 -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=TfPqU46O; 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 1pWe8d-0004gI-3Y; Mon, 27 Feb 2023 09:05:59 -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 1pWe8E-0004Yi-Gm for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:36 -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 1pWe8C-00082r-Rn for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:34 -0500 Received: by mail-wm1-x32f.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so7228640wmb.5 for ; Mon, 27 Feb 2023 06:05:28 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BJTUsUKHk/43En4guI7CyHdqY+UTTyfFYiqMtxXnikM=; b=TfPqU46OtlY1ENVI/ycRtXeFytkJYoY0vOehOSwJ5WgLFUMkOmRnCzdvkmKSUoDSsq o2Gx2T01fUh3QxgeiyHZ0WI8u4NCTbfp8NQJw97TKwI+4HWorUhmQX2oYN0H3QVtSB0i dLTiV/xSsKSUPqtlvaWKxKEw1hmgj+wsSUa743Qks3WWBIZvX2G/30y6MK5UKl0l2qtb JlehedxEwiLnvgesbWAdwcwPkjuFS88Gf6UMG1zF7wQO6qTofVPFRx7CiJmokBKh6zIe w7d/gsYuRa74o4CqljXNrsdt9vt0H9meOvCJyI02cVGCeVr5/LjvHt5hyS6Sak6lB4iY DOBQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BJTUsUKHk/43En4guI7CyHdqY+UTTyfFYiqMtxXnikM=; b=agCHT6L/l2DUbn+AVaWi90f1M9oujNwMgkPUiG63nCK9kFVFVs1u6gxlA3gr9FZLeO rTV0V46yOH4adXixBzXzXnKehsekLCBFee5OweWMk+AnzpEYbJBk/W+ZGcvntuftnK+k TCcDWnu8RXVzSi+Oncw/iCY06b8Vw9M/XwsOjiseWLkr3OD4tbGTzfevHDUdw0AKJdjF zAVLsq0f7klJstVlt9GmSXvc6vyUIV/pVCNWSbFucrll5/jLSoGxPD+D8H+G/29nDOvd z5bndjtEFoWn3H4jsOK/GBpFcGDlnu7Yt2NAq8EdsEDnni6at3IHAzwHMST8yb5qPj7v b52Q== X-Gm-Message-State: AO0yUKXVLH8++JkH0sPbXieC3dDTTWIc8fObUXuqm3fYiXSqOQaFJyWY LCVodDVu+L0lveyGMP8Gqzsf7BaiNJANqq3P X-Received: by 2002:a05:600c:3b26:b0:3e9:b2f2:27a9 with SMTP id m38-20020a05600c3b2600b003e9b2f227a9mr13356251wms.14.1677506728026; Mon, 27 Feb 2023 06:05:28 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t1-20020a5d6a41000000b002c70a68111asm7320528wrw.83.2023.02.27.06.05.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 045/126] hw/i386/pc_q35: Allow for setting properties before realizing TYPE_ICH9_LPC_DEVICE Date: Mon, 27 Feb 2023 15:00:52 +0100 Message-Id: <20230227140213.35084-36-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-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=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 From: Bernhard Beschow This is a preparation to make the next patch cleaner. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-7-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_q35.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 7137c38846..d949f2efc1 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -235,9 +235,9 @@ static void pc_q35_init(MachineState *machine) phb = PCI_HOST_BRIDGE(q35_host); host_bus = phb->bus; /* create ISA bus */ - lpc = pci_create_simple_multifunction(host_bus, PCI_DEVFN(ICH9_LPC_DEV, - ICH9_LPC_FUNC), true, - TYPE_ICH9_LPC_DEVICE); + lpc = pci_new_multifunction(PCI_DEVFN(ICH9_LPC_DEV, ICH9_LPC_FUNC), true, + TYPE_ICH9_LPC_DEVICE); + pci_realize_and_unref(lpc, host_bus, &error_fatal); object_property_add_link(OBJECT(machine), PC_MACHINE_ACPI_DEVICE_PROP, TYPE_HOTPLUG_HANDLER, From patchwork Mon Feb 27 14:00:53 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: 657028 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373862wrb; Mon, 27 Feb 2023 06:14:20 -0800 (PST) X-Google-Smtp-Source: AK7set8tw8xTLkfuIW3zQQQgTcOcCNQt2Xx6JrriMnnDjplVFkfBM3WGe4ViXSM5zPVvMJkIXm3M X-Received: by 2002:ac8:4e83:0:b0:3bf:cfa6:8842 with SMTP id 3-20020ac84e83000000b003bfcfa68842mr11497918qtp.0.1677507260497; Mon, 27 Feb 2023 06:14:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507260; cv=none; d=google.com; s=arc-20160816; b=cmwVJ8sHZYku8VQBpvnDvR0DxIEMpjDNwAxY+JWqMBTt5NOVdaFSxYEqWh9q2ZoqxS 6kBIACKi/gmcQVDfsBMtFQK3GVtgr94RbyRllwe/rnhV6nT5/omiFYqh3Jna5vCNcFKP bIGbiWbwvIeF/pGH3Ee2TmiPMMLtxOYlld5/H266VdxLMnBTz11vmNgslkI1qseu0geD KPuZ92fwPB9vcx8///Kt+9tESzPp8oEv+9EBectIcekkqn4yhJhNXgqMRw2fPjVFzj/R 72RyWN9juDu0MCg5PMa1JaXrBY0a5rShGiVBQCpwHGAsTxC61JTGT+eq7IucJVoVRe6/ SRng== 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:to:from :dkim-signature; bh=m87BxrULixPXejwoOkzzpBvGXKpwnNs8ozlgdwA7WLw=; b=xlZGdAuaQYfC0qetqkamJaFPI7RwqtU2izApOb0IjW1RJEMO1LBt/ID5YTvMkdvcB/ Eme2sigY0klqRFCRjBeFPQC7Fn6P8m+tY9/7SKaazcZn/AYokp6DbjoxHIHx5z+OBe75 LDxiV7vwbzBszUDzwUS1PknitW5znIOJAWXOlzMEnh51vKxOqbMOKcVKbVPcKa3bMxmJ avAy8+bQznDo1nAgS5UqLXsb16ZyEu8YEDvyG4E4r1mi7WjWSWhL0nbAX/LpjDU9xXkZ 4ps4TtSuKPKqfM+DCIpPnRdJt033c7zy1e1kWPnT2vB6Dq/OKsY83YD62o/cJfPhfbs8 /zpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B4cmupog; 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 j25-20020ac84059000000b003b9eb961e99si5717142qtl.600.2023.02.27.06.14.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:14:20 -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=B4cmupog; 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 1pWe8f-0004qs-5m; Mon, 27 Feb 2023 09:06:01 -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 1pWe8I-0004ZH-GR for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:42 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe8E-0008MT-Rm for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:36 -0500 Received: by mail-wr1-x42a.google.com with SMTP id e37so3875181wri.10 for ; Mon, 27 Feb 2023 06:05:34 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=m87BxrULixPXejwoOkzzpBvGXKpwnNs8ozlgdwA7WLw=; b=B4cmupog/MnWYVClYaccMOKsLMFuURr1C08qF1McRAel9faq0b775Is6ZHSe0lcmqi 5V2920oknm5gU64icV1NqLc24wWP4fzWrJL5+vOrGZNcMPB+4g7HmYTNgUG2DQHB3KG4 /ksoC8BaecNAayjwo+9WYQ9OFZMLMfIGCsL3fK1gIMTSx0P+mZM1EPjaaylWxvWH0C9u 6alTQZwSdqJzNP+5L6II+588q7VFGrQL3FyUUjLiPyXrvQqmZlcwgeYj1LHdl8fC1OSj cPBI4A0b28sQMHXQ81xGBzSG964Y5BVkW43T4QKhRdp9Xk4DZNWV0alGXipdEKv8cD1F vh3A== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m87BxrULixPXejwoOkzzpBvGXKpwnNs8ozlgdwA7WLw=; b=x8S4wU5Yey9p72Le8xw0ddNan+GF14pUBkcAYHldn+ZpOXh4hfD11I2/inMlPVeikA ulwueIhQAfvGtoBiqlrnl2iME5szMKk/rghpa8sA7LBtPCRH2MeGGfTX8gaFMHljtiYx 7k2NNyJTzuCLL3hfJa7ghJ6NEe4C+UyX1pgo3l3N+M3TVc4akgg/eDDlwwJl0GPGsU51 Ftbh7vsAVD8VTPZ0P8z/kAwSxKpDmqrAOFK9mtZi9e9IuFY/rmspkElPyTqFLORGU0k+ n6ZeXDFVkJw2ZOvOn3dQv0RKlR6cz7X+j3dZE4Ibjdb0KG02mlT2T+G6bazloRMu0jcM ZVqQ== X-Gm-Message-State: AO0yUKV7ApL+iMYfbLxuow37ePnHw+T51Gr/wkrP20dpVD4WMjHoyj1u UkY8sxQSV7sk4N/YOxogZxAd2cM+HZ+UlmXx X-Received: by 2002:adf:db8e:0:b0:2c9:e713:7889 with SMTP id u14-20020adfdb8e000000b002c9e7137889mr5313482wri.14.1677506733114; Mon, 27 Feb 2023 06:05:33 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id x16-20020a5d54d0000000b002c71703876bsm7184478wrv.14.2023.02.27.06.05.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 046/126] hw/isa/lpc_ich9: Connect PM stuff to LPC internally Date: Mon, 27 Feb 2023 15:00:53 +0100 Message-Id: <20230227140213.35084-37-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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=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 From: Bernhard Beschow Make TYPE_ICH9_LPC_DEVICE more self-contained by moving the call to ich9_lpc_pm_init() from board code to its realize function. In order to propagate x86_machine_is_smm_enabled(), introduce an "smm-enabled" property like we have in piix4. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-8-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/acpi/ich9.c | 8 ++------ hw/i386/pc_q35.c | 5 ++--- hw/isa/lpc_ich9.c | 8 +++++--- include/hw/acpi/ich9.h | 6 ++---- include/hw/i386/ich9.h | 2 -- 5 files changed, 11 insertions(+), 18 deletions(-) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index a93c470e9d..54bb3d83b3 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -291,9 +291,7 @@ static void pm_powerdown_req(Notifier *n, void *opaque) acpi_pm1_evt_power_down(&pm->acpi_regs); } -void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, - bool smm_enabled, - qemu_irq sci_irq) +void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq) { memory_region_init(&pm->io, OBJECT(lpc_pci), "ich9-pm", ICH9_PMIO_SIZE); memory_region_set_enabled(&pm->io, false); @@ -303,7 +301,7 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, acpi_pm_tmr_init(&pm->acpi_regs, ich9_pm_update_sci_fn, &pm->io); acpi_pm1_evt_init(&pm->acpi_regs, ich9_pm_update_sci_fn, &pm->io); acpi_pm1_cnt_init(&pm->acpi_regs, &pm->io, pm->disable_s3, pm->disable_s4, - pm->s4_val, !pm->smm_compat && !smm_enabled); + pm->s4_val, !pm->smm_compat && !pm->smm_enabled); acpi_gpe_init(&pm->acpi_regs, ICH9_PMIO_GPE0_LEN); memory_region_init_io(&pm->io_gpe, OBJECT(lpc_pci), &ich9_gpe_ops, pm, @@ -314,8 +312,6 @@ void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, "acpi-smi", 8); memory_region_add_subregion(&pm->io, ICH9_PMIO_SMI_EN, &pm->io_smi); - pm->smm_enabled = smm_enabled; - if (pm->enable_tco) { acpi_pm_tco_init(&pm->tco_regs, &pm->io); } diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index d949f2efc1..4508e8ac10 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -237,6 +237,8 @@ static void pc_q35_init(MachineState *machine) /* create ISA bus */ lpc = pci_new_multifunction(PCI_DEVFN(ICH9_LPC_DEV, ICH9_LPC_FUNC), true, TYPE_ICH9_LPC_DEVICE); + qdev_prop_set_bit(DEVICE(lpc), "smm-enabled", + x86_machine_is_smm_enabled(x86ms)); pci_realize_and_unref(lpc, host_bus, &error_fatal); object_property_add_link(OBJECT(machine), PC_MACHINE_ACPI_DEVICE_PROP, @@ -291,9 +293,6 @@ static void pc_q35_init(MachineState *machine) pc_basic_device_init(pcms, isa_bus, x86ms->gsi, &rtc_state, !mc->no_floppy, 0xff0104); - /* connect pm stuff to lpc */ - ich9_lpc_pm_init(lpc, x86_machine_is_smm_enabled(x86ms)); - if (pcms->sata_enabled) { /* ahci and SATA device, for q35 1 ahci controller is built-in */ ahci = pci_create_simple_multifunction(host_bus, diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 71f7c18a2e..c5060d145f 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -407,14 +407,13 @@ static void smi_features_ok_callback(void *opaque) lpc->smi_features_ok = 1; } -void ich9_lpc_pm_init(PCIDevice *lpc_pci, bool smm_enabled) +static void ich9_lpc_pm_init(ICH9LPCState *lpc) { - ICH9LPCState *lpc = ICH9_LPC_DEVICE(lpc_pci); qemu_irq sci_irq; FWCfgState *fw_cfg = fw_cfg_find(); sci_irq = qemu_allocate_irq(ich9_set_sci, lpc, 0); - ich9_pm_init(lpc_pci, &lpc->pm, smm_enabled, sci_irq); + ich9_pm_init(PCI_DEVICE(lpc), &lpc->pm, sci_irq); if (lpc->smi_host_features && fw_cfg) { uint64_t host_features_le; @@ -731,6 +730,8 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) pci_bus_irqs(pci_bus, ich9_lpc_set_irq, d, ICH9_LPC_NB_PIRQS); pci_bus_map_irqs(pci_bus, ich9_lpc_map_irq); pci_bus_set_route_irq_fn(pci_bus, ich9_route_intx_pin_to_irq); + + ich9_lpc_pm_init(lpc); } static bool ich9_rst_cnt_needed(void *opaque) @@ -797,6 +798,7 @@ static const VMStateDescription vmstate_ich9_lpc = { static Property ich9_lpc_properties[] = { DEFINE_PROP_BOOL("noreboot", ICH9LPCState, pin_strap.spkr_hi, false), DEFINE_PROP_BOOL("smm-compat", ICH9LPCState, pm.smm_compat, false), + DEFINE_PROP_BOOL("smm-enabled", ICH9LPCState, pm.smm_enabled, false), DEFINE_PROP_BIT64("x-smi-broadcast", ICH9LPCState, smi_host_features, ICH9_LPC_SMI_F_BROADCAST_BIT, true), DEFINE_PROP_BIT64("x-smi-cpu-hotplug", ICH9LPCState, smi_host_features, diff --git a/include/hw/acpi/ich9.h b/include/hw/acpi/ich9.h index d41866a229..57a542c4b8 100644 --- a/include/hw/acpi/ich9.h +++ b/include/hw/acpi/ich9.h @@ -64,7 +64,7 @@ typedef struct ICH9LPCPMRegs { uint8_t disable_s3; uint8_t disable_s4; uint8_t s4_val; - uint8_t smm_enabled; + bool smm_enabled; bool smm_compat; bool enable_tco; TCOIORegs tco_regs; @@ -72,9 +72,7 @@ typedef struct ICH9LPCPMRegs { #define ACPI_PM_PROP_TCO_ENABLED "enable_tco" -void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, - bool smm_enabled, - qemu_irq sci_irq); +void ich9_pm_init(PCIDevice *lpc_pci, ICH9LPCPMRegs *pm, qemu_irq sci_irq); void ich9_pm_iospace_update(ICH9LPCPMRegs *pm, uint32_t pm_io_base); extern const VMStateDescription vmstate_ich9_pm; diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index 52ea116f44..433c8942c9 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -8,8 +8,6 @@ #include "hw/acpi/ich9.h" #include "qom/object.h" -void ich9_lpc_pm_init(PCIDevice *pci_lpc, bool smm_enabled); - void ich9_generate_smi(void); #define ICH9_CC_SIZE (16 * 1024) /* 16KB. Chipset configuration registers */ From patchwork Mon Feb 27 14:00:54 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: 657003 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370568wrb; Mon, 27 Feb 2023 06:08:40 -0800 (PST) X-Google-Smtp-Source: AK7set+Gj/HWkXygFvOl4hQem0uvbTBSMoPwX1LKS/iNPvinnZ+erdthcbrVHQr25i0ifHPhmlAH X-Received: by 2002:a05:622a:1649:b0:3bf:c675:3b65 with SMTP id y9-20020a05622a164900b003bfc6753b65mr13552723qtj.44.1677506920504; Mon, 27 Feb 2023 06:08:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506920; cv=none; d=google.com; s=arc-20160816; b=pXM0UocrV5W29auzmQeJM+Pm4+PkTxW2b6Qf6ntihNKOoZBVEgWLD8Hyp1JnFSzQUW wz6snG4HTh5K1Js0G7hFRH59yQuf6D2+SUvvTS3txumcgip0IyOYA3RrwF73Oio6aH9o b45WAnWwIJC84JxEhx6OBiyymYryzKWw5ZR1ad9G2LeKNqP7oOJ+o8RmExJx7kuWziPt qZ5TtHqyW3L4iuxwbdFJ/G5dhSKxvhSk9VW716TW9B6HFyASu20qcQhT2T20vZvSSDkd jRT3FXPeu4Wjyhsf7rVdkc2Nfq5pR7AsiRXWS6xGY73xR5uJhIerfmI6MHHhcSJ7Cd4M 79Gg== 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:to:from :dkim-signature; bh=IhuV0d5qQy+FV+jJNXdu8LUM/kunpfBbQzrkBv7Z+wQ=; b=uGd7Fl6xNDiRkotvvn97tBwlCZ7l1d91Xoz60/3Oxr0aXb0qM4rKH3b2KwrSz29grx x209wrysmdORgvB1sXbJgqkRv6zu3fo7N+vZj6qIOXH6uy4CWok0diWubt0pM7xzn57i FDIj43rSZIbLl9sKKYb8bDnN0GcILC/ysgA1Z+2f62FPJXgDwD/ZP04HHMKjiy8TGPu/ k5dTm07pVrpIf8P6xRJqj1X3rCtKv0SKGy5oeCS6kMCMCLkkOqzhINcwha3WVBlHa1Nr KVdeBryEXpDTmMmOWwQ2CFqjgc/RQvlAl9e/NSltRLm31bzrI3vXZSOU8b3slvs1nMHL pSSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uEVoVhUO; 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 d18-20020ac85d92000000b003b84ddeae65si6841283qtx.120.2023.02.27.06.08.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:40 -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=uEVoVhUO; 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 1pWe8d-0004hb-6f; Mon, 27 Feb 2023 09:05:59 -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 1pWe8M-0004cQ-Pg for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:47 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe8K-0008P7-QO for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:42 -0500 Received: by mail-wr1-x430.google.com with SMTP id bw19so6314416wrb.13 for ; Mon, 27 Feb 2023 06:05:39 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=IhuV0d5qQy+FV+jJNXdu8LUM/kunpfBbQzrkBv7Z+wQ=; b=uEVoVhUObMydO8btZ1rAGEIGHqnk4N1IfOIL0CGdfMowv8B7G7Q9RpBtdSJzln6Ldh e05SictgQvjbijM6NDQGpCKoUIr9YndMqnIF4gxBeyZMMKjFZZG8paZ4aNueyOhR5J3l yclxHNPlODVy8EPNWGYfUR3c0fZhMvAN/2TFHv0TJuxcMA/C07Nwy0NxsxmCLmOO7pxs tZ5VPFdPT6Xn14G2u3D8xLSOhtwiJ9SZOwgfh1DMjaoboT0qCSzg5FqfN1KcTvbswrsP mSmFwuSQmk48SIh+ha9rl3IEadzuimFayMnaR9mwE/wiGNCBntj3VusndlfFvHdLX5Zi kroQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IhuV0d5qQy+FV+jJNXdu8LUM/kunpfBbQzrkBv7Z+wQ=; b=c90G7dOiAzWgUe7PxlmhObCgHQkrN9NdLoq1BzbCoNXbwrzcj1wfxJi0UusdD3yS30 uN8ZYP7YBdQUSdFedLmug9ULd9B5FtMlitt3yuM1xtgXaBcKmcqzQdxIc7CkG99nov5N 63NGnGNKjJp5LN9pXBVzFtNxvt8Wpp0VwIg95F1VecVePcrkNtr4xUPdpL32a8O6M/tt 0HgOuJOV/SO00XNo+Jvq844oIEhPmvSLG8ethrf7cRVmaUap5ruSo/O3pIHc3+IcPq8M 4xeDMvt7xsFx5egZRZePbjcmEGVWV91yZlExapYAvOuMyd+7NJl35nALTAH3OSWivoBB cv1w== X-Gm-Message-State: AO0yUKW0U3esyzoT4pILCgczAF8oxzWL6bBeJTM4Wtp/q077xTP756tL iqZDBsiZ+ifVwJYafJyWRZXEozRJxGrHy3SB X-Received: by 2002:a5d:4d4b:0:b0:2bf:d0a4:3e63 with SMTP id a11-20020a5d4d4b000000b002bfd0a43e63mr21043169wru.44.1677506738333; Mon, 27 Feb 2023 06:05:38 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e7-20020a5d5947000000b002c5a07e940csm7229548wri.33.2023.02.27.06.05.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 047/126] hw/isa/lpc_ich9: Remove redundant ich9_lpc_reset() invocation Date: Mon, 27 Feb 2023 15:00:54 +0100 Message-Id: <20230227140213.35084-38-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 From: Bernhard Beschow ich9_lpc_reset() is the dc->reset callback which is called automatically. No need to call it explicitly during k->realize. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-9-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/lpc_ich9.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index c5060d145f..2a4baac129 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -57,8 +57,6 @@ /*****************************************************************************/ /* ICH9 LPC PCI to ISA bridge */ -static void ich9_lpc_reset(DeviceState *qdev); - /* chipset configuration register * to access chipset configuration registers, pci_[sg]et_{byte, word, long} * are used. @@ -439,8 +437,6 @@ static void ich9_lpc_pm_init(ICH9LPCState *lpc) sizeof lpc->smi_features_ok, true); } - - ich9_lpc_reset(DEVICE(lpc)); } /* APM */ From patchwork Mon Feb 27 14:00:55 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: 657017 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2372124wrb; Mon, 27 Feb 2023 06:11:17 -0800 (PST) X-Google-Smtp-Source: AK7set+/2/CU9nC0FXmr84smcneLMom8PZSPJEk2zPDrsMyCJm2RjjGZEEtaRl4aKTfNa2Btn72d X-Received: by 2002:ac8:5b44:0:b0:3b8:6ae9:b108 with SMTP id n4-20020ac85b44000000b003b86ae9b108mr31487050qtw.27.1677507077017; Mon, 27 Feb 2023 06:11:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507077; cv=none; d=google.com; s=arc-20160816; b=u4D4N3CVKSicwBXf/dsblH82kvMbHL9ZsF1ykRlxsi6UmN6kZs9kotvV91HVbcB1lK cmRNDEM7k5kn9dKCc5GWgcvoxu+4kP0e8JBIaNIbfGG+HNsvnJ7LUoVAxS/CYpuazpib EA45DXcP3xPW2uAxKEMShsys5oQVCggijHMFnRjaOpT5f76Arh5lD4rlTd9ESBEIm8us tiAsS+/p9UI1bUbn4bEPsSKoAthQJfK/VQPl3Q7FfrnchwfoTDNAsgioz3fxdPIXyqUb nWVGWwXel+CwieIcw9exNuOF25mLP9rpYM/WE2sNZCi7YmcipzBHZXlW8HDpDXLUCVQO oBPw== 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:to:from :dkim-signature; bh=1WPmuQessnWr1d6uTNbLIUqufs1MGnEg49yYFi7nMzE=; b=IHkMXwuLhyowdckdSikbw+H31VwMz3Oylpxns6YFMnKOfK6htp9bfEASPpM8nxZGCF jaBX29U5R75f7usYAkBhV/ThUwZfz2EBTaXWmLGziEVrTB5qy2wILDd5j2UoSwL5Oa/Y 22XupDKDfzqBb4iggLGlRzXmh029RbwvLTm2vK7dpw3doJHuQYcsJR6jOeOn3xtwMLjN OGLnw98OIejDn2rvaf0R8sgHgo4+8IWSbXiXeWSvcjHe47b+ZuIRU0eMam7/zDPBdIp5 mTxiFg8iPRLvdAD0LgyD8tDzP1YvhvsYKz7mANdFaRHjCC0t2xvNqKiqn/ci/oKxiO9D 6cQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nGRrJwzo; 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 s19-20020a05620a29d300b00708f130fd41si7012331qkp.66.2023.02.27.06.11.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:11:16 -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=nGRrJwzo; 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 1pWe8o-00058R-Id; Mon, 27 Feb 2023 09:06:10 -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 1pWe8X-0004gJ-MP for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:56 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe8P-0008T5-Vb for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:47 -0500 Received: by mail-wm1-x332.google.com with SMTP id o11-20020a05600c4fcb00b003eb33ea29a8so3398120wmq.1 for ; Mon, 27 Feb 2023 06:05:45 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1WPmuQessnWr1d6uTNbLIUqufs1MGnEg49yYFi7nMzE=; b=nGRrJwzoigQBq+njwid6/eYsUb5vLcI75TCTSFAps67IH/71RYIOgTVU3k+bDMLhTc BdX6wy514X/Hgr4v5gDz9wmhYKjykTPwIX25ZpMBaqb6Uy6+pCqeDSHeAyU0oY1wenba +ZoRRrDhYlMe9KlaoY3b1qLwm6CmZ3GM9oMG9Mn9OXgzRwD3NS/DjG+XCDLZCLY2loye ORKUnvF3vmaY2CmeTpR+/6Nn7z8aXyEg8WEeJocEKqokLf+5ampgM7cPgruSHjOJ+IaM CWc+JG1AZ6C1ApPugYqcgTcRD3WMyzvDnoD1/5Du32CMP9npoir0bzB37PfXEudJPu9d 81sA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1WPmuQessnWr1d6uTNbLIUqufs1MGnEg49yYFi7nMzE=; b=zygZYcfTmDnhv3lUjgcaa+A3/bCesagHzPtOuI9XqaO1P7gYIEQS3NpUcmnO4gm7cU 68AVCw6Tv1LwHoaH8jOh0UA1V+2S8dQ+HIeVUacC6q55Bgc5BYE+JfE2nU28vIlJyLK3 fVkM7oDwIxhs8Q/aHXF2Og/KDxDZD8GrMbnhxq4RKlb3JNp+r/op3scwXbFapEC5g89J 8tP85bgHSRrVKN2IXrthAS6dAK6XNGnS7fMOwwy+ZSQG0xhNxyZ5AKAkYiz9dHeM9+lL 041opP+lj0Js+KBS/u19g8bMkP8bVu59A+eKmPIyW/98RuclZslU/WeiZq3yB8aNa9Ft 79Mg== X-Gm-Message-State: AO0yUKW1n7iSnZy6UQikr9UsEauKBBKI33mjKRHf3XKI5JBZ4WIcV4Ts m7gPXCGUGWrOZTYXJN8AqBYMvxZs9y1CawJ6 X-Received: by 2002:a05:600c:3b85:b0:3ea:e7f7:65e2 with SMTP id n5-20020a05600c3b8500b003eae7f765e2mr10132293wms.26.1677506744182; Mon, 27 Feb 2023 06:05:44 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h18-20020a05600c351200b003eb192787bfsm9505821wmq.25.2023.02.27.06.05.42 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 048/126] hw/i386/ich9: Remove redundant GSI_NUM_PINS Date: Mon, 27 Feb 2023 15:00:55 +0100 Message-Id: <20230227140213.35084-39-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 From: Bernhard Beschow Most code uses IOAPIC_NUM_PINS. The only place where GSI_NUM_PINS defines the size of an array is ICH9LPCState::gsi which needs to match IOAPIC_NUM_PINS. Remove GSI_NUM_PINS for consistency. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-10-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 6 +++--- hw/i386/pc_q35.c | 3 ++- hw/isa/lpc_ich9.c | 2 +- include/hw/i386/ich9.h | 2 +- include/hw/i386/x86.h | 1 - 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a7a2ededf9..d257545018 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -28,7 +28,7 @@ #include "hw/i386/pc.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" -#include "hw/i386/apic.h" +#include "hw/i386/ioapic.h" #include "hw/i386/topology.h" #include "hw/i386/fw_cfg.h" #include "hw/i386/vmport.h" @@ -405,7 +405,7 @@ GSIState *pc_gsi_create(qemu_irq **irqs, bool pci_enabled) if (kvm_ioapic_in_kernel()) { kvm_pc_setup_irq_routing(pci_enabled); } - *irqs = qemu_allocate_irqs(gsi_handler, s, GSI_NUM_PINS); + *irqs = qemu_allocate_irqs(gsi_handler, s, IOAPIC_NUM_PINS); return s; } @@ -1296,7 +1296,7 @@ void pc_basic_device_init(struct PCMachineState *pcms, sysbus_realize_and_unref(SYS_BUS_DEVICE(hpet), &error_fatal); sysbus_mmio_map(SYS_BUS_DEVICE(hpet), 0, HPET_BASE); - for (i = 0; i < GSI_NUM_PINS; i++) { + for (i = 0; i < IOAPIC_NUM_PINS; i++) { sysbus_connect_irq(SYS_BUS_DEVICE(hpet), i, gsi[i]); } pit_isa_irq = -1; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 4508e8ac10..d35316878d 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -43,6 +43,7 @@ #include "hw/i386/ich9.h" #include "hw/i386/amd_iommu.h" #include "hw/i386/intel_iommu.h" +#include "hw/i386/ioapic.h" #include "hw/display/ramfb.h" #include "hw/firmware/smbios.h" #include "hw/ide/pci.h" @@ -267,7 +268,7 @@ static void pc_q35_init(MachineState *machine) gsi_state = pc_gsi_create(&x86ms->gsi, pcmc->pci_enabled); lpc_dev = DEVICE(lpc); - for (i = 0; i < GSI_NUM_PINS; i++) { + for (i = 0; i < IOAPIC_NUM_PINS; i++) { qdev_connect_gpio_out_named(lpc_dev, ICH9_GPIO_GSI, i, x86ms->gsi[i]); } isa_bus = ISA_BUS(qdev_get_child_bus(lpc_dev, "isa.0")); diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 2a4baac129..e3385ca7be 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -717,7 +717,7 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) ICH9_RST_CNT_IOPORT, &lpc->rst_cnt_mem, 1); - qdev_init_gpio_out_named(dev, lpc->gsi, ICH9_GPIO_GSI, GSI_NUM_PINS); + qdev_init_gpio_out_named(dev, lpc->gsi, ICH9_GPIO_GSI, IOAPIC_NUM_PINS); isa_bus_irqs(isa_bus, lpc->gsi); diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index 433c8942c9..d29090a9b7 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -63,7 +63,7 @@ struct ICH9LPCState { MemoryRegion rcrb_mem; /* root complex register block */ Notifier machine_ready; - qemu_irq gsi[GSI_NUM_PINS]; + qemu_irq gsi[IOAPIC_NUM_PINS]; }; #define ICH9_MASK(bit, ms_bit, ls_bit) \ diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index 5d3047a1d1..a09388b657 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -131,7 +131,6 @@ bool x86_machine_is_acpi_enabled(const X86MachineState *x86ms); /* Global System Interrupts */ -#define GSI_NUM_PINS IOAPIC_NUM_PINS #define ACPI_BUILD_PCI_IRQS ((1<<5) | (1<<9) | (1<<10) | (1<<11)) typedef struct GSIState { From patchwork Mon Feb 27 14:00:56 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: 656997 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370239wrb; Mon, 27 Feb 2023 06:08:05 -0800 (PST) X-Google-Smtp-Source: AK7set/k8YKGSpnbO9nvUEJeksjxE/h0T3EaZKo/bg3Hmr+xr8JtqWP0kxQpRcrvTCwin3OnpVJa X-Received: by 2002:ac2:4c15:0:b0:4de:48a9:d626 with SMTP id t21-20020ac24c15000000b004de48a9d626mr2329009lfq.12.1677506885220; Mon, 27 Feb 2023 06:08:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506885; cv=none; d=google.com; s=arc-20160816; b=eZMd71onKr0bvKDGJBnz3cvS7tlW8N1l6hyD09nFQFoNI0kV/HB6yP/8OpUwaUOZVH 8l4wIp7n5xFVHcPjTU13Na++MCb7wXQScw3zjSTbSXJouYtHpfT6HkollyrWck89TyBY DVIUdProU2gBmhbl6pgNmgKQ5hdfpTNjehYwlggwO5Fo8NQa810Yomj6fdWl5PjIHdDV 2JZpsjyYdy4rMadseL6h8oPbNjjTTKS6/LxiaJwW+596NAZTwYCyLjWjHWwojDW4YuG4 BABh+qv8F9QEeyQguxSb/Eaj0Flc8ekuxRH5akWmVrx1RWiz9gIU75BZN4hz0KkoC6mA /7Cg== 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:to:from :dkim-signature; bh=08h5Sg79+cASqvgDSYHDJ7cpvTKNlaT94Ic05Ks8HVE=; b=S7onxR6+WaVTp//cz3LfTiVCXFL8h7dOveayMSRIvx2D+M2Sy6+sh9YezzBew+85xJ uVuJf3o3CdT5qigH+dtS6qjshE1fdYuaAQ3VIUew4u0XoNxMeBR1RYaRLWXoGPvQLLVg un3I0/a2UP9tOY1CHdgH9xhMJZ6U+LkMoZL91S8vauDM3vGVUB1rKrmDQ5je9TEeD4F9 /XVdssRzPGwagYWOaIN29HAMkUWPCXQw7i+8AP9R2O1ToG6ACLb0yss9tDMgwN3WFNv3 eAQWBNgYD5z9hZUBvr1LrC/ml00XTU5JMwoX6ewU00rszzLuzlHOPUS0dntyTgRadN8H 7AKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zUtkzdco; 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 l6-20020ac24306000000b004db3e20cdeasi3616983lfh.386.2023.02.27.06.08.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:05 -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=zUtkzdco; 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 1pWe8g-0004xO-EY; Mon, 27 Feb 2023 09:06:02 -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 1pWe8b-0004hJ-A2 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:59 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe8V-0008Tj-Ks for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:05:55 -0500 Received: by mail-wr1-x42f.google.com with SMTP id bx12so3194245wrb.11 for ; Mon, 27 Feb 2023 06:05:50 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=08h5Sg79+cASqvgDSYHDJ7cpvTKNlaT94Ic05Ks8HVE=; b=zUtkzdcoewXrWXfPux5I8yv6KgCTkxyoc5zbh2pcH5CMYArFOOrjmtEvSVdIKruyzo HOVE+9PUZ2no0jPEX9zDi6omlLf3PjvOnYz48/Zd5vVW0e1lda9MMG5/4JkrKsU6woZZ e34nj6l8kxwl23bect04RdtNs0YnXhcWNpxHpbA90uar0B3SD9SRaoad+wmBXaUf2Je2 6hX/PYethnKnXXNAFDONyFDN5HUDzOsDbhKGS80Ob3fHHlSnooFCohePvEKDbg6UU4n9 9K6CdE3PzCh3I6ekbl37pzuhWI/v4wJP6AHPrNKzfwYaFXkPdiTPFw457IrekDlCD11P I7Yg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=08h5Sg79+cASqvgDSYHDJ7cpvTKNlaT94Ic05Ks8HVE=; b=s206kmAxO2c/lSbri6+fWq03XHDPEmr+StBBigixh6NslhbnV8wezPCKTkVM/IfPnf 9JYupizYukpCB8XlqdEcOtJC6FIxQ6u8OGAUPKCcu4cfLDIdsYBuSUFaIgnk5IxTxGy7 uRyfbR/22xULJsuasWPQiQUpMwdBfVkBZ9MHQOYnb9u60GMjb597jkG6d48bHi1vrg+n pA+GcnoggBfN/9eaGz5BskSVgGaloODFWfpTehYDpu/ag3RW4m5AkAx/dEbdDmTbSVjj NMnFQFaW1LqHi60Ft6hn2KxG2S2LLjLhL1KVywOjapmGEdUfGXSFUqGdgFm0I7oi7UJa a7Yg== X-Gm-Message-State: AO0yUKVOXRTBX6yt7J/fWfcfalDAwMEqFRzWPnfnFvtjtInTZ7wgMHEj x9h6T5RDKkc4E82STq8fsd38nfE0i3TATpp1 X-Received: by 2002:a5d:564a:0:b0:2c7:1d26:7686 with SMTP id j10-20020a5d564a000000b002c71d267686mr11201698wrw.3.1677506749385; Mon, 27 Feb 2023 06:05:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m21-20020a7bcb95000000b003e21f959453sm9374905wmi.32.2023.02.27.06.05.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 049/126] hw: Move ioapic*.h to intc/ Date: Mon, 27 Feb 2023 15:00:56 +0100 Message-Id: <20230227140213.35084-40-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=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 From: Bernhard Beschow The ioapic sources reside in hw/intc already. Move the headers there as well. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-11-shentey@gmail.com> [PMD: Keep ioapic_internal.h in hw/intc/, not under include/] Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + hw/i386/kvm/ioapic.c | 3 +-- hw/i386/pc.c | 2 +- hw/i386/pc_q35.c | 2 +- hw/intc/apic.c | 2 +- hw/intc/ioapic.c | 4 ++-- hw/intc/ioapic_common.c | 4 ++-- {include/hw/i386 => hw/intc}/ioapic_internal.h | 8 ++++---- include/hw/i386/x86.h | 2 +- include/hw/{i386 => intc}/ioapic.h | 6 +++--- target/i386/whpx/whpx-all.c | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) rename {include/hw/i386 => hw/intc}/ioapic_internal.h (96%) rename include/hw/{i386 => intc}/ioapic.h (93%) diff --git a/MAINTAINERS b/MAINTAINERS index 75dccf0b4e..2c7731aeb7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1711,6 +1711,7 @@ F: include/hw/char/parallel.h F: include/hw/dma/i8257.h F: include/hw/i2c/pm_smbus.h F: include/hw/input/i8042.h +F: include/hw/intc/ioapic* F: include/hw/isa/i8259_internal.h F: include/hw/isa/superio.h F: include/hw/timer/hpet.h diff --git a/hw/i386/kvm/ioapic.c b/hw/i386/kvm/ioapic.c index 272e26b4a2..cd5ea5d60b 100644 --- a/hw/i386/kvm/ioapic.c +++ b/hw/i386/kvm/ioapic.c @@ -12,9 +12,8 @@ #include "qemu/osdep.h" #include "monitor/monitor.h" -#include "hw/i386/x86.h" #include "hw/qdev-properties.h" -#include "hw/i386/ioapic_internal.h" +#include "hw/intc/ioapic_internal.h" #include "hw/intc/kvm_irqcount.h" #include "sysemu/kvm.h" diff --git a/hw/i386/pc.c b/hw/i386/pc.c index d257545018..7ad71b19aa 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -28,7 +28,6 @@ #include "hw/i386/pc.h" #include "hw/char/serial.h" #include "hw/char/parallel.h" -#include "hw/i386/ioapic.h" #include "hw/i386/topology.h" #include "hw/i386/fw_cfg.h" #include "hw/i386/vmport.h" @@ -47,6 +46,7 @@ #include "multiboot.h" #include "hw/rtc/mc146818rtc.h" #include "hw/intc/i8259.h" +#include "hw/intc/ioapic.h" #include "hw/timer/i8254.h" #include "hw/input/i8042.h" #include "hw/irq.h" diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index d35316878d..0afea6705c 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -43,11 +43,11 @@ #include "hw/i386/ich9.h" #include "hw/i386/amd_iommu.h" #include "hw/i386/intel_iommu.h" -#include "hw/i386/ioapic.h" #include "hw/display/ramfb.h" #include "hw/firmware/smbios.h" #include "hw/ide/pci.h" #include "hw/ide/ahci.h" +#include "hw/intc/ioapic.h" #include "hw/usb.h" #include "hw/usb/hcd-uhci.h" #include "qapi/error.h" diff --git a/hw/intc/apic.c b/hw/intc/apic.c index 2d3e55f4e2..0ff060f721 100644 --- a/hw/intc/apic.c +++ b/hw/intc/apic.c @@ -20,7 +20,7 @@ #include "qemu/thread.h" #include "hw/i386/apic_internal.h" #include "hw/i386/apic.h" -#include "hw/i386/ioapic.h" +#include "hw/intc/ioapic.h" #include "hw/intc/i8259.h" #include "hw/intc/kvm_irqcount.h" #include "hw/pci/msi.h" diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 264262959d..6364ecab1b 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -24,10 +24,10 @@ #include "qapi/error.h" #include "monitor/monitor.h" #include "hw/i386/apic.h" -#include "hw/i386/ioapic.h" -#include "hw/i386/ioapic_internal.h" #include "hw/i386/x86.h" #include "hw/intc/i8259.h" +#include "hw/intc/ioapic.h" +#include "hw/intc/ioapic_internal.h" #include "hw/pci/msi.h" #include "hw/qdev-properties.h" #include "sysemu/kvm.h" diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c index aa5f760871..b05f436dac 100644 --- a/hw/intc/ioapic_common.c +++ b/hw/intc/ioapic_common.c @@ -24,9 +24,9 @@ #include "qemu/module.h" #include "migration/vmstate.h" #include "monitor/monitor.h" -#include "hw/i386/ioapic.h" -#include "hw/i386/ioapic_internal.h" #include "hw/intc/intc.h" +#include "hw/intc/ioapic.h" +#include "hw/intc/ioapic_internal.h" #include "hw/sysbus.h" /* ioapic_no count start from 0 to MAX_IOAPICS, diff --git a/include/hw/i386/ioapic_internal.h b/hw/intc/ioapic_internal.h similarity index 96% rename from include/hw/i386/ioapic_internal.h rename to hw/intc/ioapic_internal.h index e8ff338d7f..37b8565539 100644 --- a/include/hw/i386/ioapic_internal.h +++ b/hw/intc/ioapic_internal.h @@ -19,11 +19,11 @@ * License along with this library; if not, see . */ -#ifndef QEMU_IOAPIC_INTERNAL_H -#define QEMU_IOAPIC_INTERNAL_H +#ifndef HW_INTC_IOAPIC_INTERNAL_H +#define HW_INTC_IOAPIC_INTERNAL_H #include "exec/memory.h" -#include "hw/i386/ioapic.h" +#include "hw/intc/ioapic.h" #include "hw/sysbus.h" #include "qemu/notify.h" #include "qom/object.h" @@ -115,4 +115,4 @@ void ioapic_reset_common(DeviceState *dev); void ioapic_stat_update_irq(IOAPICCommonState *s, int irq, int level); -#endif /* QEMU_IOAPIC_INTERNAL_H */ +#endif /* HW_INTC_IOAPIC_INTERNAL_H */ diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h index a09388b657..890dfad23e 100644 --- a/include/hw/i386/x86.h +++ b/include/hw/i386/x86.h @@ -22,8 +22,8 @@ #include "hw/boards.h" #include "hw/nmi.h" +#include "hw/intc/ioapic.h" #include "hw/isa/isa.h" -#include "hw/i386/ioapic.h" #include "qom/object.h" struct X86MachineClass { diff --git a/include/hw/i386/ioapic.h b/include/hw/intc/ioapic.h similarity index 93% rename from include/hw/i386/ioapic.h rename to include/hw/intc/ioapic.h index ef37b8a9fd..aa122e25e3 100644 --- a/include/hw/i386/ioapic.h +++ b/include/hw/intc/ioapic.h @@ -17,8 +17,8 @@ * License along with this library; if not, see . */ -#ifndef HW_IOAPIC_H -#define HW_IOAPIC_H +#ifndef HW_INTC_IOAPIC_H +#define HW_INTC_IOAPIC_H #define IOAPIC_NUM_PINS 24 #define IO_APIC_DEFAULT_ADDRESS 0xfec00000 @@ -30,4 +30,4 @@ void ioapic_eoi_broadcast(int vector); -#endif /* HW_IOAPIC_H */ +#endif /* HW_INTC_IOAPIC_H */ diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index e738d83e81..3d0c0b375f 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -19,7 +19,7 @@ #include "sysemu/runstate.h" #include "qemu/main-loop.h" #include "hw/boards.h" -#include "hw/i386/ioapic.h" +#include "hw/intc/ioapic.h" #include "hw/i386/apic_internal.h" #include "qemu/error-report.h" #include "qapi/error.h" From patchwork Mon Feb 27 14:00:57 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: 657011 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2371437wrb; Mon, 27 Feb 2023 06:10:03 -0800 (PST) X-Google-Smtp-Source: AK7set9iD8py4F5bNPgmnEBvV6v8+d0KOG2nOu4KI6s0ipKEDdfs6EvyZtiSKc+4N2dK3fCM0kyi X-Received: by 2002:ac8:574f:0:b0:3bf:db77:8d47 with SMTP id 15-20020ac8574f000000b003bfdb778d47mr3533270qtx.55.1677507003148; Mon, 27 Feb 2023 06:10:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507003; cv=none; d=google.com; s=arc-20160816; b=cz9z4qDUM9ZY+0vGcu7j0rbf67SM2BF9WzBK778RjV+ZAx+ZN0UZHlWMAg3PNk6XHu bIu4vEJ3yRbtDzSpm2v12wKsRIidKTy23JmE/SIPih3md4+Tip8OyXP//U+NjVpAbEQS gEa3uWzhcgDFW6WdZfFt1RhFy1wv9IYooxctFJgsSfoTchuKd8/axjg4vVZbVorl2/a9 n1lRYjtjsJpCE5OaqaOU3llSayJ8Hu9UzF+VpJxXOe1HDH+QuNC2z521iUfvvV7Xa02s NiLz4hKJ6zOhhA+QW0zgyPRrFmxLsde8lwalGHl0WRMd5I1y4Jb9OJcfkNCRSlk3UwB7 6cNg== 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:to:from :dkim-signature; bh=XcyZBEGIyj8pgSPqx0qibrEIuq5k2XdtgcY01B6U23g=; b=ixVAyI+5u3Jed8r9diXYUJXEmehrov06lO6BoGKUuswaFX3WtVwPBOizZdWHVqECKe 2gVSvYZQypqMpVK5bObMxLyCoHqvAGTDwtrvTiOLEi9A8WMYMqNqYUAFll8/h4lx8wkD 49vaFdjoUOZv8jehgrGqNY+Vs9zely/y5MTUzOgz/7F3woQhmuoUWmk9+Nrm4imblukG AqDTY1LpQ4EeGzBqdqM2Gx49OpBW6c7aiuf68BKpkfVt3Z3p/UklPeKR7v7vz843SNW7 tUDATI1483TI6Abdjkkkh9KvT4ZTlbxjytASo935zAAf41z2TAdFrfGt+SHi6cweiENG W50g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TZVwXBko; 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 p5-20020ac84085000000b003ba1fdd469fsi5878975qtl.305.2023.02.27.06.10.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:10:03 -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=TZVwXBko; 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 1pWe8o-0005Ax-TJ; Mon, 27 Feb 2023 09:06:10 -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 1pWe8f-0004rw-7D for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:01 -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 1pWe8c-00082r-8q for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:00 -0500 Received: by mail-wm1-x32f.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so7229881wmb.5 for ; Mon, 27 Feb 2023 06:05:57 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XcyZBEGIyj8pgSPqx0qibrEIuq5k2XdtgcY01B6U23g=; b=TZVwXBkoLX/8qcON2BtCCUbAs3WAgrAeeN5rdVMcDO6NQ+IZtC/eJgc36uCPioSijh uHwsHP8Fuig4eNMCzMvLWSvFeFio9i6V4wugn42jNHshnAvtOQxQPH0XErLIVDejmmp3 xggfNMyL6pz2SAtFVDu3VaJZkSSIZy19dqgzmAlp4T1WFNGowhJvYX2l/DlFS2tRdbcm N+KOgvkriPUW4zlmSZmQuwz/ceFjh6vwZT6Ai1tysUGsTWXOXPZWuo6ruPEMAd3KvSVG muuGgU0R4L39SKh/ek6xYO7aiJK8bZu1lh8s3AkoRZyTPEsjowZBBq2nWVr+rwPI50aG 0yXQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XcyZBEGIyj8pgSPqx0qibrEIuq5k2XdtgcY01B6U23g=; b=wajmTCPaUim8fbhmcH1VJNJ+Y1tDlGyJvUzv1G8qsw5NnKeklnv414srvByFUqPLbM Roq7Y1gxECRUJonIPNr7hkNCpKZHXXtTW0/uSw7VMkFQOM74iQIoqw+1dvqluwHQgv35 yRs4t8IxL/KUibc8dFTAFuAGiI0i0YLtzqTlGk4prcjQQu3Ji+A9zRePmGsaItjmoPIC ZhlIr506LzKu5unqi4enYTvMBNtndW6qWMxa+2YX8Dn3C2sH4xrFxnyIHv7YYK2ENTcW OuiN1rof3JfGo7DCG/C2WFM0jbHrrnrlMZwkI3W8I9uG3akgeUwyIkbnz7pcf4/rgE+8 3H9A== X-Gm-Message-State: AO0yUKXfGEnQvA4MNcX15zBycOuAAvwQtvSkEdO1cnbFGOZGLiWq8za0 yWjHKEhXUrlBapnBuRk2K/rMs4opwECROWky X-Received: by 2002:a05:600c:6001:b0:3e7:772d:22de with SMTP id az1-20020a05600c600100b003e7772d22demr16640849wmb.30.1677506756686; Mon, 27 Feb 2023 06:05:56 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z19-20020a05600c0a1300b003e4326a6d53sm12811395wmp.35.2023.02.27.06.05.55 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:05:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 050/126] hw/i386/ich9: Clean up includes Date: Mon, 27 Feb 2023 15:00:57 +0100 Message-Id: <20230227140213.35084-41-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-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=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 From: Bernhard Beschow Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-12-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/acpi-build.c | 1 + hw/isa/lpc_ich9.c | 2 +- include/hw/i386/ich9.h | 8 +++++--- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index b67dcbbb37..1bb73c3e9a 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -59,6 +59,7 @@ #include "hw/acpi/pcihp.h" #include "hw/i386/fw_cfg.h" #include "hw/i386/ich9.h" +#include "hw/i386/pc.h" #include "hw/pci/pci_bus.h" #include "hw/pci-host/i440fx.h" #include "hw/pci-host/q35.h" diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index e3385ca7be..ce946760bb 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -40,8 +40,8 @@ #include "hw/irq.h" #include "hw/isa/apm.h" #include "hw/pci/pci.h" -#include "hw/pci/pci_bridge.h" #include "hw/i386/ich9.h" +#include "hw/i386/pc.h" #include "hw/acpi/acpi.h" #include "hw/acpi/ich9.h" #include "hw/pci/pci_bus.h" diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h index d29090a9b7..3125863049 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/i386/ich9.h @@ -1,11 +1,13 @@ #ifndef HW_ICH9_H #define HW_ICH9_H -#include "hw/sysbus.h" -#include "hw/i386/pc.h" #include "hw/isa/apm.h" -#include "hw/acpi/acpi.h" #include "hw/acpi/ich9.h" +#include "hw/intc/ioapic.h" +#include "hw/pci/pci.h" +#include "hw/pci/pci_device.h" +#include "exec/memory.h" +#include "qemu/notify.h" #include "qom/object.h" void ich9_generate_smi(void); From patchwork Mon Feb 27 14:00:58 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: 657063 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2379195wrb; Mon, 27 Feb 2023 06:24:25 -0800 (PST) X-Google-Smtp-Source: AK7set9Uc7PEMlpiXVDk8TQckxT0URLbSfjjFAv+dyxUqMQVV/c948aHVwkSNCHbNuQCtmwMGUqU X-Received: by 2002:a05:622a:488:b0:3b6:3b60:e0 with SMTP id p8-20020a05622a048800b003b63b6000e0mr41058150qtx.31.1677507865564; Mon, 27 Feb 2023 06:24:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507865; cv=none; d=google.com; s=arc-20160816; b=bto2+G82+FZa1dwrPw9oYwyYgBVnAzDfr68aRtQZw9ZAEN1/9BXElXA6EhNOiXQS0n foJtoz0W2LySBQMvHPOQpZPtMSqeQiSlmS1YR3B8GuneWknosyclU8Vw/JZCpK+YGOBo yY/KSUapxFQFovNJmLxGEqHAGgSMgrCkKaEZSk1HnAtwPCq7LAs1A+qBG19dLiQDCK+3 yMfRGdesT10Wf9c/tRhO92Uypbn9d7AN0MDNBzMRTAmPAf09NAgi+uVDmXgKqVHTDidM r/GQEuJ7G2ChjwIR3iEkC0GD+AXaUttAqt937PGUoGofeOPYFCS1jtYaBe63uhDiH6bI e1NQ== 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:to:from :dkim-signature; bh=3VVgDConF7QXTpND7x8W2tL9LlzCr7EZmnqokR1ktl8=; b=q9pAwUGzawrizW3OZm+HIxlHPQTppnMTXMh02IDrOzsWoQ9EmxFqXxQ7GXpS/ya36p 245qV7IU8XvYTqgEE7niZWve37ivFmQl4wykOa3v4/jWxRwd9bLarY3xOAf7ug4K1uBR GDHYYSbeXyxygFj97F4Ivpc8xEdRurUrJUvHz++5CssFP9mX0B6jETJZqHOd4o/BKALz 4GZESaBIp35lUVbKP6RqS99TL3pzIbY57uhbPN1ZOucG1ax7Vxd1Vu9SjnbpBi7ROdiM +8cj1YbEbbEzAUp0+hVi1N930C8i3FHnS0nvu5Y8uFOzflvsEGFZVN8XubMYU5betNSO fpxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mqgyXFUk; 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 j19-20020ac85f93000000b003b83c5038a6si6462983qta.411.2023.02.27.06.24.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:24:25 -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=mqgyXFUk; 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 1pWe8v-0005RJ-V5; Mon, 27 Feb 2023 09:06:18 -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 1pWe8o-00058W-FQ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:10 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe8k-0008V9-Tg for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:08 -0500 Received: by mail-wm1-x332.google.com with SMTP id j19-20020a05600c191300b003eb3e1eb0caso2605890wmq.1 for ; Mon, 27 Feb 2023 06:06:03 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3VVgDConF7QXTpND7x8W2tL9LlzCr7EZmnqokR1ktl8=; b=mqgyXFUkrpj1zlTVtF6K7P2rTyFI7pJK2JTDaC6WzndlnkmwH2ehNmJ41sILZv87mT +mKYFzAOTf9Iv13RlTjMCSpCLz7pdTWqWuK4+EMcfTseTyq46KPs/mPMZFpidOxYtqRm SYTry6RZtTBSgLqlZnZmOzV8oVWLVtbYWiCC8+v/C9y29zaWSDVwhoe7xbq9hlZz1V12 r999NQ2GhbJA2jNfkN9NCeH1sv5q4up8FUn3NhXwb0PLi44mc9EUiPiok6P9PPg3xyMQ EeE4GMOXcRW03et0MUz/ZXivEbca3l5xg2Gf+5zCR38HJvQeY7KIu/fn/iVVgJ1A9DTE 72MA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3VVgDConF7QXTpND7x8W2tL9LlzCr7EZmnqokR1ktl8=; b=F6rw+V6Lp/gseskcndXGlGlknvGirBNR3PbCfawy3ulSH1Djo+r8Vpw78NHGHaYhjA M961uWLFeDnerbAtNTmxiJ1JtD4CcgoQHeofMNma1nGBUNPHnZPltygRk2DRIOlkScsa fJO6wTjOM3dfjliZlh2TrEc35R+jFbNUWfzRmKqBzAvqezV3+R6DQonzIZpLEfuL/gui izvUzG2TH9kfnSwd54VemvRc2QxkeNFjcuRIj+GuZGJpT0LuvEA8Vw0eK6kNqzRLNKif n8BVsFYdpkQpwJSGkDaIeIjoVvV5yjPPW9KMG3/e60n0nNHzC5V0esNtnjO9EPGsAeDE aZGA== X-Gm-Message-State: AO0yUKUujZtPEeVynEUr/+6JNSUckRiXIFQ7YmQ/U5NagBr7GYGEl9N6 6uutEEnYg00a4FgAI1OqQ+DkB1vxn3QaL6ss X-Received: by 2002:a05:600c:160a:b0:3eb:3945:d405 with SMTP id m10-20020a05600c160a00b003eb3945d405mr5026509wmn.38.1677506762508; Mon, 27 Feb 2023 06:06:02 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h18-20020a05600c351200b003eb192787bfsm9506783wmq.25.2023.02.27.06.06.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 051/126] hw: Move ich9.h to southbridge/ Date: Mon, 27 Feb 2023 15:00:58 +0100 Message-Id: <20230227140213.35084-42-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 From: Bernhard Beschow ICH9 is a south bridge which doesn't necessarily depend on x86, so move it into the southbridge folder, analoguous to PIIX. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230213173033.98762-13-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + hw/acpi/ich9.c | 2 +- hw/acpi/ich9_tco.c | 2 +- hw/i2c/smbus_ich9.c | 2 +- hw/i386/acpi-build.c | 2 +- hw/i386/pc_q35.c | 2 +- hw/isa/lpc_ich9.c | 2 +- hw/pci-bridge/i82801b11.c | 2 +- include/hw/{i386 => southbridge}/ich9.h | 6 +++--- tests/qtest/tco-test.c | 2 +- 10 files changed, 12 insertions(+), 11 deletions(-) rename include/hw/{i386 => southbridge}/ich9.h (99%) diff --git a/MAINTAINERS b/MAINTAINERS index 2c7731aeb7..d54e5c4fb9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1679,6 +1679,7 @@ F: hw/i2c/smbus_ich9.c F: hw/acpi/piix4.c F: hw/acpi/ich9*.c F: include/hw/acpi/ich9*.h +F: include/hw/southbridge/ich9.h F: include/hw/southbridge/piix.h F: hw/isa/apm.c F: include/hw/isa/apm.h diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index 54bb3d83b3..d23bfcaa6b 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c @@ -36,7 +36,7 @@ #include "hw/acpi/acpi.h" #include "hw/acpi/ich9_tco.h" -#include "hw/i386/ich9.h" +#include "hw/southbridge/ich9.h" #include "hw/mem/pc-dimm.h" #include "hw/mem/nvdimm.h" diff --git a/hw/acpi/ich9_tco.c b/hw/acpi/ich9_tco.c index fbf97f81f4..1540f4fd46 100644 --- a/hw/acpi/ich9_tco.c +++ b/hw/acpi/ich9_tco.c @@ -9,7 +9,7 @@ #include "qemu/osdep.h" #include "sysemu/watchdog.h" -#include "hw/i386/ich9.h" +#include "hw/southbridge/ich9.h" #include "migration/vmstate.h" #include "hw/acpi/ich9_tco.h" diff --git a/hw/i2c/smbus_ich9.c b/hw/i2c/smbus_ich9.c index f0dd3cb147..18d40e93c1 100644 --- a/hw/i2c/smbus_ich9.c +++ b/hw/i2c/smbus_ich9.c @@ -27,7 +27,7 @@ #include "migration/vmstate.h" #include "qemu/module.h" -#include "hw/i386/ich9.h" +#include "hw/southbridge/ich9.h" #include "qom/object.h" #include "hw/acpi/acpi_aml_interface.h" diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 1bb73c3e9a..d27921fd8f 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -55,10 +55,10 @@ #include "hw/hyperv/vmbus-bridge.h" /* Supported chipsets: */ +#include "hw/southbridge/ich9.h" #include "hw/southbridge/piix.h" #include "hw/acpi/pcihp.h" #include "hw/i386/fw_cfg.h" -#include "hw/i386/ich9.h" #include "hw/i386/pc.h" #include "hw/pci/pci_bus.h" #include "hw/pci-host/i440fx.h" diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 0afea6705c..09004f3f1f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -40,7 +40,6 @@ #include "hw/qdev-properties.h" #include "hw/i386/x86.h" #include "hw/i386/pc.h" -#include "hw/i386/ich9.h" #include "hw/i386/amd_iommu.h" #include "hw/i386/intel_iommu.h" #include "hw/display/ramfb.h" @@ -48,6 +47,7 @@ #include "hw/ide/pci.h" #include "hw/ide/ahci.h" #include "hw/intc/ioapic.h" +#include "hw/southbridge/ich9.h" #include "hw/usb.h" #include "hw/usb/hcd-uhci.h" #include "qapi/error.h" diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index ce946760bb..96fd500502 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -40,7 +40,7 @@ #include "hw/irq.h" #include "hw/isa/apm.h" #include "hw/pci/pci.h" -#include "hw/i386/ich9.h" +#include "hw/southbridge/ich9.h" #include "hw/i386/pc.h" #include "hw/acpi/acpi.h" #include "hw/acpi/ich9.h" diff --git a/hw/pci-bridge/i82801b11.c b/hw/pci-bridge/i82801b11.c index f3b4a14611..0e83cd11b2 100644 --- a/hw/pci-bridge/i82801b11.c +++ b/hw/pci-bridge/i82801b11.c @@ -45,7 +45,7 @@ #include "hw/pci/pci_bridge.h" #include "migration/vmstate.h" #include "qemu/module.h" -#include "hw/i386/ich9.h" +#include "hw/southbridge/ich9.h" /*****************************************************************************/ /* ICH9 DMI-to-PCI bridge */ diff --git a/include/hw/i386/ich9.h b/include/hw/southbridge/ich9.h similarity index 99% rename from include/hw/i386/ich9.h rename to include/hw/southbridge/ich9.h index 3125863049..7004eecbf9 100644 --- a/include/hw/i386/ich9.h +++ b/include/hw/southbridge/ich9.h @@ -1,5 +1,5 @@ -#ifndef HW_ICH9_H -#define HW_ICH9_H +#ifndef HW_SOUTHBRIDGE_ICH9_H +#define HW_SOUTHBRIDGE_ICH9_H #include "hw/isa/apm.h" #include "hw/acpi/ich9.h" @@ -242,4 +242,4 @@ struct ICH9LPCState { #define ICH9_LPC_SMI_F_CPU_HOTPLUG_BIT 1 #define ICH9_LPC_SMI_F_CPU_HOT_UNPLUG_BIT 2 -#endif /* HW_ICH9_H */ +#endif /* HW_SOUTHBRIDGE_ICH9_H */ diff --git a/tests/qtest/tco-test.c b/tests/qtest/tco-test.c index d865e95dfc..0547d41173 100644 --- a/tests/qtest/tco-test.c +++ b/tests/qtest/tco-test.c @@ -14,7 +14,7 @@ #include "libqos/pci-pc.h" #include "qapi/qmp/qdict.h" #include "hw/pci/pci_regs.h" -#include "hw/i386/ich9.h" +#include "hw/southbridge/ich9.h" #include "hw/acpi/ich9.h" #include "hw/acpi/ich9_tco.h" From patchwork Mon Feb 27 14:00:59 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: 657012 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2371584wrb; Mon, 27 Feb 2023 06:10:18 -0800 (PST) X-Google-Smtp-Source: AK7set+B8bBknd5Shws1dvATj3eXyKVdQTtKoXELm+GLWVDN2SvcbPuZ5VKpSQ+W35FeIX6ayTQ/ X-Received: by 2002:a05:6214:19cf:b0:56b:eb9d:4342 with SMTP id j15-20020a05621419cf00b0056beb9d4342mr44962973qvc.49.1677507018320; Mon, 27 Feb 2023 06:10:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507018; cv=none; d=google.com; s=arc-20160816; b=imaSOnpw4ZFyED982KIsMqEtngygI+1odvCyppfTRXtDXyoJHASmfvUz32UZm66DNM YD0cIJ5PVZ0R2ibwa4rTyzrtlqtR2tJKF/RwpC/Oa8MS732KgsV4VopYfj2AyqL903Uk /71XVogvVd9jOF32WBwYOmprC2YEF3R6GQ+mGQnFepWVgvaTdWDqJLfoaqW90NEKHX9+ wxBTmvap/dQKp1zyvFnXp4YgXpYnJcCpL4vC0JtVRqJ5WjTZJpHiW4a1q4ATw7wufRbS 7tK2K8LqY15YzgtKwiQuAA1oUIiNVAyVOpe6sUHDdR3f8pp2Jlt/X3p/BdTOANc3bJDK P/Kw== 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:to:from :dkim-signature; bh=LxEfan69o3My8Mrmn1KC1X4kpU+7cC+eIIqeiegwnsI=; b=V3iBFh3gW+JSjKJ9V/qeCpbsSFWF5LId5lFUpZhZyU/e9G2HICWZs1GRNxxinaqF94 tpEKgRKHi/O13FRrxcChpAAA6oo5F1DW7gR103a6r6O/fbx7bUnaQnVUFLRPetviWI8D 600H2dKWD8jLfwCOB3NN1dcXoVMRDGX2MY0iFMNqVcRzAApkR3AxgP4z3jpoCV3rUtdr CoUbRf19hy/09Fs2CpHnxJgMTrsAPHVRzhtL5rCB+0qo/g79sb0n+embn2lWgKxYKqJU VqYznk7zf7KPS1nOLRxSNIEZqUjGCJyOnKkpnDcMcOjwGf0VUmVYS6LfWMvS3zqLi8uQ 1rhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gOFQX7LJ; 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 p20-20020a0ce194000000b00569082f127fsi6232364qvl.143.2023.02.27.06.10.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:10:18 -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=gOFQX7LJ; 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 1pWe8r-0005He-7F; Mon, 27 Feb 2023 09:06:13 -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 1pWe8p-0005Fl-UI for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:11 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe8o-0008MT-8U for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:11 -0500 Received: by mail-wr1-x42a.google.com with SMTP id e37so3877302wri.10 for ; Mon, 27 Feb 2023 06:06:08 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LxEfan69o3My8Mrmn1KC1X4kpU+7cC+eIIqeiegwnsI=; b=gOFQX7LJTkUzE2/IoCmrMlqBkJo9hx52g+j7PihPDiFn4GXCX1JE+pmODJyysv1Meu jv8KEit8ctTakNciv9rFq0998bTAtuu79ehC+21J5VyAU40KtDZJnE4kHlVf0tZCkfqh H5qLAjZ46T8I723ekIdDq1KZdrSPcxlXOhJOPzfkjIi5tmawD2A+pm0dHhK+Dqtw97C2 1h7MMrgwaywytmzz9FTGYRf04noyH+M1a3f5Jq0KMcbZISfpFc/v+yv+1TpcBUAqmwCX yE8Wqf9SnCFYyWgaJDkXaQgndeUvs/3/WpauEMSjxsf4t5B9BZ+JDmQykeAj4tXbknIC OoYg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LxEfan69o3My8Mrmn1KC1X4kpU+7cC+eIIqeiegwnsI=; b=HzIiyhC0fcatVEPWQP5oXDw0X1Zwgho8p4nrCiDInqkYdgQ5Ehew+PyviBZpS+/Txj 1zL1FCg7Jy1k3tWSxWBuNFJo5v2QLbOBpszet4vDgZbexAT2d8tOsrhhrsV5Kbjhzy8A /xFdINzDwUvyYip9+JAQz/u5QZLg2se8/CkU1IFpeQp0HGywL0M1PCNoBvssGacw2lMb OlhJx/IZkd1JfYb5iWMDxTTn9GrMDG/YYJGBCQ+y9MxR5QNRXPOKKnGrkSS5H/fQb7aK IulZP1038d01w36J+DaWSv0HRBGyl/0zQLEkZEANB0WCE7txi9oiXaromIxR4ksC1r4q uirw== X-Gm-Message-State: AO0yUKVg0uQLgI+Dgy2gTIuWL1YDxH1tnhtllBTgEcHxi9mySdLBODpM Upzzye5693pXvdDyw6DV1RPpd7NB2mYvB1dm X-Received: by 2002:a5d:456f:0:b0:2c7:16c3:1768 with SMTP id a15-20020a5d456f000000b002c716c31768mr10560285wrc.19.1677506767650; Mon, 27 Feb 2023 06:06:07 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id c10-20020a5d4f0a000000b002c54911f50bsm7210362wru.84.2023.02.27.06.06.06 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:07 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 052/126] hw/pci: Fix a typo Date: Mon, 27 Feb 2023 15:00:59 +0100 Message-Id: <20230227140213.35084-43-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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=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 Fix 'interrutp' typo. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230211152239.88106-2-philmd@linaro.org> --- hw/pci/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index cc51f98593..bad8e63db3 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -1648,7 +1648,7 @@ void pci_device_set_intx_routing_notifier(PCIDevice *dev, * 9.1: Interrupt routing. Table 9-1 * * the PCI Express Base Specification, Revision 2.1 - * 2.2.8.1: INTx interrutp signaling - Rules + * 2.2.8.1: INTx interrupt signaling - Rules * the Implementation Note * Table 2-20 */ From patchwork Mon Feb 27 14:01:00 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: 657064 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2379901wrb; Mon, 27 Feb 2023 06:25:55 -0800 (PST) X-Google-Smtp-Source: AK7set+W2VEboivZeIUrTZ584zgJfbroF3Gco3ZIRrRK/NDtg/Vnc2df7xV9tJ3Xu427zxsHPN5C X-Received: by 2002:ad4:5c46:0:b0:56e:a630:2626 with SMTP id a6-20020ad45c46000000b0056ea6302626mr50898528qva.45.1677507955690; Mon, 27 Feb 2023 06:25:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507955; cv=none; d=google.com; s=arc-20160816; b=SRX/drM4HNcf6oEzVrhn535+9JLPaZM3YgEsmrbPOU1uqQ4dhJcjDzfAEw0Zn++go3 3KDXXxzWBwrYIkjTi9kptlIW67ex4my1tFfOTBerpUN8vxOIUupe5KrIQ2RNcPtYBos1 Gga8m45QmbRQ7SkgBrj087W22FlXNVC3l4BvikVyyXfS0WWRDLlJDtgIWUhfDFyjQF78 IS2f/t1yhV8FDowN6dlEMMVaGByzPii6Udk4WfuxvVLxZWDSa0Lmm6BHovG1maUu1qSB ZWzzjZhOnAec+zhm5uf/NQNbi1xDvSwdnnDDlm+RvFNa16cE+QphCe/31T8JG6BgD0Ac x8VA== 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:to:from :dkim-signature; bh=f5yKWrXeohH1uxONlv1fkqGC/gbeXOjcvaKLR6Gd1Wk=; b=HNGs9HJozmkdB+DIsOyzM3HGMhk0HcsAATGFj09TbsYWaxjOlW8Azwc2l7+J7KI8Pb kXO5NeB4GUXjDn9XHgEfal8o7phhYOqS6leXu0oVs4ctHI2+ZLGTa++cmE3yc2IaYYmT JdCBJ/iDNuUz8G0ocTbhtvBCch5vFrP/MCJttuc6PiJoc9cuK0dSe02VgQdBCUrapJZq DgL0cuq+t6JfDJl1pgFQEItrkEzyIha6BY89z/N8Hx0uH77PrqyLyq2s9Tyyz81Q2/5y eByzjZFAO3wJspn/JU4ZrelxBUM/54RUNiZ6xG5a2Y1UBksf/BWvTmd2pgqwoXu5Q8nY 6wFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CnJp5+4I; 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 w11-20020a0ce10b000000b0057111221a51si6211163qvk.332.2023.02.27.06.25.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:25:55 -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=CnJp5+4I; 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 1pWe8w-0005Wv-RO; Mon, 27 Feb 2023 09:06:18 -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 1pWe8v-0005PN-Ll for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:17 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe8r-0008V9-Sp for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:15 -0500 Received: by mail-wm1-x332.google.com with SMTP id j19-20020a05600c191300b003eb3e1eb0caso2606323wmq.1 for ; Mon, 27 Feb 2023 06:06:13 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=f5yKWrXeohH1uxONlv1fkqGC/gbeXOjcvaKLR6Gd1Wk=; b=CnJp5+4Ii011Ume+8cj4f1dtd+ngX3f5pY67TUfYk7Zvh2mWs5CFkOyNeYgh7zFoUg itdO3D5SNfaf4nAKjL9+Sao/f9+RHaj1giDVRaGhVTseaOCtKBvynKoETlrS8gcazh8h oKV6X8/b4A80Js9VMj9i9cuah9o46nKpltRVBvNutgSd4grqS/0H/Zu61dAufPf0DRaC ru9iBJgvohrCd03ZBTnP5qRO/vN5VfVcbWE7Q1kXy0zYek6vjf0W7UFsjXoWERzbtBJR AVWQhmsOl0IR8QB5ShS3IAsN6gchp0TmzBkLnrt36O2N89PwgBYO39n9h5xKjQQzH6kU 43Lg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=f5yKWrXeohH1uxONlv1fkqGC/gbeXOjcvaKLR6Gd1Wk=; b=OGLLBIoiI4gOj+29WfuCyW+kKtl+cWublota65Bjz/cD0fiTo0ba8Gl5e0rikVmSHl GOxRc2puW1YS5k14C5tyF5LA93lzVMqkyxOGdTMT3Sdesn3mgqQp9jn2/VvVz5reHhbZ JcRDa7oKfl/ugs2rv73ph3HgNsX+NfMCtbO25o2xklr/5O2eqzoq/BbQGi+ULNR1WbhX 7pRzJN2EhHHT9MRgGXTGnP+gByfMbU40N1R/e3GzUuiEiDpUsKK5dxWmnQ6d7GnWfTr6 /zpeL0XuX993rf4R7du+o3fU9SEgEG0fyuM0i7mJIpbdKKeRTZny5CF4+VI+hK3PQz4r QWlA== X-Gm-Message-State: AO0yUKXmrRF+c9tthR/8TWDfGPIm1Mighnv/5MlS8Alcf65tqspB93Uu htL2jGWj83YdjHa1LbioTIdUQhe8TBMAIOn/ X-Received: by 2002:a05:600c:3413:b0:3eb:2de9:d01 with SMTP id y19-20020a05600c341300b003eb2de90d01mr7415997wmp.18.1677506772902; Mon, 27 Feb 2023 06:06:12 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o6-20020a05600c510600b003e20a6fd604sm9920636wms.4.2023.02.27.06.06.12 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 053/126] hw/intc/i8259: Document i8259_init() Date: Mon, 27 Feb 2023 15:01:00 +0100 Message-Id: <20230227140213.35084-44-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 i8259_init() helper creates a i8259 device on an ISA bus, connects its IRQ output to the parent's input IRQ, and returns an array of 16 ISA input IRQs. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230210163744.32182-2-philmd@linaro.org> --- hw/intc/i8259.c | 4 ++-- include/hw/intc/i8259.h | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c index 0261f087b2..17910f3bcb 100644 --- a/hw/intc/i8259.c +++ b/hw/intc/i8259.c @@ -406,7 +406,7 @@ static void pic_realize(DeviceState *dev, Error **errp) pc->parent_realize(dev, errp); } -qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq) +qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq_in) { qemu_irq *irq_set; DeviceState *dev; @@ -418,7 +418,7 @@ qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq) isadev = i8259_init_chip(TYPE_I8259, bus, true); dev = DEVICE(isadev); - qdev_connect_gpio_out(dev, 0, parent_irq); + qdev_connect_gpio_out(dev, 0, parent_irq_in); for (i = 0 ; i < 8; i++) { irq_set[i] = qdev_get_gpio_in(dev, i); } diff --git a/include/hw/intc/i8259.h b/include/hw/intc/i8259.h index a0e34dd990..c412575775 100644 --- a/include/hw/intc/i8259.h +++ b/include/hw/intc/i8259.h @@ -4,7 +4,15 @@ /* i8259.c */ extern PICCommonState *isa_pic; -qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq); + +/* + * i8259_init() + * + * Create a i8259 device on an ISA @bus, + * connect its output to @parent_irq_in, + * return an (allocated) array of 16 input IRQs. + */ +qemu_irq *i8259_init(ISABus *bus, qemu_irq parent_irq_in); qemu_irq *kvm_i8259_init(ISABus *bus); int pic_get_output(PICCommonState *s); int pic_read_irq(PICCommonState *s); From patchwork Mon Feb 27 14:01:01 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: 657067 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380393wrb; Mon, 27 Feb 2023 06:26:49 -0800 (PST) X-Google-Smtp-Source: AK7set9TtzJ1zne55y4kidnb+i8ucxSfkTN6B/4G8yG1FChWVuBtAS6F3odXahVSlX+yqyfQVtwv X-Received: by 2002:a05:622a:14d:b0:3af:4d45:b73 with SMTP id v13-20020a05622a014d00b003af4d450b73mr41954917qtw.33.1677508009416; Mon, 27 Feb 2023 06:26:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508009; cv=none; d=google.com; s=arc-20160816; b=uTekEyXWkGW6WO+zvKBrs4Spy19LKwKvkj1QSUsRc1BGnAnrcNdKDf1BzxuursTBY1 gZKqw+Jc2uL47D4FzahMZ4VHDu7RuV2iNK8RZZ2uNlRqbIiFmh58s5yOROb3knLhBNFx g58nZo0FRzAIYybEAu8YUAZ/VnwcoNp9lg7utMnnFOOEwoOvCcIWVQbIadFme3sJo2iW Re6v+onTQNj+cG4iWt1LxFrFfWWBiQIU16iMoIBKrr0oO6bJNXzHCcnXIxXVfHj0IjFJ y5sdoNdvvCsYvxSRZdgCudlGvxVFLnZsNJgYNqQVlbFmEA0LmpyjyM9J3+Ikpn4/0GSi canQ== 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:to:from :dkim-signature; bh=LhfXfTTiOAw8Tas+LE/Xmhs92F8Sdpjj0w+PGmwionY=; b=GXw7/fmwAtg9wPln/qt5fDah1BNIOYPzS2FjMFEMTkJkVNhzdcfml+75xyv2kDR1rn KMwO4EqY+abUFcMur63Dc25JHF++Yjiwajg+xuNPQFnWwNf/wbqyQ9eVn4HKjOvVtsKq 9CjW/YXv+n5fpuDgur9KFxniJy0jP3t/uL8e9XxVwKdV7FUIfgLdiThUkU0Nze24wArM igdXttW3dlaXV8mvSc6H72sM87Yn9aHkxAbXQBHaw9lEeiPWuc4gu1Fz0Xol9GhkUA/3 YN770QLBodYwiPYr350FEDiHyRwRTgzDTgCQmy35oI96yUHvDjS8eHBvOFupK1K3C1xb uGnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IqWigxu1; 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 x28-20020a05620a0b5c00b0073bb1f6269dsi5725622qkg.94.2023.02.27.06.26.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:26:49 -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=IqWigxu1; 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 1pWe90-0005kf-P7; Mon, 27 Feb 2023 09:06:22 -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 1pWe8z-0005fN-8n for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:21 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe8x-00006d-Mq for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:21 -0500 Received: by mail-wr1-x42b.google.com with SMTP id v16so3549925wrn.0 for ; Mon, 27 Feb 2023 06:06:19 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LhfXfTTiOAw8Tas+LE/Xmhs92F8Sdpjj0w+PGmwionY=; b=IqWigxu1kIdvtmMEWcZ9cfn/O2o2sfFJWBMQ8vtjXdUW3ssXADR/rq1Na4opfju1hA 5nBk42uvmmdbnv/5AizkqXmrVJiqIVTLwqDTwox37ZZUzI1iTYDl+hnky1KNkekaE2sB gv/U5U0p4/+umeRNmoKk3AJhJwrSbERxBAK8e0CpqsT3oFkWiHpnLPLQRK3vHU/XQp/f IKfRWe6ikn4MF+Ioek1M4vpNV2BevJHchPpWfLxb0sQtTGXFV9I3fP1p2oLOoYECoyPz GD2zhRleXu7+gwDK7TQZQiqb4pxjrtUF0pzxTO05pZGrg9fDI0rrlMLnwmYQPGY3rjH3 DeRA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LhfXfTTiOAw8Tas+LE/Xmhs92F8Sdpjj0w+PGmwionY=; b=zZBn2BZcK+Bs+s0+ETL7e6hWV0ap4utQNTEnyUcUK7LbTHWIwVcskIMcTIPlLNKQ+u eUuaBGOLFo1aXvX9srGPH/8zf8KXUPyBrc1ZyWnBTc+DiPkzW26ngqUo5tADzF20OHXl hFF28o9oZw9m3QoI8yoQbetTnYTrGv5RqmH9x2iG96NrDQTjfE0iEE4EtntkCOs1dxgZ k17VCRPgbhkJCHZ7pM3YkX+cWIrDqfjg8ldEy/0We7k4gv0bNlgBf2+W2NP2L3Ce9VUD NpcddwFOr66n2xQl2+NhmA9vlNp+k0zeD0Pi9kP2X05FaPWneQAHWD7hJbXf87t0GCjN ad+w== X-Gm-Message-State: AO0yUKWcTJYtah6iYFMp8vrV1EqutsRtlsqPRM82fdcOlCODcXfBdKkZ okItVCya+l1LL40pzHXyP359xClH11uS0amE X-Received: by 2002:adf:f80c:0:b0:2c8:f78:2772 with SMTP id s12-20020adff80c000000b002c80f782772mr10067972wrp.19.1677506778202; Mon, 27 Feb 2023 06:06:18 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id c10-20020a5d4f0a000000b002c54911f50bsm7210770wru.84.2023.02.27.06.06.17 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 054/126] hw/isa/i82378: Rename output IRQ as 'cpu_intr' Date: Mon, 27 Feb 2023 15:01:01 +0100 Message-Id: <20230227140213.35084-45-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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=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 Commit a04ff94097 ("prep: Add i82378 PCI-to-ISA bridge emulation") aimed to model the 2 output IRQs: CPU intr and NMI. Commit 5039d6e235 ("i8257: remove cpu_request_exit irq") removed the NMI IRQ. Since this model only use the CPU interrupt, replace the 'out[2]' array by a single 'cpu_intr'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230210163744.32182-3-philmd@linaro.org> --- hw/isa/i82378.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index e3322e03bf..84ce761f5f 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -32,7 +32,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(I82378State, I82378) struct I82378State { PCIDevice parent_obj; - qemu_irq out[2]; + qemu_irq cpu_intr; qemu_irq *i8259; MemoryRegion io; }; @@ -50,7 +50,7 @@ static const VMStateDescription vmstate_i82378 = { static void i82378_request_out0_irq(void *opaque, int irq, int level) { I82378State *s = opaque; - qemu_set_irq(s->out[0], level); + qemu_set_irq(s->cpu_intr, level); } static void i82378_request_pic_irq(void *opaque, int irq, int level) @@ -113,7 +113,7 @@ static void i82378_init(Object *obj) DeviceState *dev = DEVICE(obj); I82378State *s = I82378(obj); - qdev_init_gpio_out(dev, s->out, 1); + qdev_init_gpio_out(dev, &s->cpu_intr, 1); qdev_init_gpio_in(dev, i82378_request_pic_irq, 16); } From patchwork Mon Feb 27 14:01:02 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: 657076 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381138wrb; Mon, 27 Feb 2023 06:28:25 -0800 (PST) X-Google-Smtp-Source: AK7set+leyu3Lnt1Tov2OJo6x6KGx0/F+zMZ4tmCRsMdbcA3dgmsXrE5KAgynj6FlGredx5obF3C X-Received: by 2002:a05:622a:513:b0:3bf:d9ee:8814 with SMTP id l19-20020a05622a051300b003bfd9ee8814mr5494750qtx.17.1677508104965; Mon, 27 Feb 2023 06:28:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508104; cv=none; d=google.com; s=arc-20160816; b=tiYG9g8w8M9Cl23R+qi+5IlZGRbIlNp9Z0sUfw5eGrBnysgmk0ajcMkAhIIwrbPSzh CfsU9/NRvDCprMdmZOKJw576X+z1zmNIsjCca52TWJhwhkhTMunDHHih4gtcmJqWwIaU 2yNHW9jCd1FUAuyDeto3YNrnHEhTCRrzDd/SsTqzHQFTtjCU9oQqtTcJEyi7n+JSGFRM UnfCf+It1FD8hE+kpbN8IRkp5T24oB3uLwjb01maO49JBqw2A2Z5RmPzNoGVVe3MIYvc XvGOPa7nGLUO+d1zOVt9p8s+Y/neX3RVbce0ONWTFEZccbt+z1xYL9k1NEpoaGL8RxGm WmxQ== 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:to:from :dkim-signature; bh=h6uxcZilk2wI+Tkmg+pnz6+NZT4eCPxaC2G9zMcXWSQ=; b=Vm9znrJ2XxICzlhYh55Jax9xdbsXC+mvR2BNp1d9GIHAehPizyUaYDHCzp+EqeHbUO 4rONquttFebs6TKVO2gcdGpsxHMy53tTXc8dEi08BMjLLCAZHtl9qZakA6dMS15aVYgP nxmS/DrucqGRpFMCrwQLIjSCu6Fstt5YYiRxmAAOAiUn2ZTo0wxKe6cr6PyFuNvx/rJ+ 00roxa1gP87Og5RzGb0ZZPuhAvM7OHmrZaMfTVHvvgwX0w9L9SYStDEHKBAhGChVAv0R PrxS7ORAt7iiVLP5bDLbKvZlvLWALVUHutwMxocRqGNta1i/4LiXrX7JFQied3vCxvg5 olUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uhMuANSs; 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 i7-20020ac85c07000000b003b3c56ce5b2si6872100qti.367.2023.02.27.06.28.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28:24 -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=uhMuANSs; 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 1pWe9A-00068K-Mi; Mon, 27 Feb 2023 09:06:32 -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 1pWe98-0005yd-Jr for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:31 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe96-00007u-Lm for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:30 -0500 Received: by mail-wr1-x42f.google.com with SMTP id l1so3304300wry.12 for ; Mon, 27 Feb 2023 06:06:24 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=h6uxcZilk2wI+Tkmg+pnz6+NZT4eCPxaC2G9zMcXWSQ=; b=uhMuANSsBD1gVY23Uv8L13qMDeHiDtMvokvxRDj4GCibWeXYV3Ggc36Oeud86KhHV6 +OArFgo3BDMpHgy6osObCFIMhj4md3xoSGn45TkQLMF0eKjGdiYvVWZmr1zRnZ9p4plf 6Z6E3l5BbSQlyprqUefe7cZxEXAmbYnWjTBeoVrVhk0Rv7cgX9pBsJxE4kzBu5BukadP J87VLjnpQ6wbGevynvGm8Mm63Wxqkxn7ahn6J2sKPxYrQoz3URs/5UF57H8dGpmQhuSY FR0rQpD+yFmrCkrvVmqSDjNX5VQA2qFiNbVR2kHn8f2WTYJbVOnDzWhtNKjl7UieQH+a rwhQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h6uxcZilk2wI+Tkmg+pnz6+NZT4eCPxaC2G9zMcXWSQ=; b=jw0a4FkK5WufZvYer5SXGvberHF57zd/LqzQJ/6ZDcfUZb2/Z2NHY9HvZeAIlqUv5A 28VWTiM8ikYBE4GLIqobn1vLXxBiB9EtYsSh6XVVW6SuWLImaj3A5skM2KjBjCrhoujc rsJpPAZq64zZ4YT7CSu3EeIw79fYyF9jAVhYSQkSGmdKFx45RtdW0GaK8PkIP26/TQLg LHTiVQImLDpcLMHsd63cI9jTIYW0PISDG7oFLglVauZQwgxaEryM0wXAVnvd+clJjGOS 6N73BnaX2kiyNPg3N5taonFdzZUl9PwwYeqsQt9/nzN5mss+8ySPAZxd5IdyJpBhpPR5 yixg== X-Gm-Message-State: AO0yUKVxBv9oE7qpfUx9gxjSw9xeDvLRZO+/jOOQm69tSoMMjxAnz3Uc boo72XdHnTQSjQzyKQpbvrwKnx/XY08BSriS X-Received: by 2002:adf:fbc6:0:b0:2c5:54a7:3630 with SMTP id d6-20020adffbc6000000b002c554a73630mr21491287wrs.46.1677506783493; Mon, 27 Feb 2023 06:06:23 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id x6-20020adff646000000b002c56046a3b5sm7050207wrp.53.2023.02.27.06.06.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 055/126] hw/isa/i82378: Remove intermediate IRQ forwarder Date: Mon, 27 Feb 2023 15:01:02 +0100 Message-Id: <20230227140213.35084-46-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=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 From: Philippe Mathieu-Daudé When the i82378 model was added in commit a04ff940974 ("prep: Add i82378 PCI-to-ISA bridge emulation") the i8259 model was not yet QOM'ified. This happened later in commit 747c70af78f ("i8259: Convert to qdev"). Directly dispatch ISA IRQs to 'cpu_intr' output IRQ by removing the intermediate i82378_request_out0_irq() handler. Rename ISA IRQs array as 'isa_irqs_in' to emphasize these are input IRQs. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230210163744.32182-4-philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/i82378.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index 84ce761f5f..d32653369d 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -33,7 +33,7 @@ struct I82378State { PCIDevice parent_obj; qemu_irq cpu_intr; - qemu_irq *i8259; + qemu_irq *isa_irqs_in; MemoryRegion io; }; @@ -47,18 +47,12 @@ static const VMStateDescription vmstate_i82378 = { }, }; -static void i82378_request_out0_irq(void *opaque, int irq, int level) -{ - I82378State *s = opaque; - qemu_set_irq(s->cpu_intr, level); -} - static void i82378_request_pic_irq(void *opaque, int irq, int level) { DeviceState *dev = opaque; I82378State *s = I82378(dev); - qemu_set_irq(s->i8259[irq], level); + qemu_set_irq(s->isa_irqs_in[irq], level); } static void i82378_realize(PCIDevice *pci, Error **errp) @@ -94,9 +88,8 @@ static void i82378_realize(PCIDevice *pci, Error **errp) */ /* 2 82C59 (irq) */ - s->i8259 = i8259_init(isabus, - qemu_allocate_irq(i82378_request_out0_irq, s, 0)); - isa_bus_irqs(isabus, s->i8259); + s->isa_irqs_in = i8259_init(isabus, s->cpu_intr); + isa_bus_irqs(isabus, s->isa_irqs_in); /* 1 82C54 (pit) */ pit = i8254_pit_init(isabus, 0x40, 0, NULL); From patchwork Mon Feb 27 14:01:03 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: 657060 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2379091wrb; Mon, 27 Feb 2023 06:24:11 -0800 (PST) X-Google-Smtp-Source: AK7set8ADac/OKF/IA0nacsWZgw9XzNkZdHSuoCjc5+BQXX9mtdeFK4Eq6MS5YGTc7htIqe4/gQ8 X-Received: by 2002:a05:622a:1306:b0:3bf:a9bf:9523 with SMTP id v6-20020a05622a130600b003bfa9bf9523mr17339142qtk.17.1677507851320; Mon, 27 Feb 2023 06:24:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507851; cv=none; d=google.com; s=arc-20160816; b=liH1LcLqgJX/YVy43GUXbmWUHbQL8vBf64b8ndikpVCOtTIrI72zyzqwOGqBXQesMJ RVzBvkSQsJeEIgCeANKN9u4fykd3Bq6V3BklDQPNT9gliCNW544uxo/pGpARRrFfaxiX KaZNUqqZmanW5v3JURXyRoQidfSs8iH+a+a8tP7Rdis9QvOxUs5+ZIgq8IMI8wdbs3mO hAVnGc8jCmDvypH1Ealpb5N6tvgIjlax/fNfQRpc6kNWhrRVdlo9sTazVk1OA45lhNxr JZrKXmGeYG30SQGgpjjQVub6xEueSgFNjgrwxfnTmsmt0cGqksrcNAUjLDZsFVn8ooic KPZg== 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:to:from :dkim-signature; bh=aGiQ03h5DQob+9swZAW1Hsx6uEGDUvSbCmNrFqjMJNA=; b=OwYbTV5anRCUEfy1HEf8J9oXF8So8yGM+arFuhU4eEAqgRMhJiMBLBQSgh2eB8fRTE hXwIv1w195/yY9hjnELmbUA2NPc9rjit4coM5TvQCnzZJvbkptlY+m2dEsAfgaa4MSFB rIfZzFExER965WBF5RtniN9SFyFmoeVgwRW0FG1ntopRCK9o0hKFTGSDbkAGvAKtxM+x N3bWi6vAP46m2o8v8MT7uAWc9fyjbiCxG60c6aE7lftAtBjTi/Gm2TmUzbzFEaju0Bjv eyuv+UNLZud06LrnzcGFKNBaHPPSB3SQc7QAk57T+JpTvL9smCV5yj2pUoYCV+VvHfJB ht5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=k54x9Rfx; 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 x9-20020a05620a258900b006fa124531c0si6533781qko.205.2023.02.27.06.24.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:24:11 -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=k54x9Rfx; 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 1pWe9B-0006CA-EC; Mon, 27 Feb 2023 09:06:33 -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 1pWe99-00061j-IO for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:31 -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 1pWe97-00082r-Uc for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:31 -0500 Received: by mail-wm1-x32f.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so7231236wmb.5 for ; Mon, 27 Feb 2023 06:06:29 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=aGiQ03h5DQob+9swZAW1Hsx6uEGDUvSbCmNrFqjMJNA=; b=k54x9RfxpUwwuABj9e2b1EhzkhnXWpZVtP8scRUJERndDNllaDI/06DbNYQhahwEvX P9sGHi4bdRRZDM6+IRgiIL0ZNWr7QZeNYnqtyj+IgrMEGLZZowIKv3m9MMtd6upEfz3+ dFUXFX4ysxDNSeD+10g+QWOMhU3pS82s1LlBezWiFzZws4LwSgRKMucEX3RvUBV/SyGp fPd5n+za7VKP6NmMksdT4mEsnaBx6M/j5ndTIvSj1Ae8YvFE17gUA2md/KK1t/3ze6jS Fdu7YZt+D9YgaKyV0K9vJA+EhzSS59QvybyhBweKeAW11iawhFV/E3cZ9weQFpnpH9wn ue6g== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aGiQ03h5DQob+9swZAW1Hsx6uEGDUvSbCmNrFqjMJNA=; b=4OVgoyYiWWa7BSQsSX6vSmIoeL1GsXqf310IYai7BAl/i0ahgSYH/NcJ2fgt26z2ud Ka+OXTjCa219BpgFuBCKkfTbtMAU2iTPoU+TDb/sKnRqwYfB4iSEARSKzjx2G+BHyqA4 9YmSe8gSHul06XocoBTY6w8AxjphcbeYmRFG7nho0k3OQpuhw9f2HREfxNVay6kg5dHb OShMUNOYeGtmxoNZSjaG+eKAT1lqv7lpGi97nDPLl94Xc5lSYw8fbjLowVOk75KT9LYm TKEDkNoN+RZthpb71DyzYZbhUBRjzMmcSPMTxYyrnLNpP4IsXkiRRn+eRPJ8uLRIWWBf xY9g== X-Gm-Message-State: AO0yUKVkZAn/JED5NHX0SbIYMHOsd+CdodheH0c2fUY9jWM2BqZikJDG DhyqKfJz9KIPDcYHyhL1rGMEpdsdClXgNjFi X-Received: by 2002:a05:600c:4d18:b0:3ea:e554:7811 with SMTP id u24-20020a05600c4d1800b003eae5547811mr9932833wmp.10.1677506789011; Mon, 27 Feb 2023 06:06:29 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l4-20020a05600c1d0400b003db0ad636d1sm14620759wms.28.2023.02.27.06.06.28 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 056/126] hw/isa/vt82c686: Remove intermediate IRQ forwarder Date: Mon, 27 Feb 2023 15:01:03 +0100 Message-Id: <20230227140213.35084-47-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-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=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 From: Philippe Mathieu-Daudé Directly dispatch ISA IRQs to 'cpu_intr' output IRQ by removing the intermediate via_isa_request_i8259_irq() handler. Rename ISA IRQs array as 'isa_irqs_in' to emphasize these are input IRQs. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230210163744.32182-5-philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/vt82c686.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 3f9bd0c04d..a913a509f7 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -548,7 +548,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(ViaISAState, VIA_ISA) struct ViaISAState { PCIDevice dev; qemu_irq cpu_intr; - qemu_irq *isa_irqs; + qemu_irq *isa_irqs_in; ViaSuperIOState via_sio; RTCState rtc; PCIIDEState ide; @@ -595,13 +595,7 @@ static const TypeInfo via_isa_info = { void via_isa_set_irq(PCIDevice *d, int n, int level) { ViaISAState *s = VIA_ISA(d); - qemu_set_irq(s->isa_irqs[n], level); -} - -static void via_isa_request_i8259_irq(void *opaque, int irq, int level) -{ - ViaISAState *s = opaque; - qemu_set_irq(s->cpu_intr, level); + qemu_set_irq(s->isa_irqs_in[n], level); } static void via_isa_realize(PCIDevice *d, Error **errp) @@ -609,12 +603,10 @@ static void via_isa_realize(PCIDevice *d, Error **errp) ViaISAState *s = VIA_ISA(d); DeviceState *dev = DEVICE(d); PCIBus *pci_bus = pci_get_bus(d); - qemu_irq *isa_irq; ISABus *isa_bus; int i; qdev_init_gpio_out(dev, &s->cpu_intr, 1); - isa_irq = qemu_allocate_irqs(via_isa_request_i8259_irq, s, 1); isa_bus = isa_bus_new(dev, pci_address_space(d), pci_address_space_io(d), errp); @@ -622,8 +614,8 @@ static void via_isa_realize(PCIDevice *d, Error **errp) return; } - s->isa_irqs = i8259_init(isa_bus, *isa_irq); - isa_bus_irqs(isa_bus, s->isa_irqs); + s->isa_irqs_in = i8259_init(isa_bus, s->cpu_intr); + isa_bus_irqs(isa_bus, s->isa_irqs_in); i8254_pit_init(isa_bus, 0x40, 0, NULL); i8257_dma_init(isa_bus, 0); From patchwork Mon Feb 27 14:01: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: 657040 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2375747wrb; Mon, 27 Feb 2023 06:17:35 -0800 (PST) X-Google-Smtp-Source: AK7set/wwFEV/Y8gwQRCf8gk73oNVVFszkRBmkIsdIas660S5OzaKUE/635Ye9pG+AYl8S5VEeOG X-Received: by 2002:ac8:7e93:0:b0:3b8:6bab:1e4d with SMTP id w19-20020ac87e93000000b003b86bab1e4dmr47374032qtj.51.1677507455098; Mon, 27 Feb 2023 06:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507455; cv=none; d=google.com; s=arc-20160816; b=vk1RW+zTkTaax+auMG+gHKJ5HOhSwJm+xrQ3Rt3tR9Pkz4qflN6dvkXsyU27wM0j+5 D27Ts6LpCJcMQbhZj53KUG4tcTl7Zb/ynIIIByB+NKTLzsOmXuJn8ng6026N8yDBaHiD NkkNmLCvHhYa4gVqh+YD1kGO6ZPAeHXkZ7OGG60kc9bu8dOXJHDY4IbrIJ1mz8M/xXUV 2KB2klSR3DY9Kq4VN8LbxZGrUHfsdRDOnRC/rKexEJ12bSZ6TKZmP7dSfJDAlepMQfzU tCIMC+48IY+fr0N0Vzt5IXpXdZ+MH5odpZKH75lZFaEzbiPbkShIgPVr5YP0WtNHLWID mg7A== 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:to:from :dkim-signature; bh=Q/xrOXMKPfn2DHZUd+WXP9zhpBMTCb7v9IEh47K/bAI=; b=mvykENlhzn5bEyXpPjtVeBDzbqwHz0TVFjUwOq5UNIdZMvEG5z1fTorpBAvjZlF9T5 FqPA8OE57gvPEnTPOXSs5/9ohTNhX3U14BohFxvorcxwzry1QDzyFEa998DkusWFCcUa Jy0WpWGvamS00YFjW/mxcQUtOCxEUOXFb6ooGFWMpNcr+DDfGke+Wwdk4P2nO5xKMSIT 3q/roKb3JEF+6/tmL3RNUd+VzkrKiO3NxfGUjTGP+ZxZRR8NZXkVhMSaQzgpavU7JNiu M2bW4AusGVDln9H72MhKwbVvzT74BEc0QvpeQzNxJ/W6D1Bmd1wuFZVdLRLn8/QhjSDG 3cYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=npOs5E9s; 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 y4-20020a05620a25c400b007429a91bb72si4456878qko.737.2023.02.27.06.17.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:17:35 -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=npOs5E9s; 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 1pWe9L-0006Tw-I2; Mon, 27 Feb 2023 09:06:43 -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 1pWe9F-0006Ki-RC for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:38 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe9E-00009N-9D for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:37 -0500 Received: by mail-wm1-x334.google.com with SMTP id l7-20020a05600c4f0700b003e79fa98ce1so3911399wmq.2 for ; Mon, 27 Feb 2023 06:06:35 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Q/xrOXMKPfn2DHZUd+WXP9zhpBMTCb7v9IEh47K/bAI=; b=npOs5E9s8c7pR8As3Y1bvw5uMxrCHZxLzXoC6UtU1twZMTvNZtpQIMlgZQbkNJiush DlxZL64ZAKqOIZhtIF6bJf3oAHxwREAlRPp7OYlQIQU1mu8LUmJF+UeWL5YfDhE75rsd H2nYKlISoe71gV7Ikj8S5cNe3w3wp67gc3isllQOw553bn08ogvCmyCTlKbE9RyusF6M gqb+KHlPesJFyplbWnmDHjt933kczpIyTuUd8+nRLmILPMj8+x4WssZ0kAEhZPvMbB2W rmFhzGEEPWvEEQYgDKEtJx/pqPa2WkRWpgH1HPc2ZcgxhEXCUn6dHOh+0aaPk0vEOqJd fqtQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q/xrOXMKPfn2DHZUd+WXP9zhpBMTCb7v9IEh47K/bAI=; b=DtrkxY03e49oJssUDQA9M90DuB492m2A1ULGgKBpEzAbcG5AcY9aeU9mkQb8poLJ1t GrGaqKAFBaIaKY7ADicFaDB/phVu/uRs5C+l4Y9Ssflwn+/5w7DrKBCldxY6Bx7S99MF NQNRJn2v2lUY7kjkomSahWCO35cpGUXjSzCKw3BCkza9w7slYJu9BZkcliMQla0oqxO3 uL66RxUhgBsnzYFk+G+M0ZBuHr0TvJFKV6VEOqZzQE/9ypsaJzMUzoLy2+QTEYE7024P CymobxZAqJSmmiArvSSMCiSlBOtpbU2R3oWphZcqs6taDcqQXHUhyUS9ET0N/EHJkyOF ZJnw== X-Gm-Message-State: AO0yUKWqbbUeAdCeXDMFtnemP4xuKiTe30aheKjIj2XUybHeJpCMHhqT woTL0l3XomNf7mf40hBhOg5zSl7ohFp4JzFH X-Received: by 2002:a05:600c:3416:b0:3eb:3cc9:9f85 with SMTP id y22-20020a05600c341600b003eb3cc99f85mr4227561wmp.26.1677506794278; Mon, 27 Feb 2023 06:06:34 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m7-20020adfe947000000b002c70f5627d5sm7084671wrn.63.2023.02.27.06.06.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 057/126] hw/sparc64/sun4u: Keep reference to ISA input IRQs in EbusState Date: Mon, 27 Feb 2023 15:01:04 +0100 Message-Id: <20230227140213.35084-48-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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=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 Keep reference to ISA input IRQs in EbusState. To emphasize input/output distinction, rename arrays as isa_irqs_in / isa_irqs_out. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230210163744.32182-7-philmd@linaro.org> --- hw/sparc64/sun4u.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 387181ff77..8fe47e2c22 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -84,7 +84,8 @@ struct EbusState { PCIDevice parent_obj; ISABus *isa_bus; - qemu_irq isa_bus_irqs[ISA_NUM_IRQS]; + qemu_irq *isa_irqs_in; + qemu_irq isa_irqs_out[ISA_NUM_IRQS]; uint64_t console_serial_base; MemoryRegion bar0; MemoryRegion bar1; @@ -287,7 +288,7 @@ static const TypeInfo power_info = { static void ebus_isa_irq_handler(void *opaque, int n, int level) { EbusState *s = EBUS(opaque); - qemu_irq irq = s->isa_bus_irqs[n]; + qemu_irq irq = s->isa_irqs_out[n]; /* Pass ISA bus IRQs onto their gpio equivalent */ trace_ebus_isa_irq_handler(n, level); @@ -303,7 +304,6 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp) ISADevice *isa_dev; SysBusDevice *sbd; DeviceState *dev; - qemu_irq *isa_irq; DriveInfo *fd[MAX_FD]; int i; @@ -315,9 +315,9 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp) } /* ISA bus */ - isa_irq = qemu_allocate_irqs(ebus_isa_irq_handler, s, ISA_NUM_IRQS); - isa_bus_irqs(s->isa_bus, isa_irq); - qdev_init_gpio_out_named(DEVICE(s), s->isa_bus_irqs, "isa-irq", + s->isa_irqs_in = qemu_allocate_irqs(ebus_isa_irq_handler, s, ISA_NUM_IRQS); + isa_bus_irqs(s->isa_bus, s->isa_irqs_in); + qdev_init_gpio_out_named(DEVICE(s), s->isa_irqs_out, "isa-irq", ISA_NUM_IRQS); /* Serial ports */ From patchwork Mon Feb 27 14:01:05 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: 657078 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381143wrb; Mon, 27 Feb 2023 06:28:26 -0800 (PST) X-Google-Smtp-Source: AK7set/fxkbzAWb4gLieix2BemtFh4kK70qDhvIESCc7stDu5vB1TF17ISDhkCH8qXvjkd5ZthwP X-Received: by 2002:a05:622a:493:b0:3bf:ced2:2ad with SMTP id p19-20020a05622a049300b003bfced202admr10824804qtx.19.1677508105868; Mon, 27 Feb 2023 06:28:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508105; cv=none; d=google.com; s=arc-20160816; b=fAGv+S0oLUUEi/3s7H59XqyV7uRHsrTLq46e9TeCn1pJkscgICkgXZa5uMxLGiXqC4 jziK/JcbanERlfRB5t1FDRf0orMehaLriKPZ/yLMVWp91dK9E7KKxaLmBFTOEQa3J/Mj 20KuUxNTvR/jtBoBx8C2TM4rMVC8J0x+lS6dt2JmfSGo//eeYTSuW7zHPzF1eW37i+cU NoRj8Z42BDn8m4nURQ/0pbldqnU7ooGjZ8qYGEPfaRut/N9EMtB8QmsFrt7Ukp2w5Zma We4CtJLN7eYWq4Zr45sQfTVwGJzkgGojExLgC8myaKRUpFTat7RLmEjPqWKMAHFVBG+v ZgVA== 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:to:from :dkim-signature; bh=RTRtgDksnMT+B/aM1t2yk3AWqylUm8qIOLRO646lQk0=; b=dM7OkA5g9Q4SN0B/dsSYERWo7oYYmjQ0YsvCjfymgHWbA0xjIhZwsjR8c8sw+SFCNi uxEOWtyW7X/c/xXGikGMevX4t8AOjf2yyYkfqaYMciHSqjGhrBgRwT7rmffcDWok3lBM eP+2Fsn5N2t4smoYhDMdizvyIUS5OvM/bw6bi4grcNKU/B8TYtVVR3DV/Jk/R2r8/zQI AOB2fB/hk1FpADp9kG8cqv1XJnwREjUHF9rNQeCoMueb7GtkKg/KrGK5DsA0kjimwQkJ W4D6iVOwMl3aUcTK/4PTMxY/UgNfT2YAUEMzXeCP0UPGy2PRBUrBHSOMBmNpHc8p+wMX fmMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="O6e/HmWz"; 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 l1-20020a05622a174100b003bfc28e414fsi7106501qtk.687.2023.02.27.06.28.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28:25 -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="O6e/HmWz"; 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 1pWe9M-0006Zx-F1; Mon, 27 Feb 2023 09:06:44 -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 1pWe9K-0006Sy-P9 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:42 -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 1pWe9I-0000Aj-Tq for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:42 -0500 Received: by mail-wm1-x32f.google.com with SMTP id r19-20020a05600c459300b003eb3e2a5e7bso2263791wmo.0 for ; Mon, 27 Feb 2023 06:06:40 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=RTRtgDksnMT+B/aM1t2yk3AWqylUm8qIOLRO646lQk0=; b=O6e/HmWzPwB+SZrfQwIrCEKvLelVPNyPMANr81I1m2nytFbLckBaFJtdsAj1xM8FBV vfDFKwtaDApxVd4dhx5zL5VnLLIUr/o7aIvcGzVQ4IoLlyySK1soVYvhu75gesh1wMh+ QkFOkTaFLeSy4EjnzB2p1YY5DG1QfloPYWgakUuq2ew+w87EBAgp5YtAWWNUhI447zWj Sapy75QkB2kUcEhaNL7pxZj/STxNsiCuy0t391G5UwAqSXZRnIRsXAadsoatEJvgBCGp Bj+AsbaV7Ucd0AuwP8I2d9uha2V7IvmHT67eoNXGm/C/Hjfv0ec/xiEHPgmcCdTS5Tk7 slUg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RTRtgDksnMT+B/aM1t2yk3AWqylUm8qIOLRO646lQk0=; b=BU7lccc/vhTfaiGXIdljHZGxNuxDJ6GmZMU/FA8X4+3kkwPIq/zK/aMFCOzHU4qkK8 wypd6Z0zMSrezyGVZZqujhU1h+ESGo1yB7m21S73qiuJA4+b9JxJxhL82ULAHrNfIu5X 0g93QkvEzGoy8sN5Jf2oCq94NDEMkQKqkwEi1HGn3NtIpK4u4jpw9Fa631lB3osprjOC moVl3B3+csQpO84NmqBCQxzn7jMNalIhNEiuua14fcYfS97AGpZuxF5ngKRtLl2uFd8r 2teHSGTjVDk/rRF8zqW+X94gGSDvPJaZHWsbb6iUjGYO9k2pQUq9R/CbU6CpOkNRLmF+ ecwQ== X-Gm-Message-State: AO0yUKUnE7VDFlWGQhLOmnW5J+6RHRqyOkzoob6R/qZ8vWVQ1AUKkOEo GwIZa1LIt/pPKTz/3onexroECkC/3+v1P48o X-Received: by 2002:a05:600c:492f:b0:3e2:6ec:7fbe with SMTP id f47-20020a05600c492f00b003e206ec7fbemr18220269wmp.40.1677506799472; Mon, 27 Feb 2023 06:06:39 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p20-20020a05600c359400b003daf7721bb3sm13710134wmq.12.2023.02.27.06.06.38 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 058/126] hw/isa: Remove empty ISADeviceClass structure Date: Mon, 27 Feb 2023 15:01:05 +0100 Message-Id: <20230227140213.35084-49-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-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=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 ISADeviceClass is an empty class and just increase code complexity. Remove it, directly embedding DeviceClass in classes expanding TYPE_ISA_DEVICE. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bernhard Beschow Message-Id: <20230215161641.32663-19-philmd@linaro.org> --- hw/isa/isa-bus.c | 1 - hw/rtc/m48t59-isa.c | 2 +- include/hw/isa/i8259_internal.h | 2 +- include/hw/isa/isa.h | 6 +----- include/hw/isa/superio.h | 2 +- include/hw/timer/i8254_internal.h | 2 +- 6 files changed, 5 insertions(+), 10 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index f155b80010..845686cb12 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -213,7 +213,6 @@ static const TypeInfo isa_device_type_info = { .parent = TYPE_DEVICE, .instance_size = sizeof(ISADevice), .abstract = true, - .class_size = sizeof(ISADeviceClass), .class_init = isa_device_class_init, }; diff --git a/hw/rtc/m48t59-isa.c b/hw/rtc/m48t59-isa.c index e61f7ec370..5bb46f2383 100644 --- a/hw/rtc/m48t59-isa.c +++ b/hw/rtc/m48t59-isa.c @@ -47,7 +47,7 @@ struct M48txxISAState { }; struct M48txxISADeviceClass { - ISADeviceClass parent_class; + DeviceClass parent_class; M48txxInfo info; }; diff --git a/include/hw/isa/i8259_internal.h b/include/hw/isa/i8259_internal.h index d272d879fb..155b098452 100644 --- a/include/hw/isa/i8259_internal.h +++ b/include/hw/isa/i8259_internal.h @@ -35,7 +35,7 @@ OBJECT_DECLARE_TYPE(PICCommonState, PICCommonClass, PIC_COMMON) struct PICCommonClass { - ISADeviceClass parent_class; + DeviceClass parent_class; void (*pre_save)(PICCommonState *s); void (*post_load)(PICCommonState *s); diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 25acd5c34c..7195bfb96c 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -11,7 +11,7 @@ #define ISA_NUM_IRQS 16 #define TYPE_ISA_DEVICE "isa-device" -OBJECT_DECLARE_TYPE(ISADevice, ISADeviceClass, ISA_DEVICE) +OBJECT_DECLARE_SIMPLE_TYPE(ISADevice, ISA_DEVICE) #define TYPE_ISA_BUS "ISA" OBJECT_DECLARE_SIMPLE_TYPE(ISABus, ISA_BUS) @@ -48,10 +48,6 @@ struct IsaDmaClass { void *opaque); }; -struct ISADeviceClass { - DeviceClass parent_class; -}; - struct ISABus { /*< private >*/ BusState parent_obj; diff --git a/include/hw/isa/superio.h b/include/hw/isa/superio.h index b9f5c19155..0dc45104d4 100644 --- a/include/hw/isa/superio.h +++ b/include/hw/isa/superio.h @@ -44,7 +44,7 @@ typedef struct ISASuperIOFuncs { struct ISASuperIOClass { /*< private >*/ - ISADeviceClass parent_class; + DeviceClass parent_class; /*< public >*/ DeviceRealize parent_realize; diff --git a/include/hw/timer/i8254_internal.h b/include/hw/timer/i8254_internal.h index a9a600d941..1761deb4cf 100644 --- a/include/hw/timer/i8254_internal.h +++ b/include/hw/timer/i8254_internal.h @@ -58,7 +58,7 @@ struct PITCommonState { }; struct PITCommonClass { - ISADeviceClass parent_class; + DeviceClass parent_class; void (*set_channel_gate)(PITCommonState *s, PITChannelState *sc, int val); void (*get_channel_info)(PITCommonState *s, PITChannelState *sc, From patchwork Mon Feb 27 14:01:06 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: 657085 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2382311wrb; Mon, 27 Feb 2023 06:30:45 -0800 (PST) X-Google-Smtp-Source: AK7set/BFoZfn0iqXvbTcFVasUp8dFUBKdpb2OB2uf5MQz9ouxIVYcLLGWWQg4K+GC5XTe487fgX X-Received: by 2002:a05:6870:5686:b0:16f:263d:6f3c with SMTP id p6-20020a056870568600b0016f263d6f3cmr20228435oao.32.1677508244858; Mon, 27 Feb 2023 06:30:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508244; cv=none; d=google.com; s=arc-20160816; b=B1VE4QonxVcrhodmzUjgXNn0/YxWiZ7oHf/BQDNrBkptL+z52NbI4hh+9y824Y3vUQ swXES3GExQDgoWCfeIklWPx51wZUUIpMIr4VjbWPfU3vNTpxiEtV21ZPodYbIap3RsSb 1BA9y1lPCD5PGKtz4acGfJtcGxn2fQy4Ds0DnTRu62uxmfD+cvxfVW3lBJY/elHxZ0Sv JyoXJ2hMoiednNxqw9Jy6Gu0ZMHeBqwvX3wwmJXYK/39ny+5zOU/eEMyspimMBeTTFeZ NAnpSWExtcfnft/HKmYs8TF++kBF8TOcqHXljmzCfPm+nZccqVmUBjCMaUWi3usZN/Rg ysZw== 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:to:from :dkim-signature; bh=kei66XFAQeNAInQ8LiWStrDU7P2WNcF9VLRH7Ag0OZQ=; b=aw6s7KknuVOJlOjEAjpWvQJQZmiqAxAeGBKmRWCRL2pu1zgEL0JFmFAWlWD6WQioSc 317V9XfFGx2f4Ee/gVOouQBDUoGBzpRd94B2WQlB7uHSA0scfQ0PUOGPZLmEsdJYkP2B hUNaCRlQNRtTxxXqwTn+hchRuqwIDwD0ugl20Z5jwHwhM9NdIigLkVvshwPij/mZECQL 44MGSOK6pkt7MiLK172h5Mu8euOrwuDMyg84z0YBz8TcXPVfFRmsK7NPAqw/hFWeaxh+ O7w/7jw5duBtpGzKdUwxE3nSsGs/aXneDw1NlxTkfrGEvRW1play0OMERN34TUtU4Jze GkxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=czKZFykf; 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 29-20020a05620a049d00b0073bb1f626a0si5847232qkr.117.2023.02.27.06.30.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:30:44 -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=czKZFykf; 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 1pWe9V-0006zs-LC; Mon, 27 Feb 2023 09:06:53 -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 1pWe9Q-0006sl-8I for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:48 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe9O-0000D1-IP for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:47 -0500 Received: by mail-wm1-x32a.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so7261471wms.2 for ; Mon, 27 Feb 2023 06:06:46 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kei66XFAQeNAInQ8LiWStrDU7P2WNcF9VLRH7Ag0OZQ=; b=czKZFykfWWwDIElRiKIqXCd2i44ejpQ52ibcHcPKMphz6f1WWugrHyW1gr2iDssf5+ HJW7axmlJusMfgyIZgF0eeouey+uF5WJ2KyiGDMdsF2i4oRbTekJpdzWurOufpOuhqr8 3qoMfUSnQ496zIhLnXV19umGOcqsK84P+kRSn0P8JwxesL0DyqGtRsgXyvNFVhTM3XgL auWP3ejbiQW5IiIIqFP7d7dO32C66G6AFYPsGMtxO1QhXJMn7lPR8RjhTLRENbnORRNZ XJa7Fs+TQqxk3bZgpqji5grvOHijgzLxFeuSHCaey0Dv8parXbgU9pelVzGnJiwJlUep IZeQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kei66XFAQeNAInQ8LiWStrDU7P2WNcF9VLRH7Ag0OZQ=; b=kwwkBCZpNKsjSNZthHfUCG7nXo3uX8bQH+Oy/bQqmvwVg0j6bCDslpDoCg7F5IML4f hUS3ZiKHMBhAVdQlxwi0jk1fyYkFfytuqWr8rVzl7uTeBH7h1pwA+8RPV+2jbC16I/eM u5V9LaUWfwoNKwxJ1ZyDVnSX/AWNESBi9SjWgCEmZVzUvry0zQUWRBKq4/bZGvb2r/Ko OXXlzR2Uh8kwgM3bMcYbsoLKH8vhfIUCY6OV5QHoiyJti6PX6LUNl50UhBPhgE8zqW9a 3FnBI1WvKJCGiTQf9UEQLrcd4bndOsafNXqpOtb2LPYKkhqWgPm6lo5tf2MEraYMAiT7 gWnA== X-Gm-Message-State: AO0yUKXivbJdv5+PEcyKhVek4IqIKLR634MLXD1gKIkGsst3cvrzrpTX MAm9j3FrsqCzpbvzsBL6sfDLhA0UHh18gAjG X-Received: by 2002:a05:600c:251:b0:3ea:f73e:9d8a with SMTP id 17-20020a05600c025100b003eaf73e9d8amr11397617wmj.30.1677506805020; Mon, 27 Feb 2023 06:06:45 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j14-20020a5d464e000000b002c558869934sm7288427wrs.81.2023.02.27.06.06.44 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 059/126] hw/isa: Reorder to separate ISABus* vs ISADevice* functions Date: Mon, 27 Feb 2023 15:01:06 +0100 Message-Id: <20230227140213.35084-50-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 Separate functions taking an ISABus* argument versus functions taking a ISADevice* one. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230210163744.32182-8-philmd@linaro.org> --- include/hw/isa/isa.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 7195bfb96c..34fa8977e9 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -70,12 +70,8 @@ struct ISADevice { ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space, MemoryRegion *address_space_io, Error **errp); void isa_bus_irqs(ISABus *bus, qemu_irq *irqs); -qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq); -void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq); void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16); IsaDma *isa_get_dma(ISABus *bus, int nchan); -MemoryRegion *isa_address_space(ISADevice *dev); -MemoryRegion *isa_address_space_io(ISADevice *dev); ISADevice *isa_new(const char *name); ISADevice *isa_try_new(const char *name); bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp); @@ -83,6 +79,11 @@ ISADevice *isa_create_simple(ISABus *bus, const char *name); ISADevice *isa_vga_init(ISABus *bus); +qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq); +void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq); +MemoryRegion *isa_address_space(ISADevice *dev); +MemoryRegion *isa_address_space_io(ISADevice *dev); + /** * isa_register_ioport: Install an I/O port region on the ISA bus. * From patchwork Mon Feb 27 14:01:07 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: 657087 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2382857wrb; Mon, 27 Feb 2023 06:31:42 -0800 (PST) X-Google-Smtp-Source: AK7set8LHWpbSjvJMS2fMsmM7XleLo6BbOv7fHp8BBP54etQ0Bss/GJejGelBBC/Yvde4nrA04Tn X-Received: by 2002:ac8:5dc9:0:b0:3bf:bb09:28ca with SMTP id e9-20020ac85dc9000000b003bfbb0928camr18730469qtx.18.1677508302061; Mon, 27 Feb 2023 06:31:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508302; cv=none; d=google.com; s=arc-20160816; b=F6V5PHJthG0gFb1j+i/n80c19jbiXZMs5yLsLEC79x0GmytRkTzLJBbVjWmguiUKTM huFUr/S6Rg9QbvKDXS7Jln4V1UagX+g0zsyLEIAatrhYGOJCPqWXcahnvscKxYqq227r lf85lHYh1EhSIGYY3xDtUBe74kcfh9bM6nTy1YGKZ0v5PNxzgPTx65tgQ/3Obpa06oCv DtmqKNn17ijFndVKygOrWx4XrykCMivuQMOMVVdA29iV4vCSN1PrvmrwYIsefckTx4bE RFdIqvXDNCrtswPLfr9y3grBPqdO3J4iNuvBz0vojZmIBg1EeRsH8gJeuKTMx8VQKD8J Emhg== 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:to:from :dkim-signature; bh=PZo3682M7EwepHbREv9enem8cosk7pXWG1PM7HlrsYo=; b=reXWZkx2jDCFJ3eRKN2CMJo6vTHTNL1vXgeGPOOcZ36ZQy5SUHBRyJ8RIK12oSge6X IxO23VwPNjo5H3/W2wmk+j/ZdFT9HbmtljP63o9K6sOZFeCeyVN6V5HitYNjyR4Co00E 8+3gj8Ej3FNIHby9ZwUFlOaIJz0qMD8UOq1ooARX/in+JHDWdCl6S+bdv6QXLU4kver+ fmoWbCdaUhURZ3Riy4nY0TvXk9yMS4wYRC0lBrM2O7fs3NXt41fr0GSLv06OrDKum99e //tF+emV13CFlTh3pI/DVE6f1B1hJC3hRuxU2NvC7BPE8P1DaBMAwMN43VVbQwZp/Igb +ePQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ks4WknWP; 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 br40-20020a05620a462800b007426f039479si6385750qkb.294.2023.02.27.06.31.41 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:31:42 -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=Ks4WknWP; 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 1pWe9Z-0007Td-PF; Mon, 27 Feb 2023 09:06:57 -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 1pWe9X-0007Jr-EJ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:55 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe9V-0000Dd-E4 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:06:54 -0500 Received: by mail-wr1-x434.google.com with SMTP id t15so6351833wrz.7 for ; Mon, 27 Feb 2023 06:06:51 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=PZo3682M7EwepHbREv9enem8cosk7pXWG1PM7HlrsYo=; b=Ks4WknWPZGe2FdFhXgH3OoocOs56ovZjVwELGPfF71QChumsyGUo/WA0xGlLvC8zP3 xI1Lu3/fXYNSiBa/LaJAw8rgB9xwJ2Qc0N9fIqvPjMx3EArKWMEv0IpPOy9/JzWJwqqx 60UCAz96Ac4t3Ab5qstqq4mydKgoYwZhMgOCuK1R/3AqnQSLUIOpakNP9DQBOCxmXgo9 WdwLoDwixUWrXGtCWNXFTNlj/V65Pq0zlFG7TzZsixXGH7rxF4AxX0FvmQpNXGD/vqPr y62QeEKU/clAvdnxjkAmT2QWH54sdfRCmH92vdl5avneiwvkYXyVKJ8ndE2hQqgZ8MOY RHeQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PZo3682M7EwepHbREv9enem8cosk7pXWG1PM7HlrsYo=; b=KoKTDj40jh/b3HkwMj1lrohofOZDNi/tsF+ligbDHy37CrQKPOPX0STm8MpuvjqLxZ 9XAdxRDef7ZoQasVotRmdaHdECGJv/QOk5qmw/DFgsDgz8TxCCUtyw2oOqEn2Vl7j7Qs RG5pEI9Jw5y7fxjvMIHOi1tsn2iISXlS+cUA/DZe0HxwTSxj8YyyDONC0F6eLMDPduKv M5DsOKvo60Ooqo/SfGyhd7whzWz5osG01D6I2GAoCXffDqcn89k0gZU3O6uvokzCvlOK uCO58hyTJTKq85bJWZTfQpie2xYYXzbLhfzKLYIcio8BBPpGKUjRJHrbv2UTwnSlxw95 bGgg== X-Gm-Message-State: AO0yUKVSue9X0P0h2wEsDOQ2+2ksqHxaN93qHQV5ZY2yxhVQWN4kGgmY YCwfTVtixDMC4SUTv6ayROPZ0KwhGFcc8tfW X-Received: by 2002:a05:6000:1005:b0:2c9:97f8:2604 with SMTP id a5-20020a056000100500b002c997f82604mr5485344wrx.14.1677506809901; Mon, 27 Feb 2023 06:06:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m9-20020a05600c4f4900b003dec22de1b1sm9988365wmq.10.2023.02.27.06.06.49 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 060/126] hw/isa: Un-inline isa_bus_from_device() Date: Mon, 27 Feb 2023 15:01:07 +0100 Message-Id: <20230227140213.35084-51-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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=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 No point in inlining isa_bus_from_device() which is only used at device realization time. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230210163744.32182-9-philmd@linaro.org> Reviewed-by: Bernhard Beschow --- hw/isa/isa-bus.c | 5 +++++ include/hw/isa/isa.h | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 845686cb12..2464357971 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -164,6 +164,11 @@ bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp) return qdev_realize_and_unref(&dev->parent_obj, &bus->parent_obj, errp); } +ISABus *isa_bus_from_device(ISADevice *dev) +{ + return ISA_BUS(qdev_get_parent_bus(DEVICE(dev))); +} + ISADevice *isa_vga_init(ISABus *bus) { vga_interface_created = true; diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 34fa8977e9..1d3ffec4de 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -83,6 +83,7 @@ qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq); void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq); MemoryRegion *isa_address_space(ISADevice *dev); MemoryRegion *isa_address_space_io(ISADevice *dev); +ISABus *isa_bus_from_device(ISADevice *dev); /** * isa_register_ioport: Install an I/O port region on the ISA bus. @@ -120,9 +121,4 @@ int isa_register_portio_list(ISADevice *dev, const MemoryRegionPortio *portio, void *opaque, const char *name); -static inline ISABus *isa_bus_from_device(ISADevice *d) -{ - return ISA_BUS(qdev_get_parent_bus(DEVICE(d))); -} - #endif From patchwork Mon Feb 27 14:01:08 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: 657090 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2383491wrb; Mon, 27 Feb 2023 06:32:51 -0800 (PST) X-Google-Smtp-Source: AK7set8QVcBl3qR6KO9p26/p6GUwwVTawlc30CfLSi6CJNiCm67pC0PvN1O52Y+0DU1Wqej10j6U X-Received: by 2002:a05:622a:13d1:b0:3b8:3a7c:d208 with SMTP id p17-20020a05622a13d100b003b83a7cd208mr42588046qtk.34.1677508370837; Mon, 27 Feb 2023 06:32:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508370; cv=none; d=google.com; s=arc-20160816; b=kga8xUEmIqYAyq/izioOdkmOC74LFRCtO663rOBMSPygyONMvSYkCnW7R53hTI947p Qf6x7lMwCus16nBdQd/w4qfORYSxOYh0HQcOmX/xxsdYNYX8sWXtLEQgcO3hKDHJwWng MAc6BluiFICG30oPkJywDFUmCKT8ibNoiyzY435nG+B+Wml2TlLMAJ2mFn/9Sm184NLR fuR+TLNYga/OLDprWrKYEWz3XDmtWv6o+cMmDd044g1OFEDIqk6Usbi4VSD+3pgns+1/ cp1Arv2MgIljaaYvTmsNlpgffo2k6CAaisuuMmThZS21YA2XWO1rXiRwiwuCVmD/8J2R B6Pg== 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:to:from :dkim-signature; bh=EGxj4BA7WuTT+dIhFQSBAHpPQ5r9fDzaqonnzDMCb7o=; b=i4TDR6ThtCLDGxi0/Rb8G4pNHIDYHkTg+UZOohX/5nyVrxSYuLpKeLYSGjs+7PcBkv 6ofxUcrJa4VCOyZvpJ3Ygw+8xFwiCaBwxZYbfumjqg41z74Th2JOkfZBxC1YxYMn9oLz MRuZqYQF6Vaic3/1SduimtRkQ9J1W+HcDspAhMit+6j1/MQ0muGZTfzLyjJeK63DfPre uiMoTFd+Kn0RsBTIVTwIxyPKLeAYWZX8eFt8Q8AUdXbVsVBh5cHlqnJVggC3PzRUh1FD cEARF+BY4hF4ZXMm2/TazP8gsKvJXIqtDXT3wyXgbdOdxEprl5Y29mpfyBLRklD+rpvZ 9NvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aL4bsHUZ; 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 h11-20020ac87d4b000000b003b9fbc9642dsi7305685qtb.182.2023.02.27.06.32.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:32:50 -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=aL4bsHUZ; 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 1pWeAI-0007nv-O2; Mon, 27 Feb 2023 09:07:42 -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 1pWe9d-0007g9-5K for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:06 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe9b-0000E6-3k for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:00 -0500 Received: by mail-wm1-x331.google.com with SMTP id p16so4300647wmq.5 for ; Mon, 27 Feb 2023 06:06:58 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=EGxj4BA7WuTT+dIhFQSBAHpPQ5r9fDzaqonnzDMCb7o=; b=aL4bsHUZ/YQWVu9mH0Xj35jFTNOJRl6psyabGa70txZK1zCDSZFbrIm6JQV6MIwyni JN1gVLW55BwQFhOpgsXZeLBBBZ0R4N37hj0kO2deOgZ3vP+wo/LRmkX0NSriGxQS+gNg aOtgwMkMRw8OdWELseCdgp9aPDvT0Z7TT3JRNahEovVY1xiEwrUHzgVHJkk91rU19bBp U23/E7ThNFV2bdeuhtt8lG0TMoXh5O0Vb9oT8uHvvBwR5pxUhTmyp1auFYWBgU9bIFO+ wTBPF9jsSfupsh4GmqiJvO0bySGahOTh/o3zvaFGFDYiRJW6Wdm4bQi+a97gcIvbf+qb m28A== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EGxj4BA7WuTT+dIhFQSBAHpPQ5r9fDzaqonnzDMCb7o=; b=pSa1wU5EoiOitsEjqO4npXgLZ+1S/eqB8Mg7OHDNWOnOZZ7QpjdU4FKp3BKhEUn30y SeQ7NeTuImViqYqiqM3fmgc3wid5V9q66esSJxDENbHTMGhmkUSf+h7ck07Ntiu4Mk1c GmalWQSkztqOpJMM/pJuSYAi7dtY4dTXS6SC5wvnpoVHUnXY6K0jUEE2n9h39v8xxLtK A/3YVWGK8A8U9P3siQLYDLYreA0+wxDKOdiir7jWpUZhWV7EW4s0bEX39Jqi8nfsHHOo D0yUsE+++rUCcfKocvVf+Iptx3SdLV34NSPUSkdDztSw6QQZjvJApQF0RWrVN5IvHNpM H/aA== X-Gm-Message-State: AO0yUKWM5BHikN+PzjEUKIgD9SmhlRGjN0hWKZuzvPa/MsKf1tg+YO6B ISUxiSRLQRnXT1URTZDPm5uPR4kjY1YRBIGN X-Received: by 2002:a05:600c:4d21:b0:3d9:f769:2115 with SMTP id u33-20020a05600c4d2100b003d9f7692115mr18318256wmp.26.1677506817101; Mon, 27 Feb 2023 06:06:57 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id bd12-20020a05600c1f0c00b003e0015c8618sm12916505wmb.6.2023.02.27.06.06.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:06:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 061/126] hw/isa: Rename isa_bus_irqs() -> isa_bus_register_input_irqs() Date: Mon, 27 Feb 2023 15:01:08 +0100 Message-Id: <20230227140213.35084-52-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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=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 isa_bus_irqs() register an array of input IRQs on the ISA bus. Rename it as isa_bus_register_input_irqs(). Mechanical change using: $ sed -i -e 's/isa_bus_irqs/isa_bus_register_input_irqs/g' \ $(git grep -wl isa_bus_irqs) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230210163744.32182-10-philmd@linaro.org> --- hw/hppa/machine.c | 2 +- hw/i386/microvm.c | 2 +- hw/i386/pc_piix.c | 2 +- hw/isa/i82378.c | 2 +- hw/isa/isa-bus.c | 8 ++++---- hw/isa/lpc_ich9.c | 2 +- hw/isa/piix4.c | 2 +- hw/isa/vt82c686.c | 2 +- hw/mips/jazz.c | 2 +- hw/ppc/pnv_lpc.c | 2 +- hw/sparc64/sun4u.c | 2 +- include/hw/isa/isa.h | 4 ++-- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index 7ac68c943f..8fea5fa6b8 100644 --- a/hw/hppa/machine.c +++ b/hw/hppa/machine.c @@ -98,7 +98,7 @@ static ISABus *hppa_isa_bus(void) isa_irqs = i8259_init(isa_bus, /* qemu_allocate_irq(dino_set_isa_irq, s, 0)); */ NULL); - isa_bus_irqs(isa_bus, isa_irqs); + isa_bus_register_input_irqs(isa_bus, isa_irqs); return isa_bus; } diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 29f30dd6d3..fed468a34d 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -174,7 +174,7 @@ static void microvm_devices_init(MicrovmMachineState *mms) isa_bus = isa_bus_new(NULL, get_system_memory(), get_system_io(), &error_abort); - isa_bus_irqs(isa_bus, x86ms->gsi); + isa_bus_register_input_irqs(isa_bus, x86ms->gsi); ioapic_init_gsi(gsi_state, "machine"); if (ioapics > 1) { diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index df64dd8dcc..7c48ba30e0 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -246,7 +246,7 @@ static void pc_init1(MachineState *machine, i8257_dma_init(isa_bus, 0); pcms->hpet_enabled = false; } - isa_bus_irqs(isa_bus, x86ms->gsi); + isa_bus_register_input_irqs(isa_bus, x86ms->gsi); if (x86ms->pic == ON_OFF_AUTO_ON || x86ms->pic == ON_OFF_AUTO_AUTO) { pc_i8259_create(isa_bus, gsi_state->i8259_irq); diff --git a/hw/isa/i82378.c b/hw/isa/i82378.c index d32653369d..233059c6dc 100644 --- a/hw/isa/i82378.c +++ b/hw/isa/i82378.c @@ -89,7 +89,7 @@ static void i82378_realize(PCIDevice *pci, Error **errp) /* 2 82C59 (irq) */ s->isa_irqs_in = i8259_init(isabus, s->cpu_intr); - isa_bus_irqs(isabus, s->isa_irqs_in); + isa_bus_register_input_irqs(isabus, s->isa_irqs_in); /* 1 82C54 (pit) */ pit = i8254_pit_init(isabus, 0x40, 0, NULL); diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 2464357971..ce9999f7f7 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -67,13 +67,13 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion* address_space, return isabus; } -void isa_bus_irqs(ISABus *bus, qemu_irq *irqs) +void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in) { - bus->irqs = irqs; + bus->irqs_in = irqs_in; } /* - * isa_get_irq() returns the corresponding qemu_irq entry for the i8259. + * isa_get_irq() returns the corresponding input qemu_irq entry for the i8259. * * This function is only for special cases such as the 'ferr', and * temporary use for normal devices until they are converted to qdev. @@ -82,7 +82,7 @@ qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq) { assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus); assert(isairq < ISA_NUM_IRQS); - return isabus->irqs[isairq]; + return isabus->irqs_in[isairq]; } void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 96fd500502..d8303d0322 100644 --- a/hw/isa/lpc_ich9.c +++ b/hw/isa/lpc_ich9.c @@ -719,7 +719,7 @@ static void ich9_lpc_realize(PCIDevice *d, Error **errp) qdev_init_gpio_out_named(dev, lpc->gsi, ICH9_GPIO_GSI, IOAPIC_NUM_PINS); - isa_bus_irqs(isa_bus, lpc->gsi); + isa_bus_register_input_irqs(isa_bus, lpc->gsi); i8257_dma_init(isa_bus, 0); diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index de60ceef73..ef24826993 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -212,7 +212,7 @@ static void piix4_realize(PCIDevice *dev, Error **errp) s->isa = i8259_init(isa_bus, *i8259_out_irq); /* initialize ISA irqs */ - isa_bus_irqs(isa_bus, s->isa); + isa_bus_register_input_irqs(isa_bus, s->isa); /* initialize pit */ i8254_pit_init(isa_bus, 0x40, 0, NULL); diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index a913a509f7..52814cc751 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -615,7 +615,7 @@ static void via_isa_realize(PCIDevice *d, Error **errp) } s->isa_irqs_in = i8259_init(isa_bus, s->cpu_intr); - isa_bus_irqs(isa_bus, s->isa_irqs_in); + isa_bus_register_input_irqs(isa_bus, s->isa_irqs_in); i8254_pit_init(isa_bus, 0x40, 0, NULL); i8257_dma_init(isa_bus, 0); diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index 6aefe9a61b..ca4426a92c 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -249,7 +249,7 @@ static void mips_jazz_init(MachineState *machine, /* ISA devices */ i8259 = i8259_init(isa_bus, env->irq[4]); - isa_bus_irqs(isa_bus, i8259); + isa_bus_register_input_irqs(isa_bus, i8259); i8257_dma_init(isa_bus, 0); pit = i8254_pit_init(isa_bus, 0x40, 0, NULL); pcspk_init(isa_new(TYPE_PC_SPEAKER), isa_bus, pit); diff --git a/hw/ppc/pnv_lpc.c b/hw/ppc/pnv_lpc.c index 71143b7692..01f44c19eb 100644 --- a/hw/ppc/pnv_lpc.c +++ b/hw/ppc/pnv_lpc.c @@ -837,7 +837,7 @@ ISABus *pnv_lpc_isa_create(PnvLpcController *lpc, bool use_cpld, Error **errp) irqs = qemu_allocate_irqs(handler, lpc, ISA_NUM_IRQS); - isa_bus_irqs(isa_bus, irqs); + isa_bus_register_input_irqs(isa_bus, irqs); return isa_bus; } diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 8fe47e2c22..8a56ba9f98 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -316,7 +316,7 @@ static void ebus_realize(PCIDevice *pci_dev, Error **errp) /* ISA bus */ s->isa_irqs_in = qemu_allocate_irqs(ebus_isa_irq_handler, s, ISA_NUM_IRQS); - isa_bus_irqs(s->isa_bus, s->isa_irqs_in); + isa_bus_register_input_irqs(s->isa_bus, s->isa_irqs_in); qdev_init_gpio_out_named(DEVICE(s), s->isa_irqs_out, "isa-irq", ISA_NUM_IRQS); diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 1d3ffec4de..eb920aa710 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -55,7 +55,7 @@ struct ISABus { MemoryRegion *address_space; MemoryRegion *address_space_io; - qemu_irq *irqs; + qemu_irq *irqs_in; IsaDma *dma[2]; }; @@ -69,7 +69,7 @@ struct ISADevice { ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space, MemoryRegion *address_space_io, Error **errp); -void isa_bus_irqs(ISABus *bus, qemu_irq *irqs); +void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in); void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16); IsaDma *isa_get_dma(ISABus *bus, int nchan); ISADevice *isa_new(const char *name); From patchwork Mon Feb 27 14:01:09 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: 657100 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385426wrb; Mon, 27 Feb 2023 06:36:43 -0800 (PST) X-Google-Smtp-Source: AK7set89XjxRJHvoha9PpRl9kW9dn8MF5fjS3Y9pK1kwWiP924Kl/mTU+N0Fxg73I4RmfAQVfh/P X-Received: by 2002:ac8:5803:0:b0:3b6:2c3b:8c00 with SMTP id g3-20020ac85803000000b003b62c3b8c00mr43296016qtg.66.1677508603598; Mon, 27 Feb 2023 06:36:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508603; cv=none; d=google.com; s=arc-20160816; b=C5urhnw3LXbQcQlLz0UadIRU4qmIbLw9t63EscnPMGjku34/K8ZTfNiVyLvn/Zl+OR aXwxEXBVtr7d1BY4NJgBhL+vcs10O3yZAgPoh/k0LYcaqCNN/5gdkdNT0d/IthEoXE4W pxe9+0+rnsHwrXDtTeJ9wkFsiSK027lD1P95/D/2y79nT4x687Hl2WGamM4RQSsYhoBt 1dT/OWWvHXDPVKE6tNdEb//k6fGb2cx+NFMclvj5/VKh5N/HLYBySPf8pj2+39ArFG4q sphZ0kod7vbWlU9v6ABjnN7HPdpG3DLyrQggzN6cd8meRAL9MPuFEhQuZq+PhQOxm+Rl b4vA== 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:to:from :dkim-signature; bh=QS1nmh8lEScxSkqCqb2XqzqDwPQdmLvq21fW8K7LJn8=; b=NaryMyqOYxSd1NTusI1G4y5g4u92RvhzTxYEZ2husCtVdF1WKfrf59haZZ08o9JXYE FjKQe/ZrSlUgrrCwVT930YPEw3owa15kCX2CdwKrHxykGoGDKWSz1KciW35DEcIWwlov hLg5/4ED0cJjSrekYH+ORWhAlaYBVinBtx13PZ38XqE2Gt3HgGEpz4/HFcsppjWcTBHg YSO5ROzkE8XDBNRKKX8iZJw9a8xt131v38gADRc+0G3E9LmEzJ7ALnyQonXbgeKGjof+ es0jf1h96JiEaJdihMNoPkeE4lAUigm3ecEmrh2TKfJPTBlxYkVKqNLtYZJ0tN7NnYsc EGJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lKtFj8P5; 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 f8-20020a05622a104800b00341ae41d87esi6511912qte.106.2023.02.27.06.36.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:36:43 -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=lKtFj8P5; 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 1pWeAP-00081k-Bc; Mon, 27 Feb 2023 09:07: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 ) id 1pWe9h-0007gT-C3 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:07 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe9f-0000EZ-Qr for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:05 -0500 Received: by mail-wm1-x332.google.com with SMTP id az36so4333616wmb.1 for ; Mon, 27 Feb 2023 06:07:03 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QS1nmh8lEScxSkqCqb2XqzqDwPQdmLvq21fW8K7LJn8=; b=lKtFj8P53gUno+PDgZbq/JCYKkKg/iyC4DpWRoEjM2VRYneTLOc0svmv2eIRfnpTKw wogM5MOkMuJK7nGCifnLEl5SHKVDQt0f1ZVT1WvZcuL8CjLOmaIjiyk7aZWCYF2025wE i7d+HiuTpUR9XE5zukVqDD2UgwIymtsZpOZZSRLXchh69naFZJ+wFX9/o+qpWMuiqzzq k3I/+RKE3KdnCWPWDPCFedLWGdzy86quIhLWugPJcLcWwETp77Tr6LX0xzH5gBMc1zYT EL8UxNq6gs9Nxrdq7H2vMl+aZOEXvNbxb4CvhM3m4rfbPOflAU1avLCJieeD8pCCIUTl Q2SQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QS1nmh8lEScxSkqCqb2XqzqDwPQdmLvq21fW8K7LJn8=; b=2ITTunrvBl+DaPZNRCyVYP+8wY4LNxvwEgzGtPCvjp8eJeVQlKoaybImjxPKUjBiG4 xiML6udW8sv2RDdx7/H5TW4lUb/TXaNyY40G7SF8UPIyhtdvwwWpoCHwgrEnubYz6bE1 wnF3JFWC6HBrhKIw4/Ff+A0wCyf3KdMJ4cmu+Oywv/qFONU85QmitsJM2/hf1ttMTgVn qi9FYx60P/xVXnJ5sjtAY/3SMtgaa5GBOpevvr3FaptIso1Viw1gcQLWvTLiettIIYhX i1GT8oMMb+k6xb2gs1eWDkPj5m7kGB/KEC2JAVOwrIaOJoKpHGGxf6fxBygElSg7G0Na P50g== X-Gm-Message-State: AO0yUKUhJ5wHCWlDujFzGjhBH0J5HmFuYvvEz7RNFtCOSJXU1zyJ6yBD whWDJxe8tfARB1sQQkJnjq3gyHBdhck600+6 X-Received: by 2002:a05:600c:714:b0:3e2:1368:e3a0 with SMTP id i20-20020a05600c071400b003e21368e3a0mr17308710wmn.18.1677506822319; Mon, 27 Feb 2023 06:07:02 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id ay26-20020a05600c1e1a00b003e21f20b646sm9573905wmb.21.2023.02.27.06.07.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 062/126] hw/isa: Use isa_address_space_io() to reduce access on global 'isabus' Date: Mon, 27 Feb 2023 15:01:09 +0100 Message-Id: <20230227140213.35084-53-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230210163744.32182-11-philmd@linaro.org> --- hw/isa/isa-bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index ce9999f7f7..b3d2e5ec52 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -114,7 +114,7 @@ static inline void isa_init_ioport(ISADevice *dev, uint16_t ioport) void isa_register_ioport(ISADevice *dev, MemoryRegion *io, uint16_t start) { - memory_region_add_subregion(isabus->address_space_io, start, io); + memory_region_add_subregion(isa_address_space_io(dev), start, io); isa_init_ioport(dev, start); } @@ -135,7 +135,7 @@ int isa_register_portio_list(ISADevice *dev, isa_init_ioport(dev, start); portio_list_init(piolist, OBJECT(dev), pio_start, opaque, name); - portio_list_add(piolist, isabus->address_space_io, start); + portio_list_add(piolist, isa_address_space_io(dev), start); return 0; } From patchwork Mon Feb 27 14:01:10 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: 657113 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2388762wrb; Mon, 27 Feb 2023 06:44:06 -0800 (PST) X-Google-Smtp-Source: AK7set8P+SYsx310pnXFrozFhvAFjFt9A/kzjOXGTLhDUNzZg2OtPoBrnb3iSxYUpZftUqXVAIDx X-Received: by 2002:a05:6214:29ed:b0:56e:a4c5:9d82 with SMTP id jv13-20020a05621429ed00b0056ea4c59d82mr14266760qvb.12.1677509046374; Mon, 27 Feb 2023 06:44:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677509046; cv=none; d=google.com; s=arc-20160816; b=Qjs3I3n1eQVPbaSG966wIhVAnJVf8oIkjBHo3RasKbDCjAhc3WYE53NyMiiO3agfgM yUi7K9r5xWLWloR5nebPfNApCkyj81cNeYtldnGW9aI9V1kvph7jRKplcaM0uG1TX4hA qq4pH+0sqglG/63cdm0BhyjvAhQCdprauCSgSkbxfezk2ixLAi+k3p4bZEVxXLwf48b2 U0XuwXM40YbLBnT0jfPIpRGo8nvJTGi8Y5PwlBdd4hUiPFqxtIbd9OjoCh+96tUa7KsO t4C4LBzTnopy0Ey2QOHBB6ULCrgATswZg0UXX1dcArXLoeohI9rkO3xDIOd0AWlH/pcP P1ZQ== 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:to:from :dkim-signature; bh=gKVTnfoWv8+BbXRD0LsQp3bVMjHdMF0SmIkC/9rOp+Q=; b=LQna/FJGu+9FbbGADm5IsytzpXUK5Yp3EmvUYQ0LHiU+rzHURpcuUiHWHaDSRImc2U YWhmygzohI79zW7vjN+FH7SYO2Yl2l7dQA8py+SSgYaOuYbwx83OaBQd2zbm6qQH1mBB QYDeDMVMVqH2//38wYWy+/KF53PzEEuZnSE0BuGmaIoUkbF1D7QJQdQnQZ/0SQfXUVWL MXzR1zzXOILehiLTl0zdl+3+JuElXtM3eeJoO3BdsoVJnKpF94JI0Ra8YFb7wAGKH+Bj Z0zgRShVwN2LKGIHmIubnNAhPRrBMkA6TiDAyFXMqAuAjHtfucntgSkr3lgi1E4Bz5oK JoQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W0RQ4aso; 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 w20-20020a0cdf94000000b0056bf1e3aaf6si6554526qvl.544.2023.02.27.06.44.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:44:06 -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=W0RQ4aso; 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 1pWeAQ-0008Ht-Mt; Mon, 27 Feb 2023 09:07:50 -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 1pWe9r-0007jm-Ub for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:26 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe9n-0000D1-SO for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:15 -0500 Received: by mail-wm1-x32a.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so7262342wms.2 for ; Mon, 27 Feb 2023 06:07:08 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=gKVTnfoWv8+BbXRD0LsQp3bVMjHdMF0SmIkC/9rOp+Q=; b=W0RQ4aso0uI5NS2lP/YatKlfFzkjnSO0Ob3uG0wVSPFwjQ8Z5G76UInjN5EErcH0k+ rL3CYAwm4L2Yfn/sEOXpkrkQrcJ7LIp8svftMrOVsNmeyPkwuH6VUCKLrkdHeKBSGxro Uu08bD0uMXu03/CH0JhPoMtmcNyFcNzlF7Q6YmLdy1EOCQHXdKQHhxPTn0z1LpqtSS0R 7H/Do1H1NRkvleHPGwHLQ4ey85n+Vhzr3m+Y/VqwJDKf+P/QNLPC4B4isUOYjml7+Vbk vXGW9r1C6Y5SjW6rk+Z94C9RS/5tPHYeSIQn0U4wXuiOJZQvQru9nmnq8ecDg3NoTIA0 ePhA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=gKVTnfoWv8+BbXRD0LsQp3bVMjHdMF0SmIkC/9rOp+Q=; b=ad+r9P+xRuLqeJ9JH6pGcNvD9iyAMW8tFUM6ai5dhLCBhia37j2UoLL18z8JoW/aXb jTM59bJwLLj9rzbWMc4uqMx493y7H8uSGdDI/AU3pEUFzC4MZhbXZqaZiwGksRiYls+3 RtVJFoQ1XExYp/nueCfvZseao9rG2k5Oi6hk5Qd1MeaU2lwj9P5ll4OCqPEW5ClrmlTq FCdEuqSyViAl9yUN3ABlwyA4jn66pqOg0mPeFA8mMfM0krxJ9G3BYoJKeYNlzW9CqJAz ntVYhhcZMistC6RKJOGNcLqUOTLno4AR6KZoZKUKTiomxJDyHaGvU7usMt6E+qoutmnL vuSg== X-Gm-Message-State: AO0yUKWsIlMll1y23rbX7CedUsC1mw8A2yJBUlx7DB5xNAn7nYTC/SY4 9OQrW6ZunSMKjMHaCKqDxKVnrIpqjATeitFX X-Received: by 2002:a05:600c:4748:b0:3eb:3945:d3f4 with SMTP id w8-20020a05600c474800b003eb3945d3f4mr4864931wmo.2.1677506827408; Mon, 27 Feb 2023 06:07:07 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o18-20020a05600c4fd200b003eaf666cbe0sm9774516wmq.27.2023.02.27.06.07.06 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 063/126] hw/isa: Rename isa_get_dma() -> isa_bus_get_dma() Date: Mon, 27 Feb 2023 15:01:10 +0100 Message-Id: <20230227140213.35084-54-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 isa_get_dma() returns a DMA channel handler from an ISABus. To emphasize this, rename it as isa_bus_get_dma(). Mechanical change using: $ sed -i -e 's/isa_get_dma/isa_bus_get_dma/g' \ $(git grep -l isa_get_dma) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230215161641.32663-2-philmd@linaro.org> --- hw/audio/cs4231a.c | 2 +- hw/audio/gus.c | 2 +- hw/audio/sb16.c | 4 ++-- hw/block/fdc-isa.c | 2 +- hw/dma/i82374.c | 2 +- hw/isa/isa-bus.c | 2 +- include/hw/isa/isa.h | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c index 7f17a72a9c..ec066fcd89 100644 --- a/hw/audio/cs4231a.c +++ b/hw/audio/cs4231a.c @@ -671,7 +671,7 @@ static void cs4231a_realizefn (DeviceState *dev, Error **errp) CSState *s = CS4231A (dev); IsaDmaClass *k; - s->isa_dma = isa_get_dma(isa_bus_from_device(d), s->dma); + s->isa_dma = isa_bus_get_dma(isa_bus_from_device(d), s->dma); if (!s->isa_dma) { error_setg(errp, "ISA controller does not support DMA"); return; diff --git a/hw/audio/gus.c b/hw/audio/gus.c index 42f010b671..2a08a0f7d7 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -240,7 +240,7 @@ static void gus_realizefn (DeviceState *dev, Error **errp) IsaDmaClass *k; struct audsettings as; - s->isa_dma = isa_get_dma(isa_bus_from_device(d), s->emu.gusdma); + s->isa_dma = isa_bus_get_dma(isa_bus_from_device(d), s->emu.gusdma); if (!s->isa_dma) { error_setg(errp, "ISA controller does not support DMA"); return; diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 2215386ddb..ae745c7283 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -1401,8 +1401,8 @@ static void sb16_realizefn (DeviceState *dev, Error **errp) SB16State *s = SB16 (dev); IsaDmaClass *k; - s->isa_hdma = isa_get_dma(isa_bus_from_device(isadev), s->hdma); - s->isa_dma = isa_get_dma(isa_bus_from_device(isadev), s->dma); + s->isa_hdma = isa_bus_get_dma(isa_bus_from_device(isadev), s->hdma); + s->isa_dma = isa_bus_get_dma(isa_bus_from_device(isadev), s->dma); if (!s->isa_dma || !s->isa_hdma) { error_setg(errp, "ISA controller does not support DMA"); return; diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c index fee1ca68a8..a5f07b668d 100644 --- a/hw/block/fdc-isa.c +++ b/hw/block/fdc-isa.c @@ -98,7 +98,7 @@ static void isabus_fdc_realize(DeviceState *dev, Error **errp) fdctrl->dma_chann = isa->dma; if (fdctrl->dma_chann != -1) { IsaDmaClass *k; - fdctrl->dma = isa_get_dma(isa_bus_from_device(isadev), isa->dma); + fdctrl->dma = isa_bus_get_dma(isa_bus_from_device(isadev), isa->dma); if (!fdctrl->dma) { error_setg(errp, "ISA controller does not support DMA"); return; diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index 34c3aaf7d3..63734c22c9 100644 --- a/hw/dma/i82374.c +++ b/hw/dma/i82374.c @@ -125,7 +125,7 @@ static void i82374_realize(DeviceState *dev, Error **errp) I82374State *s = I82374(dev); ISABus *isa_bus = isa_bus_from_device(ISA_DEVICE(dev)); - if (isa_get_dma(isa_bus, 0)) { + if (isa_bus_get_dma(isa_bus, 0)) { error_setg(errp, "DMA already initialized on ISA bus"); return; } diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index b3d2e5ec52..80d8fb4c5b 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -99,7 +99,7 @@ void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16) bus->dma[1] = dma16; } -IsaDma *isa_get_dma(ISABus *bus, int nchan) +IsaDma *isa_bus_get_dma(ISABus *bus, int nchan) { assert(bus); return bus->dma[nchan > 3 ? 1 : 0]; diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index eb920aa710..3a60f6afa6 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -71,7 +71,7 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space, MemoryRegion *address_space_io, Error **errp); void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in); void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16); -IsaDma *isa_get_dma(ISABus *bus, int nchan); +IsaDma *isa_bus_get_dma(ISABus *bus, int nchan); ISADevice *isa_new(const char *name); ISADevice *isa_try_new(const char *name); bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp); From patchwork Mon Feb 27 14:01:11 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: 657114 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2389775wrb; Mon, 27 Feb 2023 06:45:58 -0800 (PST) X-Google-Smtp-Source: AK7set8rXXrNyjQYjzecEFGV6VS0OVSg3VHoaMhhrHtXqM568XatxE7qYhmL3vyjaMDx/i5SR6hk X-Received: by 2002:ad4:5ec9:0:b0:56e:af49:7a1d with SMTP id jm9-20020ad45ec9000000b0056eaf497a1dmr44994734qvb.24.1677509157945; Mon, 27 Feb 2023 06:45:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677509157; cv=none; d=google.com; s=arc-20160816; b=oHCpWEtOP5d59Pmu7Kr917svREoRWKCD2zfDfB4DSBxN4dgWp+3FL0rIZsQ29rrh+0 fDWiVSbKp9jj4DU5T2PLwENA47necfZDNt1AFJZvoZJT6bJBRBUHAJFPG7gxYpkuo2FE ud/KxathKqSTdFDg0CMBhCpiIeLPX5VrUDe1EgKrt2aVKF4f0+TiV+M2m5inux7FYEqU z3fgnlYwpRJxwTm5R1Na/nlQl3xp+Zjfqe09Fw/ADGT38FYCEXCAHoXf60+AfC3M5SsZ F3CcKI5GqnvAOONHK0GvtVbXbjqgY1jBf6ipdjbCSeutCQOKIrLC5hnyrImsO4wNbXVW +p2g== 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:to:from :dkim-signature; bh=Wvgc1q+JeB9mB1p5KKDFDthHdUae8hWBwy/9CcINALg=; b=FMkAm6YKMNU/LP2eAllHl8QFeb1df5jvdQKgdfTx8VvpOVY40JSdv+l06abTTaYMhw bcdsopVRnC2B8jar6xJsYS85IvT1d6KlKr1x9fiQl4sfWJNxOPg4LBmo+R+8LGihM4Z1 W4xxj47Ea2fP6jjbupsGGuWLbhOIzRdsOQD+TiOOE2GSICxXZZQZ7WlcenVdacJmTIv0 K0X55JMEWNxjT7cZAUYLX86AWa/mW34gebq75OlIRNl8fqrvh/xkwwEUlxjEt7SeTilP bUx38T2aZDUm8ZM4X/ZG+Zizt3FJVSfWN++qaqC5lVW4B6h+kxQ85mac8XrHtzkHFqj5 Aj9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ye+RJJYY; 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-20020a0ce44d000000b0056ee2c2c9edsi6364468qvm.422.2023.02.27.06.45.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:45:57 -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=Ye+RJJYY; 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 1pWeAQ-0008H5-Kx; Mon, 27 Feb 2023 09:07:50 -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 1pWe9s-0007jp-OY for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:26 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe9r-0000F2-1b for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:16 -0500 Received: by mail-wr1-x434.google.com with SMTP id h14so6362568wru.4 for ; Mon, 27 Feb 2023 06:07:13 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Wvgc1q+JeB9mB1p5KKDFDthHdUae8hWBwy/9CcINALg=; b=Ye+RJJYYiExrYT2Kv7dBdmNHikfxupx84XMOdqPhIB0aA9MCFslL8IuTCSt5wex5F5 IHBsiYcpvDMgCp3eXhYwDc05oQnhfO/n7mp7YgnLwxyFOEQMBlqKrHn8LcFe+/5hfASl HstlfmP/GHUraPaYzLxhVLk0yGOFCmj2MnyUnvAKNIltsHh0xo8k2wpEaqimXvn5DS6K okdLONUiLz/S0mI4zBeNHVURE7VNPTz0xtnkE3y6n7odPbT85IVVe9EPBKB23ya9CKkT GUau2cVGIFhQb0+7+Y9QlsFWgebMg47h34DeJJ+A3RNHoPl11GpoBRLfIC6blCTVOR7J Cvkw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wvgc1q+JeB9mB1p5KKDFDthHdUae8hWBwy/9CcINALg=; b=ZBVcRcU44YorH63vZfFCn+U2GpqGDfzzcpR6pkVBNyH9oSa8oD9weqgiQGFo3LHwfZ Gs5++gV6SgvP7suGy+JxikOJuWbCbaTsnr8rfKULlPucQTDM/EAVXpw+hS1+1wFhubtO B08DpMNzM1nYq4gD2x3wvEAMpYEMVxSHRDfY3ve/46HMGmV70/+bgJbva548Wh0Drprq 7rrUsemsgYzr/wpr65bWJsEKf2H1UUm3Gn5Jdu8P4/QRJk0fiLPtL3Hw4M1oRLdbv/1J a+La1avZiD4T0xoyKcj+Z3e1Ol3sPPVG9wek9D88iQy0VgZIHN8rv/tcY6OioYfhQJQv utZw== X-Gm-Message-State: AO0yUKWeL+g9MX4V2V1SQVR+pfS1ixQar5xKki8gb2GdROKyNiXcMzGW QwKVPKeEfQoBqM9olIf0DswKTek88cEjnBO5 X-Received: by 2002:adf:e450:0:b0:2c3:fb3e:ae85 with SMTP id t16-20020adfe450000000b002c3fb3eae85mr22364261wrm.44.1677506832595; Mon, 27 Feb 2023 06:07:12 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id y18-20020a5d4ad2000000b002c5584d0e3dsm7294008wrs.24.2023.02.27.06.07.11 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 064/126] hw/isa: Factor isa_bus_get_irq() out of isa_get_irq() Date: Mon, 27 Feb 2023 15:01:11 +0100 Message-Id: <20230227140213.35084-55-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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=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 isa_get_irq() was added in commit 3a38d437ca ("Add isa_reserve_irq()" Fri Aug 14 11:36:15 2009) as: a temporary interface to be used to allocate ISA IRQs for devices which have not yet been converted to qdev, and for special cases which are not suited for qdev conversions, such as the 'ferr'. We still use it 14 years later, using the global 'isabus' singleton. In order to get rid of such *temporary* interface, extract isa_bus_get_irq() which can take any ISABus* object. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230215161641.32663-3-philmd@linaro.org> --- hw/isa/isa-bus.c | 14 ++++++++++---- include/hw/isa/isa.h | 8 ++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 80d8fb4c5b..a289eccfb1 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -72,6 +72,13 @@ void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in) bus->irqs_in = irqs_in; } +qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum) +{ + assert(irqnum < ISA_NUM_IRQS); + assert(bus->irqs_in); + return bus->irqs_in[irqnum]; +} + /* * isa_get_irq() returns the corresponding input qemu_irq entry for the i8259. * @@ -81,14 +88,13 @@ void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in) qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq) { assert(!dev || ISA_BUS(qdev_get_parent_bus(DEVICE(dev))) == isabus); - assert(isairq < ISA_NUM_IRQS); - return isabus->irqs_in[isairq]; + return isa_bus_get_irq(isabus, isairq); } void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq) { - qemu_irq irq = isa_get_irq(isadev, isairq); - qdev_connect_gpio_out(DEVICE(isadev), gpioirq, irq); + qemu_irq input_irq = isa_get_irq(isadev, isairq); + qdev_connect_gpio_out(DEVICE(isadev), gpioirq, input_irq); } void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16) diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index 3a60f6afa6..40d6224a4e 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -72,6 +72,14 @@ ISABus *isa_bus_new(DeviceState *dev, MemoryRegion *address_space, void isa_bus_register_input_irqs(ISABus *bus, qemu_irq *irqs_in); void isa_bus_dma(ISABus *bus, IsaDma *dma8, IsaDma *dma16); IsaDma *isa_bus_get_dma(ISABus *bus, int nchan); +/** + * isa_bus_get_irq: Return input IRQ on ISA bus. + * @bus: the #ISABus to plug ISA devices on. + * @irqnum: the ISA IRQ number. + * + * Return IRQ @irqnum from the PIC associated on ISA @bus. + */ +qemu_irq isa_bus_get_irq(ISABus *bus, unsigned irqnum); ISADevice *isa_new(const char *name); ISADevice *isa_try_new(const char *name); bool isa_realize_and_unref(ISADevice *dev, ISABus *bus, Error **errp); From patchwork Mon Feb 27 14:01:12 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: 657072 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380948wrb; Mon, 27 Feb 2023 06:27:58 -0800 (PST) X-Google-Smtp-Source: AK7set+pA3bCoA/HrBP+I0L8iLXnlr/BEgVgFu/ZUH0nvc825iWL+mCDVyD2yHPHjT2LaPKGztYz X-Received: by 2002:ac8:5cc7:0:b0:3b6:8bc3:a09c with SMTP id s7-20020ac85cc7000000b003b68bc3a09cmr15767253qta.25.1677508078357; Mon, 27 Feb 2023 06:27:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508078; cv=none; d=google.com; s=arc-20160816; b=HN2KWmPjBrB9G1Ushu8JwHvso9N/gwhEsMdygNgY9sV0GLaxvdn8p+6c1WWFq2xHlw +IGiLMOPsy3bHHcBSmwUCp6dPe96LtpCVEXLUaY/VduZrFMlZ66U+6aaP95OlfEJ2slY ahRYG/NcFlak8MeF+rh4oM+uKcs6tJXrXg446v2jQk7rgL9H+JdYrohDm+B+Wc6WRgjg GHlXp45xVESNEdQik9Vba8nML5LU2UX6phmA5g0wUdRjsRwvSpjwUfukRMAvSaMpm2eM SWrv+ymQH965JeYZSnbiDDgOYtMb2lEJ83wVJZuWoCtLGzux0/GOrKUuTu1gVF2rU62k 87CA== 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:to:from :dkim-signature; bh=sD8nMOvl9XnKQqeIn+DUxNqc5UOPoGaD9olkVeLlkv0=; b=KpkVOGxVOJkjnmlJfmLSF4aFyaQ38RwzqjYo37hlAnD7tsMO4n9tlsYcsj2keVKrmJ Kuz6WnxuHMjEws3mzWYA7fVBm8bDpf9Istjd9+4MQZowhE8soXBF8LiUEPhd54bR372/ IhUBIfGESZ7IEVJEinKtgFqyHK9d5MPOnlc6n6QLlszcqULOgWXvNXDwOZF2UbIA8DlE e4YPGGDdgq9c0EXL6eRCD4kZIXwC81dMg5ziQ7gqeosQqU7rax6VvX5IEQXf7As7GlF9 mRK9DttFxXp/S9X7Ny+Xsotbov8w4i0JOMYTUzm0OgUJTcE3KALE911m8mIbbC89rgeX aHSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oU5viHel; 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 c15-20020ac87dcf000000b003a824d0f6f0si6546285qte.152.2023.02.27.06.27.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:27: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=oU5viHel; 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 1pWeAS-00006E-Nj; Mon, 27 Feb 2023 09:07:52 -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 1pWeA3-0007kt-Dr for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:35 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeA1-0000FS-Kh for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:27 -0500 Received: by mail-wr1-x430.google.com with SMTP id l25so6368926wrb.3 for ; Mon, 27 Feb 2023 06:07:21 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=sD8nMOvl9XnKQqeIn+DUxNqc5UOPoGaD9olkVeLlkv0=; b=oU5viHelvs8Z/BYMPZCeCpbPBzzy6Npi/jpNZYeek1YFNJZ3+lY4rrumvtNEqV9GdV dzkit7Q84hAQQcd7V1a388GfHAOQOC9w023oRCwkPaeadQKjiVCwilBISvV9vemUmlqH oGexPU4ibepG7FLNbj8HKhzfkwd6afumuW1PFr4INxwxzJMc3p78ibWF3DD3wfYdCxUJ U9upmfr0/zh/pSkXe2aDoQZZtO3kGMp19J6SL1y0hXQqp5jX5FLzwPm6yp5M2lzUVrHf kIOl8g59Nm1mzDCtmMhiqRXAJsyA+I+bGeZWBB6JOEWnhgIwAyHzwyVyJCcKWaDKxBLa /MKA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sD8nMOvl9XnKQqeIn+DUxNqc5UOPoGaD9olkVeLlkv0=; b=T6H8/3xEX6ZyEiQzkUdl/MxeVjuYSjJnn7czS0a+8ntntnbtfBV7wscKIIaEEdvDAJ SrxS/mal4FRNjixAzOUNsyUvWAKl2fi01j9eG+Z9QlPsZ7Iz62zskXbbRYs9DK5misgP am4hr/V34c77NvrdIjDgHsjldh00Rs7Xk9UOMJCs0/7AWAlD0VQmPQvzXjeZGsly/rQy FaZQ9bCij/mt6fFmnWVGSMwxVKd5P41RZvezl9t0j5EjoqVIkUV67+WisPCWoZKUsMCo BAiy8JIwXfFriqYziVK7RkH7dJk9+LFrdQ2Pkyjd/YTt8KhO7drSRXni/CGhW5zivvZv 6/KQ== X-Gm-Message-State: AO0yUKUNDL8g6el/FFTGxon0Y2Q3bwIXaGi25kHK/C1md3NaMU/gj5vI SUBET4NDVuW+lwFjuZPK0fUijEmhHGprIPZn X-Received: by 2002:adf:fdc5:0:b0:2c7:dec:77ac with SMTP id i5-20020adffdc5000000b002c70dec77acmr14119105wrs.21.1677506837997; Mon, 27 Feb 2023 06:07:17 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id c4-20020adffb04000000b002c70bfe505esm7149901wrr.82.2023.02.27.06.07.17 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 065/126] hw: Replace isa_get_irq() by isa_bus_get_irq() when ISABus is available Date: Mon, 27 Feb 2023 15:01:12 +0100 Message-Id: <20230227140213.35084-56-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Message-Id: <20230215161641.32663-4-philmd@linaro.org> --- hw/audio/cs4231a.c | 5 +++-- hw/audio/gus.c | 5 +++-- hw/audio/sb16.c | 7 ++++--- hw/block/fdc-isa.c | 5 +++-- include/hw/timer/i8254.h | 3 ++- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c index ec066fcd89..5c6d643732 100644 --- a/hw/audio/cs4231a.c +++ b/hw/audio/cs4231a.c @@ -668,16 +668,17 @@ static void cs4231a_initfn (Object *obj) static void cs4231a_realizefn (DeviceState *dev, Error **errp) { ISADevice *d = ISA_DEVICE (dev); + ISABus *bus = isa_bus_from_device(d); CSState *s = CS4231A (dev); IsaDmaClass *k; - s->isa_dma = isa_bus_get_dma(isa_bus_from_device(d), s->dma); + s->isa_dma = isa_bus_get_dma(bus, s->dma); if (!s->isa_dma) { error_setg(errp, "ISA controller does not support DMA"); return; } - s->pic = isa_get_irq(d, s->irq); + s->pic = isa_bus_get_irq(bus, s->irq); k = ISADMA_GET_CLASS(s->isa_dma); k->register_channel(s->isa_dma, s->dma, cs_dma_read, s); diff --git a/hw/audio/gus.c b/hw/audio/gus.c index 2a08a0f7d7..787345ce54 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -236,11 +236,12 @@ static const MemoryRegionPortio gus_portio_list2[] = { static void gus_realizefn (DeviceState *dev, Error **errp) { ISADevice *d = ISA_DEVICE(dev); + ISABus *bus = isa_bus_from_device(d); GUSState *s = GUS (dev); IsaDmaClass *k; struct audsettings as; - s->isa_dma = isa_bus_get_dma(isa_bus_from_device(d), s->emu.gusdma); + s->isa_dma = isa_bus_get_dma(bus, s->emu.gusdma); if (!s->isa_dma) { error_setg(errp, "ISA controller does not support DMA"); return; @@ -282,7 +283,7 @@ static void gus_realizefn (DeviceState *dev, Error **errp) s->emu.himemaddr = s->himem; s->emu.gusdatapos = s->emu.himemaddr + 1024 * 1024 + 32; s->emu.opaque = s; - s->pic = isa_get_irq(d, s->emu.gusirq); + s->pic = isa_bus_get_irq(bus, s->emu.gusirq); AUD_set_active_out (s->voice, 1); } diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index ae745c7283..535ccccdc9 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -1398,17 +1398,18 @@ static void sb16_initfn (Object *obj) static void sb16_realizefn (DeviceState *dev, Error **errp) { ISADevice *isadev = ISA_DEVICE (dev); + ISABus *bus = isa_bus_from_device(isadev); SB16State *s = SB16 (dev); IsaDmaClass *k; - s->isa_hdma = isa_bus_get_dma(isa_bus_from_device(isadev), s->hdma); - s->isa_dma = isa_bus_get_dma(isa_bus_from_device(isadev), s->dma); + s->isa_hdma = isa_bus_get_dma(bus, s->hdma); + s->isa_dma = isa_bus_get_dma(bus, s->dma); if (!s->isa_dma || !s->isa_hdma) { error_setg(errp, "ISA controller does not support DMA"); return; } - s->pic = isa_get_irq(isadev, s->irq); + s->pic = isa_bus_get_irq(bus, s->irq); s->mixer_regs[0x80] = magic_of_irq (s->irq); s->mixer_regs[0x81] = (1 << s->dma) | (1 << s->hdma); diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c index a5f07b668d..7ec075e470 100644 --- a/hw/block/fdc-isa.c +++ b/hw/block/fdc-isa.c @@ -86,6 +86,7 @@ static const MemoryRegionPortio fdc_portio_list[] = { static void isabus_fdc_realize(DeviceState *dev, Error **errp) { ISADevice *isadev = ISA_DEVICE(dev); + ISABus *bus = isa_bus_from_device(isadev); FDCtrlISABus *isa = ISA_FDC(dev); FDCtrl *fdctrl = &isa->state; Error *err = NULL; @@ -94,11 +95,11 @@ static void isabus_fdc_realize(DeviceState *dev, Error **errp) isa->iobase, fdc_portio_list, fdctrl, "fdc"); - fdctrl->irq = isa_get_irq(isadev, isa->irq); + fdctrl->irq = isa_bus_get_irq(bus, isa->irq); fdctrl->dma_chann = isa->dma; if (fdctrl->dma_chann != -1) { IsaDmaClass *k; - fdctrl->dma = isa_bus_get_dma(isa_bus_from_device(isadev), isa->dma); + fdctrl->dma = isa_bus_get_dma(bus, isa->dma); if (!fdctrl->dma) { error_setg(errp, "ISA controller does not support DMA"); return; diff --git a/include/hw/timer/i8254.h b/include/hw/timer/i8254.h index 3e569f42b6..8402caad30 100644 --- a/include/hw/timer/i8254.h +++ b/include/hw/timer/i8254.h @@ -56,7 +56,8 @@ static inline ISADevice *i8254_pit_init(ISABus *bus, int base, int isa_irq, qdev_prop_set_uint32(dev, "iobase", base); isa_realize_and_unref(d, bus, &error_fatal); qdev_connect_gpio_out(dev, 0, - isa_irq >= 0 ? isa_get_irq(d, isa_irq) : alt_irq); + isa_irq >= 0 ? isa_bus_get_irq(bus, isa_irq) + : alt_irq); return d; } From patchwork Mon Feb 27 14:01:13 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: 657091 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2383678wrb; Mon, 27 Feb 2023 06:33:10 -0800 (PST) X-Google-Smtp-Source: AK7set927RCywKm/81ii1qd9X0opRS+JNqQbGMA++QuwOpdCmZDWM1rDXfKqeRBkmZCHZnWNT6kr X-Received: by 2002:a05:6214:768:b0:56c:52e:b169 with SMTP id f8-20020a056214076800b0056c052eb169mr43123123qvz.50.1677508389813; Mon, 27 Feb 2023 06:33:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508389; cv=none; d=google.com; s=arc-20160816; b=cZWY/FTVqS4Elx8/W8o2pKLOa7z2CNUFGF9isEXmOh7cZIdXjP7Xvdy1729AUBfRx0 S1Ik7om0ZzatamP0hRiKhtkGoqivGPHNAqRHXt+5XhF8TVCtEqzy8z8ZflgfGrjI5fH7 DFnTm4FCSbwgGAI3MpB/kw8ygmfGhfPoVou4gsiNhQh/izFl6J/cmL0NFX5zHaJDGEd2 thMZHxt8J9koJpRMWLFl3UYhxMNCbAlybzhKmCGIpcjwa/BpZlw/4KR7nXFsavFhc97Z /lB55gxAyDpoi4fOiqavrU1A61Ki/6dfcHFL+JhFvIucOW3p167tNKOWYE3nLB3tarX9 5K6Q== 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:to:from :dkim-signature; bh=x+B1FDRRt0TkrqqX/Umb0cDe131Gg7bV7tBHlILEa4w=; b=ZC1s4YzhhY2xRcslBVI1fVTla/DevwIG2P/Xyo83Aq6OdLYm6f0ZZk+2oLu8uvlhcA 94n0fNhZWT7rz+AfTQQ95pIM0YCPY65EuC43Ug0S4a/Lttid8c3tntGCmfGctIovjplQ 3ZhrU+iG5gIWMMX/JgFfMFpP7FgnJ803gqvwozYvw1D4reMvr6XmZG6qAPXcYZSQ9F7s fSMIGu/qKqJUH1S0Za1QIZ8oumA5lG2EPRKopB7JisbyAvyURiLXEJW3LyJBeF2bFQZs ngc0ly/jb5zc3hkPXuMyOp21PpX/mYlgZ8GOQjKe3i/jsFlEs2NWbFbSgCQOt5F5L/Yq 8iJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LGQF838M; 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 bq30-20020a05620a469e00b00722cc4470eesi6541112qkb.450.2023.02.27.06.33.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:33:09 -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=LGQF838M; 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 1pWeAR-0008PW-Om; Mon, 27 Feb 2023 09:07:51 -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 1pWeA4-0007m4-3b for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:36 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeA1-0000D1-Q4 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:27 -0500 Received: by mail-wm1-x32a.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so7263038wms.2 for ; Mon, 27 Feb 2023 06:07:24 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=x+B1FDRRt0TkrqqX/Umb0cDe131Gg7bV7tBHlILEa4w=; b=LGQF838MfPhu+xQJ3KkNr6hVQeqwWXtZRSzQPk91ee9zPDPBQe0PycO6jALkqZp0Mv t574g+fhPIUGnjdoxIwPFcV4H6VxemmaFwQ78yy9Yxm6KA8obhxBkZP/POM02dGt6UK4 GkUbXccensC3nGq89f0d7OX99e0gJItUKqO0JXI648ftBou5vrdezutZQtdTLXifvIxh T0qM3igg+W6ArSQz2xIKydrMZ38xwI2bJFsioJWb52anK7o8u7t1pzKnFLnxugsjUjq5 17K63r5BcQNOpVB3ja7SMHQeSx/N/YM/Rhnx9LcAjVUr9VQ89RdbGU763+286m8JO5aC eQJA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x+B1FDRRt0TkrqqX/Umb0cDe131Gg7bV7tBHlILEa4w=; b=mafXk6maWFjQk8az8a4Dg8z+bRKZ+OJ4v2c2nyUe6mnMvgrsX+qpe6r1IeiITXH6ZI Owy8W5an4nfvrYqgR6btM3YoAYoXmPvKyzPVinyXHIWQbwuAxMkhNH1rGrdQ0G1c4kVv QsyKEJiSS0wVYQ6v/p4TOTFe1O67F8WeHu+JwXeUk2FhEeGK3EYlbphpOiJVtwoX010w tZqKD2Bu1P+t/C9u9PVoe62ZzWra4C0oSDiXbMlYQXsoGLfS57BmUcNnl5rzFGGyYzew qYlV70KkvgmeLrhXTGtke3kzAQL4gcsBojRasHR7VFGvbnoC3gdxvFTVlLDp9vnT1sxJ ohgA== X-Gm-Message-State: AO0yUKWm0wfyYMFe+TRx6OUgrYPRGhW0n9EC+78ZKQFPaPyh9Uf408Y2 ISndp8ZWqLT+x3hwN2vLm9HXOfXP9pmoYx5+ X-Received: by 2002:a05:600c:3089:b0:3eb:29fe:7343 with SMTP id g9-20020a05600c308900b003eb29fe7343mr7801912wmn.33.1677506843736; Mon, 27 Feb 2023 06:07:23 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e9-20020a05600c218900b003dc434b39c7sm17287976wme.0.2023.02.27.06.07.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 066/126] hw/rtc/mc146818rtc: Rename RTCState -> MC146818RtcState Date: Mon, 27 Feb 2023 15:01:13 +0100 Message-Id: <20230227140213.35084-57-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 RTCState only represents a Motorola MC146818 model, not any RTC chipset. Rename the structure as MC146818RtcState using: $ sed -i -e s/RTCState/MC146818RtcState/g $(git grep -wl RTCState) Reviewed-by: Richard Henderson Message-Id: <20230210233116.80311-2-philmd@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/isa/piix4.c | 2 +- hw/isa/vt82c686.c | 2 +- hw/rtc/mc146818rtc.c | 119 ++++++++++++++++++----------------- include/hw/rtc/mc146818rtc.h | 6 +- 4 files changed, 65 insertions(+), 64 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index ef24826993..e0b149f8eb 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -47,7 +47,7 @@ struct PIIX4State { qemu_irq cpu_intr; qemu_irq *isa; - RTCState rtc; + MC146818RtcState rtc; PCIIDEState ide; UHCIState uhci; PIIX4PMState pm; diff --git a/hw/isa/vt82c686.c b/hw/isa/vt82c686.c index 52814cc751..f4c40965cd 100644 --- a/hw/isa/vt82c686.c +++ b/hw/isa/vt82c686.c @@ -550,7 +550,7 @@ struct ViaISAState { qemu_irq cpu_intr; qemu_irq *isa_irqs_in; ViaSuperIOState via_sio; - RTCState rtc; + MC146818RtcState rtc; PCIIDEState ide; UHCIState uhci[2]; ViaPMState pm; diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index ba612a151d..c285a53286 100644 --- a/hw/rtc/mc146818rtc.c +++ b/hw/rtc/mc146818rtc.c @@ -71,19 +71,19 @@ #define RTC_ISA_BASE 0x70 -static void rtc_set_time(RTCState *s); -static void rtc_update_time(RTCState *s); -static void rtc_set_cmos(RTCState *s, const struct tm *tm); -static inline int rtc_from_bcd(RTCState *s, int a); -static uint64_t get_next_alarm(RTCState *s); +static void rtc_set_time(MC146818RtcState *s); +static void rtc_update_time(MC146818RtcState *s); +static void rtc_set_cmos(MC146818RtcState *s, const struct tm *tm); +static inline int rtc_from_bcd(MC146818RtcState *s, int a); +static uint64_t get_next_alarm(MC146818RtcState *s); -static inline bool rtc_running(RTCState *s) +static inline bool rtc_running(MC146818RtcState *s) { return (!(s->cmos_data[RTC_REG_B] & REG_B_SET) && (s->cmos_data[RTC_REG_A] & 0x70) <= 0x20); } -static uint64_t get_guest_rtc_ns(RTCState *s) +static uint64_t get_guest_rtc_ns(MC146818RtcState *s) { uint64_t guest_clock = qemu_clock_get_ns(rtc_clock); @@ -91,7 +91,7 @@ static uint64_t get_guest_rtc_ns(RTCState *s) guest_clock - s->last_update + s->offset; } -static void rtc_coalesced_timer_update(RTCState *s) +static void rtc_coalesced_timer_update(MC146818RtcState *s) { if (s->irq_coalesced == 0) { timer_del(s->coalesced_timer); @@ -104,19 +104,19 @@ static void rtc_coalesced_timer_update(RTCState *s) } } -static QLIST_HEAD(, RTCState) rtc_devices = +static QLIST_HEAD(, MC146818RtcState) rtc_devices = QLIST_HEAD_INITIALIZER(rtc_devices); void qmp_rtc_reset_reinjection(Error **errp) { - RTCState *s; + MC146818RtcState *s; QLIST_FOREACH(s, &rtc_devices, link) { s->irq_coalesced = 0; } } -static bool rtc_policy_slew_deliver_irq(RTCState *s) +static bool rtc_policy_slew_deliver_irq(MC146818RtcState *s) { kvm_reset_irq_delivered(); qemu_irq_raise(s->irq); @@ -125,7 +125,7 @@ static bool rtc_policy_slew_deliver_irq(RTCState *s) static void rtc_coalesced_timer(void *opaque) { - RTCState *s = opaque; + MC146818RtcState *s = opaque; if (s->irq_coalesced != 0) { s->cmos_data[RTC_REG_C] |= 0xc0; @@ -140,7 +140,7 @@ static void rtc_coalesced_timer(void *opaque) rtc_coalesced_timer_update(s); } -static uint32_t rtc_periodic_clock_ticks(RTCState *s) +static uint32_t rtc_periodic_clock_ticks(MC146818RtcState *s) { int period_code; @@ -157,8 +157,8 @@ static uint32_t rtc_periodic_clock_ticks(RTCState *s) * handle periodic timer. @old_period indicates the periodic timer update * is just due to period adjustment. */ -static void -periodic_timer_update(RTCState *s, int64_t current_time, uint32_t old_period, bool period_change) +static void periodic_timer_update(MC146818RtcState *s, int64_t current_time, + uint32_t old_period, bool period_change) { uint32_t period; int64_t cur_clock, next_irq_clock, lost_clock = 0; @@ -234,7 +234,7 @@ periodic_timer_update(RTCState *s, int64_t current_time, uint32_t old_period, bo static void rtc_periodic_timer(void *opaque) { - RTCState *s = opaque; + MC146818RtcState *s = opaque; periodic_timer_update(s, s->next_periodic_time, s->period, false); s->cmos_data[RTC_REG_C] |= REG_C_PF; @@ -255,7 +255,7 @@ static void rtc_periodic_timer(void *opaque) } /* handle update-ended timer */ -static void check_update_timer(RTCState *s) +static void check_update_timer(MC146818RtcState *s) { uint64_t next_update_time; uint64_t guest_nsec; @@ -306,7 +306,7 @@ static void check_update_timer(RTCState *s) } } -static inline uint8_t convert_hour(RTCState *s, uint8_t hour) +static inline uint8_t convert_hour(MC146818RtcState *s, uint8_t hour) { if (!(s->cmos_data[RTC_REG_B] & REG_B_24H)) { hour %= 12; @@ -317,7 +317,7 @@ static inline uint8_t convert_hour(RTCState *s, uint8_t hour) return hour; } -static uint64_t get_next_alarm(RTCState *s) +static uint64_t get_next_alarm(MC146818RtcState *s) { int32_t alarm_sec, alarm_min, alarm_hour, cur_hour, cur_min, cur_sec; int32_t hour, min, sec; @@ -410,7 +410,7 @@ static uint64_t get_next_alarm(RTCState *s) static void rtc_update_timer(void *opaque) { - RTCState *s = opaque; + MC146818RtcState *s = opaque; int32_t irqs = REG_C_UF; int32_t new_irqs; @@ -439,7 +439,7 @@ static void rtc_update_timer(void *opaque) static void cmos_ioport_write(void *opaque, hwaddr addr, uint64_t data, unsigned size) { - RTCState *s = opaque; + MC146818RtcState *s = opaque; uint32_t old_period; bool update_periodic_timer; @@ -557,7 +557,7 @@ static void cmos_ioport_write(void *opaque, hwaddr addr, } } -static inline int rtc_to_bcd(RTCState *s, int a) +static inline int rtc_to_bcd(MC146818RtcState *s, int a) { if (s->cmos_data[RTC_REG_B] & REG_B_DM) { return a; @@ -566,7 +566,7 @@ static inline int rtc_to_bcd(RTCState *s, int a) } } -static inline int rtc_from_bcd(RTCState *s, int a) +static inline int rtc_from_bcd(MC146818RtcState *s, int a) { if ((a & 0xc0) == 0xc0) { return -1; @@ -578,7 +578,7 @@ static inline int rtc_from_bcd(RTCState *s, int a) } } -static void rtc_get_time(RTCState *s, struct tm *tm) +static void rtc_get_time(MC146818RtcState *s, struct tm *tm) { tm->tm_sec = rtc_from_bcd(s, s->cmos_data[RTC_SECONDS]); tm->tm_min = rtc_from_bcd(s, s->cmos_data[RTC_MINUTES]); @@ -597,7 +597,7 @@ static void rtc_get_time(RTCState *s, struct tm *tm) rtc_from_bcd(s, s->cmos_data[RTC_CENTURY]) * 100 - 1900; } -static void rtc_set_time(RTCState *s) +static void rtc_set_time(MC146818RtcState *s) { struct tm tm; g_autofree const char *qom_path = object_get_canonical_path(OBJECT(s)); @@ -609,7 +609,7 @@ static void rtc_set_time(RTCState *s) qapi_event_send_rtc_change(qemu_timedate_diff(&tm), qom_path); } -static void rtc_set_cmos(RTCState *s, const struct tm *tm) +static void rtc_set_cmos(MC146818RtcState *s, const struct tm *tm) { int year; @@ -633,7 +633,7 @@ static void rtc_set_cmos(RTCState *s, const struct tm *tm) s->cmos_data[RTC_CENTURY] = rtc_to_bcd(s, year / 100); } -static void rtc_update_time(RTCState *s) +static void rtc_update_time(MC146818RtcState *s) { struct tm ret; time_t guest_sec; @@ -649,7 +649,7 @@ static void rtc_update_time(RTCState *s) } } -static int update_in_progress(RTCState *s) +static int update_in_progress(MC146818RtcState *s) { int64_t guest_nsec; @@ -678,7 +678,7 @@ static int update_in_progress(RTCState *s) static uint64_t cmos_ioport_read(void *opaque, hwaddr addr, unsigned size) { - RTCState *s = opaque; + MC146818RtcState *s = opaque; int ret; if ((addr & 1) == 0) { return 0xff; @@ -741,21 +741,21 @@ static uint64_t cmos_ioport_read(void *opaque, hwaddr addr, void rtc_set_memory(ISADevice *dev, int addr, int val) { - RTCState *s = MC146818_RTC(dev); + MC146818RtcState *s = MC146818_RTC(dev); if (addr >= 0 && addr <= 127) s->cmos_data[addr] = val; } int rtc_get_memory(ISADevice *dev, int addr) { - RTCState *s = MC146818_RTC(dev); + MC146818RtcState *s = MC146818_RTC(dev); assert(addr >= 0 && addr <= 127); return s->cmos_data[addr]; } static void rtc_set_date_from_host(ISADevice *dev) { - RTCState *s = MC146818_RTC(dev); + MC146818RtcState *s = MC146818_RTC(dev); struct tm tm; qemu_get_timedate(&tm, 0); @@ -770,7 +770,7 @@ static void rtc_set_date_from_host(ISADevice *dev) static int rtc_pre_save(void *opaque) { - RTCState *s = opaque; + MC146818RtcState *s = opaque; rtc_update_time(s); @@ -779,7 +779,7 @@ static int rtc_pre_save(void *opaque) static int rtc_post_load(void *opaque, int version_id) { - RTCState *s = opaque; + MC146818RtcState *s = opaque; if (version_id <= 2 || rtc_clock == QEMU_CLOCK_REALTIME) { rtc_set_time(s); @@ -810,7 +810,7 @@ static int rtc_post_load(void *opaque, int version_id) static bool rtc_irq_reinject_on_ack_count_needed(void *opaque) { - RTCState *s = (RTCState *)opaque; + MC146818RtcState *s = (MC146818RtcState *)opaque; return s->irq_reinject_on_ack_count != 0; } @@ -820,7 +820,7 @@ static const VMStateDescription vmstate_rtc_irq_reinject_on_ack_count = { .minimum_version_id = 1, .needed = rtc_irq_reinject_on_ack_count_needed, .fields = (VMStateField[]) { - VMSTATE_UINT16(irq_reinject_on_ack_count, RTCState), + VMSTATE_UINT16(irq_reinject_on_ack_count, MC146818RtcState), VMSTATE_END_OF_LIST() } }; @@ -832,19 +832,19 @@ static const VMStateDescription vmstate_rtc = { .pre_save = rtc_pre_save, .post_load = rtc_post_load, .fields = (VMStateField[]) { - VMSTATE_BUFFER(cmos_data, RTCState), - VMSTATE_UINT8(cmos_index, RTCState), + VMSTATE_BUFFER(cmos_data, MC146818RtcState), + VMSTATE_UINT8(cmos_index, MC146818RtcState), VMSTATE_UNUSED(7*4), - VMSTATE_TIMER_PTR(periodic_timer, RTCState), - VMSTATE_INT64(next_periodic_time, RTCState), + VMSTATE_TIMER_PTR(periodic_timer, MC146818RtcState), + VMSTATE_INT64(next_periodic_time, MC146818RtcState), VMSTATE_UNUSED(3*8), - VMSTATE_UINT32_V(irq_coalesced, RTCState, 2), - VMSTATE_UINT32_V(period, RTCState, 2), - VMSTATE_UINT64_V(base_rtc, RTCState, 3), - VMSTATE_UINT64_V(last_update, RTCState, 3), - VMSTATE_INT64_V(offset, RTCState, 3), - VMSTATE_TIMER_PTR_V(update_timer, RTCState, 3), - VMSTATE_UINT64_V(next_alarm_time, RTCState, 3), + VMSTATE_UINT32_V(irq_coalesced, MC146818RtcState, 2), + VMSTATE_UINT32_V(period, MC146818RtcState, 2), + VMSTATE_UINT64_V(base_rtc, MC146818RtcState, 3), + VMSTATE_UINT64_V(last_update, MC146818RtcState, 3), + VMSTATE_INT64_V(offset, MC146818RtcState, 3), + VMSTATE_TIMER_PTR_V(update_timer, MC146818RtcState, 3), + VMSTATE_UINT64_V(next_alarm_time, MC146818RtcState, 3), VMSTATE_END_OF_LIST() }, .subsections = (const VMStateDescription*[]) { @@ -857,7 +857,8 @@ static const VMStateDescription vmstate_rtc = { BIOS will read it and start S3 resume at POST Entry */ static void rtc_notify_suspend(Notifier *notifier, void *data) { - RTCState *s = container_of(notifier, RTCState, suspend_notifier); + MC146818RtcState *s = container_of(notifier, MC146818RtcState, + suspend_notifier); rtc_set_memory(ISA_DEVICE(s), 0xF, 0xFE); } @@ -873,7 +874,7 @@ static const MemoryRegionOps cmos_ops = { static void rtc_get_date(Object *obj, struct tm *current_tm, Error **errp) { - RTCState *s = MC146818_RTC(obj); + MC146818RtcState *s = MC146818_RTC(obj); rtc_update_time(s); rtc_get_time(s, current_tm); @@ -882,7 +883,7 @@ static void rtc_get_date(Object *obj, struct tm *current_tm, Error **errp) static void rtc_realizefn(DeviceState *dev, Error **errp) { ISADevice *isadev = ISA_DEVICE(dev); - RTCState *s = MC146818_RTC(dev); + MC146818RtcState *s = MC146818_RTC(dev); s->cmos_data[RTC_REG_A] = 0x26; s->cmos_data[RTC_REG_B] = 0x02; @@ -949,7 +950,7 @@ ISADevice *mc146818_rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq) { DeviceState *dev; ISADevice *isadev; - RTCState *s; + MC146818RtcState *s; isadev = isa_new(TYPE_MC146818_RTC); dev = DEVICE(isadev); @@ -969,17 +970,17 @@ ISADevice *mc146818_rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq) } static Property mc146818rtc_properties[] = { - DEFINE_PROP_INT32("base_year", RTCState, base_year, 1980), - DEFINE_PROP_UINT16("iobase", RTCState, io_base, RTC_ISA_BASE), - DEFINE_PROP_UINT8("irq", RTCState, isairq, RTC_ISA_IRQ), - DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", RTCState, + DEFINE_PROP_INT32("base_year", MC146818RtcState, base_year, 1980), + DEFINE_PROP_UINT16("iobase", MC146818RtcState, io_base, RTC_ISA_BASE), + DEFINE_PROP_UINT8("irq", MC146818RtcState, isairq, RTC_ISA_IRQ), + DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", MC146818RtcState, lost_tick_policy, LOST_TICK_POLICY_DISCARD), DEFINE_PROP_END_OF_LIST(), }; static void rtc_reset_enter(Object *obj, ResetType type) { - RTCState *s = MC146818_RTC(obj); + MC146818RtcState *s = MC146818_RTC(obj); /* Reason: VM do suspend self will set 0xfe * Reset any values other than 0xfe(Guest suspend case) */ @@ -1000,14 +1001,14 @@ static void rtc_reset_enter(Object *obj, ResetType type) static void rtc_reset_hold(Object *obj) { - RTCState *s = MC146818_RTC(obj); + MC146818RtcState *s = MC146818_RTC(obj); qemu_irq_lower(s->irq); } static void rtc_build_aml(AcpiDevAmlIf *adev, Aml *scope) { - RTCState *s = MC146818_RTC(adev); + MC146818RtcState *s = MC146818_RTC(adev); Aml *dev; Aml *crs; @@ -1045,7 +1046,7 @@ static void rtc_class_initfn(ObjectClass *klass, void *data) static const TypeInfo mc146818rtc_info = { .name = TYPE_MC146818_RTC, .parent = TYPE_ISA_DEVICE, - .instance_size = sizeof(RTCState), + .instance_size = sizeof(MC146818RtcState), .class_init = rtc_class_initfn, .interfaces = (InterfaceInfo[]) { { TYPE_ACPI_DEV_AML_IF }, diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h index 45bcd6f040..11631af7e3 100644 --- a/include/hw/rtc/mc146818rtc.h +++ b/include/hw/rtc/mc146818rtc.h @@ -16,9 +16,9 @@ #include "qom/object.h" #define TYPE_MC146818_RTC "mc146818rtc" -OBJECT_DECLARE_SIMPLE_TYPE(RTCState, MC146818_RTC) +OBJECT_DECLARE_SIMPLE_TYPE(MC146818RtcState, MC146818_RTC) -struct RTCState { +struct MC146818RtcState { ISADevice parent_obj; MemoryRegion io; @@ -46,7 +46,7 @@ struct RTCState { Notifier clock_reset_notifier; LostTickPolicy lost_tick_policy; Notifier suspend_notifier; - QLIST_ENTRY(RTCState) link; + QLIST_ENTRY(MC146818RtcState) link; }; #define RTC_ISA_IRQ 8 From patchwork Mon Feb 27 14:01:14 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: 657033 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2374174wrb; Mon, 27 Feb 2023 06:14:54 -0800 (PST) X-Google-Smtp-Source: AK7set/sNF09OwNuKweqOLgE9QucuVMIUvzHoVjKyqZwzRANsPg5JQofwrB4bD3h2PYqMzEE5i37 X-Received: by 2002:a05:622a:488:b0:3b6:3b60:e0 with SMTP id p8-20020a05622a048800b003b63b6000e0mr41005303qtx.31.1677507293994; Mon, 27 Feb 2023 06:14:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507293; cv=none; d=google.com; s=arc-20160816; b=UxEj35ccwvxq09azGlADH51iMU47HqFE4KpHQWW8pfDD/fEEDmOu9JiQ5dYCXe2SBs C+VGCRJIwF5sNN9X0zEqeyOa7jiDFuq7qNue6F4Y1imyOozXLlIkcZcQ1DseQG+I8u03 y7r1rjyXINsF1Opp/lYLCmrqk9VFN78ZDQo6+nBDpcqLxuX3uyHbUomw/zouwrG3u4ha TKLslLf2tQ3xo06pli/Y6M98ShqbZrSDv3C1rp3Qz3Agg/wI5O0KnSlbUM75TOF0CHRP vY0YuOMHvFiyZ3D46YAAK0/qepVzeCWH1ZBf3swvF5HY+Y2XgxAJadYPmWf49/eRd462 uLYQ== 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:to:from :dkim-signature; bh=BH6iFkg3xXP0Y7tfwyRGkdg+hFknPWvTOF1VaPk08+M=; b=V2367YUIZ+y8OBClUkITSlF9Z4Qcrsjbu7jAlvBrp9s3D9HyJkTL3Qcm8pZDS3bhWt aGK3YSZqTsWSPQEELhAyGNkEzSsr9cxvGNwTn5MOt2sVnHh9xS4Uwf10ExQ2rtjZw0oj FBVJ/jLS/swTGhYJd6qfebhDoU2fEPdlIEYoLld3FWGX23Xr1h94PFJU2pJNnCKCrL28 /1xMGfOcTGGgVH0DI7jI7ML+zfqlstjnsjFmWQzEVnGFv0HtEJ2eSjRsOQ5lX24fy5BS fIGbPKuxBAdyKQRZhgE0T3zGHO2NpFqFodB+fZf7Dmp2g8AEnzRHMU/hm+UJIc1LSL8w 0EtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SqwNFxJ7; 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 m3-20020aed27c3000000b003b9b3a0df86si5489683qtg.535.2023.02.27.06.14.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:14:53 -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=SqwNFxJ7; 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 1pWeAU-0000Kh-1L; Mon, 27 Feb 2023 09:07:54 -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 1pWeA8-0007mw-Kj for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:36 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeA6-0000GA-Na for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:32 -0500 Received: by mail-wm1-x332.google.com with SMTP id ay29-20020a05600c1e1d00b003e9f4c2b623so7245949wmb.3 for ; Mon, 27 Feb 2023 06:07:30 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BH6iFkg3xXP0Y7tfwyRGkdg+hFknPWvTOF1VaPk08+M=; b=SqwNFxJ7W5osEFMu3bCvORvTEhOgWs7HemRFlqupYCHGPHE+bBXlDsmdYEP68NNRq2 ExaOnvGYr+ncuJ+hXxHaA/smZjKRHRp7nnMf1+9EI7AF0/F4S+bCVBdk3HSs3EtjF1fI 75Vnsz0bmayJ6l4o5k9VlW2cZPjx1mgaC05DMTwO7O2466llFZePLk0W6DGjGNgDn52L 2TK6qTp0pc470+oYAia9/1ZzcdzSzszCy2KkXH0ceQjalPZjB5x6HQHrq5dUh3r2DKfA rPrJdIr4lntvafILHy6i5pNXjPf6y+EOH1rQmxDYcF+jBQEVqZUVdW1A4E3tKv4AKA8u 9O0w== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BH6iFkg3xXP0Y7tfwyRGkdg+hFknPWvTOF1VaPk08+M=; b=CH2Ru/g5hiT+Hvc7LPIv4VQLA1f9npobbMgS8r3IltxARZvEfNd3SUaU1rDU4kSdhn AyhuvlMaU/aVvaP63hBz55F9aqBPKd4h9oeiZmPmAFzsnStMKAZZALMscreyCFLxH7k+ w3oTqgPHf/enZs/18JIa0N54V2f4vfiuqyso6CtfEgG+qCxHN/p/UbK3zHB4+jLYG60+ OPg4KCymOqgEvouurDNXRKcvtNQjgHwui1zhWiq28D4WYDLVRbaoCN9PAPRZWCKuWUdm lzBU71VKZAvFnBSFFXHJ1eq6odnv2isXxoGxoUwoJo0qOVmw1hQg/Od2cmstfzgvQScP 8tMg== X-Gm-Message-State: AO0yUKV2H458emCpIqxoov3D71ZdkavSAswge0QZYeAcz66fP4CZ8H5D mq9afcZLjK7NMrNWmYdLjMP/Hfwuq/9BT4oL X-Received: by 2002:a05:600c:3088:b0:3d3:49db:9b25 with SMTP id g8-20020a05600c308800b003d349db9b25mr19973172wmn.26.1677506849073; Mon, 27 Feb 2023 06:07:29 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m9-20020a05600c4f4900b003dec22de1b1sm9990523wmq.10.2023.02.27.06.07.28 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 067/126] hw/rtc/mc146818rtc: Pass MC146818RtcState instead of ISADevice argument Date: Mon, 27 Feb 2023 15:01:14 +0100 Message-Id: <20230227140213.35084-58-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 rtc_get_memory() and rtc_set_memory() methods can not take any TYPE_ISA_DEVICE object. They expect a TYPE_MC146818_RTC one. Simplify the API by passing a MC146818RtcState. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230210233116.80311-3-philmd@linaro.org> --- hw/i386/microvm.c | 6 ++---- hw/i386/pc.c | 16 +++++++++------- hw/i386/x86.c | 4 +++- hw/ppc/prep.c | 3 +-- hw/rtc/mc146818rtc.c | 13 ++++++------- include/hw/rtc/mc146818rtc.h | 8 ++++---- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index fed468a34d..2349c4a0ab 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -57,7 +57,7 @@ #define MICROVM_QBOOT_FILENAME "qboot.rom" #define MICROVM_BIOS_FILENAME "bios-microvm.bin" -static void microvm_set_rtc(MicrovmMachineState *mms, ISADevice *s) +static void microvm_set_rtc(MicrovmMachineState *mms, MC146818RtcState *s) { X86MachineState *x86ms = X86_MACHINE(mms); int val; @@ -161,7 +161,6 @@ static void microvm_devices_init(MicrovmMachineState *mms) const char *default_firmware; X86MachineState *x86ms = X86_MACHINE(mms); ISABus *isa_bus; - ISADevice *rtc_state; GSIState *gsi_state; int ioapics; int i; @@ -267,8 +266,7 @@ static void microvm_devices_init(MicrovmMachineState *mms) if (mms->rtc == ON_OFF_AUTO_ON || (mms->rtc == ON_OFF_AUTO_AUTO && !kvm_enabled())) { - rtc_state = mc146818_rtc_init(isa_bus, 2000, NULL); - microvm_set_rtc(mms, rtc_state); + microvm_set_rtc(mms, mc146818_rtc_init(isa_bus, 2000, NULL)); } if (mms->isa_serial) { diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 7ad71b19aa..91f195032c 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -438,7 +438,7 @@ static uint64_t ioportF0_read(void *opaque, hwaddr addr, unsigned size) #define REG_EQUIPMENT_BYTE 0x14 -static void cmos_init_hd(ISADevice *s, int type_ofs, int info_ofs, +static void cmos_init_hd(MC146818RtcState *s, int type_ofs, int info_ofs, int16_t cylinders, int8_t heads, int8_t sectors) { rtc_set_memory(s, type_ofs, 47); @@ -470,7 +470,8 @@ static int boot_device2nibble(char boot_device) return 0; } -static void set_boot_dev(ISADevice *s, const char *boot_device, Error **errp) +static void set_boot_dev(MC146818RtcState *s, const char *boot_device, + Error **errp) { #define PC_MAX_BOOT_DEVICES 3 int nbds, bds[3] = { 0, }; @@ -498,7 +499,7 @@ static void pc_boot_set(void *opaque, const char *boot_device, Error **errp) set_boot_dev(opaque, boot_device, errp); } -static void pc_cmos_init_floppy(ISADevice *rtc_state, ISADevice *floppy) +static void pc_cmos_init_floppy(MC146818RtcState *rtc_state, ISADevice *floppy) { int val, nb, i; FloppyDriveType fd_type[2] = { FLOPPY_DRIVE_TYPE_NONE, @@ -536,7 +537,7 @@ static void pc_cmos_init_floppy(ISADevice *rtc_state, ISADevice *floppy) } typedef struct pc_cmos_init_late_arg { - ISADevice *rtc_state; + MC146818RtcState *rtc_state; BusState *idebus[2]; } pc_cmos_init_late_arg; @@ -603,7 +604,7 @@ static ISADevice *pc_find_fdc0(void) static void pc_cmos_init_late(void *opaque) { pc_cmos_init_late_arg *arg = opaque; - ISADevice *s = arg->rtc_state; + MC146818RtcState *s = arg->rtc_state; int16_t cylinders; int8_t heads, sectors; int val; @@ -645,11 +646,12 @@ static void pc_cmos_init_late(void *opaque) void pc_cmos_init(PCMachineState *pcms, BusState *idebus0, BusState *idebus1, - ISADevice *s) + ISADevice *rtc) { int val; static pc_cmos_init_late_arg arg; X86MachineState *x86ms = X86_MACHINE(pcms); + MC146818RtcState *s = MC146818_RTC(rtc); /* various important CMOS locations needed by PC/Bochs bios */ @@ -1303,7 +1305,7 @@ void pc_basic_device_init(struct PCMachineState *pcms, pit_alt_irq = qdev_get_gpio_in(hpet, HPET_LEGACY_PIT_INT); rtc_irq = qdev_get_gpio_in(hpet, HPET_LEGACY_RTC_INT); } - *rtc_state = mc146818_rtc_init(isa_bus, 2000, rtc_irq); + *rtc_state = ISA_DEVICE(mc146818_rtc_init(isa_bus, 2000, rtc_irq)); qemu_register_boot_set(pc_boot_set, *rtc_state); diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 5f28dc8390..38d2ec0581 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -150,8 +150,10 @@ void x86_cpus_init(X86MachineState *x86ms, int default_cpu_version) } } -void x86_rtc_set_cpus_count(ISADevice *rtc, uint16_t cpus_count) +void x86_rtc_set_cpus_count(ISADevice *s, uint16_t cpus_count) { + MC146818RtcState *rtc = MC146818_RTC(s); + if (cpus_count > 0xff) { /* * If the number of CPUs can't be represented in 8 bits, the diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index fcbe4c5837..076e2d0d22 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -212,10 +212,9 @@ static int PPC_NVRAM_set_params (Nvram *nvram, uint16_t NVRAM_size, static int prep_set_cmos_checksum(DeviceState *dev, void *opaque) { uint16_t checksum = *(uint16_t *)opaque; - ISADevice *rtc; if (object_dynamic_cast(OBJECT(dev), TYPE_MC146818_RTC)) { - rtc = ISA_DEVICE(dev); + MC146818RtcState *rtc = MC146818_RTC(dev); rtc_set_memory(rtc, 0x2e, checksum & 0xff); rtc_set_memory(rtc, 0x3e, checksum & 0xff); rtc_set_memory(rtc, 0x2f, checksum >> 8); diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index c285a53286..b4d7777634 100644 --- a/hw/rtc/mc146818rtc.c +++ b/hw/rtc/mc146818rtc.c @@ -739,16 +739,14 @@ static uint64_t cmos_ioport_read(void *opaque, hwaddr addr, } } -void rtc_set_memory(ISADevice *dev, int addr, int val) +void rtc_set_memory(MC146818RtcState *s, int addr, int val) { - MC146818RtcState *s = MC146818_RTC(dev); if (addr >= 0 && addr <= 127) s->cmos_data[addr] = val; } -int rtc_get_memory(ISADevice *dev, int addr) +int rtc_get_memory(MC146818RtcState *s, int addr) { - MC146818RtcState *s = MC146818_RTC(dev); assert(addr >= 0 && addr <= 127); return s->cmos_data[addr]; } @@ -859,7 +857,7 @@ static void rtc_notify_suspend(Notifier *notifier, void *data) { MC146818RtcState *s = container_of(notifier, MC146818RtcState, suspend_notifier); - rtc_set_memory(ISA_DEVICE(s), 0xF, 0xFE); + rtc_set_memory(s, 0xF, 0xFE); } static const MemoryRegionOps cmos_ops = { @@ -946,7 +944,8 @@ static void rtc_realizefn(DeviceState *dev, Error **errp) QLIST_INSERT_HEAD(&rtc_devices, s, link); } -ISADevice *mc146818_rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq) +MC146818RtcState *mc146818_rtc_init(ISABus *bus, int base_year, + qemu_irq intercept_irq) { DeviceState *dev; ISADevice *isadev; @@ -966,7 +965,7 @@ ISADevice *mc146818_rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq) object_property_add_alias(qdev_get_machine(), "rtc-time", OBJECT(isadev), "date"); - return isadev; + return s; } static Property mc146818rtc_properties[] = { diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h index 11631af7e3..a6b0c135c0 100644 --- a/include/hw/rtc/mc146818rtc.h +++ b/include/hw/rtc/mc146818rtc.h @@ -51,10 +51,10 @@ struct MC146818RtcState { #define RTC_ISA_IRQ 8 -ISADevice *mc146818_rtc_init(ISABus *bus, int base_year, - qemu_irq intercept_irq); -void rtc_set_memory(ISADevice *dev, int addr, int val); -int rtc_get_memory(ISADevice *dev, int addr); +MC146818RtcState *mc146818_rtc_init(ISABus *bus, int base_year, + qemu_irq intercept_irq); +void rtc_set_memory(MC146818RtcState *s, int addr, int val); +int rtc_get_memory(MC146818RtcState *s, int addr); void qmp_rtc_reset_reinjection(Error **errp); #endif /* HW_RTC_MC146818RTC_H */ From patchwork Mon Feb 27 14:01:15 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: 657094 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385134wrb; Mon, 27 Feb 2023 06:36:08 -0800 (PST) X-Google-Smtp-Source: AK7set++nBlsoD4akO3o9n2F9+oUViWb8Z0ipL3MNLhOjARkziOsqnoqy01Sfr4OVbh4JlC35aWO X-Received: by 2002:a05:622a:c7:b0:3bf:d359:1a1c with SMTP id p7-20020a05622a00c700b003bfd3591a1cmr7467853qtw.13.1677508568426; Mon, 27 Feb 2023 06:36:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508568; cv=none; d=google.com; s=arc-20160816; b=vkFTBbzwoZIVOV3jjOohGgajUVSwyhOI6eEHifPcOW/dOBBqSxsNUjHOP5TWUyBrsC FuGoubY09b/XY6QAZPmTaZrP3rY632k7cX4ATj8wOR0Kz262T+73FzyCVAotcT+Maft/ FhKq8ZDrKlG172gXdMYQAVcQjJRmS7b5Wz6QJV0sHTm1bDtOsa3wMXz5mOaBjJlRA5LF JmAJ0R0cYzgxXZERxqaXXeZLkrcZ76oX98CtJvEgZK4U5F2bAmmXNnUeP6enikoSGX6S EHCL9jFBGfbSlfI6dNaROndqtxuwSgC72KWbNKu+nH1iWNsgx7K4g3pMxbk/dXUnarZR nFrg== 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:to:from :dkim-signature; bh=HzGq9APDxAMzQIo8VltVW2aurDsOTUdVVQvgrdGYPTo=; b=X1bvPJJZKEqlCwZS6MGIcbUAQ8Q/deNn/Aqjpd4QcVb95Y+vnQE1UBh/oZfQ8Iu2d+ VXNJMKOIgvpZA74lCahxGHVzBvIfIz7OvISEqUk6t32yckmSjGwSfU/mkcVHFZCKNde+ /yBMpIeT9A2y1zlEcQebtnPqJN6s7le8/n83uEMqxUaGTfZDRzrGj5EegVhP35UrrQni kStDpRfxE5MrxOgD1XwHr5zNXMFMVb1ZBMXuEa43jdxen/bp17g4WBv4jwmsBcTTyRTk qb693KvA7oomwjkjES6fTBTyzwkjToav0mJAvl7o234ES5ii4GsOiaGYqUnwhNTLYH0n ztww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D7hXoqDn; 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 t13-20020a05622a01cd00b003b96ffcbb43si6642953qtw.673.2023.02.27.06.36.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:36: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=D7hXoqDn; 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 1pWeAR-0008QG-RC; Mon, 27 Feb 2023 09:07:51 -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 1pWeAH-0007rD-C2 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:42 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAF-0000IN-9i for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:41 -0500 Received: by mail-wm1-x335.google.com with SMTP id p26so4303174wmc.4 for ; Mon, 27 Feb 2023 06:07:38 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HzGq9APDxAMzQIo8VltVW2aurDsOTUdVVQvgrdGYPTo=; b=D7hXoqDnRblyu72fvUJlffqThaADbBBWVs4BtY23Lnf9rL8PLfVqIisbSoMaF1lfm8 7G28csfRqkp1/CrHR7kyJFBPYIgSAZvUEwxRWQ5RxwWF2gCmAy0n16jOs5YyRj0jLSUT otrYCaOafYZbGOH8jQXxiWJgST5/sVQE6h/JT5dqN6i6mrvI1K9R/c/XfV/5YXt8eZ+j bSlo5Se1ZWWQ0j1Nh8UGYWpRBRazRW/nKkt4fGXiax/8v5lQgtSmSVn02snwaq7FhS4u o+r/Cs2bHCSVT48DMFUnpIiaxQYAkAZJNX6igLkgZX2BSF0SoCrnI4XnzFHNqzB3nfWV J3sA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HzGq9APDxAMzQIo8VltVW2aurDsOTUdVVQvgrdGYPTo=; b=WBgFS8wsxsx2mL5kSlX4mnZja5G0rg2lwJJ0G8d/FRA6Lw+ys1DY7l/YVHkKaQx/F5 OZS+X/yx2BQdX1ptjHIk/oMWSNfx54eCvOpMmj10szLJc8i6WTbTUrYByM9tO+RuEUed wKdj3p6t6YgFHJo4Kio9Rn4eR8adF+5qPhMIqmf5z/LqXIC278U1qPo7HajlN8kcGgoX yTIr///mhsQ7DZ/RroIeU2qEV49PsEM0LRxDelNIkoUG5S2h9eAFfCJFmHp5mjqAoBCM vVx6IhllwUxQAmyngaYlb6HkPtGdIJwPN1Io4lCLcMcev44f/2pKbwceoW5cXzpf0Kxp cyng== X-Gm-Message-State: AO0yUKUzKn5xfnCHT8iFnjtytT4O6sRJv9/Q1Fy6XVFC56+cmgd713Sy civ4NcWQMeIXx6ZEAvZTphmkV4nSBdzQHc2e X-Received: by 2002:a05:600c:4b30:b0:3e2:147f:ac16 with SMTP id i48-20020a05600c4b3000b003e2147fac16mr16823986wmp.10.1677506855502; Mon, 27 Feb 2023 06:07:35 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p15-20020a05600c1d8f00b003e20970175dsm13223389wms.32.2023.02.27.06.07.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 068/126] hw/rtc: Rename rtc_[get|set]_memory -> mc146818rtc_[get|set]_cmos_data Date: Mon, 27 Feb 2023 15:01:15 +0100 Message-Id: <20230227140213.35084-59-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=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 rtc_get_memory() and rtc_set_memory() helpers only work with TYPE_MC146818_RTC devices. 'memory' in their name refer to the CMOS region. Rename them as mc146818rtc_get_cmos_data() and mc146818rtc_set_cmos_data() to be explicit about what they are doing. Mechanical change doing: $ sed -i -e 's/rtc_set_memory/mc146818rtc_set_cmos_data/g' \ $(git grep -wl rtc_set_memory) $ sed -i -e 's/rtc_get_memory/mc146818rtc_get_cmos_data/g' \ $(git grep -wl rtc_get_memory) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230210233116.80311-4-philmd@linaro.org> --- hw/i386/microvm.c | 22 +++++++------- hw/i386/pc.c | 58 ++++++++++++++++++------------------ hw/i386/x86.c | 4 +-- hw/ppc/prep.c | 8 ++--- hw/rtc/mc146818rtc.c | 6 ++-- include/hw/rtc/mc146818rtc.h | 4 +-- 6 files changed, 51 insertions(+), 51 deletions(-) diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c index 2349c4a0ab..68c22016d2 100644 --- a/hw/i386/microvm.c +++ b/hw/i386/microvm.c @@ -63,8 +63,8 @@ static void microvm_set_rtc(MicrovmMachineState *mms, MC146818RtcState *s) int val; val = MIN(x86ms->below_4g_mem_size / KiB, 640); - rtc_set_memory(s, 0x15, val); - rtc_set_memory(s, 0x16, val >> 8); + mc146818rtc_set_cmos_data(s, 0x15, val); + mc146818rtc_set_cmos_data(s, 0x16, val >> 8); /* extended memory (next 64MiB) */ if (x86ms->below_4g_mem_size > 1 * MiB) { val = (x86ms->below_4g_mem_size - 1 * MiB) / KiB; @@ -74,10 +74,10 @@ static void microvm_set_rtc(MicrovmMachineState *mms, MC146818RtcState *s) if (val > 65535) { val = 65535; } - rtc_set_memory(s, 0x17, val); - rtc_set_memory(s, 0x18, val >> 8); - rtc_set_memory(s, 0x30, val); - rtc_set_memory(s, 0x31, val >> 8); + mc146818rtc_set_cmos_data(s, 0x17, val); + mc146818rtc_set_cmos_data(s, 0x18, val >> 8); + mc146818rtc_set_cmos_data(s, 0x30, val); + mc146818rtc_set_cmos_data(s, 0x31, val >> 8); /* memory between 16MiB and 4GiB */ if (x86ms->below_4g_mem_size > 16 * MiB) { val = (x86ms->below_4g_mem_size - 16 * MiB) / (64 * KiB); @@ -87,13 +87,13 @@ static void microvm_set_rtc(MicrovmMachineState *mms, MC146818RtcState *s) if (val > 65535) { val = 65535; } - rtc_set_memory(s, 0x34, val); - rtc_set_memory(s, 0x35, val >> 8); + mc146818rtc_set_cmos_data(s, 0x34, val); + mc146818rtc_set_cmos_data(s, 0x35, val >> 8); /* memory above 4GiB */ val = x86ms->above_4g_mem_size / 65536; - rtc_set_memory(s, 0x5b, val); - rtc_set_memory(s, 0x5c, val >> 8); - rtc_set_memory(s, 0x5d, val >> 16); + mc146818rtc_set_cmos_data(s, 0x5b, val); + mc146818rtc_set_cmos_data(s, 0x5c, val >> 8); + mc146818rtc_set_cmos_data(s, 0x5d, val >> 16); } static void create_gpex(MicrovmMachineState *mms) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 91f195032c..98c2becc11 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -441,16 +441,16 @@ static uint64_t ioportF0_read(void *opaque, hwaddr addr, unsigned size) static void cmos_init_hd(MC146818RtcState *s, int type_ofs, int info_ofs, int16_t cylinders, int8_t heads, int8_t sectors) { - rtc_set_memory(s, type_ofs, 47); - rtc_set_memory(s, info_ofs, cylinders); - rtc_set_memory(s, info_ofs + 1, cylinders >> 8); - rtc_set_memory(s, info_ofs + 2, heads); - rtc_set_memory(s, info_ofs + 3, 0xff); - rtc_set_memory(s, info_ofs + 4, 0xff); - rtc_set_memory(s, info_ofs + 5, 0xc0 | ((heads > 8) << 3)); - rtc_set_memory(s, info_ofs + 6, cylinders); - rtc_set_memory(s, info_ofs + 7, cylinders >> 8); - rtc_set_memory(s, info_ofs + 8, sectors); + mc146818rtc_set_cmos_data(s, type_ofs, 47); + mc146818rtc_set_cmos_data(s, info_ofs, cylinders); + mc146818rtc_set_cmos_data(s, info_ofs + 1, cylinders >> 8); + mc146818rtc_set_cmos_data(s, info_ofs + 2, heads); + mc146818rtc_set_cmos_data(s, info_ofs + 3, 0xff); + mc146818rtc_set_cmos_data(s, info_ofs + 4, 0xff); + mc146818rtc_set_cmos_data(s, info_ofs + 5, 0xc0 | ((heads > 8) << 3)); + mc146818rtc_set_cmos_data(s, info_ofs + 6, cylinders); + mc146818rtc_set_cmos_data(s, info_ofs + 7, cylinders >> 8); + mc146818rtc_set_cmos_data(s, info_ofs + 8, sectors); } /* convert boot_device letter to something recognizable by the bios */ @@ -490,8 +490,8 @@ static void set_boot_dev(MC146818RtcState *s, const char *boot_device, return; } } - rtc_set_memory(s, 0x3d, (bds[1] << 4) | bds[0]); - rtc_set_memory(s, 0x38, (bds[2] << 4) | (fd_bootchk ? 0x0 : 0x1)); + mc146818rtc_set_cmos_data(s, 0x3d, (bds[1] << 4) | bds[0]); + mc146818rtc_set_cmos_data(s, 0x38, (bds[2] << 4) | (fd_bootchk ? 0x0 : 0x1)); } static void pc_boot_set(void *opaque, const char *boot_device, Error **errp) @@ -513,9 +513,9 @@ static void pc_cmos_init_floppy(MC146818RtcState *rtc_state, ISADevice *floppy) } val = (cmos_get_fd_drive_type(fd_type[0]) << 4) | cmos_get_fd_drive_type(fd_type[1]); - rtc_set_memory(rtc_state, 0x10, val); + mc146818rtc_set_cmos_data(rtc_state, 0x10, val); - val = rtc_get_memory(rtc_state, REG_EQUIPMENT_BYTE); + val = mc146818rtc_get_cmos_data(rtc_state, REG_EQUIPMENT_BYTE); nb = 0; if (fd_type[0] != FLOPPY_DRIVE_TYPE_NONE) { nb++; @@ -533,7 +533,7 @@ static void pc_cmos_init_floppy(MC146818RtcState *rtc_state, ISADevice *floppy) val |= 0x41; /* 2 drives, ready for boot */ break; } - rtc_set_memory(rtc_state, REG_EQUIPMENT_BYTE, val); + mc146818rtc_set_cmos_data(rtc_state, REG_EQUIPMENT_BYTE, val); } typedef struct pc_cmos_init_late_arg { @@ -621,7 +621,7 @@ static void pc_cmos_init_late(void *opaque) cmos_init_hd(s, 0x1a, 0x24, cylinders, heads, sectors); val |= 0x0f; } - rtc_set_memory(s, 0x12, val); + mc146818rtc_set_cmos_data(s, 0x12, val); val = 0; for (i = 0; i < 4; i++) { @@ -637,7 +637,7 @@ static void pc_cmos_init_late(void *opaque) val |= trans << (i * 2); } } - rtc_set_memory(s, 0x39, val); + mc146818rtc_set_cmos_data(s, 0x39, val); pc_cmos_init_floppy(s, pc_find_fdc0()); @@ -658,8 +658,8 @@ void pc_cmos_init(PCMachineState *pcms, /* memory size */ /* base memory (first MiB) */ val = MIN(x86ms->below_4g_mem_size / KiB, 640); - rtc_set_memory(s, 0x15, val); - rtc_set_memory(s, 0x16, val >> 8); + mc146818rtc_set_cmos_data(s, 0x15, val); + mc146818rtc_set_cmos_data(s, 0x16, val >> 8); /* extended memory (next 64MiB) */ if (x86ms->below_4g_mem_size > 1 * MiB) { val = (x86ms->below_4g_mem_size - 1 * MiB) / KiB; @@ -668,10 +668,10 @@ void pc_cmos_init(PCMachineState *pcms, } if (val > 65535) val = 65535; - rtc_set_memory(s, 0x17, val); - rtc_set_memory(s, 0x18, val >> 8); - rtc_set_memory(s, 0x30, val); - rtc_set_memory(s, 0x31, val >> 8); + mc146818rtc_set_cmos_data(s, 0x17, val); + mc146818rtc_set_cmos_data(s, 0x18, val >> 8); + mc146818rtc_set_cmos_data(s, 0x30, val); + mc146818rtc_set_cmos_data(s, 0x31, val >> 8); /* memory between 16MiB and 4GiB */ if (x86ms->below_4g_mem_size > 16 * MiB) { val = (x86ms->below_4g_mem_size - 16 * MiB) / (64 * KiB); @@ -680,13 +680,13 @@ void pc_cmos_init(PCMachineState *pcms, } if (val > 65535) val = 65535; - rtc_set_memory(s, 0x34, val); - rtc_set_memory(s, 0x35, val >> 8); + mc146818rtc_set_cmos_data(s, 0x34, val); + mc146818rtc_set_cmos_data(s, 0x35, val >> 8); /* memory above 4GiB */ val = x86ms->above_4g_mem_size / 65536; - rtc_set_memory(s, 0x5b, val); - rtc_set_memory(s, 0x5c, val >> 8); - rtc_set_memory(s, 0x5d, val >> 16); + mc146818rtc_set_cmos_data(s, 0x5b, val); + mc146818rtc_set_cmos_data(s, 0x5c, val >> 8); + mc146818rtc_set_cmos_data(s, 0x5d, val >> 16); object_property_add_link(OBJECT(pcms), "rtc_state", TYPE_ISA_DEVICE, @@ -701,7 +701,7 @@ void pc_cmos_init(PCMachineState *pcms, val = 0; val |= 0x02; /* FPU is there */ val |= 0x04; /* PS/2 mouse installed */ - rtc_set_memory(s, REG_EQUIPMENT_BYTE, val); + mc146818rtc_set_cmos_data(s, REG_EQUIPMENT_BYTE, val); /* hard drives and FDC */ arg.rtc_state = s; diff --git a/hw/i386/x86.c b/hw/i386/x86.c index 38d2ec0581..c44846f47b 100644 --- a/hw/i386/x86.c +++ b/hw/i386/x86.c @@ -160,9 +160,9 @@ void x86_rtc_set_cpus_count(ISADevice *s, uint16_t cpus_count) * BIOS must use "FW_CFG_NB_CPUS". Set RTC field to 0 just * to make old BIOSes fail more predictably. */ - rtc_set_memory(rtc, 0x5f, 0); + mc146818rtc_set_cmos_data(rtc, 0x5f, 0); } else { - rtc_set_memory(rtc, 0x5f, cpus_count - 1); + mc146818rtc_set_cmos_data(rtc, 0x5f, cpus_count - 1); } } diff --git a/hw/ppc/prep.c b/hw/ppc/prep.c index 076e2d0d22..d00280c0f8 100644 --- a/hw/ppc/prep.c +++ b/hw/ppc/prep.c @@ -215,10 +215,10 @@ static int prep_set_cmos_checksum(DeviceState *dev, void *opaque) if (object_dynamic_cast(OBJECT(dev), TYPE_MC146818_RTC)) { MC146818RtcState *rtc = MC146818_RTC(dev); - rtc_set_memory(rtc, 0x2e, checksum & 0xff); - rtc_set_memory(rtc, 0x3e, checksum & 0xff); - rtc_set_memory(rtc, 0x2f, checksum >> 8); - rtc_set_memory(rtc, 0x3f, checksum >> 8); + mc146818rtc_set_cmos_data(rtc, 0x2e, checksum & 0xff); + mc146818rtc_set_cmos_data(rtc, 0x3e, checksum & 0xff); + mc146818rtc_set_cmos_data(rtc, 0x2f, checksum >> 8); + mc146818rtc_set_cmos_data(rtc, 0x3f, checksum >> 8); object_property_add_alias(qdev_get_machine(), "rtc-time", OBJECT(rtc), "date"); diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index b4d7777634..c27c362db9 100644 --- a/hw/rtc/mc146818rtc.c +++ b/hw/rtc/mc146818rtc.c @@ -739,13 +739,13 @@ static uint64_t cmos_ioport_read(void *opaque, hwaddr addr, } } -void rtc_set_memory(MC146818RtcState *s, int addr, int val) +void mc146818rtc_set_cmos_data(MC146818RtcState *s, int addr, int val) { if (addr >= 0 && addr <= 127) s->cmos_data[addr] = val; } -int rtc_get_memory(MC146818RtcState *s, int addr) +int mc146818rtc_get_cmos_data(MC146818RtcState *s, int addr) { assert(addr >= 0 && addr <= 127); return s->cmos_data[addr]; @@ -857,7 +857,7 @@ static void rtc_notify_suspend(Notifier *notifier, void *data) { MC146818RtcState *s = container_of(notifier, MC146818RtcState, suspend_notifier); - rtc_set_memory(s, 0xF, 0xFE); + mc146818rtc_set_cmos_data(s, 0xF, 0xFE); } static const MemoryRegionOps cmos_ops = { diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h index a6b0c135c0..97cec0b3e8 100644 --- a/include/hw/rtc/mc146818rtc.h +++ b/include/hw/rtc/mc146818rtc.h @@ -53,8 +53,8 @@ struct MC146818RtcState { MC146818RtcState *mc146818_rtc_init(ISABus *bus, int base_year, qemu_irq intercept_irq); -void rtc_set_memory(MC146818RtcState *s, int addr, int val); -int rtc_get_memory(MC146818RtcState *s, int addr); +void mc146818rtc_set_cmos_data(MC146818RtcState *s, int addr, int val); +int mc146818rtc_get_cmos_data(MC146818RtcState *s, int addr); void qmp_rtc_reset_reinjection(Error **errp); #endif /* HW_RTC_MC146818RTC_H */ From patchwork Mon Feb 27 14:01:16 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: 657015 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2372079wrb; Mon, 27 Feb 2023 06:11:12 -0800 (PST) X-Google-Smtp-Source: AK7set9Ok51y/4cnztMXIuzhhZMOBkMcH5AZT4bwVMfmeOWbq4wz7LgGzggpS/E0flfx6V+Dknml X-Received: by 2002:a05:622a:4c8:b0:3bf:d196:5e27 with SMTP id q8-20020a05622a04c800b003bfd1965e27mr9031029qtx.20.1677507072741; Mon, 27 Feb 2023 06:11:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507072; cv=none; d=google.com; s=arc-20160816; b=TPSQwadj9d7uNR1rpb1Tim/EJiKrbRMhJmJAJw1rXdaIx+wdWwwpTFphS9bJkdcBzF rfaS1AKaaS6lFWfIkXKjxmcSiY9H13zMGswi79pCJp5jkM0pSdyJ/r8Txl71yMsdhNRj co9LIZUgPF9iu1M8cGwoj51qtyJFN3hESJdMYHfLzcitaEngVBh+Us+Bmw0dxyaqv3um nnL8L0zH/KOzL23m5E5AN+5DA5n8nm4vBrF6znINhivK9OTWrid1RnlOjS1VNCRdHKbD V3AaFxlSTMx8/6lDcwUmU2JQqWCwY8eAS4jgBIYtIxZCdTAJIV7kegRYFFQliEB88eBj Jfkg== 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:to:from :dkim-signature; bh=FlE7UGdxR/uM/IgeqU29kmjHYiv7oetRrBoHo0yqcyc=; b=p45cWE0QVIAaK6grNwwoMzWPFDb0PRdMo8NhThdRr5gawonkROefWVNXYRh0n+IO+0 dUeTcbqQfjnvC9BPsnjiK9zGznlRKknk7AAeRhYFEVUZN7qIDUcZkuTMv9Xd095cgVbz gpg+bW5ZidTFXEuhzRHvhBRKLocsO3PHah0uHhDg/bBDbD4w+5pcN1ccWfEOzKDm9sdC DGerMfQdxrHs5dygPClmmxQjbh3p8uAMwuClGdoNnrLpXf/s3gQvyUo8GcT+3cwzGP4a mkgMW6nNW9zCAUnfQs1NvgpTXHSZwtrjE+Rq07kN+Bia1Gr5qT4CLnqs63cgjU8LDJa4 RaZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Or7Ts3NI; 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 d10-20020ac85aca000000b003ba1ccba50fsi6609723qtd.557.2023.02.27.06.11.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:11: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=Or7Ts3NI; 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 1pWeAU-0000TN-TX; Mon, 27 Feb 2023 09:07:54 -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 1pWeAK-0007vS-L4 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:48 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAJ-0000J6-6D for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:44 -0500 Received: by mail-wr1-x430.google.com with SMTP id bt28so6352850wrb.8 for ; Mon, 27 Feb 2023 06:07:42 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FlE7UGdxR/uM/IgeqU29kmjHYiv7oetRrBoHo0yqcyc=; b=Or7Ts3NI0L56hQaab+RAccj6pS6drEp2Vx+U1CwurQ8sjpUNw6Q0fFzOm0AomaEPBO b/9Z93jVjshedO0xvPs9KE/QpontXL28Fo+3Uwb9Q6Icl280iaefaKGW/wSO88wR2E9X fMSnA2gR7Mmjdm5VwQJ1vgHpVGaaJ04rAQMbgQ+YGQLuKp8fAHrXnaCZtNpQLwPjbTFa gfBsVgKVTfThqb7PJV4vKJ6H0Y/cHxOzuct2upLYVBsQOr5KW/0DaiquCopop4SrK5is ezqGyiUegSPg9zmadcPky/4MtcozNeV7X35isp33gcWL/1RdrFfYihX2VTt6+Vr4uwzm GlEw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FlE7UGdxR/uM/IgeqU29kmjHYiv7oetRrBoHo0yqcyc=; b=q0/LM7CX1k1WBwb+Y8BfgPJxMqeEZ7CPX0XNwyeM37VsdF7pFbx2F+j6evEhwAA/kh vYB9FWUTWwlSEnUeVntB+y/vjcGEyAzt3suKj2p6rC/JBWsYOGgtLk13AvdimzxIP+gB 3+m2IotQQjurhEFJMjTmCaUVZOUylITw4zYjdXpJmxJ/yuSprFbf9UYnyGhwf9Q8CV9m 8q1msSGCUfHiCBHxlYh5V87BI5zaLSbei578eM7fFC9dbX/904cJrkCzSYCErecY+S/u DYoIrVdwxvsfh6awlm1RKzxuMxEp7fYVlaKQ0CoZQ61/yYvbdKNd60VxnzREiH2kAlcj Dl4w== X-Gm-Message-State: AO0yUKW3957IK9Ay5lrSkVFpZv68BuwyLysug85OMd0BUPB37iol9k1r lZi/TxFVKsdj/ca9V42ToEyrPjVqaDdKxcWA X-Received: by 2002:adf:e58f:0:b0:2c5:a07e:4bb6 with SMTP id l15-20020adfe58f000000b002c5a07e4bb6mr20580291wrm.33.1677506861222; Mon, 27 Feb 2023 06:07:41 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j24-20020a05600c1c1800b003e22508a343sm9905965wms.12.2023.02.27.06.07.40 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:40 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 069/126] hw/timer/hpet: Include missing 'hw/qdev-properties.h' header Date: Mon, 27 Feb 2023 15:01:16 +0100 Message-Id: <20230227140213.35084-60-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 Avoid when refactoring unrelated headers: hw/timer/hpet.c:776:39: error: array has incomplete element type 'Property' (aka 'struct Property') static Property hpet_device_properties[] = { ^ hw/timer/hpet.c:777:5: error: implicit declaration of function 'DEFINE_PROP_UINT8' is invalid in C99 [-Werror,-Wimplicit-function-declaration] DEFINE_PROP_UINT8("timers", HPETState, num_timers, HPET_MIN_TIMERS), ^ Signed-off-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson Message-Id: <20230215174353.37097-2-philmd@linaro.org> --- hw/timer/hpet.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/timer/hpet.c b/hw/timer/hpet.c index 9520471be2..214d6a0501 100644 --- a/hw/timer/hpet.c +++ b/hw/timer/hpet.c @@ -30,6 +30,7 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/timer.h" +#include "hw/qdev-properties.h" #include "hw/timer/hpet.h" #include "hw/sysbus.h" #include "hw/rtc/mc146818rtc.h" From patchwork Mon Feb 27 14:01:17 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: 657031 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373957wrb; Mon, 27 Feb 2023 06:14:33 -0800 (PST) X-Google-Smtp-Source: AK7set9oQRbVWZL2PZUD2/djb7H3odS6f9icJu+QemvXlcAJgb5yydsQdAV/qf/AMrB8lKiV8O0y X-Received: by 2002:ac8:7d88:0:b0:3bf:d372:a5a4 with SMTP id c8-20020ac87d88000000b003bfd372a5a4mr9063020qtd.50.1677507273049; Mon, 27 Feb 2023 06:14:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507273; cv=none; d=google.com; s=arc-20160816; b=NtI8aN9Rq1y+kwsNxON6/OFbNphP/jPOgB2FWRigJY4G1KqChW4185XEEoLDI7MeV9 CdN2KYAxdzJpLgkHyKuHtr2Z1HtgavzuqDIuhRbMhyHJ0Kh8VgPEIqyFeqFcgRqcK2JX AgKLKIsbeG+DuGz5GOO46pcrAhcssaeh6Vv8le6wxqAkPcnNEmbwnjdBTtfMTVRHLpI+ Klo0pxQYS38wXiMnPn7KAKM5suqS+4Ke9ZNNwYGr0CeL2HKIl4yEiOODGVDF++6e4NZo cV1azRwSJCOx5A/dHq650jKLnUrI50doiayTB1Nh4FKp7HLZdMkrAFVVWv0cFPxeK3rM 0IRA== 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:to:from :dkim-signature; bh=3enTjFCWEZfDXiQrgweVk1M1zUaM7hjsygeC4oyGuF0=; b=Bfa8lWwbRolR9+ZK7YQNm/hBtpnjIVdv+Xv8CDCZ6spjMkQ6JZN68KwYq5NUcPTXub Apc5bmonUJ7FYTdnvAKE+bqJ8OKUNlOFy4YOq66RchrWvgXfMq3V8MYo1CrUbGfgLGLi 7UR9MrDxNGNJvW7sDm8AS77aoNKi7cIAVlc+YiIJRTWjVqcH8cvtUSDOTfYadYyn+v+r hBNIT3E3/tRbBS5H59fwf4g1TSkwmDwwgBn0/kyi1aFSielp1XuDzg0VZfppDhWVpgni rD0trw1zk80PP9Za1hdPnWoHX4+cLqPNh7DsJdLW0Wm/O+GYpFIJrNcOzyWtNW0SXucu vlww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w0V0MT9s; 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 j8-20020a05622a038800b003be36c7a146si6582239qtx.240.2023.02.27.06.14.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:14:33 -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=w0V0MT9s; 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 1pWeAU-0000TZ-Tl; Mon, 27 Feb 2023 09:07:54 -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 1pWeAQ-0008Ei-61 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:50 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAO-0000J6-Ff for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:49 -0500 Received: by mail-wr1-x430.google.com with SMTP id bt28so6353152wrb.8 for ; Mon, 27 Feb 2023 06:07:47 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=3enTjFCWEZfDXiQrgweVk1M1zUaM7hjsygeC4oyGuF0=; b=w0V0MT9snEsleCIfJ2SSIaopnG5u/1pZPC0pamLYuLWdI9xl7mJ8Xlva+BOmvNGyex 5gPboEoirOtL1KFEveTSgBoj9B3iMhHKsJc3gnhrW1E0q9H3AOLrEEMA03wfgBZ/yIj0 93ItkGteuvo0XIHZD1Fo91FAlFPTuWILP076G4ctu44K1T98NjIiQ30g2AXiFIjMW1tX HVAgXkGr8jnmF34Jx34iZDnp8kCIQuiCCqz/2w4p5zBYUj8GAhtPl88khl2JG4crEBnc k0PRgq2TdY1RXY8NqiJ1Ga0HosZPCCXAdwDa04O2Ne94CB0bAmGJitgNWCPo/Y94DSN6 XQqA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3enTjFCWEZfDXiQrgweVk1M1zUaM7hjsygeC4oyGuF0=; b=P+F0WP4uBT0o/+RHkbZjPvQegp9BvEsSGXPZQz4oefKAJvzoigTOSFMFcYVb/CppZD 20YAEzZ2FDUnQjal1nFtyCgczSOdsME8+A4D/4sH/pWIdXk31A5KCItancGUBSJjE6Q6 kIzLfTbKoTqylKTcg/qGH/oZDjPJQOrIvreOJfsqZCBizCH/PYiFQZU8uXoHbVg023pY l8yMc+eWTgk36PWWat16qxLi9tx6hXFNlFSYvt4HbigOfAvhwCp/8nsWFJAy/x7Sf8Zb fodRG+MCBIUi+2lug+07/pBYZgkViLqai8jaq0riKj+FKogJn0F576RYLl/O5LBesu8H yIaA== X-Gm-Message-State: AO0yUKUygJ4ctpl4Gmh5wU5rJcoOSn/BjGnVziGJBMufx4Kb8kjfLhDF N9bEkA8dXIUznni5jVl0YrUu+F/47dC+gTTA X-Received: by 2002:adf:ef0d:0:b0:2c5:587e:75ba with SMTP id e13-20020adfef0d000000b002c5587e75bamr19890379wro.55.1677506866636; Mon, 27 Feb 2023 06:07:46 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t23-20020a05600c2f9700b003e2232d0960sm9190227wmn.23.2023.02.27.06.07.45 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:46 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 070/126] hw/audio/hda-codec: Avoid forward-declaring HDAAudioState Date: Mon, 27 Feb 2023 15:01:17 +0100 Message-Id: <20230227140213.35084-61-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 To avoid forward-declaring HDAAudioState, declare HDA_AUDIO QOM definitions before its use in the HDAAudioStream structure. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220131837.26292-2-philmd@linaro.org> --- hw/audio/hda-codec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index feb8f9e2bb..c51d8ba617 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -145,7 +145,9 @@ static const char *fmt2name[] = { [ AUDIO_FORMAT_S32 ] = "PCM-S32", }; -typedef struct HDAAudioState HDAAudioState; +#define TYPE_HDA_AUDIO "hda-audio" +OBJECT_DECLARE_SIMPLE_TYPE(HDAAudioState, HDA_AUDIO) + typedef struct HDAAudioStream HDAAudioStream; struct HDAAudioStream { @@ -171,9 +173,6 @@ struct HDAAudioStream { int64_t buft_start; }; -#define TYPE_HDA_AUDIO "hda-audio" -OBJECT_DECLARE_SIMPLE_TYPE(HDAAudioState, HDA_AUDIO) - struct HDAAudioState { HDACodecDevice hda; const char *name; From patchwork Mon Feb 27 14:01:18 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: 657055 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2378416wrb; Mon, 27 Feb 2023 06:22:49 -0800 (PST) X-Google-Smtp-Source: AK7set+YdtQLlEpoo5mj2DcBenk/7qjb3OYaQpO/YIkNO4iZKYtJVHY4531OASuadmjiQAyNx+V/ X-Received: by 2002:ac8:7d88:0:b0:3bf:d372:a5a4 with SMTP id c8-20020ac87d88000000b003bfd372a5a4mr9121267qtd.50.1677507769266; Mon, 27 Feb 2023 06:22:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507769; cv=none; d=google.com; s=arc-20160816; b=u8KcLy6WPitj9GOxyZcxq2kI2bmxxe0N9qDMvPHfzAXM7g4+46h5ISjD+jtCeI/T9W 95NfeQBvn+8P6ad8CwlYs0c1oZV0a5krwf7t6zdos0tW94ALKrgzybgbMne9F0dAZaku 5J0ROl0pjtqLqRdUHwA3KjZ0YTg/fN66GiUG3U3xPdrm/LNWt9e8f5PEZihyGXihBb+O 4xxh6HHmHntQI+zLDUtOKjPa/KWTIt5kpmcb4RZjdYaU7uD1tcyAQAHje8R7s/dvqSR5 n0L9BJ7NlYa7nn4uzgqDENAbgL/8iOmuhG0itPjhDw+kL0gSGOHPJFrw1ERv5kVZhyp8 JGFw== 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:to:from :dkim-signature; bh=9BQv1kTB2L0mnCbjAHXP+un9EH4FVICZqpzI5v7B5ww=; b=rNcwZie7/3ebJDQzMqo0onakTS60mr8aO5XKpLGnQKj4avP2COSAlnxaPpbPDwqj4W nzrHNBT07KVYJwALLPrCwKNw/U6SCEeiRSEmSfG8D3cfQAskeb5fz6L1kgue6mFw5Fum NMKOac9kbaCv/cVbMuHggBLSam2gFtaZIxP1xr0HRcGQSlK55yyErg/YiRoaML3/ph4+ oEw+1BZFxjzbEM49KXUWyvH6DgpaP/sHvEeGiMllzRYfJrzUrvrmJ5v9tLuQ7GgiJDC0 pgBXx02svBVaBgHoxU266QbivqRGXNN0CIvANKIyDut689RuNIJ4Kwr+B9crAvnn+dEb omvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ww56SprY; 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 o7-20020ac87c47000000b003ba3a9cc7f3si5307674qtv.419.2023.02.27.06.22.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:22:49 -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=ww56SprY; 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 1pWeAX-0000ze-FM; Mon, 27 Feb 2023 09:07:57 -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 1pWeAV-0000d1-Nk for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:55 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAT-0000Lb-SB for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:55 -0500 Received: by mail-wr1-x433.google.com with SMTP id h14so6365013wru.4 for ; Mon, 27 Feb 2023 06:07:53 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9BQv1kTB2L0mnCbjAHXP+un9EH4FVICZqpzI5v7B5ww=; b=ww56SprYy/WgKYYwysoYvV/+aY16HBvRbmo95k9guREgWVpeuroFyWlDTpC0H1JldR b3BmImq757spZfuj5V0b2IkIBn3Ae4PlJ8/ExuIQPRk1tjr3f1i6Zq1Uq2VCMs2mHAAc G1hDCZY/vEcb4T3JfE2LIsHxqEO2Fjek3SdrkLwHYbuUUWgjrxvqR4qP0TmUyvbe2dtV vk+dHhsctSzugHe2yZ5Om+UAFUTEFz27rJQACvLVjT2D1Hm3FjmBqzwrNFkbfNz32n0W srjUjKovdHrCk/KFpo8I0J6kS1iXo1w9vV6bvYg/PhyD9O4K17FBmEWskkvJh7I1vQIX I13w== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9BQv1kTB2L0mnCbjAHXP+un9EH4FVICZqpzI5v7B5ww=; b=GtkjGKGXs3bNDJMLAd37G1mug5jLkhHs84jdEA6O7cqcZYpvIvgrNHzxwvfRe0jIHG qSR/vQrKa2Q2K2UEHm1Upsypp+J+dbeTgqVlRQL2rwLcBtBlQJWf7/LOIf6hvowpk+H3 MYH/6MTY0BEEYNzxYpS9BOKzNNYoaRu6eEvitgQbzM+ptTjPXzfGqtli6jde5tyzQOCD 4SQHB4rrovDgdUPPXTjuFhWt1reOtU90E+sp2JJIVqAkViik3F69llRZndbK623nfO1D T1O1Y53+ETWpSwn98jdRk/6F92ro8HXWRsPXOcg7JgBwBFI8AVSeix4fTvbRsZHOetp3 wEcA== X-Gm-Message-State: AO0yUKWkFACrkP2kfuXJ/sxH6kRqZZ+frdnxUElIeWkbapY6UOzE5mCO G8CBkQ52Hf1634it1CMsfMsjiCkHLjJvMkAR X-Received: by 2002:a5d:6147:0:b0:2c9:ed98:c3bd with SMTP id y7-20020a5d6147000000b002c9ed98c3bdmr5054984wrt.60.1677506872002; Mon, 27 Feb 2023 06:07:52 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id fm26-20020a05600c0c1a00b003e6dcd562a6sm9640860wmb.28.2023.02.27.06.07.51 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:51 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 071/126] hw/audio/es1370: Avoid forward-declaring ES1370State Date: Mon, 27 Feb 2023 15:01:18 +0100 Message-Id: <20230227140213.35084-62-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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=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 To avoid forward-declaring ES1370State, declare ES1370 QOM definitions before its use in the chan_bits structure. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220131837.26292-3-philmd@linaro.org> --- hw/audio/es1370.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 54cc19a637..ea76c9a734 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -256,6 +256,9 @@ static void print_sctl (uint32_t val) #define lwarn(...) #endif +#define TYPE_ES1370 "ES1370" +OBJECT_DECLARE_SIMPLE_TYPE(ES1370State, ES1370) + struct chan { uint32_t shift; uint32_t leftover; @@ -278,7 +281,6 @@ struct ES1370State { uint32_t codec; uint32_t sctl; }; -typedef struct ES1370State ES1370State; struct chan_bits { uint32_t ctl_en; @@ -292,9 +294,6 @@ struct chan_bits { uint32_t *old_freq, uint32_t *new_freq); }; -#define TYPE_ES1370 "ES1370" -OBJECT_DECLARE_SIMPLE_TYPE(ES1370State, ES1370) - static void es1370_dac1_calc_freq (ES1370State *s, uint32_t ctl, uint32_t *old_freq, uint32_t *new_freq); static void es1370_dac2_and_adc_calc_freq (ES1370State *s, uint32_t ctl, From patchwork Mon Feb 27 14:01:19 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: 657000 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370415wrb; Mon, 27 Feb 2023 06:08:23 -0800 (PST) X-Google-Smtp-Source: AK7set8gIdn+Sff9JlunWNEX5uEeLqFqH7q4HzUGuLpnNBK1UOm8Y84RdMuUM3PAt4WmreFofxw9 X-Received: by 2002:a05:6214:e45:b0:573:c1d9:df40 with SMTP id o5-20020a0562140e4500b00573c1d9df40mr14386253qvc.49.1677506903039; Mon, 27 Feb 2023 06:08:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506903; cv=none; d=google.com; s=arc-20160816; b=JFDNLUVQ4rirkwHhPhuima4WywmYFHKxG5wHckeFm5WVIHRoPikcuKDq9kYW+BWb/O RftYJADiphj1rWyq1DibO/y4gGhpibhPmFoPb0RRYsbHgtTDP3ISN3LvviL5r6KEVGlg G1tnKGrfyv665uHPCXxVa8aelx+++LiJjUGohLazNPoanMCT5X8E/gc3XURylchcpnPe dEygpjJhCeSUez+Mzu8owdVNab26euBYQac21D+bEFRJV42VrXC+/DonN85Y+L75is45 a2HYa538E04/1R9yVs7lkJ5kdXRPBrTQff5L27Ua1vfEPDotSPgk+z8cHJAsFPKHVqDT 94Yw== 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:to:from :dkim-signature; bh=xWSTUmb++2mGiogMvXbqJJocrCykF9OSc1ggtSDBGQk=; b=EWyaEaJ+MqwoqF0eLZJF6B1lX/m5IkMipge+xb7jcZ2Hjy/m5OCyWHQDxUw3x/QCD1 T42xMT1xjztpIC8KHbgaXMDAgbonndz+x+chI1zuEjgiyFdHUdyHzf/+5BtdsMFIhgDy NzpJ/Xy9Ut0RilZDCDN1gZOTbZoo3JNQiyBKGwq1NocD5l/mlZKOzkGChuRxe2cLnE1L oLMlNpF1VB/3yiUwJxJNRMg7ZBBz6Ur1lCnrCOmlcFflJOKFc+pReMcUm6+Jf0CbYXCf LpqAXninxvD9zY0ZptjZ9ak/6YXuX37kGOuI6gmiUg2R4ZHvuulijl84R+CiC+n3q9DX 0FrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KVWgdG2k; 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 p1-20020a0ccb81000000b0056ea83d60f7si6438325qvk.361.2023.02.27.06.08.22 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:23 -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=KVWgdG2k; 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 1pWeAa-0001gr-VT; Mon, 27 Feb 2023 09:08:01 -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 1pWeAa-0001aN-2k for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:00 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAY-0000FS-9K for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:07:59 -0500 Received: by mail-wr1-x430.google.com with SMTP id l25so6371285wrb.3 for ; Mon, 27 Feb 2023 06:07:57 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=xWSTUmb++2mGiogMvXbqJJocrCykF9OSc1ggtSDBGQk=; b=KVWgdG2kE24e/aar+GrSettzPiMGN9m0BA3Gdu6FAbuk/+58aSiuz7ZnrGWtfDa8Lz OXLVQNqNnuMhvaH9kRaPa7eB0gUrUHXunYIEircwNPJtSbhx34kN6XyIGKPMREsYcVdo sbfR8WIM4obmm1wTaGV6EF+JUmTwVd5o7432loFWelGW/PUQrqT1v8J8mxR6b9reOHl+ p4xNHwrY5Kx55hRC90eQsB6gPB3kpBTCWtx9ssTUqjcNJoa9DNS/ugRMBnjK9I1LhyF8 QhgOwdQc4KLl5gIVSOjWo9FXx2Z3N8XvcvpjhU+/8ZX+NIkQYA5SGmsFaX0Sl+17hTpW 6XNw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xWSTUmb++2mGiogMvXbqJJocrCykF9OSc1ggtSDBGQk=; b=zu9IJPJaq1vQF0wYdmg7s6a1Uso+C5iAr/iAMeJbifkEXeHjzK1t6qHRCYBuhdLaIb +2EVwMU+63otXpJFZ75XtMJf/owFZwKhQL4fCoiSVJTnf/w6U+XiUaH0TEPgaQlMsOHy Gi6OL3QMh8eMERkG0TvWzYtQfFeZ7Mb1xohWpzxRMf47TE8r1Luld47l7HD5aq1yl51a +ODD3Svj8AgTd9vDE6Ah5ZKTZtpyiexJxtIYW1qYNly7n06QQfZJU7KMoFnXVK2fCPQp 2uzUVKi6nZFrkBXA11uIxZpl7VJrq8g044Vts1ZyDXXlBxcVci5zCHbP3Y0tzpsnhmC7 OJkQ== X-Gm-Message-State: AO0yUKU6llbVBArp8wnPRLJZq/O5IWTi7UfLVYHkWMwmNxU3U/NDOInJ aUBGM3lsWGAKUubRTPc/e2J0Ff9VLMaxvUaD X-Received: by 2002:adf:d089:0:b0:2cc:4dd4:b7f7 with SMTP id y9-20020adfd089000000b002cc4dd4b7f7mr932333wrh.63.1677506877330; Mon, 27 Feb 2023 06:07:57 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a14-20020a5d4d4e000000b002c57475c375sm7169011wru.110.2023.02.27.06.07.56 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:07:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 072/126] hw/audio/es1370: Replace container_of() by ES1370() QOM cast macro Date: Mon, 27 Feb 2023 15:01:19 +0100 Message-Id: <20230227140213.35084-63-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220131837.26292-4-philmd@linaro.org> --- hw/audio/es1370.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index ea76c9a734..4f738a0ad8 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es1370.c @@ -843,7 +843,8 @@ static const VMStateDescription vmstate_es1370 = { static void es1370_on_reset(DeviceState *dev) { - ES1370State *s = container_of(dev, ES1370State, dev.qdev); + ES1370State *s = ES1370(dev); + es1370_reset (s); } From patchwork Mon Feb 27 14:01:20 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: 657108 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2387158wrb; Mon, 27 Feb 2023 06:40:34 -0800 (PST) X-Google-Smtp-Source: AK7set9Sn8UMiv0orLgkvCL4mEPKaDaYEwkd6OzV6KIn/oMIOIF+hFqoAnrqNM9dRqPpfSPhFlJE X-Received: by 2002:ac8:5c0c:0:b0:3ba:1bcb:af01 with SMTP id i12-20020ac85c0c000000b003ba1bcbaf01mr30399118qti.59.1677508834353; Mon, 27 Feb 2023 06:40:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508834; cv=none; d=google.com; s=arc-20160816; b=s5R5a+y8VzKCt5DIHhb7Js0QNeGbBW8hCz1aLHyLIuICNXhlGzG1NhH82F96Waxtrt HvMH71qJ1FK+csc8GwHC33tvtIezPVGx/e8+jSOYpql6AeJ/0aXOCXLyQncG9KpRqv2q 67xxsSmHSC4LGT5f3o9vble/BcnZYqCgt9o1IhecRAntfARODDoE3peygZoRRR3uLDho 59LN9oLyJN+oCTqDdEHTPeTr/a8xMcZ5Y68UkQJpPJGcJHy2WbKnHYENXQIDz42kRD6m Glduf7lZmvBhNm14L36nps0qzu+gAyY3WNt32ph2IKUsYXKguqfIvmnjCWHnIKwHZHvR dchQ== 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:to:from :dkim-signature; bh=Yk2SedGuzUoZBp5OVz40sDs6z7kS7gFYhnzajKNCxAo=; b=ySLRBL+yaINX7zD4qKgTVGHn4p9oOh8GHzZVHCJYfnK4WSAu45bXC+73g35xSuGwuR ML8+6NO4gDUOYI0yxdFPBHhTnZskaOMUy6l3nQdz6BjFhyFlqggdPDt0EHONupaAq3Rv 8cAhogLXxQ1CFQZp2r0Husk/JtgFxU0eNm1zzBuDZo1F4a8vZ9EGTXJe+37GBU/PBknu ldB/404718fHIhQV2HYhZ2DyKzfGS/l68waVcI1vPG8T2FvXyVMeanl9ATGV1PFg/qxq v8C1YLYVN/NhZo7T/Tbx69qetLQt3UOxGXT+1T47rYRCq9o1hqFuAGBnvnEr46nmd1lj 8GhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lwgnM3U6; 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 79-20020a370752000000b0072c5a7a00ebsi5945812qkh.49.2023.02.27.06.40.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:40:34 -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=lwgnM3U6; 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 1pWeAu-00028a-8K; Mon, 27 Feb 2023 09:08: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 1pWeAf-0001x2-Uz for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:08 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAe-0000Ne-Ck for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:05 -0500 Received: by mail-wm1-x329.google.com with SMTP id l7-20020a05600c4f0700b003e79fa98ce1so3914625wmq.2 for ; Mon, 27 Feb 2023 06:08:03 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Yk2SedGuzUoZBp5OVz40sDs6z7kS7gFYhnzajKNCxAo=; b=lwgnM3U6M7R26MZGTPQr7cgy7l/lk/xITg0TjLlBQalZSMX6Mixj62FOMi4p1p7zeg povadoFnpOabmst/wR69sMtbfDt1FJWLNRuocSOAsJb7daS1feIQcowGM7jlpx9QBus7 d5yEiK+b54wLv45NH9wgOHEfoSRkoILwTrN9yKVO0TgWhPAHX25wPGReIiTOqyf4pqoH Zg8cvhNvH3ysS/Lm9mdA1Ll1bjPxTawd6sMEabPIc8Se8jT+RTR2/2KMkEM5OoCxGQ87 305TtMxa+RH2NZjvdv4Fa5Ya4TnUdzdzebOmw1WRCQGQpZ4s+eqQpKXEe+TwKlfoXqrw zEhg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Yk2SedGuzUoZBp5OVz40sDs6z7kS7gFYhnzajKNCxAo=; b=upvn9scaxKgdh3YlKimZe6cMl+4h/NJOhwyCd5o/SZxCKq04Ta11dSvJQe6HzBxx0K UrYbK+pH80voE51xSsjO/63sUE8j1nhlHSIUwifVjgrd8qh48Ieh2rDHUkS1Gl/frc21 hlzOTCSpF10oApRZNhtC4CQLCiUmHbJrA8BsftEOWV9zmtFFsU0DY6a4tn2D3kMVFVTV xngcZE/SCgjXyCB9lFZOcBTN5/f+r1XvsVgDosx3aT6CTw3hX4KD6G5Ua+kuBqjUMZM4 +WHYMG/VrpB3ux3hKDvTuqauLkR4y4OhkScjrxvOQ2QncYhWJDtyOxTX4dZfC++smrTp V3rw== X-Gm-Message-State: AO0yUKWp+1QEj0BIwKDUDJhjXsVErzlDJ7djdyJBOJgVRAWQlx9JFgn/ yhCttLMSJNkyHzeymY6H8UJgxZSTBIbKTnnx X-Received: by 2002:a05:600c:43c8:b0:3e2:1d1e:78d0 with SMTP id f8-20020a05600c43c800b003e21d1e78d0mr16725248wmn.22.1677506882850; Mon, 27 Feb 2023 06:08:02 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m4-20020a05600c4f4400b003e209b45f6bsm13710323wmq.29.2023.02.27.06.08.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 073/126] hw/audio/ac97: Replace container_of() by AC97() QOM cast macro Date: Mon, 27 Feb 2023 15:01:20 +0100 Message-Id: <20230227140213.35084-64-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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=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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220131837.26292-5-philmd@linaro.org> --- hw/audio/ac97.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index 364cdfa733..b3a45bb49f 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -1295,7 +1295,7 @@ static const MemoryRegionOps ac97_io_nabm_ops = { static void ac97_on_reset(DeviceState *dev) { - AC97LinkState *s = container_of(dev, AC97LinkState, dev.qdev); + AC97LinkState *s = AC97(dev); reset_bm_regs(s, &s->bm_regs[0]); reset_bm_regs(s, &s->bm_regs[1]); From patchwork Mon Feb 27 14:01:21 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: 657057 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2378468wrb; Mon, 27 Feb 2023 06:22:55 -0800 (PST) X-Google-Smtp-Source: AK7set90hDzNextrzpqO30WM0zDx+nOF1TDtXJvTxRGP/FRm2HLAG3fUoR7jDIUK6S8g5TiGHEQi X-Received: by 2002:ac8:5fc5:0:b0:3b8:5bc6:deab with SMTP id k5-20020ac85fc5000000b003b85bc6deabmr46152404qta.8.1677507775367; Mon, 27 Feb 2023 06:22:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507775; cv=none; d=google.com; s=arc-20160816; b=P8olgz+xj//JmQTmHtNOOK7bSEsaj5EiNqRJgtBwwY4b5h6CYChnmjra60GvmYHUzx M0onyjm5Pup9xe9K4TlFY3b1fxqxAvKa5ODhviC3J5B8w5Hgv7hlhHkDY8rOWnv6eNo2 ZoaB0Ay8YKxE/KIsdv87Z2D8FAjmJ+uJDLv0TwdYlqzPJwA1S5G5JUmM141sXTFtmvHW obBGjVcCk8EIXCNLc4Gn/AbYuPWhWDmmRcctBiefasPd+TQInsXXfrdvX6efh816GpSw dt/sW5VFHfcy9E/48kHXgNGXQOG1BNwQWpSEbO1PsLJO9MIQuMs6EG6XILDOj4V6iTAb khLA== 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:to:from :dkim-signature; bh=Eii2CWpjR1rk5swmvP65mG8yo3Fbs09KNYOOJTPu4DM=; b=UvjTXHg1rdlP9JGMFmXfH2KLQhzZStJlYvVTpT9CwqX77nqlOEzHOantIs6bhjBF9u bHvH7/aTfyDgMlfQH/4A2Ox6XzOevZR0edbWIEURDF6yLmIvlikqsQ9TPgOmXYL95q8Y HxcN4IBBYt7fTNUpgU2fXDedsCDuDp8R7Ol/bH7Y6WOYPn0vCYGE/1rZs42Ml39Aqmzu zHO8uQlHUXm+qZC4it+LC64CzLrhduVt6Y8gRPILWIC6jjjGmGVIBPnvtE3KqYpnqIdp DjtTMa2nj89892OrJMWpgSRO0RSWfLLJNU37RKSLvx2IA8Wkj99RDtHFHdZJx7LnEH24 hJ5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XMMJvb5y; 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 g19-20020ac85813000000b003b85473ae55si6942361qtg.142.2023.02.27.06.22.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:22:55 -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=XMMJvb5y; 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 1pWeAw-0002Re-EW; Mon, 27 Feb 2023 09:08:22 -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 1pWeAm-0001zx-JW for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:12 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAk-0000OK-7x for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:12 -0500 Received: by mail-wr1-x42f.google.com with SMTP id bv17so6364900wrb.5 for ; Mon, 27 Feb 2023 06:08:09 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Eii2CWpjR1rk5swmvP65mG8yo3Fbs09KNYOOJTPu4DM=; b=XMMJvb5y9ZTVRxHcBLasSeqwhTW5ACjbgC3msZW+8ZIK4vUWvQ7mcmi4jxBycgfBXl MA7ktY/RyY4raGARff7Nb4OYnIKpj7ensSh3VnJhLCynDAZgGwsExFgj6ScBIENNjUa4 ZWAckBM525olZEjB9JK5y+a9W/JMnTduwQDXrJcUG9KyM2Ie/0AwW25xSXA6sGLys79S Qbnal5CsL2C2Cq3pomfrBAq8BeBnOyFu46oSCko0TV6LdKv6kF410yHcallmF20ceeoI /JDS9fG9/E5ixIkPbBR4LVoPxQD9HYvQxPSFbdccGMf5y/CNPE1PZWLhz/tVRaMO+PGd J90w== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Eii2CWpjR1rk5swmvP65mG8yo3Fbs09KNYOOJTPu4DM=; b=E/WO4VjLBDm+J0BDDxKrPLUf6oTIgh36tjqhoeSGKx2e+r665xEHhLSUQ/dUPah2fB SX0ygloFaSZgF1VLF7gBLffLpi5LzXAiegnm9EkkNp+Rpt41L34nOJ9SMLPxsy/GwtqD z6tWnmi+DCuuAfxow1f8XOItnQyDwWUm5IaAUqZFVgLleQiQ49i5Ydxgr2D1pxzdRDpJ BiXRFo9T6znVv3q24+uJH7Pgj+cUulKPOi3+Kw8DjHjz+R8EtvY+6B3PqBeW5S5yGsR8 kZycGwGZXcqObxHCkJwKZT30subVAos1QhV/CVYNbxjcHQ40IXT4ZQqrpbyqLHx2pl+2 /6mg== X-Gm-Message-State: AO0yUKXBG6GjuVNKO2BR+d2i+wGKWQtJdOgeHz3+EMDYnafu52eKshSN CcIO4mi2yReYvQFPTFfoE4AFoycSWACkheFL X-Received: by 2002:a5d:6785:0:b0:2c7:a9ec:3 with SMTP id v5-20020a5d6785000000b002c7a9ec0003mr8120064wru.65.1677506888196; Mon, 27 Feb 2023 06:08:08 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id u17-20020adff891000000b002c553e061fdsm7144268wrp.112.2023.02.27.06.08.07 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:07 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 074/126] hw/audio/ac97: Split off some definitions to a header Date: Mon, 27 Feb 2023 15:01:21 +0100 Message-Id: <20230227140213.35084-65-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=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 From: BALATON Zoltan These can be shared with other AC97 implementations. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <6f0980fdc3753624be6f3935a6ab0a2dc1df4b30.1677445307.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/audio/ac97.c | 43 +------------------------------- hw/audio/ac97.h | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 42 deletions(-) create mode 100644 hw/audio/ac97.h diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index b3a45bb49f..c2a5ce062a 100644 --- a/hw/audio/ac97.c +++ b/hw/audio/ac97.c @@ -26,43 +26,7 @@ #include "qemu/module.h" #include "sysemu/dma.h" #include "qom/object.h" - -enum { - AC97_Reset = 0x00, - AC97_Master_Volume_Mute = 0x02, - AC97_Headphone_Volume_Mute = 0x04, - AC97_Master_Volume_Mono_Mute = 0x06, - AC97_Master_Tone_RL = 0x08, - AC97_PC_BEEP_Volume_Mute = 0x0A, - AC97_Phone_Volume_Mute = 0x0C, - AC97_Mic_Volume_Mute = 0x0E, - AC97_Line_In_Volume_Mute = 0x10, - AC97_CD_Volume_Mute = 0x12, - AC97_Video_Volume_Mute = 0x14, - AC97_Aux_Volume_Mute = 0x16, - AC97_PCM_Out_Volume_Mute = 0x18, - AC97_Record_Select = 0x1A, - AC97_Record_Gain_Mute = 0x1C, - AC97_Record_Gain_Mic_Mute = 0x1E, - AC97_General_Purpose = 0x20, - AC97_3D_Control = 0x22, - AC97_AC_97_RESERVED = 0x24, - AC97_Powerdown_Ctrl_Stat = 0x26, - AC97_Extended_Audio_ID = 0x28, - AC97_Extended_Audio_Ctrl_Stat = 0x2A, - AC97_PCM_Front_DAC_Rate = 0x2C, - AC97_PCM_Surround_DAC_Rate = 0x2E, - AC97_PCM_LFE_DAC_Rate = 0x30, - AC97_PCM_LR_ADC_Rate = 0x32, - AC97_MIC_ADC_Rate = 0x34, - AC97_6Ch_Vol_C_LFE_Mute = 0x36, - AC97_6Ch_Vol_L_R_Surround_Mute = 0x38, - AC97_Vendor_Reserved = 0x58, - AC97_Sigmatel_Analog = 0x6c, /* We emulate a Sigmatel codec */ - AC97_Sigmatel_Dac2Invert = 0x6e, /* We emulate a Sigmatel codec */ - AC97_Vendor_ID1 = 0x7c, - AC97_Vendor_ID2 = 0x7e -}; +#include "ac97.h" #define SOFT_VOLUME #define SR_FIFOE 16 /* rwc */ @@ -121,11 +85,6 @@ enum { #define BD_IOC (1 << 31) #define BD_BUP (1 << 30) -#define EACS_VRA 1 -#define EACS_VRM 8 - -#define MUTE_SHIFT 15 - #define TYPE_AC97 "AC97" OBJECT_DECLARE_SIMPLE_TYPE(AC97LinkState, AC97) diff --git a/hw/audio/ac97.h b/hw/audio/ac97.h new file mode 100644 index 0000000000..0358b56ff4 --- /dev/null +++ b/hw/audio/ac97.h @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2006 InnoTek Systemberatung GmbH + * + * This file is part of VirtualBox Open Source Edition (OSE), as + * available from http://www.virtualbox.org. This file is free software; + * you can redistribute it and/or modify it under the terms of the GNU + * General Public License as published by the Free Software Foundation, + * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE + * distribution. VirtualBox OSE is distributed in the hope that it will + * be useful, but WITHOUT ANY WARRANTY of any kind. + * + * If you received this file as part of a commercial VirtualBox + * distribution, then only the terms of your commercial VirtualBox + * license agreement apply instead of the previous paragraph. + * + * Contributions after 2012-01-13 are licensed under the terms of the + * GNU GPL, version 2 or (at your option) any later version. + */ + +#ifndef AC97_H +#define AC97_H + +enum { + AC97_Reset = 0x00, + AC97_Master_Volume_Mute = 0x02, + AC97_Headphone_Volume_Mute = 0x04, + AC97_Master_Volume_Mono_Mute = 0x06, + AC97_Master_Tone_RL = 0x08, + AC97_PC_BEEP_Volume_Mute = 0x0A, + AC97_Phone_Volume_Mute = 0x0C, + AC97_Mic_Volume_Mute = 0x0E, + AC97_Line_In_Volume_Mute = 0x10, + AC97_CD_Volume_Mute = 0x12, + AC97_Video_Volume_Mute = 0x14, + AC97_Aux_Volume_Mute = 0x16, + AC97_PCM_Out_Volume_Mute = 0x18, + AC97_Record_Select = 0x1A, + AC97_Record_Gain_Mute = 0x1C, + AC97_Record_Gain_Mic_Mute = 0x1E, + AC97_General_Purpose = 0x20, + AC97_3D_Control = 0x22, + AC97_AC_97_RESERVED = 0x24, + AC97_Powerdown_Ctrl_Stat = 0x26, + AC97_Extended_Audio_ID = 0x28, + AC97_Extended_Audio_Ctrl_Stat = 0x2A, + AC97_PCM_Front_DAC_Rate = 0x2C, + AC97_PCM_Surround_DAC_Rate = 0x2E, + AC97_PCM_LFE_DAC_Rate = 0x30, + AC97_PCM_LR_ADC_Rate = 0x32, + AC97_MIC_ADC_Rate = 0x34, + AC97_6Ch_Vol_C_LFE_Mute = 0x36, + AC97_6Ch_Vol_L_R_Surround_Mute = 0x38, + AC97_Vendor_Reserved = 0x58, + AC97_Sigmatel_Analog = 0x6c, /* We emulate a Sigmatel codec */ + AC97_Sigmatel_Dac2Invert = 0x6e, /* We emulate a Sigmatel codec */ + AC97_Vendor_ID1 = 0x7c, + AC97_Vendor_ID2 = 0x7e +}; + +#define EACS_VRA 1 +#define EACS_VRM 8 + +#define MUTE_SHIFT 15 + +#endif /* AC97_H */ From patchwork Mon Feb 27 14:01:22 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: 657068 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380411wrb; Mon, 27 Feb 2023 06:26:50 -0800 (PST) X-Google-Smtp-Source: AK7set8/oFDIstP5bXIoyal1I+DJmmrzv5/qG8w02TaM5Z6vHiH0rXqsrVhWCiVol5hzNgJ/U+O5 X-Received: by 2002:ad4:5c47:0:b0:56e:b7a1:c9e with SMTP id a7-20020ad45c47000000b0056eb7a10c9emr48759904qva.15.1677508010564; Mon, 27 Feb 2023 06:26:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508010; cv=none; d=google.com; s=arc-20160816; b=dTZw4njCVQ76ZUhf7p/Uaqb036ZcEkqT+MINVCG/z4OqW/k2/aryI4sx27iuAfudqz Ww3t1huEDfOB9X34JU+2T9IK1s584LAYKO3d4tZ+GpixpUvqbx1g70an07oRDUjGd6aE RmgavVhqDHNkeUmojnb5f7KJ2Uc//1QgI93OqP71jurRdVA2IR7uK20ZX0jjy+oeFVUz LwayjQyU9PKIRkeg4CPzn2ltkqfLuNgRKguzgL+2Feido9SVkIIi1yuWgMJLLy3Lq8MF gU/QgbAk89DYpL9nRrH1kzg57AMhDMU3xNU1/lTrZ2lcvKrJCuYo1BR1Vu1RFAQnUxp+ po/w== 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:to:from :dkim-signature; bh=QJ3BKCFcAXPLhAg+8B2nnFVcuypAiJT5mvyLP2qVcBI=; b=YrPEiA8Bxl5yiutePEFrAVO7mYBovPrlbimobKJO5fOM9jy7p+nDOHqRgjUn/21Iqx znO2RDJRup+Fjbb8NSfIhbOFA8phH00pY0ZPXF4zLMSFpl83pfqrvSFX2jaPh8Sa6PgV JK5F2PYr/bo3BC/GdEOPdOTi4o1yTMkMCal6ft0F855ApHcRdcy0LeDllyFz3uwzoq5q 3OO39He7nc6ZeXiAaBfF65gledPV/GiVbXOVouBVU6ForJFivBMlNPAKihGYROVs+A8+ g+9hLQV5Jo8ZJZcChizsggOfBzbAPUsUvzq5dk8qSwVUD9SLefdXd95tz6Tg9w/p0sGC picQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VA0DRsLi; 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 az38-20020a05620a172600b007423fc5b7basi160908qkb.182.2023.02.27.06.26.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:26:50 -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=VA0DRsLi; 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 1pWeAv-0002Dp-1b; Mon, 27 Feb 2023 09:08:21 -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 1pWeAt-00024R-8z for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:19 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAp-0000Od-1Y for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:16 -0500 Received: by mail-wr1-x429.google.com with SMTP id r7so6358499wrz.6 for ; Mon, 27 Feb 2023 06:08:14 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QJ3BKCFcAXPLhAg+8B2nnFVcuypAiJT5mvyLP2qVcBI=; b=VA0DRsLi06sYDvJg8wAqDf+VYbENd1yjjJ3a3t4Ne/TP3jTKEASPL433P0BdrsJQBw gNG91KpCbfv0A1TVN2nrqEKBU9ZwI5pGuxIcmoyWA+8fSl+FPM1fHagWEpktLYV6CNfq /ybj2i9+ba5VkQS6D/AnJDIEitz1WcaHO6CuOdeqMU4wKKYhTl4N6SgFJ4I4Mh/8NJbv sBsmL+FQJXakjxNhv6jDFFfxE2syqQRREA5B4HkJTbA7SqV7xPweWeagvMy0+0srQdK7 Kr1LjSNvt1wUhwnXBlq23DoYmE7iACtsm7wbsWIpasIgfEVuDuiaJ1SHb8WZrdTzs/jY D+vQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QJ3BKCFcAXPLhAg+8B2nnFVcuypAiJT5mvyLP2qVcBI=; b=nYkuNKQRhRN7BvF+fkGGLa/+kZ7IhUpn2Y6h9X7BxfcU1oHnCSdoVAfUWMsBQ5CRyE NSo5P0HudRhwJ47T2DQVkl1ILTPQ7aNM62uumfdsdRNGJ51qT41CykvsO8JMOSQ28740 ql2C5uUWl46wzLY3fnoIU1CpEfG4/XysXNryaybKurhFbheNQQoNy/DNLpRnV9dlTysx crZgL4/Ve0aKKK2TOk0KdxHMQMsnUtfzZi8cz6dPJBtx91D+Haq+U8p7tDKlBPRPS6Z/ 6oUPshzf9hLv627NjtaaiCo0B0vE2YSBxhGxURRFLXAMkpLbITFMFniSIMVzYJZWrtPj nfbg== X-Gm-Message-State: AO0yUKXJNQ5kh+1AfpaT4tI91neQrtGpVuZgc2oO2YfM1quiE9Ztnddy eonOz2+Agn/8cmHrugNTRqbmQLlYxvfq1Fcx X-Received: by 2002:a5d:58d9:0:b0:2c6:e87f:30cc with SMTP id o25-20020a5d58d9000000b002c6e87f30ccmr19165699wrf.48.1677506893523; Mon, 27 Feb 2023 06:08:13 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h8-20020adff188000000b002c54241b4fesm7118517wro.80.2023.02.27.06.08.12 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:13 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 075/126] hw/usb/dev-smartcard-reader: Avoid forward-declaring CCIDBus Date: Mon, 27 Feb 2023 15:01:22 +0100 Message-Id: <20230227140213.35084-66-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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=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 To avoid forward-declaring CCIDBus, declare CCID_BUS QOM definitions before its use in the USBCCIDState structure. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220150515.32549-2-philmd@linaro.org> --- hw/usb/dev-smartcard-reader.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-smartcard-reader.c b/hw/usb/dev-smartcard-reader.c index 28164d89be..be0a4fc3bc 100644 --- a/hw/usb/dev-smartcard-reader.c +++ b/hw/usb/dev-smartcard-reader.c @@ -278,7 +278,9 @@ typedef struct BulkIn { struct CCIDBus { BusState qbus; }; -typedef struct CCIDBus CCIDBus; + +#define TYPE_CCID_BUS "ccid-bus" +OBJECT_DECLARE_SIMPLE_TYPE(CCIDBus, CCID_BUS) /* * powered - defaults to true, changed by PowerOn/PowerOff messages @@ -1174,9 +1176,6 @@ static Property ccid_props[] = { DEFINE_PROP_END_OF_LIST(), }; -#define TYPE_CCID_BUS "ccid-bus" -OBJECT_DECLARE_SIMPLE_TYPE(CCIDBus, CCID_BUS) - static const TypeInfo ccid_bus_info = { .name = TYPE_CCID_BUS, .parent = TYPE_BUS, From patchwork Mon Feb 27 14:01:23 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: 657046 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2376109wrb; Mon, 27 Feb 2023 06:18:18 -0800 (PST) X-Google-Smtp-Source: AK7set/jPkTmRnzJLmz4B7Ej+huLetQnurfIVmEo4cWT8xPxjwhL6es+7HCWJEoLrd5xipiYNZrP X-Received: by 2002:ac8:5713:0:b0:3b9:bc8c:c1fa with SMTP id 19-20020ac85713000000b003b9bc8cc1famr17647750qtw.5.1677507497939; Mon, 27 Feb 2023 06:18:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507497; cv=none; d=google.com; s=arc-20160816; b=dN6WZnPqjMc/vQlrDxKIG9M8Z6oSY71uTZqDMal/HWgpZITZcLw9UtnT8Oftr19W/t HsPYIHEic4p4mDC9P7xISvXG6KzHOgzJcswCGzJkBe7YX8tfjipSH5w/p5lPPPajwu/B 9Tj08tbl1rSjDmDeW9J41pBZLCYhED8LibjMOikv47sfHb0++H3CSGyp8tpLZFjJCwHq T1EJKx3BwwAx3x8GVIgLerLZT23NmdFyOFptG4HMJuQZw2qrXO/qr/33rIGULk0eRN1a 9R30NCsMuKzBatv7PaqXcY+thUlECCNTjghBzpi7vNB4alYbg4gjhsmB0/lkOrMEVPIj n8PA== 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:to:from :dkim-signature; bh=mB/pDWgm2BIuPhx5UcfH++r62QSUw7La1WlZAVYPtq8=; b=gvSJNXA9TAZlhhb4w1v3cu14cm8DvuqveWZyes/sJRNbpddbBgcnbYmF7t6395Uoev z9v5YIqP817U3sTkMn+oVRArJns2iyu/qb3WrAkFg6DkMyjLKF7+oMOzXOcEw5JVXMcg ikOKB4jwpwgx7K4Dpo+nQ5uJymXGVOlBVXimwJq8NQHtCCl/JVLAXLWo+dBkLvFp4pEF w3z6YZaMd1i1plbaoro5YPjBJC2bE0wywh0jd3EyPRNMRxexRGYLsKGHHde7+k688zoJ iUwRaz9urXOpqdQjXB3LP+FUS3F3vyauQRM81moxtMifhWq2uNz0e0db/ZYyVlXDEAVn yurA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C3RoFFdj; 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 d7-20020ac85d87000000b003bd111d451asi6749036qtx.704.2023.02.27.06.18.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:18:17 -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=C3RoFFdj; 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 1pWeAy-0002iD-Qn; Mon, 27 Feb 2023 09:08:24 -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 1pWeAw-0002WE-S1 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:22 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAu-0000PC-LT for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:22 -0500 Received: by mail-wr1-x436.google.com with SMTP id r18so6381466wrx.1 for ; Mon, 27 Feb 2023 06:08:20 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mB/pDWgm2BIuPhx5UcfH++r62QSUw7La1WlZAVYPtq8=; b=C3RoFFdjA2uZJzosvp4jan8q/NjYJwN7PP/Cfy+5B6sGZ4sMvGoVyTketMTTPfaRpl u9JrrQVzXg20ebVykTmT0C/2HXLeEksA0HDiASJvAn5H3YpB3rWFvuJex+FKxBt2xBPs 7lwUe1SZHufzyJfK4oqDC4UFGicp+epg+j2x22TmStwqPkxEa7Xo6JpAk/2YW3WoRWcl rNNNeZxx+tdxC5leNZ3Cm5n3AZCjPKHZjOSQDJ2gHOVsrSct6IXtBEPYgrpg043kbsLZ TypH8BS3qyzP2zz3wvSeQqf94CAo5CO1ShvdYS+y2h5hYip8WWYBJVtMLkDq93WM/2Wu 0BvA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mB/pDWgm2BIuPhx5UcfH++r62QSUw7La1WlZAVYPtq8=; b=k0d0keRGO0IIb4gu5VTCrAXhhN8pHbhzyqE5pXkelQsGogvMBTMw9NL3k3nQdBZaQb bYhTa+WwVA/Q+yTv3cL+yPEtIC8GOxtwUdGxtYG9ckDjZ67nMhyEzYLGxNgkCob0uFop Z+or/3lp95CxVP1oMFTKa0vtGosXgiXt5Z2MoRkDMn9qiScy/cRD7dB84FsKFEOaGx0M f1XXC6ekTBtQR6nA7/Hefps6+auNg7Fnp/fMHiywq8E3oiV3GP82HEn1vk/OtsP9v2op 9UFw+ae8s84qqFQRnrhj6i5qc0OaSs2wC6MDc0OAUsvSduI0y2kdXl2bDl1BHJcIobCR XqhQ== X-Gm-Message-State: AO0yUKUJH4ZTe48Ctiah5+Lf4XXKEj1QCH2B0SgEslvPcwp1WEfBdQ2W qnjip6kvacQCO9zOk6qvB8hW9V3ahZlusaQ+ X-Received: by 2002:adf:f0cd:0:b0:2c7:d75:373a with SMTP id x13-20020adff0cd000000b002c70d75373amr14817696wro.1.1677506898986; Mon, 27 Feb 2023 06:08:18 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id j1-20020a5d4521000000b002c573cff730sm7203340wra.68.2023.02.27.06.08.18 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:18 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 076/126] hw/usb/u2f: Declare QOM macros using OBJECT_DECLARE_TYPE() Date: Mon, 27 Feb 2023 15:01:23 +0100 Message-Id: <20230227140213.35084-67-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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=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 hw/usb/u2f.h was added by commit 80e267f1d1 ("hw/usb: Add U2F key base class"), almost the same time of the automatic conversion done by commit c821774a3b ("Use OBJECT_DECLARE_TYPE where posible"). Manually convert to OBJECT_DECLARE_TYPE(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220150515.32549-9-philmd@linaro.org> --- hw/usb/u2f.h | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/hw/usb/u2f.h b/hw/usb/u2f.h index a408a82927..8bff13141a 100644 --- a/hw/usb/u2f.h +++ b/hw/usb/u2f.h @@ -31,22 +31,16 @@ #define U2FHID_PACKET_SIZE 64 #define U2FHID_PENDING_IN_NUM 32 -typedef struct U2FKeyState U2FKeyState; typedef struct U2FKeyInfo U2FKeyInfo; #define TYPE_U2F_KEY "u2f-key" -#define U2F_KEY(obj) \ - OBJECT_CHECK(U2FKeyState, (obj), TYPE_U2F_KEY) -#define U2F_KEY_CLASS(klass) \ - OBJECT_CLASS_CHECK(U2FKeyClass, (klass), TYPE_U2F_KEY) -#define U2F_KEY_GET_CLASS(obj) \ - OBJECT_GET_CLASS(U2FKeyClass, (obj), TYPE_U2F_KEY) +OBJECT_DECLARE_TYPE(U2FKeyState, U2FKeyClass, U2F_KEY) /* * Callbacks to be used by the U2F key base device (i.e. hw/u2f.c) * to interact with its variants (i.e. hw/u2f-*.c) */ -typedef struct U2FKeyClass { +struct U2FKeyClass { /*< private >*/ USBDeviceClass parent_class; @@ -55,12 +49,12 @@ typedef struct U2FKeyClass { const uint8_t packet[U2FHID_PACKET_SIZE]); void (*realize)(U2FKeyState *key, Error **errp); void (*unrealize)(U2FKeyState *key); -} U2FKeyClass; +}; /* * State of the U2F key base device (i.e. hw/u2f.c) */ -typedef struct U2FKeyState { +struct U2FKeyState { USBDevice dev; USBEndpoint *ep; uint8_t idle; @@ -70,7 +64,7 @@ typedef struct U2FKeyState { uint8_t pending_in_start; uint8_t pending_in_end; uint8_t pending_in_num; -} U2FKeyState; +}; /* * API to be used by the U2F key device variants (i.e. hw/u2f-*.c) From patchwork Mon Feb 27 14:01:24 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: 657107 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2386554wrb; Mon, 27 Feb 2023 06:39:12 -0800 (PST) X-Google-Smtp-Source: AK7set96nZ2NYdFSaScVuBl10g0voPQU/li7lmFXya5fs+PUwWQin+iqCmGuXQKo0m5m3JPGsCke X-Received: by 2002:ac8:5c49:0:b0:3b9:bc8c:c1f8 with SMTP id j9-20020ac85c49000000b003b9bc8cc1f8mr16582281qtj.3.1677508752708; Mon, 27 Feb 2023 06:39:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508752; cv=none; d=google.com; s=arc-20160816; b=CvUqBy3RnyuE3fBY3lBu4A3CZcCUe/T2FdJfOJnoRds/O6lTcLi5pXS8dTxhNv3bNt 3GAzussg60pK/S/Yosx/rdbGjfmNLP2dqYRCv2v2w4bF8ZYoBc1GPcCcmI1Um/E7aAdl qL9aTwmadz3mX0eQbyoILU0pbMcQLZA3qwh7PH1DtQVmBVv6YnNQ76F0tDkZqWx3ywvt NxzSqlGgsRBR60cEJZVSqRNlcSU/s6G49Rp+k0uhqw7sVlHP7K1K95K3IXwKtVGfS8iH JxmxpJKUqAHRTGZq11o2PxH8Yy8wT8AQMwoJcTblRg4C1yy8sZulIvXI4TtTxjYy33Qv UPHw== 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:to:from :dkim-signature; bh=illwlrrIAF5BtfATNC0qhOmoCzfSa9vUurg0/i93crg=; b=WnwCz2uOa3ft4R2Ffi+IcuHowOzl0XB943kuT2YGkzQKL8NJMvomgXepOu3fKGFHKv JyabdOxSRTA9/oxdLgQeFGHktewyn5e4cfqS4BlmTjFK0a0DvvCN6xnRYRBYRrjoAbnF J3D+LNQL+t6M41G+BWxq18wIN2EKX0vusrJ/XqBRsp8ZQO42VkKgFfgfzKcnT5ZjKFhZ KSYpV3KkOP+a0BkjvhS+nR2HNneLV12iliqHvpOwT529U7rapoiGa0e2Uxc0+7XqkfmV 1qGp8ks9AaQwM2od/sYZwmCj3RjKBU577Kg9fqs4oTZ6Y4trvpUaxifv4kvI8NRUJsG9 gfAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ricJSUnd; 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 y12-20020a37f60c000000b0073b9cf4be8bsi5658807qkj.139.2023.02.27.06.39.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:39: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=ricJSUnd; 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 1pWeBO-0003Dw-Lc; Mon, 27 Feb 2023 09:08:54 -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 1pWeB2-0002vC-23 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:28 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeAz-0000Q6-Qx for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:27 -0500 Received: by mail-wm1-x32e.google.com with SMTP id m14-20020a7bce0e000000b003e00c739ce4so3895061wmc.5 for ; Mon, 27 Feb 2023 06:08:25 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=illwlrrIAF5BtfATNC0qhOmoCzfSa9vUurg0/i93crg=; b=ricJSUndjnqkDW/bjVB+uI+2G8Bioy+M8YhqW3dn9YVzFVzCcujw2epaP89M4F0ZGD yJ1jZ2mEyGTLJKbgZPbCKuQuZNhV5lreNLgRBHq5PGOrjQjepb4v/Q0sh/k0uRGv/HuU UVzsfeJCF2GzBOFTD8Xq/kVvFUIdOfH+nXN5Yr0Uovrnx/S9vR1RdvqOH7KJTMD/PdNw RptCBA/1mHM+muBUiCJq763YqHUOsVcYjCw26BkyRyLyWVTthQm0ZFQwvS1zC7dRNBOk vaxSYDqYJshEhBHOJTqXi9ntzfrLt9sQFpjjyWvJIuugvh3g1w+gRLjCQVFsjxd85coO hieA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=illwlrrIAF5BtfATNC0qhOmoCzfSa9vUurg0/i93crg=; b=j3HFU2MhJsYlcYVCl51hRd3SmwWkToBRRFJ06Y/RV1QCmFn+PqjdLmwrLSH5XUDxNP 7Bz1hWkYOWD3/JdxM8/PFHZv9CqYFUCIspav5Ssvx9S9Tg4QfE5b6k5Qc+R1VyyYlfR+ JCERoI10Lh89BMgNZZbWxw7Y+uPE+eQ5+to982NLZ2qFxncYbJM/rZT/ybZfAT42atae 7CiE0FwwtqhVkMxSs5FdLiNykzibFgrF5ldkGZ619F8/RcpEiRkZZkOAsiB+se8pp183 DeJsEWqIiEqhRNnQzwWg5NDXiStfAHkxT8x8BfxoKucHKvEf0fcCH/u4Pk8xJfe5zaPn jjpw== X-Gm-Message-State: AO0yUKUDkW85pEbJD9yeQr5yqlc8g122LNW9vjHbeFN4W007GnxY6loZ 5poKk+cXboTbrx0WSy7yGFw5VfWXqgUHPujE X-Received: by 2002:a05:600c:3318:b0:3ea:dc39:e8b1 with SMTP id q24-20020a05600c331800b003eadc39e8b1mr9852560wmp.12.1677506904318; Mon, 27 Feb 2023 06:08:24 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h10-20020a05600c350a00b003daffc2ecdesm14006493wmq.13.2023.02.27.06.08.23 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 077/126] hw/usb/ohci: Include missing 'sysbus.h' header Date: Mon, 27 Feb 2023 15:01:24 +0100 Message-Id: <20230227140213.35084-68-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.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=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 Avoid when including "hw/usb/hcd-ohci.h": hw/usb/hcd-ohci.h:100:5: error: unknown type name 'SysBusDevice' SysBusDevice parent_obj; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Message-Id: <20230203113650.78146-6-philmd@linaro.org> --- hw/usb/hcd-ohci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci.h index 11ac57058d..e5e6b434fd 100644 --- a/hw/usb/hcd-ohci.h +++ b/hw/usb/hcd-ohci.h @@ -21,6 +21,7 @@ #ifndef HCD_OHCI_H #define HCD_OHCI_H +#include "hw/sysbus.h" #include "sysemu/dma.h" #include "hw/usb.h" #include "qom/object.h" From patchwork Mon Feb 27 14:01:25 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: 657096 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385214wrb; Mon, 27 Feb 2023 06:36:16 -0800 (PST) X-Google-Smtp-Source: AK7set+57Gs17Pn/r3O8PtHQfzcCsyZKg0K33RA5tjIiQtrXJg10gNznnp931CI3afOYilMh+dvs X-Received: by 2002:ad4:5d65:0:b0:56e:b4e0:1bfc with SMTP id fn5-20020ad45d65000000b0056eb4e01bfcmr46686705qvb.11.1677508576477; Mon, 27 Feb 2023 06:36:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508576; cv=none; d=google.com; s=arc-20160816; b=bRMWpEjaCFRNLqNiovnCU8wdMo24FhtmTTVHveCk5En4QnpnD+3LCp3xFmCrydpj4M Oib30KqvpC/vOJj/GL2ErQDdh43Kq2YtKf5YUWMnsbn0UB3V5X0bO0csO/x3VrHqwnWV LjqpeoP2VlHhQhcW6+3fEhNlpae5bMiOf0oUsTxHk9gQcssn+W2O1Iu5tB1S198GW0nM kk4uc2eK0EtQn6G+OuOVADT/yVWgKlpNyoqLyY33NPMJQYIA8EqfOFKSkAViancpmSHK WzFHTZuuubDPJrD50R6xrnM0dt71Nke0kvHxFTxEZoUcmamX2eJ+nDd5q2O91OYP/f63 uHEQ== 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:to:from :dkim-signature; bh=nfzbgiNXdB7bzGKCFvc/rYiWW7yVj2AEWIRDHY3zhyM=; b=WxIWl8IiOWfv0WMaIkoj6XVEBll2Mgpman23sxpsNX2Xkhz/Mi+DsCy5Vs/vtloBsp xWsqzgohCFgU4sZrtvYmAEvyGrZFgv+aEVK+SO6llPe9OWQGQtLAsfy55AJK3Y2ryYEx w4HozIJOSBJ7atiaz3n+2FNgzWS01qzUao0dV346B5CPaebiXGFd5Os2dRx8Hnmkmwys LuQNmWcs8vXzLfR5g1jxHnnA7u0IAW/OO2Xxr8eddl9uKGDejLXHRNSOHncqqG/uB3+m OJpzfl8WQXCuNVCGu8mw0QM1hYefNc3u8l67iXxobO6MkNm+39mWyVUGjUV+NFqOW1MY 4c7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RxLj3AE1; 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 y14-20020a05620a25ce00b0073b4a55a2d6si6498035qko.486.2023.02.27.06.36.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:36:16 -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=RxLj3AE1; 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 1pWeBU-0003Sw-Ez; Mon, 27 Feb 2023 09:08:56 -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 1pWeB6-00035X-Vs for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:33 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeB5-0000Qh-8N for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:32 -0500 Received: by mail-wr1-x42e.google.com with SMTP id l1so3312313wry.12 for ; Mon, 27 Feb 2023 06:08:30 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=nfzbgiNXdB7bzGKCFvc/rYiWW7yVj2AEWIRDHY3zhyM=; b=RxLj3AE19JAlvSjgeXZ0Agi0QNGJJRBQABvqG6A5MyBVWpXMw0BXSKI0Rk1eWm6b7G aZnkbnxkBivZNiNwVxJRl8StrMkaeQyRFEkiCgBwWhnjQ8BbQ2/zD+oheCgRMHVhCQ2A sreCgf3KZ1hbbiPz81ye5uAs2L9Q9WCd1CJLkqYZ3oH0VhyjU4fC4mFJNZlmUuBakJjg pl61syeGMdNNmo+QIsDhoE0TYOKgDNWm1bLIfZtHTBxxTPNqc6Bn0lzrEjWQFeAboHQ5 NhLys21dprPMdyoF+lo4bh33mwvnAA+3twe2wIOZfJb3j78YCA+ELafaEtKF+91b8DHO ImEQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nfzbgiNXdB7bzGKCFvc/rYiWW7yVj2AEWIRDHY3zhyM=; b=X5fMRuEkhPICWZfdNqzOvQBhyt37xXjEkHqRB2rsl0YAfA0m0deSZDIWu3SuO1yg7A 1qohGOlP780fQwMRlLkHOEZrBgOwg6kIZZIRH7gq7jQPaoU0i/aW4S5kzvBYdxdBP/kd 5zBTWz+RUepXDaIKryk3FzRpn1qoI0aWa0GYLvhoFXmQ7AWeTZlya1fh5h648hZahRQV dkssodP+3KLwLd5WehOHT3UAdocCltxhtixwaRKvGmG5/3nD9vFMiCqHkohiweuQL09L D2Zg3WVoy6XleUChnkUWtVG5MOyA1BRfL0HRBw94SxYH26GCCm4XoHaY+GfxV9E3/dZe Cs/g== X-Gm-Message-State: AO0yUKXUJ8FcOYNqncJ/yJ41Ws2EN/xAmOqmhV5u40bgxiHLmjvyNnky aGR2Xsxqn0lgV6KGSBnQexsFkOdif7cchHuZ X-Received: by 2002:adf:ed0b:0:b0:2c7:1e16:57cf with SMTP id a11-20020adfed0b000000b002c71e1657cfmr9509135wro.67.1677506909486; Mon, 27 Feb 2023 06:08:29 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id u3-20020adfed43000000b002c55ec7f661sm7544192wro.5.2023.02.27.06.08.28 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:29 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 078/126] hw/usb/ohci: Use OHCIState type definition Date: Mon, 27 Feb 2023 15:01:25 +0100 Message-Id: <20230227140213.35084-69-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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=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 Forward-define the type first, then use it for the ohci_die() handler. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220150515.32549-3-philmd@linaro.org> --- hw/usb/hcd-ohci.c | 2 +- hw/usb/hcd-ohci.h | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 9d68036d23..7ecf9b15b7 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -1827,7 +1827,7 @@ static USBBusOps ohci_bus_ops = { void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports, dma_addr_t localmem_base, char *masterbus, uint32_t firstport, AddressSpace *as, - void (*ohci_die_fn)(struct OHCIState *), Error **errp) + void (*ohci_die_fn)(OHCIState *), Error **errp) { Error *err = NULL; int i; diff --git a/hw/usb/hcd-ohci.h b/hw/usb/hcd-ohci.h index e5e6b434fd..e1827227ac 100644 --- a/hw/usb/hcd-ohci.h +++ b/hw/usb/hcd-ohci.h @@ -34,7 +34,9 @@ typedef struct OHCIPort { uint32_t ctrl; } OHCIPort; -typedef struct OHCIState { +typedef struct OHCIState OHCIState; + +struct OHCIState { USBBus bus; qemu_irq irq; MemoryRegion mem; @@ -90,8 +92,8 @@ typedef struct OHCIState { uint32_t async_td; bool async_complete; - void (*ohci_die)(struct OHCIState *ohci); -} OHCIState; + void (*ohci_die)(OHCIState *ohci); +}; #define TYPE_SYSBUS_OHCI "sysbus-ohci" OBJECT_DECLARE_SIMPLE_TYPE(OHCISysBusState, SYSBUS_OHCI) @@ -113,7 +115,7 @@ extern const VMStateDescription vmstate_ohci_state; void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports, dma_addr_t localmem_base, char *masterbus, uint32_t firstport, AddressSpace *as, - void (*ohci_die_fn)(struct OHCIState *), Error **errp); + void (*ohci_die_fn)(OHCIState *), Error **errp); void ohci_bus_stop(OHCIState *ohci); void ohci_stop_endpoints(OHCIState *ohci); void ohci_hard_reset(OHCIState *ohci); From patchwork Mon Feb 27 14:01:26 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: 657093 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385030wrb; Mon, 27 Feb 2023 06:35:56 -0800 (PST) X-Google-Smtp-Source: AK7set+GaTIvY0PsG8UjKlI2OjzRC2hEXeZMHKAX9PkkVVCjjOwV2UXMIqWbMRmWiQM5hlS7MCob X-Received: by 2002:ac8:5d8f:0:b0:3bf:d87d:4948 with SMTP id d15-20020ac85d8f000000b003bfd87d4948mr7871480qtx.14.1677508556108; Mon, 27 Feb 2023 06:35:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508556; cv=none; d=google.com; s=arc-20160816; b=LbhdBfmvtHhx0GgG9ipMgcpcN6ckPDvAnBz44bqBcw6DhOEE/PnU7lmXjTK+hDlJ/Y QWTCxXb+ivwcjhY0WpBD8X0Pkdj1BDLG4TXTTBDmdJJQtQIYBv0gPaXkERi1Q86o6r4b Cz6L4hN+qEDlD6VbxQ/Ud+PwHj/w6WSiYq/jTpE8gz93jOy+DxZ3OhLtrTCZF7yk2XR6 lyzQ8gFujCBCKXGVKlNlK9g9NfEvz0h/MDu9A7Q5Qex9EwD8kfWPdBqgmoruzs2/hASy U0C9dIPe3QiJVB1lCaeUGnPNF2qMaRmVnwckYiK58XBQnsIL9pnoUi4cPNoTJoTph3na 4z+A== 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:to:from :dkim-signature; bh=g1WFgmQi9RTPdbhVn2Otree0rWFPQ8KugT3/QR1c5Yo=; b=YYEdQrnK4qg3qNSynrK7cwv9HdR+D6yx53km6Xj9RituYPVdCj4zqW/HwK1tvRIPeQ RF7lTb8qPXZifTKEHlYXBm8h6UCTrNZOpGQJ+kVHxpqG6WZ9VL6wNhjleFgVitcpcMGP cO0qS0TwTP/uZ8JRSD0dc2V7YIPhUnmuXdM/EhFTQ+KhFB3n1c6/zg4rxTl2mxx9pozy zveXigMd+5lHBClcfp0+9vk5eTdcEjbm9btLBTx0p5mdVdOCPCyX0fg0XYxSQQaBoX4Q VPEX8Q/sKf7adBtwEB+0XlGFClLzQT5uJneMN3rbtNq4LEh09hC5UBB760BUHiOU1BwY xcWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VppkSAy2; 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 w2-20020a05622a190200b003b39d40b408si6770220qtc.63.2023.02.27.06.35.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:35:56 -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=VppkSAy2; 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 1pWeBV-0003hp-UB; Mon, 27 Feb 2023 09:08:57 -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 1pWeBH-0003Ho-94 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:46 -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 1pWeBB-0000R9-4E for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:39 -0500 Received: by mail-wm1-x32f.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so7266189wms.2 for ; Mon, 27 Feb 2023 06:08:36 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=g1WFgmQi9RTPdbhVn2Otree0rWFPQ8KugT3/QR1c5Yo=; b=VppkSAy2ThYZerfqb9FGVrNkvqUcOHzJlwVUaWtURunO8pChLTNiLFqvdfRs3rQbev vQvJlKJ91f9REZOAohil+I+dKM8mW9ohSN4VhQwDOFs3oby8xuLyzoRahyLFGLIXx5D6 ALhal8vYU9pz1hkMoWIsjsUkx4OHcWJRUSPdg+9YNCI+UzklhDoSyMeYwquYPTlcBwHc jqx0o354kBArsYWbUbUx6mwMaNrTMvBXrxSGZIgTZeTGgkQoBTCVWELdDibQCGxEHgSR 1FFyNof52yTYaSjVsLLrVQN/nVgOrHJLcWQqdm3UzMP2UnGH6ejhsmTn8ttPoTK2ffdu ypXA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=g1WFgmQi9RTPdbhVn2Otree0rWFPQ8KugT3/QR1c5Yo=; b=rF5m5M2/BMPdfJdmRSNGqug0a0Qce8qCT2RH0tHf+2RpNeq/1BZbAr/QV2jg9PzvmG vYw04+ef3hUhpSJuxuh3+mJ0ExMMF3ob6btPeBu9J0tnS1nAVTTVFoesEpjqZpUxbQ/m 50opUtlJyW8EKafyq6AcvLacYK9z9a2ZJnAb+YYEwo3a62urRgCLxbotDZzxxG0pqo72 JCL6tsa4MjLB3xRgDM6GQmmxyK7rn2SPvoE4SbC/pZS5z5lg3uvisosUP8zBDYU/FZ8b ZoGe0+Bm+sxHFnopW+4EjmwCHKhkNCZ4d9orPGn825EaERY/aiSsHlnY5M6/3axyd5bX FJrA== X-Gm-Message-State: AO0yUKWe27I5yfI94PdckQBXFv99g68DfxVx1vqJNa7aJ9q6nOpWIKgp 5qy0RyI/onolINEJj6Cz255u4rIh++ouf8bk X-Received: by 2002:a05:600c:4f96:b0:3db:8de:6993 with SMTP id n22-20020a05600c4f9600b003db08de6993mr6685644wmq.4.1677506915104; Mon, 27 Feb 2023 06:08:35 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n41-20020a05600c3ba900b003e20fa01a86sm9873340wms.13.2023.02.27.06.08.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 079/126] hw/usb/ohci: Code style fix comments Date: Mon, 27 Feb 2023 15:01:26 +0100 Message-Id: <20230227140213.35084-70-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-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=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 From: BALATON Zoltan Signed-off-by: BALATON Zoltan Reviewed-by: Peter Maydell Message-Id: <9b0aadedc7c4780fefdc27f14f72ac9003032fbf.1676916639.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ohci.c | 99 +++++++++++++++++++++++------------------------ 1 file changed, 49 insertions(+), 50 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 7ecf9b15b7..93fc592161 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -23,7 +23,7 @@ * o Disable timers when nothing needs to be done, or remove timer usage * all together. * o BIOS work to boot from USB storage -*/ + */ #include "qemu/osdep.h" #include "hw/irq.h" @@ -39,7 +39,7 @@ #include "hcd-ohci.h" /* This causes frames to occur 1000x slower */ -//#define OHCI_TIME_WARP 1 +/*#define OHCI_TIME_WARP 1*/ #define ED_LINK_LIMIT 32 @@ -58,7 +58,7 @@ struct ohci_hcca { #define ED_WBACK_OFFSET offsetof(struct ohci_ed, head) #define ED_WBACK_SIZE 4 -/* Bitfields for the first word of an Endpoint Desciptor. */ +/* Bitfields for the first word of an Endpoint Desciptor. */ #define OHCI_ED_FA_SHIFT 0 #define OHCI_ED_FA_MASK (0x7f<per_cur = 0; ohci->done = 0; ohci->done_count = 7; - - /* FSMPS is marked TBD in OCHI 1.0, what gives ffs? + /* + * FSMPS is marked TBD in OCHI 1.0, what gives ffs? * I took the value linux sets ... */ ohci->fsmps = 0x2778; @@ -460,10 +460,10 @@ static inline int ohci_read_hcca(OHCIState *ohci, static inline int ohci_put_ed(OHCIState *ohci, dma_addr_t addr, struct ohci_ed *ed) { - /* ed->tail is under control of the HCD. + /* + * ed->tail is under control of the HCD. * Since just ed->head is changed by HC, just write back this */ - return put_dwords(ohci, addr + ED_WBACK_OFFSET, (uint32_t *)((char *)ed + ED_WBACK_OFFSET), ED_WBACK_SIZE >> 2); @@ -601,8 +601,10 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed) trace_usb_ohci_iso_td_relative_frame_number_neg(relative_frame_number); return 1; } else if (relative_frame_number > frame_count) { - /* ISO TD expired - retire the TD to the Done Queue and continue with - the next ISO TD of the same ED */ + /* + * ISO TD expired - retire the TD to the Done Queue and continue with + * the next ISO TD of the same ED + */ trace_usb_ohci_iso_td_relative_frame_number_big(relative_frame_number, frame_count); if (OHCI_CC_DATAOVERRUN == OHCI_BM(iso_td.flags, TD_CC)) { @@ -845,9 +847,10 @@ static void ohci_td_pkt(const char *msg, const uint8_t *buf, size_t len) } } -/* Service a transport descriptor. - Returns nonzero to terminate processing of this endpoint. */ - +/* + * Service a transport descriptor. + * Returns nonzero to terminate processing of this endpoint. + */ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) { int dir; @@ -869,7 +872,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) return 1; } - /* See if this TD has already been submitted to the device. */ + /* See if this TD has already been submitted to the device. */ completion = (addr == ohci->async_td); if (completion && !ohci->async_complete) { trace_usb_ohci_td_skip_async(); @@ -885,7 +888,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) switch (dir) { case OHCI_TD_DIR_OUT: case OHCI_TD_DIR_IN: - /* Same value. */ + /* Same value. */ break; default: dir = OHCI_BM(td.flags, TD_DP); @@ -956,11 +959,12 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) } ep = usb_ep_get(dev, pid, OHCI_BM(ed->flags, ED_EN)); if (ohci->async_td) { - /* ??? The hardware should allow one active packet per - endpoint. We only allow one active packet per controller. - This should be sufficient as long as devices respond in a - timely manner. - */ + /* + * ??? The hardware should allow one active packet per + * endpoint. We only allow one active packet per controller. + * This should be sufficient as long as devices respond in a + * timely manner. + */ trace_usb_ohci_td_too_many_pending(ep->nr); return 1; } @@ -996,7 +1000,7 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) /* Writeback */ if (ret == pktlen || (dir == OHCI_TD_DIR_IN && ret >= 0 && flag_r)) { - /* Transmission succeeded. */ + /* Transmission succeeded. */ if (ret == len) { td.cbp = 0; } else { @@ -1048,8 +1052,10 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) OHCI_SET_BM(td.flags, TD_EC, 3); break; } - /* An error occurred so we have to clear the interrupt counter. See - * spec at 6.4.4 on page 104 */ + /* + * An error occurred so we have to clear the interrupt counter. + * See spec at 6.4.4 on page 104 + */ ohci->done_count = 0; } ed->head |= OHCI_ED_H; @@ -1071,7 +1077,7 @@ exit_no_retire: return OHCI_BM(td.flags, TD_CC) != OHCI_CC_NOERROR; } -/* Service an endpoint list. Returns nonzero if active TD were found. */ +/* Service an endpoint list. Returns nonzero if active TD were found. */ static int ohci_service_ed_list(OHCIState *ohci, uint32_t head) { struct ohci_ed ed; @@ -1095,7 +1101,7 @@ static int ohci_service_ed_list(OHCIState *ohci, uint32_t head) if ((ed.head & OHCI_ED_H) || (ed.flags & OHCI_ED_K)) { uint32_t addr; - /* Cancel pending packets for ED that have been paused. */ + /* Cancel pending packets for ED that have been paused. */ addr = ed.head & OHCI_DPTR_MASK; if (ohci->async_td && addr == ohci->async_td) { usb_cancel_packet(&ohci->usb_packet); @@ -1151,7 +1157,7 @@ static void ohci_sof(OHCIState *ohci) ohci_set_interrupt(ohci, OHCI_INTR_SF); } -/* Process Control and Bulk lists. */ +/* Process Control and Bulk lists. */ static void ohci_process_lists(OHCIState *ohci) { if ((ohci->ctl & OHCI_CTL_CLE) && (ohci->status & OHCI_STATUS_CLF)) { @@ -1192,7 +1198,7 @@ static void ohci_frame_boundary(void *opaque) ohci_service_ed_list(ohci, le32_to_cpu(hcca.intr[n])); } - /* Cancel all pending packets if either of the lists has been disabled. */ + /* Cancel all pending packets if either of the lists has been disabled. */ if (ohci->old_ctl & (~ohci->ctl) & (OHCI_CTL_BLE | OHCI_CTL_CLE)) { ohci_stop_endpoints(ohci); } @@ -1234,18 +1240,17 @@ static void ohci_frame_boundary(void *opaque) } } -/* Start sending SOF tokens across the USB bus, lists are processed in +/* + * Start sending SOF tokens across the USB bus, lists are processed in * next frame */ static int ohci_bus_start(OHCIState *ohci) { trace_usb_ohci_start(ohci->name); - - /* Delay the first SOF event by one frame time as - * linux driver is not ready to receive it and - * can meet some race conditions + /* + * Delay the first SOF event by one frame time as linux driver is + * not ready to receive it and can meet some race conditions */ - ohci->sof_time = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL); ohci_eof_timer(ohci); @@ -1259,9 +1264,9 @@ void ohci_bus_stop(OHCIState *ohci) timer_del(ohci->eof_timer); } -/* Sets a flag in a port status register but only set it if the port is - * connected, if not set ConnectStatusChange flag. If flag is enabled - * return 1. +/* + * Sets a flag in a port status reg but only set it if the port is connected. + * If not set ConnectStatusChange flag. If flag is enabled return 1. */ static int ohci_port_set_if_connected(OHCIState *ohci, int i, uint32_t val) { @@ -1271,9 +1276,7 @@ static int ohci_port_set_if_connected(OHCIState *ohci, int i, uint32_t val) if (val == 0) return 0; - /* If CurrentConnectStatus is cleared we set - * ConnectStatusChange - */ + /* If CurrentConnectStatus is cleared we set ConnectStatusChange */ if (!(ohci->rhport[i].ctrl & OHCI_PORT_CCS)) { ohci->rhport[i].ctrl |= OHCI_PORT_CSC; if (ohci->rhstatus & OHCI_RHS_DRWE) { @@ -1291,7 +1294,7 @@ static int ohci_port_set_if_connected(OHCIState *ohci, int i, uint32_t val) return ret; } -/* Set the frame interval - frame interval toggle is manipulated by the hcd only */ +/* Frame interval toggle is manipulated by the hcd only */ static void ohci_set_frame_interval(OHCIState *ohci, uint16_t val) { val &= OHCI_FMI_FI; @@ -1357,9 +1360,7 @@ static uint32_t ohci_get_frame_remaining(OHCIState *ohci) if ((ohci->ctl & OHCI_CTL_HCFS) != OHCI_USB_OPERATIONAL) return (ohci->frt << 31); - /* Being in USB operational state guarnatees sof_time was - * set already. - */ + /* Being in USB operational state guarnatees sof_time was set already. */ tks = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - ohci->sof_time; if (tks < 0) { tks = 0; @@ -1439,13 +1440,11 @@ static void ohci_port_set_status(OHCIState *ohci, int portnum, uint32_t val) trace_usb_ohci_port_reset(portnum); usb_device_reset(port->port.dev); port->ctrl &= ~OHCI_PORT_PRS; - /* ??? Should this also set OHCI_PORT_PESC. */ + /* ??? Should this also set OHCI_PORT_PESC. */ port->ctrl |= OHCI_PORT_PES | OHCI_PORT_PRSC; } - /* Invert order here to ensure in ambiguous case, device is - * powered up... - */ + /* Invert order here to ensure in ambiguous case, device is powered up. */ if (val & OHCI_PORT_LSDA) ohci_port_power(ohci, portnum, 0); if (val & OHCI_PORT_PPS) @@ -1892,7 +1891,7 @@ void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports, ohci_frame_boundary, ohci); } -/** +/* * A typical OHCI will stop operating and set itself into error state * (which can be queried by MMIO) to signal that it got an error. */ From patchwork Mon Feb 27 14:01:27 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: 657095 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385180wrb; Mon, 27 Feb 2023 06:36:13 -0800 (PST) X-Google-Smtp-Source: AK7set/VhmvQ6XFfvLT4rPl9ep6yEp7VtNWflQrwbijcSQvYHfJGOtjkxQBc4BBkqpon/lTLFKHt X-Received: by 2002:ad4:5aec:0:b0:56e:a791:37c6 with SMTP id c12-20020ad45aec000000b0056ea79137c6mr47923312qvh.16.1677508573306; Mon, 27 Feb 2023 06:36:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508573; cv=none; d=google.com; s=arc-20160816; b=HlyBuc8lmoVYgGGZTWQZOcNiyW5I0hkabAycU+KAiJpDcfjhPi57sGOQ/sqzWW7mJP gY0nEsn1qjCC+wcQ9ZMmJxMYDQamsuTqBwROkFURbPdWyYPiXeucI1rpFnXJxnRRiGOR xijsB1EERVmBsQNdZYoDPbATDdgk2eUAqIegTBeZUOFUdXyX3Ra80uweBTm2unAYyDA1 dGd38tp5FUgUWB52nORk/YMzc5DG394LXxd+rMKx2v5NxRAVYlNtPsh6yEyQKPYRY8/c DhvfgkQFyVZ2L8D9B2huZghmMQY9TPlgqBynSZbyKEuzV5a80RupPulj5aSMxuos+BcM fQAQ== 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:to:from :dkim-signature; bh=/4kgSE2+HxM+MyjPD9/wKQdYRNr954dTXEePh8cVcfc=; b=HCXI+0H2Pu8Rrqy2HsRdWPJcXWO3qL+iBCaJN/6c90to9lDdTRelyFtv9v2V2F2MUa WfZkcPfOIAixchB9bMUGzvDK75jCqxUgPUhFj6yWGCIHF8dh/s6MxcZgfo2vswmIfTpH +GkFS3VBkBb6uKcRb3YIIxP+WHnyrb9ScIjrLIbqEA02G07snNFI3hKRs+FFWF/kuVoT cS7W723kop/4/y+b8DmXvAf3PvVhSreWBfb8hwiLZUPyuRzNGmU+fUEB0CxF18qESWcR 1nrcHd2ChUdIcZbx3Qf6+9fz00pxLxQOf3i+2WmDx6dgeC398pKcOsM5BB6z7OOLV3DS IIFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=L6n1DOx7; 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 bn40-20020a05620a2ae800b0073b9e5fb99esi6056727qkb.105.2023.02.27.06.36.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:36:13 -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=L6n1DOx7; 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 1pWeBV-0003hO-Pn; Mon, 27 Feb 2023 09:08:57 -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 1pWeBJ-0003Kx-I1 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:47 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBH-0000RN-2P for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:45 -0500 Received: by mail-wr1-x42e.google.com with SMTP id v16so3558519wrn.0 for ; Mon, 27 Feb 2023 06:08:41 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/4kgSE2+HxM+MyjPD9/wKQdYRNr954dTXEePh8cVcfc=; b=L6n1DOx7pALKiVXYUoeDPStjd51rc+v0eSD3CWjx1DTmOhqhH14RsfSIrP92Iw5AC6 QzZGIxyU35vuCr7jYsGlKSB1cEb097HRtKCVt4uKhnioDXGG5Orvnd6fnbPc7MVA7dU0 lEbeBSqaO8jm7SLJCAEKS+JkdYB3NXkw4eMEhc2Z8naGUvitVhHChKXPUdmBahpROo2f CDcPkU0A2NEWSavukFq8fvwzMCayCPA/cIn6PkiRFz+FUpg+sKiLvwldJcRhaYS8F9CG mKNPv/znqHe1V6DZGLfwGpaIxJsteb8e5hcfQxQBjmU04vCrvegvwhTIqLHv3AoFe7px eOCQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/4kgSE2+HxM+MyjPD9/wKQdYRNr954dTXEePh8cVcfc=; b=4ABbjP6hPExkDNW34QrpYMPfoFGt1kDgD2d6gvNzafFh7paJAUAtl5m6Dt2ZIoqtyL fg/DEqhrF99CU8eVOtMcuz5Tf3yS/ohK7n5MEItsBRbSt+pU5iAAMSi9OdwRY3SBHu3k nUkbGrC2uHuV9l4cr9J+mD0DCxMFWM9RUL8Jj8YwVjg9Nh2mDMW5b8z0FZ5ieWHEBzEl 7T2YehBVOuaTFYT+zRaCJm8BiG5vUjkjbr2rEImA6xtexgFnmlSvy0DcFrJU2QLth1/S sBmH2P/bBDt1WLg0E08SlIWYsEPK7bQn6Dl9wLUAaLvvwk1q82FS4C9Ljn5Kj/eH7l4D i6Bg== X-Gm-Message-State: AO0yUKVKGqyrSaRYMNdTn2bzXO1UaRYCsswnn5eq67wstPychmFaKkGk 4WjZOqIFY5S12qHgBwInlQ5qFtDy2qzLi1Fv X-Received: by 2002:a5d:42c4:0:b0:2c7:1c44:5aae with SMTP id t4-20020a5d42c4000000b002c71c445aaemr9468120wrr.12.1677506920085; Mon, 27 Feb 2023 06:08:40 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i2-20020adfdec2000000b002c71dd1109fsm7170449wrn.47.2023.02.27.06.08.39 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 080/126] hw/usb/ohci: Code style fix white space errors Date: Mon, 27 Feb 2023 15:01:27 +0100 Message-Id: <20230227140213.35084-71-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.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=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 From: BALATON Zoltan Signed-off-by: BALATON Zoltan Reviewed-by: Peter Maydell Message-Id: Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ohci.c | 154 +++++++++++++++++++++++----------------------- 1 file changed, 76 insertions(+), 78 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 93fc592161..9d6bb8312e 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -60,46 +60,46 @@ struct ohci_hcca { /* Bitfields for the first word of an Endpoint Desciptor. */ #define OHCI_ED_FA_SHIFT 0 -#define OHCI_ED_FA_MASK (0x7f<frame_number, starting_frame); + relative_frame_number = USUB(ohci->frame_number, starting_frame); trace_usb_ohci_iso_td_head( ed->head & OHCI_DPTR_MASK, ed->tail & OHCI_DPTR_MASK, @@ -657,8 +657,8 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed) next_offset = iso_td.be; } - if (!(OHCI_BM(start_offset, TD_PSW_CC) & 0xe) || - ((relative_frame_number < frame_count) && + if (!(OHCI_BM(start_offset, TD_PSW_CC) & 0xe) || + ((relative_frame_number < frame_count) && !(OHCI_BM(next_offset, TD_PSW_CC) & 0xe))) { trace_usb_ohci_iso_td_bad_cc_not_accessed(start_offset, next_offset); return 1; @@ -1118,7 +1118,7 @@ static int ohci_service_ed_list(OHCIState *ohci, uint32_t head) ed.tail & OHCI_DPTR_MASK, ed.next & OHCI_DPTR_MASK); trace_usb_ohci_ed_pkt_flags( OHCI_BM(ed.flags, ED_FA), OHCI_BM(ed.flags, ED_EN), - OHCI_BM(ed.flags, ED_D), (ed.flags & OHCI_ED_S)!= 0, + OHCI_BM(ed.flags, ED_D), (ed.flags & OHCI_ED_S) != 0, (ed.flags & OHCI_ED_K) != 0, (ed.flags & OHCI_ED_F) != 0, OHCI_BM(ed.flags, ED_MPS)); @@ -1311,10 +1311,8 @@ static void ohci_port_power(OHCIState *ohci, int i, int p) if (p) { ohci->rhport[i].ctrl |= OHCI_PORT_PPS; } else { - ohci->rhport[i].ctrl &= ~(OHCI_PORT_PPS| - OHCI_PORT_CCS| - OHCI_PORT_PSS| - OHCI_PORT_PRS); + ohci->rhport[i].ctrl &= ~(OHCI_PORT_PPS | OHCI_PORT_CCS | + OHCI_PORT_PSS | OHCI_PORT_PRS); } } @@ -1858,7 +1856,7 @@ void usb_ohci_init(OHCIState *ohci, DeviceState *dev, uint32_t num_ports, ohci->num_ports = num_ports; if (masterbus) { USBPort *ports[OHCI_MAX_PORTS]; - for(i = 0; i < num_ports; i++) { + for (i = 0; i < num_ports; i++) { ports[i] = &ohci->rhport[i].port; } usb_register_companion(masterbus, ports, num_ports, From patchwork Mon Feb 27 14:01:28 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: 657074 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381015wrb; Mon, 27 Feb 2023 06:28:06 -0800 (PST) X-Google-Smtp-Source: AK7set9Oo0bg4mFQagb6NuZOltUu8BKFuFUifB4tPmmoS+MESdNS2FjDXUIyMwFyvPdUnin4q66u X-Received: by 2002:a05:6214:250d:b0:574:d6d:a317 with SMTP id gf13-20020a056214250d00b005740d6da317mr13521096qvb.39.1677508085978; Mon, 27 Feb 2023 06:28:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508085; cv=none; d=google.com; s=arc-20160816; b=QXaiGkrbNGLnwZVbCI0odiRKfWjJE4owUCljfIWw+GBowc0OKqsNUSRSB/vQXF6Bub ddI6RJRQObeQuRUf+UawtkHSA9Z0UR/oZDs+ftXZLe8p1KvXVKHBwF18hqRBwh07kgTY MAum21szqxxjDFzUlYOrP4iwHwX18hfuHa4f6hx/w2djHvG7lskul6R3BwgiMYw2hrJ5 otZcmmcX8r7ILJW5bZGbY2L2ktgEY2TxNYeMsBP7kjMm6qlm6WmaBfFt4eJnwGBxXYqB CjiCMH/3ioMwjcKu4qQmx5/7fC07IqpfSVqXRpgMFlryuj808qlP0t6OnCqAXpeo1N8N 9R4Q== 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:to:from :dkim-signature; bh=2VoGtTwgHmiA8Fb4MxVYfdhh5AZ0EXQI7N3heOlGcxs=; b=My5n7yQ/Y28N5dneMC6blKsXBqP1CJz59f/U7hzENExiVnA9MqRkqWqo52Lolfp5Rk QjTO+7VEtgbNsLxEDDP/AqpanGw0Y1L48JQzYlAkJeotV96aaPltRzyElE9kZuNbVH9H KNOVdZpRucmK/bQQR0eDpM+ORxc4+Lcn83L8eX0PbZpBHNiE1B1P8b8zVIxKWbqTqzOG mTBq0tuthiMVzdff4w/5Nk3hVGeU+dLMrNpaL/XR8NtoRxJN3jUtt+NEUorRRQhZ9cVn 15aKgkAGymQW91KGxV2LaNKopp9Nou+xr6EwRqdewiJQ80f0NncHXRP2Egf69pze7VkW WkYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LIXgDJ81; 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 p1-20020a0ccb81000000b0056ea83d60f7si6469651qvk.361.2023.02.27.06.28.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28:05 -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=LIXgDJ81; 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 1pWeBX-0003rf-1B; Mon, 27 Feb 2023 09:08:59 -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 1pWeBR-0003PL-A4 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:54 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBL-0000UE-Hl for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:49 -0500 Received: by mail-wm1-x332.google.com with SMTP id d41-20020a05600c4c2900b003e9e066550fso3902480wmp.4 for ; Mon, 27 Feb 2023 06:08:46 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=2VoGtTwgHmiA8Fb4MxVYfdhh5AZ0EXQI7N3heOlGcxs=; b=LIXgDJ81Z151oyLml54ijgZiGVE847D8Im8Ut9rXi7Mi/gWO7+i3bkKfHbTi1HfASd TTPN4NndhYeQQ0DoG07MGPDkcGs7q7+lt5eRRXIPypS8cDp0VSCPkZxAtSlIf0xhfh1l +fcm8sI03qHVhoSSV9/c1RV/4pzGdj685hogB+sNK4jkNqooNFvf849eNHMhCvaKeh3X 8xDJelxMUslZePc1A/r+fnPL6N8y5cVFxXbn7ppSLKqeOmwkMoZ3sc5BDhSMnWV7jsXG qRkwFUSHbj/35IQzKd7UfGwCAoBUsqfcfwWlmSPrK23Plt+eIj6Y2bi7FcCiGt5EIr2t jn8g== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2VoGtTwgHmiA8Fb4MxVYfdhh5AZ0EXQI7N3heOlGcxs=; b=fIfFJRtYhI6NjfxzQwOFM6Oql0APnUS6jEvd7Q2U+i2FfcGilugFv8Pk3ZJWMjdYi1 Fa8oAz6oI6i2yEVYf5bkzDxfSMNHIlkLl39Yjcb0+g11QmyxoL6NA+YnrpjNBBfeP11W sXoGfhGwhtPnemMkhDbtdqLn6Y3+xEl+stkeQdFIlim6pxGzNrKOAANXIkK+QaHyLLNf opePO+C1eVbnzH1WcDiyNkhFbN7YFOtrcB4FdzYsaT+RdwkLwVpITNRImP3ca+y6uJ0u SHWn2yK7SIoCYus98t8G9oQOZrN+jNzHW/pZubSlMKZD7cTNCXaWuKbEI3kuUkWJ3a++ QsPw== X-Gm-Message-State: AO0yUKV2u/RX0ztDpUqMHfm8UQ2l+NPMpRWkvdTZIfZqjOA82psN8n5+ UjaHpp+2ZRUXqVqogEgfOwyTO67BFzj7Jms1 X-Received: by 2002:a05:600c:3113:b0:3eb:2b88:999f with SMTP id g19-20020a05600c311300b003eb2b88999fmr7547861wmo.5.1677506925254; Mon, 27 Feb 2023 06:08:45 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id t10-20020a05600c128a00b003dfee43863fsm12663166wmd.26.2023.02.27.06.08.44 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 081/126] hw/usb/ohci: Code style fix missing braces and extra parenthesis Date: Mon, 27 Feb 2023 15:01:28 +0100 Message-Id: <20230227140213.35084-72-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 From: BALATON Zoltan Signed-off-by: BALATON Zoltan Reviewed-by: Peter Maydell Message-Id: Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ohci.c | 106 ++++++++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 46 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 9d6bb8312e..b7877866f6 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -499,9 +499,9 @@ static int ohci_copy_td(OHCIState *ohci, struct ohci_td *td, ptr = td->cbp; n = 0x1000 - (ptr & 0xfff); - if (n > len) + if (n > len) { n = len; - + } if (dma_memory_rw(ohci->as, ptr + ohci->localmem_base, buf, n, dir, MEMTXATTRS_UNSPECIFIED)) { return -1; @@ -527,9 +527,9 @@ static int ohci_copy_iso_td(OHCIState *ohci, ptr = start_addr; n = 0x1000 - (ptr & 0xfff); - if (n > len) + if (n > len) { n = len; - + } if (dma_memory_rw(ohci->as, ptr + ohci->localmem_base, buf, n, dir, MEMTXATTRS_UNSPECIFIED)) { return -1; @@ -617,8 +617,9 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed) iso_td.next = ohci->done; ohci->done = addr; i = OHCI_BM(iso_td.flags, TD_DI); - if (i < ohci->done_count) + if (i < ohci->done_count) { ohci->done_count = i; + } if (ohci_put_iso_td(ohci, addr, &iso_td)) { ohci_die(ohci); return 1; @@ -803,8 +804,9 @@ static int ohci_service_iso_td(OHCIState *ohci, struct ohci_ed *ed) iso_td.next = ohci->done; ohci->done = addr; i = OHCI_BM(iso_td.flags, TD_DI); - if (i < ohci->done_count) + if (i < ohci->done_count) { ohci->done_count = i; + } } if (ohci_put_iso_td(ohci, addr, &iso_td)) { ohci_die(ohci); @@ -1022,8 +1024,9 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) /* Setting ED_C is part of the TD retirement process */ ed->head &= ~OHCI_ED_C; - if (td.flags & OHCI_TD_T0) + if (td.flags & OHCI_TD_T0) { ed->head |= OHCI_ED_C; + } } else { if (ret >= 0) { trace_usb_ohci_td_underrun(); @@ -1067,8 +1070,9 @@ static int ohci_service_td(OHCIState *ohci, struct ohci_ed *ed) td.next = ohci->done; ohci->done = addr; i = OHCI_BM(td.flags, TD_DI); - if (i < ohci->done_count) + if (i < ohci->done_count) { ohci->done_count = i; + } exit_no_retire: if (ohci_put_td(ohci, addr, &td)) { ohci_die(ohci); @@ -1087,9 +1091,9 @@ static int ohci_service_ed_list(OHCIState *ohci, uint32_t head) uint32_t link_cnt = 0; active = 0; - if (head == 0) + if (head == 0) { return 0; - + } for (cur = head; cur && link_cnt++ < ED_LINK_LIMIT; cur = next_ed) { if (ohci_read_ed(ohci, cur, &ed)) { trace_usb_ohci_ed_read_error(cur); @@ -1125,8 +1129,9 @@ static int ohci_service_ed_list(OHCIState *ohci, uint32_t head) active = 1; if ((ed.flags & OHCI_ED_F) == 0) { - if (ohci_service_td(ohci, &ed)) + if (ohci_service_td(ohci, &ed)) { break; + } } else { /* Handle isochronous endpoints */ if (ohci_service_iso_td(ohci, &ed)) { @@ -1218,19 +1223,21 @@ static void ohci_frame_boundary(void *opaque) hcca.frame = cpu_to_le16(ohci->frame_number); if (ohci->done_count == 0 && !(ohci->intr_status & OHCI_INTR_WD)) { - if (!ohci->done) + if (!ohci->done) { abort(); - if (ohci->intr & ohci->intr_status) + } + if (ohci->intr & ohci->intr_status) { ohci->done |= 1; + } hcca.done = cpu_to_le32(ohci->done); ohci->done = 0; ohci->done_count = 7; ohci_set_interrupt(ohci, OHCI_INTR_WD); } - if (ohci->done_count != 7 && ohci->done_count != 0) + if (ohci->done_count != 7 && ohci->done_count != 0) { ohci->done_count--; - + } /* Do SOF stuff here */ ohci_sof(ohci); @@ -1273,9 +1280,9 @@ static int ohci_port_set_if_connected(OHCIState *ohci, int i, uint32_t val) int ret = 1; /* writing a 0 has no effect */ - if (val == 0) + if (val == 0) { return 0; - + } /* If CurrentConnectStatus is cleared we set ConnectStatusChange */ if (!(ohci->rhport[i].ctrl & OHCI_PORT_CCS)) { ohci->rhport[i].ctrl |= OHCI_PORT_CSC; @@ -1285,9 +1292,9 @@ static int ohci_port_set_if_connected(OHCIState *ohci, int i, uint32_t val) return 0; } - if (ohci->rhport[i].ctrl & val) + if (ohci->rhport[i].ctrl & val) { ret = 0; - + } /* set the bit */ ohci->rhport[i].ctrl |= val; @@ -1327,9 +1334,9 @@ static void ohci_set_ctl(OHCIState *ohci, uint32_t val) new_state = ohci->ctl & OHCI_CTL_HCFS; /* no state change */ - if (old_state == new_state) + if (old_state == new_state) { return; - + } trace_usb_ohci_set_ctl(ohci->name, new_state); switch (new_state) { case OHCI_USB_OPERATIONAL: @@ -1355,9 +1362,9 @@ static uint32_t ohci_get_frame_remaining(OHCIState *ohci) uint16_t fr; int64_t tks; - if ((ohci->ctl & OHCI_CTL_HCFS) != OHCI_USB_OPERATIONAL) - return (ohci->frt << 31); - + if ((ohci->ctl & OHCI_CTL_HCFS) != OHCI_USB_OPERATIONAL) { + return ohci->frt << 31; + } /* Being in USB operational state guarnatees sof_time was set already. */ tks = qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - ohci->sof_time; if (tks < 0) { @@ -1365,9 +1372,9 @@ static uint32_t ohci_get_frame_remaining(OHCIState *ohci) } /* avoid muldiv if possible */ - if (tks >= usb_frame_time) - return (ohci->frt << 31); - + if (tks >= usb_frame_time) { + return ohci->frt << 31; + } tks = tks / usb_bit_time; fr = (uint16_t)(ohci->fi - tks); @@ -1383,33 +1390,36 @@ static void ohci_set_hub_status(OHCIState *ohci, uint32_t val) old_state = ohci->rhstatus; /* write 1 to clear OCIC */ - if (val & OHCI_RHS_OCIC) + if (val & OHCI_RHS_OCIC) { ohci->rhstatus &= ~OHCI_RHS_OCIC; - + } if (val & OHCI_RHS_LPS) { int i; - for (i = 0; i < ohci->num_ports; i++) + for (i = 0; i < ohci->num_ports; i++) { ohci_port_power(ohci, i, 0); + } trace_usb_ohci_hub_power_down(); } if (val & OHCI_RHS_LPSC) { int i; - for (i = 0; i < ohci->num_ports; i++) + for (i = 0; i < ohci->num_ports; i++) { ohci_port_power(ohci, i, 1); + } trace_usb_ohci_hub_power_up(); } - if (val & OHCI_RHS_DRWE) + if (val & OHCI_RHS_DRWE) { ohci->rhstatus |= OHCI_RHS_DRWE; - - if (val & OHCI_RHS_CRWE) + } + if (val & OHCI_RHS_CRWE) { ohci->rhstatus &= ~OHCI_RHS_DRWE; - - if (old_state != ohci->rhstatus) + } + if (old_state != ohci->rhstatus) { ohci_set_interrupt(ohci, OHCI_INTR_RHSC); + } } /* Set root hub port status */ @@ -1422,12 +1432,12 @@ static void ohci_port_set_status(OHCIState *ohci, int portnum, uint32_t val) old_state = port->ctrl; /* Write to clear CSC, PESC, PSSC, OCIC, PRSC */ - if (val & OHCI_PORT_WTC) + if (val & OHCI_PORT_WTC) { port->ctrl &= ~(val & OHCI_PORT_WTC); - - if (val & OHCI_PORT_CCS) + } + if (val & OHCI_PORT_CCS) { port->ctrl &= ~OHCI_PORT_PES; - + } ohci_port_set_if_connected(ohci, portnum, val & OHCI_PORT_PES); if (ohci_port_set_if_connected(ohci, portnum, val & OHCI_PORT_PSS)) { @@ -1443,13 +1453,15 @@ static void ohci_port_set_status(OHCIState *ohci, int portnum, uint32_t val) } /* Invert order here to ensure in ambiguous case, device is powered up. */ - if (val & OHCI_PORT_LSDA) + if (val & OHCI_PORT_LSDA) { ohci_port_power(ohci, portnum, 0); - if (val & OHCI_PORT_PPS) + } + if (val & OHCI_PORT_PPS) { ohci_port_power(ohci, portnum, 1); - - if (old_state != port->ctrl) + } + if (old_state != port->ctrl) { ohci_set_interrupt(ohci, OHCI_INTR_RHSC); + } } static uint64_t ohci_mem_read(void *opaque, @@ -1606,8 +1618,9 @@ static void ohci_mem_write(void *opaque, /* Bits written as '0' remain unchanged in the register */ ohci->status |= val; - if (ohci->status & OHCI_STATUS_HCR) + if (ohci->status & OHCI_STATUS_HCR) { ohci_soft_reset(ohci); + } break; case 3: /* HcInterruptStatus */ @@ -1685,8 +1698,9 @@ static void ohci_mem_write(void *opaque, case 25: /* HcHReset */ ohci->hreset = val & ~OHCI_HRESET_FSBIR; - if (val & OHCI_HRESET_FSBIR) + if (val & OHCI_HRESET_FSBIR) { ohci_hard_reset(ohci); + } break; case 26: /* HcHInterruptEnable */ From patchwork Mon Feb 27 14:01:29 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: 657079 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381148wrb; Mon, 27 Feb 2023 06:28:27 -0800 (PST) X-Google-Smtp-Source: AK7set/AlxhETvjn90HsHngLU/0xx3gucRPrUK/tGgcIGSJKbJXsX2e30Uf6sbdmt9cyztfGPjhk X-Received: by 2002:a05:6214:508b:b0:56f:8a99:1a5d with SMTP id kk11-20020a056214508b00b0056f8a991a5dmr41565290qvb.30.1677508106883; Mon, 27 Feb 2023 06:28:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508106; cv=none; d=google.com; s=arc-20160816; b=Qbo80Ck3Wqc6tZcoqz2QzoZ7lt0teLyaJBILBkaOBRoQVQBUZlw4w5JlwKOghO15JI Fozn6GgYXoGEqQ6tYuNLfrlw6kWLDonVauk7V1tcfdia3PjXmszIe6lrcYpkteIZR1qn Po2EQBWxToLfFXkzN6aP6Xh59adODrHpkT2wuZgKVmJ7LTIwlxbA1TEWDO52vepho2CV OU+G1nw1KPdPL7+5qBi4UA4Z5aWPUCptEDyYj3fkXer/YWRvd5DcQauE/3PQ1gA1gEYb Upcu7Ws+FoECF75xVf1UqOl/kJmTtz3gaGKxfkbD/+2pz+vcVQJcIMDVyY3b882Sblft x67Q== 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:to:from :dkim-signature; bh=mYWHqZNBGHAOEgv7ZOTXSvVJJmng/wfNhhXsX59Blok=; b=k1S74xYOtp4U9PEYGaYXNFaSIzDONtQlpqZsZDM4mSkzYDKNeLtLo1oqt9/CdMMuHE /vqBswaIw8Ops9hDefgLBHokNo2Cu1fNGqlO9MRCs3dEJtxiAE6OsVbyVLGKq+C1r7bR ou7sj8mt62hY9dw+Dglsfb7IuNG7huUSNL+ITjl+G5LvDRviEhBV+WOcjGKf+Ym0OlwX /7o8eHjaibR+PewHiBAdBDhzoPFwpvCqABtkGNPsZQJPsoiTpFvnmK7lWQUE1/sIn1rF mM1bsb/NwgegXnkqdvHRf5z/eaQtpmP2n8ercI8yoV5jfrVSFhPenw/dLa7vKZBda1rG BRbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zixwW8N2; 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 v2-20020a05620a0f0200b007428b22c9d9si6180422qkl.397.2023.02.27.06.28.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28:26 -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=zixwW8N2; 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 1pWeBX-0003y5-9v; Mon, 27 Feb 2023 09:08:59 -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 1pWeBT-0003SZ-0y for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:56 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBR-0000UX-2r for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:08:54 -0500 Received: by mail-wr1-x430.google.com with SMTP id e37so3887261wri.10 for ; Mon, 27 Feb 2023 06:08:51 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mYWHqZNBGHAOEgv7ZOTXSvVJJmng/wfNhhXsX59Blok=; b=zixwW8N2iMVDXxKOvk521LqOGgNUs97Ca5RqZbHTGjHXSCZ5ceKg9I7pnQ3TebkSm3 S8AO+4HrLJw/g9xeDCLO2SW3t2Ymbmg99Vd1+djwp8sF08AF5+Nu61/eiL/PK0fCaj0n atC0lQ/dF1ALVeQzIs2bpG2jOWhnbPjGgmBd5GG72/BuXH+OIoqENFYpkUp1O2nuTiN2 mpBO5oofDPuqewIQ8tTT45q9bVV42ES85Joz0nnsLDusGOaSGLg2r1yClhXa0ztEZgIf selqS6hxUOfcqNJZGD03Os+KKstwovFZUdsUbGnxyrQkN7xVEftxap5IgQrwi9MnCrcl zyCw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mYWHqZNBGHAOEgv7ZOTXSvVJJmng/wfNhhXsX59Blok=; b=vt/EVDfe1oo4aslm+blPs/lAQYYJNNSgTDbuG/NqqVj9U1pfd6L6HEYFrKqJbJXBaF z3kbRrJdEpVotRr/C6LA7mU3BCrnWKrrJtRTqZQQobRxX/HAumBwAWwdxrBwEnXWUoQu lnPGU93LpXbVXZK9XYmdRJwT8ORUDg8uVXjtB7C2QoVt9BONw6UiuQw79kOW6wVXhM/5 Y2E5Z+klvYh1OwcVUslcYlzm1KHFLix6edKXJ7nUCwMFURw2GbY65mf3j2peqRAefW3t BI7jvNOoIxYRc3+VyCqqTm402itWb/TXwhCxoVZnYtHjm7ipjNm6/nT8tDN3Vv7tGlNE ek/A== X-Gm-Message-State: AO0yUKVEZPsRK6L02FY0tg5ifh9ePCaXUnu0nbprQcmu0TSz8/qgOGtH 8kzFtggYSW3H6GVZ/nsiX6LSTjQn9C3ZyJ/d X-Received: by 2002:adf:f344:0:b0:2c7:1740:629b with SMTP id e4-20020adff344000000b002c71740629bmr10571872wrp.13.1677506930747; Mon, 27 Feb 2023 06:08:50 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id c4-20020adffb04000000b002c70bfe505esm7153059wrr.82.2023.02.27.06.08.49 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:50 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 082/126] hw/usb/ohci: Move a function next to where it is used Date: Mon, 27 Feb 2023 15:01:29 +0100 Message-Id: <20230227140213.35084-73-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 From: BALATON Zoltan The ohci_port_set_if_connected() function is only used by ohci_port_set_status(), move next to it to have them at the same place. Signed-off-by: BALATON Zoltan Reviewed-by: Peter Maydell Message-Id: <46411d4980ab0fba61ab0d2209a939fdc41eb573.1676916640.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ohci.c | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index b7877866f6..2a52aace80 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -1271,36 +1271,6 @@ void ohci_bus_stop(OHCIState *ohci) timer_del(ohci->eof_timer); } -/* - * Sets a flag in a port status reg but only set it if the port is connected. - * If not set ConnectStatusChange flag. If flag is enabled return 1. - */ -static int ohci_port_set_if_connected(OHCIState *ohci, int i, uint32_t val) -{ - int ret = 1; - - /* writing a 0 has no effect */ - if (val == 0) { - return 0; - } - /* If CurrentConnectStatus is cleared we set ConnectStatusChange */ - if (!(ohci->rhport[i].ctrl & OHCI_PORT_CCS)) { - ohci->rhport[i].ctrl |= OHCI_PORT_CSC; - if (ohci->rhstatus & OHCI_RHS_DRWE) { - /* TODO: CSC is a wakeup event */ - } - return 0; - } - - if (ohci->rhport[i].ctrl & val) { - ret = 0; - } - /* set the bit */ - ohci->rhport[i].ctrl |= val; - - return ret; -} - /* Frame interval toggle is manipulated by the hcd only */ static void ohci_set_frame_interval(OHCIState *ohci, uint16_t val) { @@ -1422,6 +1392,36 @@ static void ohci_set_hub_status(OHCIState *ohci, uint32_t val) } } +/* + * Sets a flag in a port status reg but only set it if the port is connected. + * If not set ConnectStatusChange flag. If flag is enabled return 1. + */ +static int ohci_port_set_if_connected(OHCIState *ohci, int i, uint32_t val) +{ + int ret = 1; + + /* writing a 0 has no effect */ + if (val == 0) { + return 0; + } + /* If CurrentConnectStatus is cleared we set ConnectStatusChange */ + if (!(ohci->rhport[i].ctrl & OHCI_PORT_CCS)) { + ohci->rhport[i].ctrl |= OHCI_PORT_CSC; + if (ohci->rhstatus & OHCI_RHS_DRWE) { + /* TODO: CSC is a wakeup event */ + } + return 0; + } + + if (ohci->rhport[i].ctrl & val) { + ret = 0; + } + /* set the bit */ + ohci->rhport[i].ctrl |= val; + + return ret; +} + /* Set root hub port status */ static void ohci_port_set_status(OHCIState *ohci, int portnum, uint32_t val) { From patchwork Mon Feb 27 14:01:30 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: 657070 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380613wrb; Mon, 27 Feb 2023 06:27:14 -0800 (PST) X-Google-Smtp-Source: AK7set+sKZyrMIaxvZy6Mirr+Kr4T9/TvBhl6VSITqu7x3KWVcAhmQrKH2DOy0TCeQBZQHREg/iZ X-Received: by 2002:a05:622a:1648:b0:3b9:e0b2:9a49 with SMTP id y8-20020a05622a164800b003b9e0b29a49mr44120041qtj.60.1677508034650; Mon, 27 Feb 2023 06:27:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508034; cv=none; d=google.com; s=arc-20160816; b=p+GdOb4FDWrXW7hHrIzxHsImJVZemF7DnKcuIFS8S8Y6PYvLKjD8wKe9Ko5sSMJNXA GyMGaykE0BiEsOTrXbOBZT0w1b5acwllWFjgmpTe8qMGLFAusUecndiTEg5sG/xrLvCz 48tp8Sczxgz3MNhVF+T/vE2pEOWL9wAMBPTFXFStE7SqAL7WbXlcMRaHwA3MCUQodKH7 Maoydnd01h1V/CqYFs/iWJOOruNq8HX3KwHu/3avo0QOmdxstQ6DUoVSMhxlHA1n2xcB bnVfCZEgaM30C4XF3+KRLAr3UlC08cpleqqzOJVYbGOXODWaDjP0NI/DX53zhOO5G2gq G26g== 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:to:from :dkim-signature; bh=ySdhuu+HBdkQKc4PyRG/80iLRfXGK1b4SJkc+12EU2g=; b=ujJaLVtP8A0Ine5kQSov9tSd0Dw579j1/vy6GzDSjKl51b51Kqu903stDD6WnxQKnp 1zHyRz1LZfsVxdc1inMtLLwZ7dFEFbImKUMxuui16sr+MI+IHhNPQ+4OOHOIB8LtDK2I YQjnfrm7BYYUMkBgFbHimbfONBM4FFeawjaNAELXNWG0awoVcYrj2AO17VoMjhlu6YfO lIWFiKUQ9DgLgTFzxVaaGus0p9xC7fCJZ6qVcBmIHoN4h4rsc5SDW3wE/7enEXd3YUwW AOOvHCbhSBbNOuq+mpqZ/BR2QoonH3gSS0gmEy5Iqj7VkSgeV/z8PWyfeivGb5b3C3Dx cLoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pnctJ0tX; 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 188-20020a370bc5000000b006ee9af422b6si6241317qkl.226.2023.02.27.06.27.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:27:14 -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=pnctJ0tX; 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 1pWeC0-0004Zl-FU; Mon, 27 Feb 2023 09:09:28 -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 1pWeBY-0004D6-Ju for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:00 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBW-0000V4-Ig for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:00 -0500 Received: by mail-wr1-x42b.google.com with SMTP id t15so6359630wrz.7 for ; Mon, 27 Feb 2023 06:08:58 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ySdhuu+HBdkQKc4PyRG/80iLRfXGK1b4SJkc+12EU2g=; b=pnctJ0tXRhEX9nVjm2rtoLLnDo3PSeIKMSz3XsrCnxVWcBhX+5ZRhXJQUjeH//k+ez 1jvctsnvIPeTaMZv31BhOJCxiBh8fxqRu0k6lSDcDsJ8fZ48Y+O+kTheCCGusQhfxmSp E+yxQD0uE3ZORSmuf1+/3fhvOi+xmTbJJxSfTZH8rgnxXAKTw1HhYBbx+CeVPIc+5NZu OaaaNmACpaoi26FzRior8L3wXuQtXlqeL8pF7w63h7lnSeeFyIkJwNk6EbXg/lF/hl6u /gYlO6L85iQVaVMRoVST+s4Ukki/iaZz9bCT6QYDnNJ47Nx32eNWm/2JS3fveQyr40YN 88JA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ySdhuu+HBdkQKc4PyRG/80iLRfXGK1b4SJkc+12EU2g=; b=djNxnHFtbgR2UuznXWsZKVaFOilAN/Cgj44SkNHicRR4fbcPBhnP35Jo1YyIcLkLy5 oGi9WfWhqMs0PSgmlO3JLMA6zarqDCOVpAhhIIYFYlxJsqX5ZJ28O/iLgFqeQHgQw4sA L77xxPGLQph76cZSGIVIN7a9C9QyYGsC1AWwCR/N3LFgSJDqYlEsaEETze7oB1ZbubTr Q0Lacj7C88i8fIVNan+1wvocZ+qE6Mjir4r+rbDOSLDwJZAKmnb7epyx5MBBO1Y9xlw5 F0ouSfip1lci8aKVq3KdtiAbbntfRiR/tfDkMggxFl7Dd3FIJHchyNtQ+uhXY9idRvhV 5B7w== X-Gm-Message-State: AO0yUKXOkpI7aUTN7Onati004suJgicDQQtjPd+BqOdPclR4bnoxGdvG oCx4XjXecwPOwpCLdUnGMKcK+0ePPbkf9L2U X-Received: by 2002:a5d:608f:0:b0:2ca:6442:c817 with SMTP id w15-20020a5d608f000000b002ca6442c817mr4146542wrt.57.1677506936808; Mon, 27 Feb 2023 06:08:56 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id o8-20020a5d4a88000000b002c70c99db74sm7106772wrq.86.2023.02.27.06.08.55 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:08:56 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 083/126] hw/usb/ohci: Add trace points for register access Date: Mon, 27 Feb 2023 15:01:30 +0100 Message-Id: <20230227140213.35084-74-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philmd@linaro.org; helo=mail-wr1-x42b.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=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 From: BALATON Zoltan To help debugging add trace points that print values read from or written to the device's registers. Signed-off-by: BALATON Zoltan Message-Id: <1bb4985e5dfc1df5a290e77f76fd827ae3592ab7.1676916640.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-ohci.c | 27 +++++++++++++++++++++++++++ hw/usb/trace-events | 4 ++++ 2 files changed, 31 insertions(+) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 2a52aace80..35a1a55145 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -235,6 +235,24 @@ struct ohci_iso_td { #define OHCI_HRESET_FSBIR (1 << 0) +static const char *ohci_reg_names[] = { + "HcRevision", "HcControl", "HcCommandStatus", "HcInterruptStatus", + "HcInterruptEnable", "HcInterruptDisable", "HcHCCA", "HcPeriodCurrentED", + "HcControlHeadED", "HcControlCurrentED", "HcBulkHeadED", "HcBulkCurrentED", + "HcDoneHead", "HcFmInterval", "HcFmRemaining", "HcFmNumber", + "HcPeriodicStart", "HcLSThreshold", "HcRhDescriptorA", "HcRhDescriptorB", + "HcRhStatus" +}; + +static const char *ohci_reg_name(hwaddr addr) +{ + if (addr >> 2 < ARRAY_SIZE(ohci_reg_names)) { + return ohci_reg_names[addr >> 2]; + } else { + return ""; + } +} + static void ohci_die(OHCIState *ohci) { ohci->ohci_die(ohci); @@ -1478,6 +1496,8 @@ static uint64_t ohci_mem_read(void *opaque, } else if (addr >= 0x54 && addr < 0x54 + ohci->num_ports * 4) { /* HcRhPortStatus */ retval = ohci->rhport[(addr - 0x54) >> 2].ctrl | OHCI_PORT_PPS; + trace_usb_ohci_mem_port_read(size, "HcRhPortStatus", (addr - 0x50) >> 2, + addr, addr >> 2, retval); } else { switch (addr >> 2) { case 0: /* HcRevision */ @@ -1582,6 +1602,10 @@ static uint64_t ohci_mem_read(void *opaque, trace_usb_ohci_mem_read_bad_offset(addr); retval = 0xffffffff; } + if (addr != 0xc || retval) { + trace_usb_ohci_mem_read(size, ohci_reg_name(addr), addr, addr >> 2, + retval); + } } return retval; @@ -1602,10 +1626,13 @@ static void ohci_mem_write(void *opaque, if (addr >= 0x54 && addr < 0x54 + ohci->num_ports * 4) { /* HcRhPortStatus */ + trace_usb_ohci_mem_port_write(size, "HcRhPortStatus", + (addr - 0x50) >> 2, addr, addr >> 2, val); ohci_port_set_status(ohci, (addr - 0x54) >> 2, val); return; } + trace_usb_ohci_mem_write(size, ohci_reg_name(addr), addr, addr >> 2, val); switch (addr >> 2) { case 1: /* HcControl */ ohci_set_ctl(ohci, val); diff --git a/hw/usb/trace-events b/hw/usb/trace-events index b65269892c..6bb9655c8d 100644 --- a/hw/usb/trace-events +++ b/hw/usb/trace-events @@ -57,8 +57,12 @@ usb_ohci_ed_read_error(uint32_t addr) "ED read error at 0x%x" usb_ohci_ed_pkt(uint32_t cur, int h, int c, uint32_t head, uint32_t tail, uint32_t next) "ED @ 0x%.8x h=%u c=%u\n head=0x%.8x tailp=0x%.8x next=0x%.8x" usb_ohci_ed_pkt_flags(uint32_t fa, uint32_t en, uint32_t d, int s, int k, int f, uint32_t mps) "fa=%u en=%u d=%u s=%u k=%u f=%u mps=%u" usb_ohci_hcca_read_error(uint32_t addr) "HCCA read error at 0x%x" +usb_ohci_mem_read(uint32_t size, const char *name, uint32_t addr, uint32_t offs, uint32_t val) "%d %s 0x%x %d -> 0x%x" +usb_ohci_mem_port_read(uint32_t size, const char *name, uint32_t port, uint32_t addr, uint32_t offs, uint32_t val) "%d %s[%d] 0x%x %d -> 0x%x" usb_ohci_mem_read_unaligned(uint32_t addr) "at 0x%x" usb_ohci_mem_read_bad_offset(uint32_t addr) "0x%x" +usb_ohci_mem_write(uint32_t size, const char *name, uint32_t addr, uint32_t offs, uint32_t val) "%d %s 0x%x %d <- 0x%x" +usb_ohci_mem_port_write(uint32_t size, const char *name, uint32_t port, uint32_t addr, uint32_t offs, uint32_t val) "%d %s[%d] 0x%x %d <- 0x%x" usb_ohci_mem_write_unaligned(uint32_t addr) "at 0x%x" usb_ohci_mem_write_bad_offset(uint32_t addr) "0x%x" usb_ohci_process_lists(uint32_t head, uint32_t cur) "head 0x%x, cur 0x%x" From patchwork Mon Feb 27 14:01:31 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: 657083 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381857wrb; Mon, 27 Feb 2023 06:30:00 -0800 (PST) X-Google-Smtp-Source: AK7set/2M6t8n97zWfKJUQ0yqm9Sh/UjKnEOpHP5mn4YKxcC6okh9YD10Ft7NAVlbdtrpoMEfKot X-Received: by 2002:a05:622a:3ce:b0:3b2:4309:99e with SMTP id k14-20020a05622a03ce00b003b24309099emr49292609qtx.54.1677508200432; Mon, 27 Feb 2023 06:30:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508200; cv=none; d=google.com; s=arc-20160816; b=ObNSboIjWxMFw6+U94cGJqpA0x3lfo+nAsGhGsK3yZF4IY0xM3F72d3udN9m6EImik XE8VPsuFLUCeAP9LFDobp+cYMLfSzSasALJsjreBK5p8y9ShZPQxVqoIyeVbZitshSd7 g12Iqh6oo+V27lA36dXawTRfPQbhwDzrM0fw5a5tpwfPFNcy50p9KKRreeSPSstYkUo1 yKCptwgzI1H0tD0RIp6IBZP6ODxXuZUCRmv8Ua6MeY80QgmV52m3OTFtlmLpf/oUjqre oiymNo99tt3rZrA6aze6eZHrLvLtd14aiWLVwmQsUAwoG8u2OolkrzsDniqBmxq3ceYo t6Wg== 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:to:from :dkim-signature; bh=Hni7zBNlkddwjECNQ+BvGF3daVF+v0wRLZ0wdOeOPwo=; b=pqbWn9Vnc/klnum93NjS929S/cNLHgiU8QnMVhn8OI+jxFZaCY9GLeHy2vDu3tbJDp KAd0oFeZBod1a1gpdbwiNbf77yNl06g7idLNouOA32230v303xpWM2yeUhir/YcJkEKo sU+SkTwM1d7TmHeFVrzwAbrued6vk0bafpHliS74hoCqnG3BdhHvARlBDvDJ2N2NCfm7 Kp7fdQcMWndBwxNgKWKH/bK0TMpEpzZVbCFzRB5ydMAYrSOnnaus2k+aJ7pRTwlzO8GD kryhCvxsbxaywJKLyzLqTW6AQhLFukAinAQ0j04aaLcdjEnZaipj2Ql28rQY0FfHAaHz kpXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zldNe8ji; 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 s7-20020a05622a1a8700b003b86cef433esi6548542qtc.544.2023.02.27.06.30.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:30:00 -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=zldNe8ji; 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 1pWeCA-0004mj-Ef; Mon, 27 Feb 2023 09:09:38 -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 1pWeBf-0004Xe-8E for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:19 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBd-0000Vp-6t for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:06 -0500 Received: by mail-wm1-x334.google.com with SMTP id k37so4359214wms.0 for ; Mon, 27 Feb 2023 06:09:03 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Hni7zBNlkddwjECNQ+BvGF3daVF+v0wRLZ0wdOeOPwo=; b=zldNe8jiTn0v2x34rJYGE/s//9QSFgzoUZ2GXbTbyj6CduDbfRNgocEYm6FsArUp/m vLacpRiZHifNK/H+waV3radbN5ejOuClVWKOl8ObcxoAAy3YwPrzQUst/mPzRkBNwb7S OVLrEdqHW1SDcjGsc4N9rhWJIj6X7XJjLbSFgd+fSsiVTA1ZCxgo6TzjB12nvfg2RSLm jqvJx9YHTyyP5mA1rzxgj2b8bTKmSKf5Gvdm+YUI9KvnfthaC5229E/q50OD1s+gK7SL GCGIBDkHHpzA4pOMM5aV9qM/Md2oAuLBy57ofM7wKdaZH/ACG3gbESWXr/lmWE5pOKP/ btYg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Hni7zBNlkddwjECNQ+BvGF3daVF+v0wRLZ0wdOeOPwo=; b=wYl8/RwWhm19Yg604IAaq6yZ0qcGyANvg2xcTuhLM1Ea0EnuZUC+iBwM/tnTjvi/2f XsfJ9cTe4TVAXrpWid45UDQXV5r131E8XICKfetUeJOz+3reBfINDN/FYFMrusRNx6WQ swwPs+TnZlH19KWHg1TBQ9bj4TqOrFMv22sb1NJR1asGt6FzJzT1Mu774vMhuwkqRDwE 39eOf4ksd+BS6TcmkeQPD+KgX8TR1jlFFW/syTutQesjb40T0UtjtNKGVzeuYww+N+Ua gCA99xKgeTl3wv7o4csbN4LOYb4PQOwEFVuu4/xWirAJHzQFlpx6JHku/LYnCkwPB0hf oIeA== X-Gm-Message-State: AO0yUKXanSxbgTvoQLiOtB5TwubXmUcv7Rd5ex/QZhdBjHSz4tCbCGHR kW1UPhpYvvxeDpj7dCYWMkYshjY3dV6yRHDj X-Received: by 2002:a05:600c:44d2:b0:3ea:4af0:3475 with SMTP id f18-20020a05600c44d200b003ea4af03475mr12045680wmo.1.1677506942604; Mon, 27 Feb 2023 06:09:02 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e15-20020a5d594f000000b002c5d3f0f737sm7172938wri.30.2023.02.27.06.09.01 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:02 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 084/126] hw/usb/ohci: Fix typo Date: Mon, 27 Feb 2023 15:01:31 +0100 Message-Id: <20230227140213.35084-75-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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=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 Signed-off-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé Message-Id: <03599fd4db313ac4f651cceb43340109ad6a14b8.1676916640.git.balaton@eik.bme.hu> --- hw/usb/hcd-ohci.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 35a1a55145..6f8b543243 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -58,7 +58,7 @@ struct ohci_hcca { #define ED_WBACK_OFFSET offsetof(struct ohci_ed, head) #define ED_WBACK_SIZE 4 -/* Bitfields for the first word of an Endpoint Desciptor. */ +/* Bitfields for the first word of an Endpoint Descriptor. */ #define OHCI_ED_FA_SHIFT 0 #define OHCI_ED_FA_MASK (0x7f << OHCI_ED_FA_SHIFT) #define OHCI_ED_EN_SHIFT 7 @@ -71,11 +71,11 @@ struct ohci_hcca { #define OHCI_ED_MPS_SHIFT 16 #define OHCI_ED_MPS_MASK (0x7ff << OHCI_ED_MPS_SHIFT) -/* Flags in the head field of an Endpoint Desciptor. */ +/* Flags in the head field of an Endpoint Descriptor. */ #define OHCI_ED_H 1 #define OHCI_ED_C 2 -/* Bitfields for the first word of a Transfer Desciptor. */ +/* Bitfields for the first word of a Transfer Descriptor. */ #define OHCI_TD_R (1 << 18) #define OHCI_TD_DP_SHIFT 19 #define OHCI_TD_DP_MASK (3 << OHCI_TD_DP_SHIFT) @@ -88,14 +88,14 @@ struct ohci_hcca { #define OHCI_TD_CC_SHIFT 28 #define OHCI_TD_CC_MASK (0xf << OHCI_TD_CC_SHIFT) -/* Bitfields for the first word of an Isochronous Transfer Desciptor. */ -/* CC & DI - same as in the General Transfer Desciptor */ +/* Bitfields for the first word of an Isochronous Transfer Descriptor. */ +/* CC & DI - same as in the General Transfer Descriptor */ #define OHCI_TD_SF_SHIFT 0 #define OHCI_TD_SF_MASK (0xffff << OHCI_TD_SF_SHIFT) #define OHCI_TD_FC_SHIFT 24 #define OHCI_TD_FC_MASK (7 << OHCI_TD_FC_SHIFT) -/* Isochronous Transfer Desciptor - Offset / PacketStatusWord */ +/* Isochronous Transfer Descriptor - Offset / PacketStatusWord */ #define OHCI_TD_PSW_CC_SHIFT 12 #define OHCI_TD_PSW_CC_MASK (0xf << OHCI_TD_PSW_CC_SHIFT) #define OHCI_TD_PSW_SIZE_SHIFT 0 From patchwork Mon Feb 27 14:01:32 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: 657056 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2378434wrb; Mon, 27 Feb 2023 06:22:51 -0800 (PST) X-Google-Smtp-Source: AK7set+8NlLeXZrUGDXPSqZPzhlWm/2nBDmSNujWSvEGyZ8NKiT8WHtEdXaOEWsM95uhL+R1frSr X-Received: by 2002:ac8:598e:0:b0:3b8:588c:40e9 with SMTP id e14-20020ac8598e000000b003b8588c40e9mr45676532qte.19.1677507770988; Mon, 27 Feb 2023 06:22:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507770; cv=none; d=google.com; s=arc-20160816; b=f5M0cvQ2nCNP+Fir89zHHKtriVf1/gbmfrrePwUu0feg5q+YzX9gnwz6qVAaV1z5sq Z4WFQ0/fRitihQ6T02rLpm/GGtmnGlf4eP0QTWFCnlpvY9TfSatmdMvYw08DhRPKdQFH GrZGSD+ynSqChNO3mtVGDc+5FdEbtaDcg6mlbVuljmFOG0yKXtHUar/cdBmNH2TrZrTd fbq1wPm6zPBOisSK7mrR+VhUQL2pbo11kyC+IXR18Hs7+QruzlmKZSmuFJhaKadb9wQ3 tzbjVKxXGtR70IM6SmJQlvYsWQ9Ql7+1tLvHb22ZtnC6C3m0iDfpo5ztGJ22d2U7PVmO PdAg== 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:to:from :dkim-signature; bh=ZSoS+ygN+1cuiZu+xD0EGGjAruapBoISIy1LA8Yb1HM=; b=o0M1UG548MDKMhEKDU9Q9WAnWAOtEE9KpodYJO5o8sgcZGGHtdSvgUSUPjcRM4O05Y J29Rc4c+FzW7LSlu1ioLahCtgNLNo62+8e9xX2KpVJq+EybSQkfmIOPliFWLleDSUUQs 7G0KHZpxIoLONBtrMfcZ9Ts0d0oDqen2Cy7rGdA8ilHtU/PeSL/hdyNp/Z+TUHQmsrqq CxZzN5FDHKrm87nvZzN+5gD6Kn6RgMA+X5ah4zd8FPTWBPFwFiBpuilWtqEb9+V4GZjX qeszdzqGRDc8vjU/VuZVX29xuMgGvLVTWcIjso6/lZFb1FNir+u52d2qtBSlhIIKLvBG XneA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=f36185WH; 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 l10-20020ac8458a000000b0035a89595940si6104042qtn.19.2023.02.27.06.22.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:22:50 -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=f36185WH; 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 1pWeCL-0005JP-8E; Mon, 27 Feb 2023 09:09:50 -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 1pWeBr-0004YD-Hm for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:19 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBo-0000WB-8g for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:19 -0500 Received: by mail-wm1-x329.google.com with SMTP id r19-20020a05600c459300b003eb3e2a5e7bso2269603wmo.0 for ; Mon, 27 Feb 2023 06:09:09 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ZSoS+ygN+1cuiZu+xD0EGGjAruapBoISIy1LA8Yb1HM=; b=f36185WHGnV6uaIG4BiLUNZXapmda3hIGQm4SamaIkh+CyhRngxz+7hKRYoPTHbbE8 aExDucPw4PgcvGSa0SjeB7sTpcriP70ZxlZw0D9wY6w/sDX+n9DOSp5mugKCNkshIhqb mJmJSM+xMx6MPCHHsNv7+bV8LnXEiQJsSA8CdPYYRC1u1pV2KT+3PaFlhT3yHL1/xDgU 1gQVTCIYphbjm21nI421JcQDQ1pkIuXWJejBUzxgDBHixwGNPZsGgdZMTN3SMJJj5tlU LAOk20RJAlSCIFwfBzBnAIjx+x3IC7CYy+yDZXXpwlkepN/oamhAXxcXAbZxOqI4ywPn gkVw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZSoS+ygN+1cuiZu+xD0EGGjAruapBoISIy1LA8Yb1HM=; b=7Y9rBRGNmOmVs58AxWX1MsCRy4Y8rldAOvc8HnZOhr97oMWFP9oQhv8TpkHHbgFg6+ lMbix750CL5Vn/oXS96UYRQuUBK7cN/EpI6qqTfwPvcXGEz31o+EefEgwXITtDYlldAR PKKAz8iN1HN9VfCuMDu+b2uLXAW+hWF2919pjG04jSxiUcaQ/AWra81XIHqW9jo5heR9 walYdOp+l2lOMV5DyMwj1GPLp2uI73J3dvomnAZ/kyF4i890DHUmVMHe3TMTJT0FmHDD zx4Wm9yAWwAIe/FSAafh5mlhAXq+Qqpf5QnOWc+Q3gNO40AnmEHQdy0rOjug1eGvog1c K1OQ== X-Gm-Message-State: AO0yUKWwqWlMyveww3sQ4LvXnJDfor6DAdM3KnciuLuOO8iocZFOGq+D gxG38qFz8oNJbBhuOugStxVM45XAPNTQysig X-Received: by 2002:a05:600c:3093:b0:3dc:5c86:12f3 with SMTP id g19-20020a05600c309300b003dc5c8612f3mr15890635wmn.1.1677506947943; Mon, 27 Feb 2023 06:09:07 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n4-20020a7bcbc4000000b003dc3f3d77e3sm8782341wmi.7.2023.02.27.06.09.06 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:07 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 085/126] hw/usb/uhci: Declare QOM macros using OBJECT_DECLARE_TYPE() Date: Mon, 27 Feb 2023 15:01:32 +0100 Message-Id: <20230227140213.35084-76-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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=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 The automatic conversion done during commit a489d1951c ("Use OBJECT_DECLARE_TYPE when possible") missed this model because the typedefs are in a different file unit (hcd-uhci.c) than where the DECLARE_INSTANCE_CHECKER() is (hcd-uhci.h). Manually convert to OBJECT_DECLARE_TYPE(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220150515.32549-5-philmd@linaro.org> --- hw/usb/hcd-uhci.c | 2 -- hw/usb/hcd-uhci.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 30ae0104bb..f77ffda69a 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -60,9 +60,7 @@ enum { TD_RESULT_ASYNC_CONT, }; -typedef struct UHCIState UHCIState; typedef struct UHCIAsync UHCIAsync; -typedef struct UHCIPCIDeviceClass UHCIPCIDeviceClass; struct UHCIPCIDeviceClass { PCIDeviceClass parent_class; diff --git a/hw/usb/hcd-uhci.h b/hw/usb/hcd-uhci.h index e0fdb98ef1..69f8b40c49 100644 --- a/hw/usb/hcd-uhci.h +++ b/hw/usb/hcd-uhci.h @@ -75,7 +75,7 @@ typedef struct UHCIState { } UHCIState; #define TYPE_UHCI "pci-uhci-usb" -DECLARE_INSTANCE_CHECKER(UHCIState, UHCI, TYPE_UHCI) +OBJECT_DECLARE_TYPE(UHCIState, UHCIPCIDeviceClass, UHCI) typedef struct UHCIInfo { const char *name; From patchwork Mon Feb 27 14:01:33 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: 657016 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2372122wrb; Mon, 27 Feb 2023 06:11:16 -0800 (PST) X-Google-Smtp-Source: AK7set8/v6f5esnAmNMo8gVn5LMe+roOczQ7L1Zok1faLaKVtGIrX4DE9p20AcjzRfQkk1OLGnhW X-Received: by 2002:ac8:5b56:0:b0:3bf:daef:3ee2 with SMTP id n22-20020ac85b56000000b003bfdaef3ee2mr3349182qtw.26.1677507076758; Mon, 27 Feb 2023 06:11:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507076; cv=none; d=google.com; s=arc-20160816; b=FJwXjEl3al43PvIQ9ZMmDy3RIyYtNNzc1JrPZvDV7ZbbVis2ZGt0Gmn540rUwjjE7D +N+Rt0rdpd3/pwBvTub6AoujJUXWXP1YLWTwpxfDujVx8UeQaEYFmbw42yeo61lS/ggY VlLuk2TejpvMgQh9JITz58YoCFsNasLJb2vhOjM9m7ECsYMSqZxebkcg10Db+8Z5CAQf pQeAF1Ane40OHfFWkRN6f6NQaVQ8vukqGYAupXyFEQqEbF55OrqgIpNbSgGj4CNI6h2c S6bFZXfTqEX6TddXCAcW0+FZ7DRXdWABOZELa/9yNweE4yTl6e0lYLNc9Y4LqSk+Sjtz NJDA== 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:to:from :dkim-signature; bh=bUNkpksa1z+r3dKThl/p4YF8nw2umtf4CY7o0Emr5eg=; b=YJq4WFjjGerm3o1Hs1jELgZoMdKS5Qbo2UKQ0GFi8rCfyozbGRpaowAaKvk4vq4gRX 7y/QaIbq+sLGYSNCTwgtaCc5WrtRczmkt+J2mi6dOvcVPRN0ygCPotsl7L9qZhiyCqi1 n1k3mwmbKqNqm7B7FVgd/WyrrZE8fA0G2l2UbljoZSwxeXdeA9mP6yKa8TBKT8GaTo1y 0dXJBcg4QhuhGYUAtaPfi71UsNNtxvGzD3opnRUaGYABdGsCjX8gwjTnBJakK4lbux3h rPkDi4rZLxBHFuZ7nYPpZGtrqm83VMfoOdZCaF5iQJ9JBPGUgY5+QcyuKRVNbJEYLHVq ua4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PvmdxTEO; 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 b10-20020ac87fca000000b003bd06c84109si6496994qtk.715.2023.02.27.06.11.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:11:16 -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=PvmdxTEO; 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 1pWeCF-00050H-SR; Mon, 27 Feb 2023 09:09:43 -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 1pWeBs-0004Yv-Mp for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:22 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBo-0000WZ-By for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:20 -0500 Received: by mail-wm1-x32a.google.com with SMTP id o11-20020a05600c4fcb00b003eb33ea29a8so3405865wmq.1 for ; Mon, 27 Feb 2023 06:09:14 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bUNkpksa1z+r3dKThl/p4YF8nw2umtf4CY7o0Emr5eg=; b=PvmdxTEOxHXmlQZFqzj1XRqiK8lLA2R3uTu9M7oF1pZznCueb9iJXwC18QFGmJ4kIH IBBOUGqT01urj06CMs/UBM2fKRxSomOZSj/YxPm3ZP0/6u5bXN0ozVjK0cJcmQWDnBpM 0bQRLSRqzmVjKzo9myA56zWpdifOqynkUOhZIPqew+A9pjMuvKhIHuWcNwQMwlUhgRP8 Bz+N7bukM+h8bprYxUTLf3qg9fH8lCcFHOjG6nN0ZPwMz09aOFPnSADagf8MODI2LudK cbN5ee4IWUCer5UOKcQfUuoBWQhNGxZu9zLZ5rk3IgBvpmM4mgpBsjJdR0laYJRnOJa/ yvFg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bUNkpksa1z+r3dKThl/p4YF8nw2umtf4CY7o0Emr5eg=; b=fu64I91X5e9yhpfI5QSmFAHN9/U7O2K0HH87iPjAQlLxSGnQAE2rjMFUgZtrO/9HGz WIXRIwuax3bJHPgihM8CD8oZPosvBQBKrpxnclTAEiKUac9JHGAcV9zN0YQGTz74jSdu fssBs1pFY8O0Ow58GqdN4gIEhI5hAITPuopiVL/hQNExxYSVv9A4m/kLh1LghH5D7Jbl LGO+DtHIKOE8wNqHnwVcDwcT9l2UXWcWjYdvPEXH/1Ka3GEN4IjK/H/i1C+VpAPdYymv C9Le81JAXAyw66C3VJh3xj3q0Cms1HzLhbfgcCrdMDNpmhyg0KYjp5T2UEttz5M4thse tZpw== X-Gm-Message-State: AO0yUKVrQd0GUo7z4wLeXWrM6ZahzAhvqk5KxVAlIRkXfbo4imxHL7tK TWAppyRXRr0XeGbKbBdgUfTMFLJa91zjqcSr X-Received: by 2002:a05:600c:16c7:b0:3e2:1e01:803a with SMTP id l7-20020a05600c16c700b003e21e01803amr18724930wmn.9.1677506953305; Mon, 27 Feb 2023 06:09:13 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i11-20020a05600c354b00b003eb2e685c7dsm10668316wmq.9.2023.02.27.06.09.12 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:12 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 086/126] hw/usb/uhci: Replace container_of() by UHCI_GET_CLASS() QOM macro Date: Mon, 27 Feb 2023 15:01:33 +0100 Message-Id: <20230227140213.35084-77-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 By using the QOM UHCI_GET_CLASS() cast macro we don't to use the intermediate PCIDeviceClass variable. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220150515.32549-6-philmd@linaro.org> --- hw/usb/hcd-uhci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index f77ffda69a..8ac1175ad2 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -1159,8 +1159,7 @@ static USBBusOps uhci_bus_ops = { void usb_uhci_common_realize(PCIDevice *dev, Error **errp) { Error *err = NULL; - PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev); - UHCIPCIDeviceClass *u = container_of(pc, UHCIPCIDeviceClass, parent_class); + UHCIPCIDeviceClass *u = UHCI_GET_CLASS(dev); UHCIState *s = UHCI(dev); uint8_t *pci_conf = s->dev.config; int i; @@ -1267,7 +1266,7 @@ void uhci_data_class_init(ObjectClass *klass, void *data) { PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass); - UHCIPCIDeviceClass *u = container_of(k, UHCIPCIDeviceClass, parent_class); + UHCIPCIDeviceClass *u = UHCI_CLASS(klass); UHCIInfo *info = data; k->realize = info->realize ? info->realize : usb_uhci_common_realize; From patchwork Mon Feb 27 14:01:34 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: 657047 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2376122wrb; Mon, 27 Feb 2023 06:18:19 -0800 (PST) X-Google-Smtp-Source: AK7set9LinriMNDjjVnv4xm0EEPp5dPUrQjkrYY9p1PvEaBxPulu6UDwj8z4SLuxroTVqzdr8RQl X-Received: by 2002:ac8:4e41:0:b0:3bf:e2ff:4c2f with SMTP id e1-20020ac84e41000000b003bfe2ff4c2fmr1258309qtw.51.1677507499032; Mon, 27 Feb 2023 06:18:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507499; cv=none; d=google.com; s=arc-20160816; b=KqZd1j9HToZVrh5rRVUB+5XbpZsT5EYgCK6ijSo5GNfa2SZgx10fGPy4j4mmNItGIp mdsGCCXTS8CjBjKDM3/CgWdtlsbQ5TgFIXk2vwJEZW+SbDkAQDWvdUU1pAFKfLL59/7t 7XXDI9OEYVJIW/lGn2wO9LpZNDtZpQvNjZT4BEPITL/WzsuufSIAk8Q4FclywaUK1Mys qrxsvb3NzRF0N2g/JMNrUR09xSKk/MbDmT5/CO9M1DitYNqXgH2ZzVkoZW9x5mfCpZSv b3tYzpycJ+j9wEvUQL2JzDpmnOFcuphFFH8gfebLwBN2kiHFKYvo9BPFKx+G1tOaMukl bibQ== 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:to:from :dkim-signature; bh=vrhLzk8HW2g05OSZG+hwxdkUshGUicJmNC2ENXTKq80=; b=BftqN82PuDiolsUEOS7Mu/46acoScYVbaqStB2fXLyNaJTYms/IVchklMyFq6+jMvV yN5MsjdDXKsmIXgd3tOT0wrXuMPiv60wFGpi17muMj6D5FouO1jmikHn3x/IsUo5X3Nn NwvwwFyAFDRYJETwSvkaIF4hakuQV2yyV/CRCdu7oAwGAWaFE0T1Kfg3sQNG4Bccpm55 CRco5dhc2/BZ9awQCQ6L9TjEXQ+ZVCxmgxtLMvNXbn+x+i7lG1aR6pQdDVywlrVD23t3 e4n7epgLSlQ5S0yWBYPjLTHQAk2gwaisGdJoTyOjL64LppVyCr1YPg6FW95AsISJFhAR p7yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=feGgLKga; 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 z19-20020ac87f93000000b003b63a6cc22dsi6931770qtj.701.2023.02.27.06.18.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:18:19 -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=feGgLKga; 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 1pWeCI-00053e-5A; Mon, 27 Feb 2023 09:09:46 -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 1pWeBt-0004ZG-R9 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:22 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBr-0000Wv-Tq for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:21 -0500 Received: by mail-wm1-x32c.google.com with SMTP id r19-20020a05600c459300b003eb3e2a5e7bso2270000wmo.0 for ; Mon, 27 Feb 2023 06:09:19 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=vrhLzk8HW2g05OSZG+hwxdkUshGUicJmNC2ENXTKq80=; b=feGgLKgaCHgd+HjWFrrbfUsA/+rdkZp6v8Xvu+irLptmSmsXjOE67Rr+6fUR5tX3Vl l9c6N8UDrN38TqKAtcGHpLnzJzHEMvhphtOmymHTAyWQUYIxrtmnz8nuwbQ/WoUvPCHS zV5+aHfOi+8ZZzprfdMcBjma3Su5wjfJLkeo5miMgvZIfize1v40SjddUmjhwdh5m269 rA2a+3ZJBTKcdMOk/evQX72gf5EDe8FyRGRBpUY8iCs7AG77S97gPzoRIEJKDXnpV53V 3Jl65MVpZAfVtkV2DfkJI/s6li1hIQv/Wv+zmiZAJu6rWk2CBwtAMy3onwTVWbRpbxSU 3spQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vrhLzk8HW2g05OSZG+hwxdkUshGUicJmNC2ENXTKq80=; b=SdNrFaWehp6Cgd1ngCPR3bfmvtrB3d5hxAVWER0ys8znNyuoM2JoD+/8SSIp/1eapl L8IybFKGDJ0ZmlntAZp34iKdnZKgV4o5Q6zrRC57qgNWGSnagPVsZmcPqSDX/nx2Bh1R uA6gDpMfnjoCnBFgt/7/L1bbnRciTl87Y6/ug+rvonm4wcrnNiEn2BLontgp4iSQthQ0 ftOHx09Pn0lBr/UNiy9LlNhBRYSejb7uXV51G/vgqemUBRSXjJNixx4WB5BCcYJwu+dx 4Dh2Xz8racImYkeBGVB65jMBsiiWCrYlcTSPC3/oalQx8cyNnx5dgxx0kNbheBP384t9 uXjQ== X-Gm-Message-State: AO0yUKUnV+L2E+uXe7JMwxDwCkwQiWS54KAvcrElX4JBZIHYP+UFuPDI lrBA3c5/3D807cggx8eCzbmtIo8Bji8lTvPj X-Received: by 2002:a05:600c:491f:b0:3eb:3974:aad7 with SMTP id f31-20020a05600c491f00b003eb3974aad7mr6048404wmp.24.1677506958489; Mon, 27 Feb 2023 06:09:18 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i14-20020a05600c354e00b003e91b9a92c9sm9704286wmq.24.2023.02.27.06.09.17 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:18 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 087/126] hw/usb/xhci-nec: Declare QOM macros for NEC_XHCI Date: Mon, 27 Feb 2023 15:01:34 +0100 Message-Id: <20230227140213.35084-78-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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=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 NEC_XHCI is a QOM object type. Declare its macros / typedefs using OBJECT_DECLARE_SIMPLE_TYPE(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220150515.32549-7-philmd@linaro.org> --- hw/usb/hcd-xhci-nec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index 13c9ac5dbd..d732be0ef9 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -27,14 +27,16 @@ #include "hcd-xhci-pci.h" -typedef struct XHCINecState { +OBJECT_DECLARE_SIMPLE_TYPE(XHCINecState, NEC_XHCI) + +struct XHCINecState { /*< private >*/ XHCIPciState parent_obj; /*< public >*/ uint32_t flags; uint32_t intrs; uint32_t slots; -} XHCINecState; +}; static Property nec_xhci_properties[] = { DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO), From patchwork Mon Feb 27 14:01:35 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: 657010 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2371424wrb; Mon, 27 Feb 2023 06:10:02 -0800 (PST) X-Google-Smtp-Source: AK7set+VNI08lWmmsFHzdDiQv6+yvK7GnV8kGiFXWiI+F53I5yhdHHtQXAR1jZtoRCrswMD1hEqJ X-Received: by 2002:a05:622a:4204:b0:3bf:d9d2:2d2c with SMTP id cp4-20020a05622a420400b003bfd9d22d2cmr3979270qtb.53.1677507002026; Mon, 27 Feb 2023 06:10:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507002; cv=none; d=google.com; s=arc-20160816; b=l2uxfBRwT/362mU67DaGkJKAwz0CVUmXOX8TxRbE5zAxkNi8rM2ygUbjPAa0vI99Co RAWkFu7SZVovch4GRk6RjzOxtDPRh57DDzr7od66d3Wd8gJvc6gTAKoNRrlS9u+FscVG Py0lUd3YlZj5PyftCdbfpWTxf5yDnsj17TD7EH9gVJMh2S6eqGskxbG3sFWh0zF3ku/J gzkuvCpXwPAfSZH2o1sTNhXDaMVHuvpln0MaV451nv/nRv1lcGLyMhPYv5mi6mGTMPLE d4U/ucnwzLElmm1DXdeebQre6EOamtSe4IbRst6ve1jD5CsX0qkbOSAkoYrniZ8Fr0va V/WA== 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:to:from :dkim-signature; bh=hssXN3XkoW4KUFtL7+A8SmD/TD5D7zgacO3632skb5U=; b=sfCQFYeld79r2taNJ5RAflfH4yDmWSoSb97sprdMfUVIxVgJADzyqArgxKCHbGCUnr UsTz1qao114CyF0NvCheN3ZlJUOjfFA4/esYz2WhQ4rhBEIda5kDF6lUIv0fUYzfMhrA zl8E3E2Cqed/9vHvJsveYzdd8FEFurJFQTk275mWgsWh2aRz5UXWbSjJD6FNzykmyDW7 KN+/aTJgda53/z+opMq+GIIDMEHbgEisD2MdR5uDqqt/iEV4itBAYq+jOGnkZne9wXXZ E/ChI6yvVkn2reyaKrGTYLFTnIYVgI9xRSivHvEuiQgUnuq1Aw+e9NX2XYc/qXj6JR/F VtOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CFmgspM0; 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 t13-20020a05622a01cd00b003b9e3fc5688si6602052qtw.511.2023.02.27.06.10.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:10:02 -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=CFmgspM0; 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 1pWeCJ-0005Eh-FG; Mon, 27 Feb 2023 09:09:47 -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 1pWeC0-0004em-5W for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:28 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeBy-0000Xv-Kz for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:27 -0500 Received: by mail-wr1-x431.google.com with SMTP id j2so6345925wrh.9 for ; Mon, 27 Feb 2023 06:09:24 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hssXN3XkoW4KUFtL7+A8SmD/TD5D7zgacO3632skb5U=; b=CFmgspM0P6WgAcYn5I/YDn4T7oCUz45UHC0xVgOuX/hQnhdL+aFtLu3WM4i30KoNF8 zYGmscD28l8u+NDEkgBkDSP0B0CHM1dnY6qu0/xnfngkwmB8n3z/nAZ/l7739kbXpPeZ MYN9cGVinzRejehqxwEWFk0Yr7UUYR89LaoXvqwoL0GH8p+WvqG+voE05BcE9D/xU/Pv faHps5cNsdrKHptEbvPSTlpKA1Khpjxog8K5zDrHlHUen1g0qwQrNmPeUIQO5dHMV1H+ t3iLnjqLmDtSsHJ1/jVtce7zJxnUf+5iGGcBR8JGUfJPflJyUz8+gMf3UEZfBoDT5xKn COyA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hssXN3XkoW4KUFtL7+A8SmD/TD5D7zgacO3632skb5U=; b=1wIZHLEnyRcCH+vUavnxUl4LFyWzYnvnC7fqXCGsv5dLA3SJQALYLqHNfodF+4DB0C hDUtiYSKsa4uh/1L9hj55auN8HB5wVEv/CDTgSAzAL5Q+SS3EoA1+HYF2d7ifwbWH2Tm k2Z0uKAAGGbu5dS3UR06eIAwwmmOCZmB6lpMpBoK7DjhG3NihaeOrFr/6WjVzHuWPTJ8 j0jK0pQ3MelCub4fP82QmfoRS52HG0+dQKX34M0aXJXkck6/8ogBG6VVxWY5v3eZVHBU mwbaEVh4G/xylfFGhSX/zBqxBQziphD0ICtSv4zLJVN983Xd+fEjHnjDl7/GFB91qTWp NHEg== X-Gm-Message-State: AO0yUKUKGXcO5/vV10vDqgSRV6BE820qyV6aAEMV5nmPneKqUF8GmBeH wAx4ueoMYzlpjjIWvMDVYWsSqGhmFTVA6F+o X-Received: by 2002:adf:fdc5:0:b0:2c7:dec:77ac with SMTP id i5-20020adffdc5000000b002c70dec77acmr14127186wrs.21.1677506963705; Mon, 27 Feb 2023 06:09:23 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m25-20020a7bca59000000b003db0bb81b6asm9268857wml.1.2023.02.27.06.09.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 088/126] hw/usb/xhci-nec: Replace container_of() by NEC_XHCI() QOM cast macro Date: Mon, 27 Feb 2023 15:01:35 +0100 Message-Id: <20230227140213.35084-79-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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=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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230220150515.32549-8-philmd@linaro.org> --- hw/usb/hcd-xhci-nec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c index d732be0ef9..328e5bfe7c 100644 --- a/hw/usb/hcd-xhci-nec.c +++ b/hw/usb/hcd-xhci-nec.c @@ -53,7 +53,7 @@ static Property nec_xhci_properties[] = { static void nec_xhci_instance_init(Object *obj) { XHCIPciState *pci = XHCI_PCI(obj); - XHCINecState *nec = container_of(pci, XHCINecState, parent_obj); + XHCINecState *nec = NEC_XHCI(obj); pci->xhci.flags = nec->flags; pci->xhci.numintrs = nec->intrs; From patchwork Mon Feb 27 14:01:36 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: 657054 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2378402wrb; Mon, 27 Feb 2023 06:22:48 -0800 (PST) X-Google-Smtp-Source: AK7set9lGUTkVqrrl1GM/BC+bWqNur2+fgqiVPxbl3G1HTCU7Wq3AEMGp/SdPNdxftmG5kdvXjVz X-Received: by 2002:ac8:5bd5:0:b0:3bf:ca04:3bc6 with SMTP id b21-20020ac85bd5000000b003bfca043bc6mr13223251qtb.9.1677507767997; Mon, 27 Feb 2023 06:22:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507767; cv=none; d=google.com; s=arc-20160816; b=K+9OSn7aHo+WJ5Tu9Ix/1rji0TTuKyhBX4uUZxjnX46gyPYjo4At0ClwCtpy/vTn7j 55xZYkUSvQILewfdelQBTFg1ApXWhNSTWQvikWDHOvn4z3Q3FHwxyAkfILu/qsQ+KlL5 Sj5pt3B6HLqrrGkovQyTvccKgj0IngRyrln8pViTX956mJiZgp2+2A96VJpBXyQES2YQ QU1Ib1eSHuqBQwmTSbJtB2h4XeDGfIEmIyRWzYZA/ach40rf2CL0ba7qPLx64ij1YiaG mQOc5x71SgqmFcMfkt9T6lvjK/5AOoLV+UyUCGGU4kxvNHZnCMIs94vIbB0m/n9ObtGc TkAg== 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:to:from :dkim-signature; bh=jWJvrSdJX2sHlOeU6ruiLsKR+oVCbKmfMpesV07gggA=; b=Zc+stqAgfPA2TFzQzocLmxPPW8N6wFEiMYeH1Aw4mSETB0ycMKFmdkkjT1pZBo3jxd bBlRzYfQQbIFyfED5y6sJEPjH+KkbWM0kryP4VQWjTGcZRzi+OwY/FE4/hQyYh2SC2lw jPvfawKP5VKmhNu0UUqay/Cdxf3nX/b6zxBkY9CS5rxRlUcnWhljJMVR8FwTKpNbjueJ 8Bahce8WHPy+J0DGy7V2prFlRQn4LLALT59cDNEvFsA7BB9S/77wMPvi7Yt5sBOfKZ/W 0a1l92y5yciVFoe9vbIDEuuEIIhOMHjMbOlWaDUbJTCT9yRuHXUMB0GUCU4A/a56WJjp vkRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="zyO/PJgf"; 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 d19-20020ac85ad3000000b0039ce6373d32si6161248qtd.534.2023.02.27.06.22.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:22:47 -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="zyO/PJgf"; 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 1pWeCK-0005I5-Hj; Mon, 27 Feb 2023 09:09:48 -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 1pWeC4-0004jE-Vb for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:34 -0500 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeC3-0000Zx-9h for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:32 -0500 Received: by mail-wm1-x332.google.com with SMTP id t25-20020a1c7719000000b003eb052cc5ccso6824101wmi.4 for ; Mon, 27 Feb 2023 06:09:30 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jWJvrSdJX2sHlOeU6ruiLsKR+oVCbKmfMpesV07gggA=; b=zyO/PJgfdL/mLJzPDfaVxOJCeE5Orx3ZcXskmM/6RVq/9Vet1VBJ6o2gwpEYx6aXnY 7bpiPe3cVZhNDWJduPaa39Umk0hYslDSC6//u+wBQ1LxhbTZOPHQ7QgAYxbu+cbgeNlW jr4+V8O/Ohaz9I61SYUrHCD38ohw/098C7sqZgmg/RBGy/Ov8rvhp4odn8nVBUhzrbEx YOvVf6bsRbDyCa25+8QB5aV6iz9I5CtPpwKj/s60XVJLCveQaMAkMJQcmIwtFXU+7Xnp sN3Oe/0wy/geaKAZFPJFhR5/rfaj1X1lVo9bpNiivlz2pPf1Q2Xga1wyGjKuKNoxjA7n 1EVQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jWJvrSdJX2sHlOeU6ruiLsKR+oVCbKmfMpesV07gggA=; b=n4jecXjlbN0cYGnLKOunkA0nTRmtknoLbbb40O3dAOm8Skf5VNx9DN2u5b/+y17faR yvhtLcWfhvXnWooHOTopxMB0PYaEEiePJlzW81BRfHMeeXuvrsd66HjkDwM9d5hav0kc t3wYjzcJi/qYpY27zaeYfqWXz0GxPRIxBCqyiwS/98wCu8OCUPcRBg5Ypt+LJtzohJUL +hArclMfTzeUTZoJEbNyGQPg1KVs/ZQZGeBC4cZ5NfpEKth/onqwXnlJFlKVVKvFK8Le mdEA/xTiB5JbMrsQh2Tro+pVESkWaEIHSviL/voFqE3o8bZ070N0v3pRZXNpzNQ1Itcw ooxg== X-Gm-Message-State: AO0yUKUIluwi4G3mpFcwbgD0llyC/S2zrj7LFpQDaYqCmF/uM6MO/M7S lqT1ZduRmm9V6CsJbF5x1hid1GVLMFwl+vQ5 X-Received: by 2002:a05:600c:998:b0:3dc:5b88:e6dd with SMTP id w24-20020a05600c099800b003dc5b88e6ddmr19957914wmp.10.1677506969590; Mon, 27 Feb 2023 06:09:29 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p20-20020a05600c359400b003daf7721bb3sm13719342wmq.12.2023.02.27.06.09.28 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:29 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 089/126] hw/display/sm501: Embed OHCI QOM child in chipset Date: Mon, 27 Feb 2023 15:01:36 +0100 Message-Id: <20230227140213.35084-80-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.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=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 Note this device doesn't implement unrealize(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Message-Id: <20230203145536.17585-11-philmd@linaro.org> --- hw/display/sm501.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index e1d0591d36..38b8d0e16b 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -28,6 +28,7 @@ #include "qapi/error.h" #include "qemu/log.h" #include "qemu/module.h" +#include "hw/usb/hcd-ohci.h" #include "hw/char/serial.h" #include "ui/console.h" #include "hw/sysbus.h" @@ -1945,13 +1946,13 @@ struct SM501SysBusState { uint32_t vram_size; uint32_t base; SerialMM serial; + OHCISysBusState ohci; }; static void sm501_realize_sysbus(DeviceState *dev, Error **errp) { SM501SysBusState *s = SYSBUS_SM501(dev); SysBusDevice *sbd = SYS_BUS_DEVICE(dev); - DeviceState *usb_dev; MemoryRegion *mr; sm501_init(&s->state, dev, s->vram_size); @@ -1964,13 +1965,11 @@ static void sm501_realize_sysbus(DeviceState *dev, Error **errp) sysbus_init_mmio(sbd, &s->state.mmio_region); /* bridge to usb host emulation module */ - usb_dev = qdev_new("sysbus-ohci"); - qdev_prop_set_uint32(usb_dev, "num-ports", 2); - qdev_prop_set_uint64(usb_dev, "dma-offset", s->base); - sysbus_realize_and_unref(SYS_BUS_DEVICE(usb_dev), &error_fatal); + qdev_prop_set_uint64(DEVICE(&s->ohci), "dma-offset", s->base); + sysbus_realize_and_unref(SYS_BUS_DEVICE(&s->ohci), &error_fatal); memory_region_add_subregion(&s->state.mmio_region, SM501_USB_HOST, - sysbus_mmio_get_region(SYS_BUS_DEVICE(usb_dev), 0)); - sysbus_pass_irq(sbd, SYS_BUS_DEVICE(usb_dev)); + sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->ohci), 0)); + sysbus_pass_irq(sbd, SYS_BUS_DEVICE(&s->ohci)); /* bridge to serial emulation module */ sysbus_realize(SYS_BUS_DEVICE(&s->serial), &error_fatal); @@ -2017,8 +2016,12 @@ static void sm501_sysbus_class_init(ObjectClass *klass, void *data) static void sm501_sysbus_init(Object *o) { SM501SysBusState *sm501 = SYSBUS_SM501(o); + OHCISysBusState *ohci = &sm501->ohci; SerialMM *smm = &sm501->serial; + object_initialize_child(o, "ohci", ohci, TYPE_SYSBUS_OHCI); + qdev_prop_set_uint32(DEVICE(ohci), "num-ports", 2); + object_initialize_child(o, "serial", smm, TYPE_SERIAL_MM); qdev_set_legacy_instance_id(DEVICE(smm), SM501_UART0, 2); qdev_prop_set_uint8(DEVICE(smm), "regshift", 2); From patchwork Mon Feb 27 14:01:37 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: 657082 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381178wrb; Mon, 27 Feb 2023 06:28:30 -0800 (PST) X-Google-Smtp-Source: AK7set9dqVe+gVEivgHVNBV/Ws6D01N+GCb0aZYJs8CQrh7Lcn2VckumYSjnWaGo1ypryr3yciHI X-Received: by 2002:a05:6214:e8d:b0:56e:a07b:f4d4 with SMTP id hf13-20020a0562140e8d00b0056ea07bf4d4mr49561410qvb.3.1677508110238; Mon, 27 Feb 2023 06:28:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508110; cv=none; d=google.com; s=arc-20160816; b=XrQfgUdTdh6S3tXTDLYRaFpoNbNZRXRV2a4AhT8/C/7rqbVxhy4gLDAy/I/z7RyrZq uHLQ8cCq78VNdq30lt9D22bTUJBQF0mU7b4LlAtQij7J+z3+Gj3tboy5b+bIMvPNA/Jo fqkxDy9TrMhhO1clqQMfZ/Rgnty0Krr/8B75ycQLk7SpQDNXTY2wA2kSQFfKiGBu4MBD Cs6pAgEFqYvvlmVnI4BzfmhIECTcMVbpREkf3WJ4SwbzhHmCt8eL7uK4HCh9XnOdo8B9 s1uTOrKTC6ZP1SDxqPzlFc0ayC1wwcTu/EdQlG/dL//zABya0q6FrmcoECA6bLkgSOdp HOZw== 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:to:from :dkim-signature; bh=reFqpRaD/SRUkm/EOnn9E/Z0xVn0tzwElddaq98oV3o=; b=0RM7yYudjxmGqZHZ9ZW9H/cnX9u0+Fyt217LoXysYSJLFqONto6SCH6EWMbGWuV7fa SnrmToyLDumSflHfMyFQdNXRIVH/sORwsFgK+gvCFOsR62JX/q2CHELRrIzoxG1dQhx3 O6jF02OYE0Hq0qim2WdqwYn/iRmomcO7v++JBafEN2zcwmTe0yCgfGTQPSoKAyR4JW0l VB9Y32b6FLD51qQNPDFFQOuhGR3ZK5K8qY9UZBuG5viuH0S4EklV/ITtPRj2tvmCzhc3 L/t9ku7VbkI2ncXKSL3v9jKCx7DskhP0FyF9SKiPgcRyZtgNn2/KH+3xUgraQSCjccer Q35Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jT63GyUF; 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 r8-20020a0ce288000000b0056c23bb1597si7071447qvl.88.2023.02.27.06.28.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28:30 -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=jT63GyUF; 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 1pWeCM-0005Kd-HC; Mon, 27 Feb 2023 09:09:50 -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 1pWeC9-0004mn-Vp for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:38 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeC8-0000b3-Ad for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:37 -0500 Received: by mail-wm1-x335.google.com with SMTP id p26so4307189wmc.4 for ; Mon, 27 Feb 2023 06:09:35 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=reFqpRaD/SRUkm/EOnn9E/Z0xVn0tzwElddaq98oV3o=; b=jT63GyUFa7ScoWkWi8FCYh1gQGra0gFt4iTHSwSnL5umiiojJ+jARHFN6oxbxa7C1q 42fEetnCu0zI98ZXSgwhjiwpiXAN0lNWozZ3DvOWkA7KcfDdFoc1RGGrToQO5hn7WpWy r8P/2PKJvJ5RB3paCtdBE34nKrNuvaCivN71faex7UfGCT/EBcpElCp80NA94h/sfA/j V3lciG4iSDpzKgpzbUQdNUtm29HcHNFKH6I3zmDMJ9eoc/4KIvTXeHxYDomtiYqhZSiU a6zqQ2mlcuZthp9TBuN1SW3gBqRkHMMKbuawOsK1LE3F7PLK248HjzOlQSPzPiP5+X1y obMg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=reFqpRaD/SRUkm/EOnn9E/Z0xVn0tzwElddaq98oV3o=; b=NKyMqQtqtOHElXmZ0Jxvubr/uJPznfqiflWkNrTJKS37/thuF819hvLD7sSOhO4Uf1 B7ITim20hFWd1XAUAyUED5uaPbjsoJHjgPYnI3+0e2n1phogQDap1ISNFYa2pMz23ACO OhTs+1xM3xzNqAP60XBYTepyt5Wzn9Muou9kGD49WiPPBz5P93L7OxcIeJ2J4msqjqr6 iFUnaBdj1asbqHXwgyLyTUntv/uSSHjiTXeeCPv/eutYcxZCZXw/3PDzHjygChTBQiRn ULy1BbuIhEBDGWuYdkk1aRoZEdiwRgiB5Jn9EwbWY2M4R2uM0Ljig1PbSHUOyXLpI/1D V0VQ== X-Gm-Message-State: AO0yUKWvc4rLQHC+MJD1exbTWcu2HuudUZ4t8BxrB+qpaGLJmxFsOrOj CkAhLzuhlAIACF3E5oXlAb0SKsoLbsHPz8oa X-Received: by 2002:a05:600c:3093:b0:3dc:5c86:12f3 with SMTP id g19-20020a05600c309300b003dc5c8612f3mr15892250wmn.1.1677506974537; Mon, 27 Feb 2023 06:09:34 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n41-20020a05600c3ba900b003e20fa01a86sm9877012wms.13.2023.02.27.06.09.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 090/126] hw/display/sm501: Alias 'dma-offset' QOM property in chipset object Date: Mon, 27 Feb 2023 15:01:37 +0100 Message-Id: <20230227140213.35084-81-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=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 No need to use an intermediate 'dma-offset' property in the chipset object. Alias the property, so when the machine (here r2d-plus) sets the value on the chipset, it is propagated to the OHCI object. Note we can rename the chipset 'base' property as 'dma-offset' since the object is a non-user-creatable sysbus type. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Message-Id: <20230203145536.17585-12-philmd@linaro.org> --- hw/display/sm501.c | 7 ++----- hw/sh4/r2d.c | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index 38b8d0e16b..bb53499dff 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -1944,7 +1944,6 @@ struct SM501SysBusState { /*< public >*/ SM501State state; uint32_t vram_size; - uint32_t base; SerialMM serial; OHCISysBusState ohci; }; @@ -1965,7 +1964,6 @@ static void sm501_realize_sysbus(DeviceState *dev, Error **errp) sysbus_init_mmio(sbd, &s->state.mmio_region); /* bridge to usb host emulation module */ - qdev_prop_set_uint64(DEVICE(&s->ohci), "dma-offset", s->base); sysbus_realize_and_unref(SYS_BUS_DEVICE(&s->ohci), &error_fatal); memory_region_add_subregion(&s->state.mmio_region, SM501_USB_HOST, sysbus_mmio_get_region(SYS_BUS_DEVICE(&s->ohci), 0)); @@ -1980,7 +1978,6 @@ static void sm501_realize_sysbus(DeviceState *dev, Error **errp) static Property sm501_sysbus_properties[] = { DEFINE_PROP_UINT32("vram-size", SM501SysBusState, vram_size, 0), - DEFINE_PROP_UINT32("base", SM501SysBusState, base, 0), DEFINE_PROP_END_OF_LIST(), }; @@ -2020,6 +2017,7 @@ static void sm501_sysbus_init(Object *o) SerialMM *smm = &sm501->serial; object_initialize_child(o, "ohci", ohci, TYPE_SYSBUS_OHCI); + object_property_add_alias(o, "dma-offset", OBJECT(ohci), "dma-offset"); qdev_prop_set_uint32(DEVICE(ohci), "num-ports", 2); object_initialize_child(o, "serial", smm, TYPE_SERIAL_MM); @@ -2027,8 +2025,7 @@ static void sm501_sysbus_init(Object *o) qdev_prop_set_uint8(DEVICE(smm), "regshift", 2); qdev_prop_set_uint8(DEVICE(smm), "endianness", DEVICE_LITTLE_ENDIAN); - object_property_add_alias(o, "chardev", - OBJECT(smm), "chardev"); + object_property_add_alias(o, "chardev", OBJECT(smm), "chardev"); } static const TypeInfo sm501_sysbus_info = { diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 39fc4f19d9..d7020d6d2b 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -274,7 +274,7 @@ static void r2d_init(MachineState *machine) dev = qdev_new("sysbus-sm501"); busdev = SYS_BUS_DEVICE(dev); qdev_prop_set_uint32(dev, "vram-size", SM501_VRAM_SIZE); - qdev_prop_set_uint32(dev, "base", 0x10000000); + qdev_prop_set_uint64(dev, "dma-offset", 0x10000000); qdev_prop_set_chr(dev, "chardev", serial_hd(2)); sysbus_realize_and_unref(busdev, &error_fatal); sysbus_mmio_map(busdev, 0, 0x10000000); From patchwork Mon Feb 27 14:01:38 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: 657097 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385310wrb; Mon, 27 Feb 2023 06:36:28 -0800 (PST) X-Google-Smtp-Source: AK7set/NLXxkBiEDRZCVxXf5rtUJ6Ay6dM/xBNxzY4uW9raATJZLRHEySZV1kAt31oP74N0ojher X-Received: by 2002:ac8:5f94:0:b0:3bf:d9a4:fda7 with SMTP id j20-20020ac85f94000000b003bfd9a4fda7mr6030597qta.19.1677508588639; Mon, 27 Feb 2023 06:36:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508588; cv=none; d=google.com; s=arc-20160816; b=Bdw2Joe+Kozf5egZ22lsyDa+EaDcJ4hInfxSKdXsSn7l9xGM1JXW8PoJDTAAtkD4uh JDE/JJsU//+bMTFUfRgxjC8xNT46C23CaONufk1jglpvvrhjywj6xWuhq8NuEbGCldDj KZARq1zTHs3CCvvbPgc/qfQtvX4T6nNrzICxpER2//R0v5tMqvF3nZrqcl4C8aaCbp0N I9+V6xTUhAUT5Bza/MWMzTK/EpIl/VETrzB5IOqeLC0C6I02bMJLn83JWyN+q5XQfiHI QRvv26SnMQFjiOBY7VO2/F/hwI1g8PfFbtzAMNnqcKTlgd9SjaahhSy2TU9KHbczxNHX X+1Q== 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:to:from :dkim-signature; bh=yE2nb8UtCPTjefeNFrKNR+9dA7QDwYIIYJDcNWKRaRc=; b=ZfB3IBhYlv2aP3xF3083+8n61HxXiN4It7ZUAjygBeKhFkAB6jATHdaWAKrNS1NciG eQCY4K22NqSM9bhipRfmPkVusLLwX9MYnUK3n+Zb/bb1B9ZnaklRXOOE/G7zTCBZ3O0P pnWVF+rvZK+gOiJRUBBYq/u+ZRsAFCCKg8wFgGZarLqsoPVQmq9BFJ/jBxf27atrbalm 6z/bFQ2MwH48qw3+X2e4WoRSR/0t7o0aaVkIJSZJP9uBdgSDfsTK3EuBtGGtOjguhEL4 R7dZEgjws9Ji2Z2vw82dfBY/g4UbMt6NNdK2xQqYrdLu4Dju850W4uXhaXNuAAsTRFe+ CAlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Qxd6mSI8; 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 e20-20020a05622a111400b003b9a3ab548fsi6258944qty.646.2023.02.27.06.36.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:36:28 -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=Qxd6mSI8; 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 1pWeCO-0005Tx-Sr; Mon, 27 Feb 2023 09:09:53 -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 1pWeCF-0004zz-6G for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:43 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeCC-0000br-VX for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:42 -0500 Received: by mail-wr1-x433.google.com with SMTP id t15so6362265wrz.7 for ; Mon, 27 Feb 2023 06:09:40 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yE2nb8UtCPTjefeNFrKNR+9dA7QDwYIIYJDcNWKRaRc=; b=Qxd6mSI8PfnxwEuSgz51RKkghZdjCBeZQC3wAM6N6dCpgZ0Ifu7kTaSVCnyvjTpusx BgqKFRfMoUNN+mHo0YnwBJ2cPZKBzQCtT0uOj9JSQKBc2blFI6RktQfM5gPLvTbsupOE JACB6iJo00APgbFDHcmPkm5Ddeh/50ivD5afXkl3xRAEcxLeLZuwy1WJCU24QkPUGTb/ Tle9WUxuftYhofoQB5GB4iScN7IDj8mrtsoQXVARC1VkAZLOQ6NHi9IySBPG17qZAA6h 4DrOtzM5Nxw/eb6tUCy/E5ZgU7+gN2hQGSkdwwa7Tcf3CnWkMeT3KeyKO90QCvq1/JlB c/Ww== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yE2nb8UtCPTjefeNFrKNR+9dA7QDwYIIYJDcNWKRaRc=; b=UCm/L5PUOfXTKhBKlU9N6VfIcl+cJvZiuJL136AYYnpnQh0OysBDCXMvtWpQFtO/3E qEHKnywJxAA+VXp1cXNXA+i+3qmKK/3BuVdNekWuWet1IUl8AHCipBSU+prJOjKopbf5 oGWyu16qESe3lGikDhQc7WmcvdvDerNTU2QsQQisd4PlbALIcnp7d6X1nvjCX0fni9/1 4rktMCbWprwp6vVqNNRh0Dy7I+scyx64C7qADZUWr0NEgmJk2kk1VUq9vGFHm1F0oACu HLTii5qjnIbQv/HdMIBvyVmpoxJbkGWvdHy6/98OJ61zrbUT8uik88gUWbEFUyL5dPbu Ju9Q== X-Gm-Message-State: AO0yUKUqb0SpWbL3Ukghe4bCcgoRCSiQ29FGM+cghghRORYU+oiO79uV xTWY2/obenvT60U2rRoaqbeSjsIoOFYmx4b3 X-Received: by 2002:adf:ea07:0:b0:2c7:420:5d52 with SMTP id q7-20020adfea07000000b002c704205d52mr18813200wrm.62.1677506979400; Mon, 27 Feb 2023 06:09:39 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n7-20020adfe787000000b002c573778432sm7157810wrm.102.2023.02.27.06.09.38 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:39 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 091/126] hw/display/sm501: Implement more 2D raster operations Date: Mon, 27 Feb 2023 15:01:38 +0100 Message-Id: <20230227140213.35084-82-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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=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 From: BALATON Zoltan Add simple implementation for two raster operations that are used by AmigaOS which fixes graphics problems in some programs using these. Signed-off-by: BALATON Zoltan Reported-by: Rene Engel Tested-by: Rene Engel Reviewed-by: Daniel Henrique Barboza Message-Id: <17ef3c59dc7868f75034e9ebe21e2999c8f718d4.1677445307.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/display/sm501.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index bb53499dff..c4c567d977 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -754,7 +754,7 @@ static void sm501_2d_operation(SM501State *s) } if ((rop_mode && rop == 0x5) || (!rop_mode && rop == 0x55)) { - /* Invert dest, is there a way to do this with pixman? */ + /* DSTINVERT, is there a way to do this with pixman? */ unsigned int x, y, i; uint8_t *d = s->local_mem + dst_base; @@ -764,6 +764,34 @@ static void sm501_2d_operation(SM501State *s) stn_he_p(&d[i], bypp, ~ldn_he_p(&d[i], bypp)); } } + } else if (!rop_mode && rop == 0x99) { + /* DSxn, is there a way to do this with pixman? */ + unsigned int x, y, i, j; + uint8_t *sp = s->local_mem + src_base; + uint8_t *d = s->local_mem + dst_base; + + for (y = 0; y < height; y++) { + i = (dst_x + (dst_y + y) * dst_pitch) * bypp; + j = (src_x + (src_y + y) * src_pitch) * bypp; + for (x = 0; x < width; x++, i += bypp, j += bypp) { + stn_he_p(&d[i], bypp, + ~(ldn_he_p(&sp[j], bypp) ^ ldn_he_p(&d[i], bypp))); + } + } + } else if (!rop_mode && rop == 0xee) { + /* SRCPAINT, is there a way to do this with pixman? */ + unsigned int x, y, i, j; + uint8_t *sp = s->local_mem + src_base; + uint8_t *d = s->local_mem + dst_base; + + for (y = 0; y < height; y++) { + i = (dst_x + (dst_y + y) * dst_pitch) * bypp; + j = (src_x + (src_y + y) * src_pitch) * bypp; + for (x = 0; x < width; x++, i += bypp, j += bypp) { + stn_he_p(&d[i], bypp, + ldn_he_p(&sp[j], bypp) | ldn_he_p(&d[i], bypp)); + } + } } else { /* Do copy src for unimplemented ops, better than unpainted area */ if ((rop_mode && (rop != 0xc || rop2_source_is_pattern)) || From patchwork Mon Feb 27 14:01:39 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: 657103 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2386117wrb; Mon, 27 Feb 2023 06:38:19 -0800 (PST) X-Google-Smtp-Source: AK7set85MWNrnIulz5hP3JBOLV6jKkrjz+2raUyIdvdRyM/7a1/PjrBi6siYxxw2ybIzK8E6rOFT X-Received: by 2002:a05:6214:1941:b0:56e:b16d:ec93 with SMTP id q1-20020a056214194100b0056eb16dec93mr53893418qvk.4.1677508699745; Mon, 27 Feb 2023 06:38:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508699; cv=none; d=google.com; s=arc-20160816; b=vmwQLaE+GjhZxCQnkDkMvk8Mvpt4hLJ10YlED9SeUEEJVrQXpxekAXM/vKuMP0bBhq 8w9Ia1kksI2iOVstedcjq5jg0KgtRmqO+i3c0OVwvTAzMcidtLE/zLP1wkBh9p2293B8 FFvPNgXaqxii1sEctJzHVgeTZhjZh3Qogd1SRnwRlrK2KDcfWUEdpGdZuLfut3SJQ6Wz TsfmfREey+DRkuSFRzqvvTECcaKKFMIigBickTYuaQkHGpsCsOWDhna0Ev/iYSmWNxCe SyDjt+6zA1pB4+1lNJQ/LXZFshoFt9eG8ZCc9HyXE9RdM7YXRPOZGAXHQKB+J9pBrQBb UHxw== 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:to:from :dkim-signature; bh=e7FA41agVqmKf8hhf61FgfCAFmlz8PJvwhU2DkO2De8=; b=dbxE7LM2YOwLsRQSUiy15pTNz79fo+L7au/DvqNawQCdy0ahXg7aoGZXfIEhoB0AS9 sKliH/OmlHIS6ays1SrU9d6qIYqsMxnbwbcqB+2q6sMtfsK/55uU7134gcqwNHU/epX+ Ur5v8ZcD2jlQteiecA/uVbmrCf7MOk2Na1rAp5f7S3kJry47yfUxKmThrE6T7tjIbGIY nt0yC705s2RKDklrqmItp7uZsqgj695Z6LnOscVs7JHcS5gNQ4svHxax0x+pPwkt+qo6 dYcFjv1LWieIIR0sfKfU/ZTE2S4m4zvjHNoozx0II62C8PYpD+sszmNZSLmDE76+rH71 GGMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CIfDnNlJ; 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 r7-20020a0ce287000000b0056eb019cf91si6164670qvl.93.2023.02.27.06.38.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:38:19 -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=CIfDnNlJ; 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 1pWeCO-0005TP-KT; Mon, 27 Feb 2023 09:09:52 -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 1pWeCK-0005Im-Mm for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:48 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeCH-0000Xv-RH for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:48 -0500 Received: by mail-wr1-x431.google.com with SMTP id j2so6347210wrh.9 for ; Mon, 27 Feb 2023 06:09:45 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=e7FA41agVqmKf8hhf61FgfCAFmlz8PJvwhU2DkO2De8=; b=CIfDnNlJWBrFJcqAe1Sy7pNFdMITwjf6b+KnYEoWvUcMj9XQUiKqD3F40e6ttPHBYr PM++b+elsUaEPlLdyfkEb84l+yirLpZUaVl/mVj7PiLgxajmty2ntXKh6nF+7LpwGWy0 Sl3Bt1SoejQquzUgoW6Hf271wGpi3JIvpLrtZp4/nl3Y/stOqUHBA12X9BO6m+9M6NOm XRaBz0wXnC2cx7bWCTsmxZlm8XVHJhN5L9GOyL2PODKAbqVSiSvBy3rprDxewIdg+DzY frPTPAukJF4WxI5zbb8gasAiDnRiiDxH7ir2wdPP2J7LJzZUS7w21h3MUd/Z6vCTL24t +BRg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e7FA41agVqmKf8hhf61FgfCAFmlz8PJvwhU2DkO2De8=; b=JLBwBbyPNOJkoMria4oCjerDere2mv3YPIMqEY5JI7N9CEZC6VER5ivNa+1GkShm6M +NR9EKr6KVOo9wL6+bo0oOIpXc0TnYhStkeuo69ZUsFJrbABnRKsiNjflBsRBkd+40Y0 NWsaidkk0DVumWglsjMA3WpoXq9CGZ+0BPo2cJbZ0eJqzxtQOqttuCJ/bYGCoV/yUdz9 Fei54EuPRryOc8Aw9v0rqjmyh3IaOdjRUqnqhC1ETPMpQ18H2XMYMyRC2CFb9ot65mr6 GYuARomWay2FnrLXO66C9yNd8Xg0GHGMxhdqwKOuVIZHyeE79kttjau9w8WlhDudgmXE 9ZlA== X-Gm-Message-State: AO0yUKVyoLa+IlWYSGFK0mtOh2yJSAg7O60DXjqVZth124kpv3TsyNDY nU0TO6NGa0BZ3NZ9RwTUnHIcA2ZsOhJE/Ttz X-Received: by 2002:adf:f7d1:0:b0:2c7:bd6:68fd with SMTP id a17-20020adff7d1000000b002c70bd668fdmr15074904wrq.47.1677506984721; Mon, 27 Feb 2023 06:09:44 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e9-20020a5d5309000000b002c70d269b4esm7123254wrv.91.2023.02.27.06.09.43 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 092/126] hw/display/sm501: Add fallbacks to pixman routines Date: Mon, 27 Feb 2023 15:01:39 +0100 Message-Id: <20230227140213.35084-83-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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=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 From: BALATON Zoltan Pixman may return false if it does not have a suitable implementation. Add fallbacks to handle such cases. Signed-off-by: BALATON Zoltan Reported-by: Rene Engel Tested-by: Rene Engel Message-Id: <20ed9442a0146238254ccc340c0d1efa226c6356.1677445307.git.balaton@eik.bme.hu> Signed-off-by: Philippe Mathieu-Daudé --- hw/display/sm501.c | 75 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 23 deletions(-) diff --git a/hw/display/sm501.c b/hw/display/sm501.c index c4c567d977..17835159fc 100644 --- a/hw/display/sm501.c +++ b/hw/display/sm501.c @@ -692,7 +692,7 @@ static void sm501_2d_operation(SM501State *s) unsigned int dst_pitch = (s->twoD_pitch >> 16) & 0x1FFF; int crt = (s->dc_crt_control & SM501_DC_CRT_CONTROL_SEL) ? 1 : 0; int fb_len = get_width(s, crt) * get_height(s, crt) * get_bpp(s, crt); - bool overlap = false; + bool overlap = false, fallback = false; if ((s->twoD_stretch >> 16) & 0xF) { qemu_log_mask(LOG_UNIMP, "sm501: only XY addressing is supported.\n"); @@ -835,25 +835,48 @@ static void sm501_2d_operation(SM501State *s) if (tmp_stride * sizeof(uint32_t) * height > sizeof(tmp_buf)) { tmp = g_malloc(tmp_stride * sizeof(uint32_t) * height); } - pixman_blt((uint32_t *)&s->local_mem[src_base], tmp, - src_pitch * bypp / sizeof(uint32_t), - tmp_stride, 8 * bypp, 8 * bypp, - src_x, src_y, 0, 0, width, height); - pixman_blt(tmp, (uint32_t *)&s->local_mem[dst_base], - tmp_stride, - dst_pitch * bypp / sizeof(uint32_t), - 8 * bypp, 8 * bypp, - 0, 0, dst_x, dst_y, width, height); + fallback = !pixman_blt((uint32_t *)&s->local_mem[src_base], + tmp, + src_pitch * bypp / sizeof(uint32_t), + tmp_stride, + 8 * bypp, 8 * bypp, + src_x, src_y, 0, 0, width, height); + if (!fallback) { + fallback = !pixman_blt(tmp, + (uint32_t *)&s->local_mem[dst_base], + tmp_stride, + dst_pitch * bypp / sizeof(uint32_t), + 8 * bypp, 8 * bypp, + 0, 0, dst_x, dst_y, width, height); + } if (tmp != tmp_buf) { g_free(tmp); } } else { - pixman_blt((uint32_t *)&s->local_mem[src_base], - (uint32_t *)&s->local_mem[dst_base], - src_pitch * bypp / sizeof(uint32_t), - dst_pitch * bypp / sizeof(uint32_t), - 8 * bypp, 8 * bypp, - src_x, src_y, dst_x, dst_y, width, height); + fallback = !pixman_blt((uint32_t *)&s->local_mem[src_base], + (uint32_t *)&s->local_mem[dst_base], + src_pitch * bypp / sizeof(uint32_t), + dst_pitch * bypp / sizeof(uint32_t), + 8 * bypp, 8 * bypp, src_x, src_y, + dst_x, dst_y, width, height); + } + if (fallback) { + uint8_t *sp = s->local_mem + src_base; + uint8_t *d = s->local_mem + dst_base; + unsigned int y, i, j; + for (y = 0; y < height; y++) { + if (overlap) { /* overlap also means rtl */ + i = (dst_y + height - 1 - y) * dst_pitch; + i = (dst_x + i) * bypp; + j = (src_y + height - 1 - y) * src_pitch; + j = (src_x + j) * bypp; + memmove(&d[i], &sp[j], width * bypp); + } else { + i = (dst_x + (dst_y + y) * dst_pitch) * bypp; + j = (src_x + (src_y + y) * src_pitch) * bypp; + memcpy(&d[i], &sp[j], width * bypp); + } + } } } break; @@ -868,13 +891,19 @@ static void sm501_2d_operation(SM501State *s) color = cpu_to_le16(color); } - if (width == 1 && height == 1) { - unsigned int i = (dst_x + dst_y * dst_pitch) * bypp; - stn_he_p(&s->local_mem[dst_base + i], bypp, color); - } else { - pixman_fill((uint32_t *)&s->local_mem[dst_base], - dst_pitch * bypp / sizeof(uint32_t), - 8 * bypp, dst_x, dst_y, width, height, color); + if ((width == 1 && height == 1) || + !pixman_fill((uint32_t *)&s->local_mem[dst_base], + dst_pitch * bypp / sizeof(uint32_t), 8 * bypp, + dst_x, dst_y, width, height, color)) { + /* fallback when pixman failed or we don't want to call it */ + uint8_t *d = s->local_mem + dst_base; + unsigned int x, y, i; + for (y = 0; y < height; y++, i += dst_pitch * bypp) { + i = (dst_x + (dst_y + y) * dst_pitch) * bypp; + for (x = 0; x < width; x++, i += bypp) { + stn_he_p(&d[i], bypp, color); + } + } } break; } From patchwork Mon Feb 27 14:01:40 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: 657101 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385441wrb; Mon, 27 Feb 2023 06:36:45 -0800 (PST) X-Google-Smtp-Source: AK7set+2H54MKTNlgzUcMnPsDBBUfZqj4WsRBqInjOf+4hX+Hg18WK4kmRhZb0AfbNJHzshTjI4R X-Received: by 2002:a05:6214:e42:b0:56b:ec1f:db0d with SMTP id o2-20020a0562140e4200b0056bec1fdb0dmr45554704qvc.34.1677508605528; Mon, 27 Feb 2023 06:36:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508605; cv=none; d=google.com; s=arc-20160816; b=MYKnCeTK07QgcsH9FqdXMA/ZxFsBQRBdzMjaiN0is1tuemOuYX4Z0/NQfWVOCWrYTj latQBiyBmEhZ+8j4jol8WhcBHdbJ3m2syv5RC956I38CD26c3eiHrE7XtCV7Y7/zahjR Zb3dvcvVz5Of0ZluNcbdHSi++IDW7GqAlMnAoZbod9GiHB0KewiCxmizvlEZfW6epSiD po/jnXh8tgD63dHDUoljhlBlFTfLIOdaxlnfe7pInQxdkGo5f7lpCqBw54Q49G4EvIU2 dYGD9w6OyGnn8cu0ELhDMzqc6sVJaouaWLxL2u4tvXRXhxgPKpkrMRRi+Gf0lOcRtIvG sqzQ== 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:to:from :dkim-signature; bh=0m6KPJ37JOrM04k9+URwQ6acVFhlO5OtjPrDp8PrsTQ=; b=QaIJyV1vUdYgyw8PxsIqL5VGjRyWVx0ZkO+u0dTJWx+YWDd/6LliI457D8rVCmRbuI DRKtHTggGkY0vaWjEPBjO4KWyJSvpE3kpfmsL4pvUmetOcN0ARkUVhBacVTXJhdXAeQp ElXK0YHQ7KSZTEOwe+Setis5wgrnmIppX+0PXMiyvcR0W1C6W0o4/LhC87a0kDE0A0vN j5vTyfBguwNAoNhMV2nTShaG8fridFHI6yY3OyVbxaOtEKbUV/cZlXGb7SBmhMILYjcy /0J55Y33v+sqKeHS6ILtbU4tJdxu0L8zRuxqDQkHvgs2tZBbt0OFFYjKa3wclRRsFG8l e8VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ffqzD0Iu; 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 a25-20020a0cb359000000b0056ee5ebb3c3si3888258qvf.566.2023.02.27.06.36.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:36:45 -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=ffqzD0Iu; 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 1pWeCT-000633-CL; Mon, 27 Feb 2023 09:09:57 -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 1pWeCP-0005bS-Mi for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:53 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeCN-0000ev-Te for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:53 -0500 Received: by mail-wm1-x32d.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so7239852wmb.5 for ; Mon, 27 Feb 2023 06:09:51 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0m6KPJ37JOrM04k9+URwQ6acVFhlO5OtjPrDp8PrsTQ=; b=ffqzD0IuDhir/Ptkh+lY/0mfruMibA3NpoQeNFVXE/odGxef4UcHvQN1xnl+dN+4ut Hye+4KhCsgQvCxpHr32NyP4IgNa5HyHIgQ5ljlxFecXhmGFsGzMusH3vlDWnGvBg3NV4 vFug2aPzQCFzoKaRa8ecfCOvmACuv6LukcaXFtx2n3ui+386vU3xIJvTEowrTzgiXIqz Dr8xy/QF4TlLVCcjwAHDSv3O7QIkoXXFBExnSsNB9+sNWsURiAl3a06FwwnQpibButDj ZxzA+YvqR3lZ+d0dI+3fZThE7THcP5r/HmAPFJi/3gYfBB0SFb/vdRGO3VNr5mhBVvN9 ireA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0m6KPJ37JOrM04k9+URwQ6acVFhlO5OtjPrDp8PrsTQ=; b=NLcj9SeNXf0HJI4P0s+/sX7xisNC6mOf73Sm2+3QHDJN23ZflX23JaRMIG2+eGyXsW rMkJBXnNOHLghdGFWvCgif4KOjMdUUKjwFKhYBT96jLu99jilivBcjvUcacH8stRxPRB FPnSSXku5ZaBNILadfiHon56FiAKak4RAjUqnDAkeQ7NmFVT/ArnxZiYsKCy8UyfqZ+6 oQ41GyifThaZ9i4brpyqnNe75qANiC4HOLwuq7w2X1L4l3QEhi2weGz1LZoEVqlS43eN l+bfY9LM5nVwCGQFIGwq7SxJKJdqGK0/uhxFmZO/nUt7kFFLQ//5bO74vbe4ouohaAef ByeQ== X-Gm-Message-State: AO0yUKWdI5qDrPQChpunAFmn2MtjEPQjG0S4orYVut8erRacL0yuzG+/ bRMW0KWr0dHM6eb5t/7+lUEr7T3dudkjP+ln X-Received: by 2002:a05:600c:1708:b0:3eb:376e:2b9c with SMTP id c8-20020a05600c170800b003eb376e2b9cmr5488342wmn.36.1677506990103; Mon, 27 Feb 2023 06:09:50 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id e17-20020a05600c219100b003e7f1086660sm12863668wme.15.2023.02.27.06.09.49 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 093/126] hw/ppc/sam460ex: Correctly set MAL properties Date: Mon, 27 Feb 2023 15:01:40 +0100 Message-Id: <20230227140213.35084-84-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=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 MAL properties are declared as uint8_t: static Property ppc4xx_mal_properties[] = { DEFINE_PROP_UINT8("txc-num", Ppc4xxMalState, txcnum, 0), DEFINE_PROP_UINT8("rxc-num", Ppc4xxMalState, rxcnum, 0), DEFINE_PROP_END_OF_LIST(), }; Correct the API use by setting the property using qdev_prop_set_uint8(). No behavioral change. Fixes: da116a8aab ("ppc/ppc405: QOM'ify MAL") Reviewed-by: BALATON Zoltan Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230203145536.17585-7-philmd@linaro.org> --- hw/ppc/sam460ex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 4a22ce3761..cf065aae0e 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -389,8 +389,8 @@ static void sam460ex_init(MachineState *machine) /* MAL */ dev = qdev_new(TYPE_PPC4xx_MAL); - qdev_prop_set_uint32(dev, "txc-num", 4); - qdev_prop_set_uint32(dev, "rxc-num", 16); + qdev_prop_set_uint8(dev, "txc-num", 4); + qdev_prop_set_uint8(dev, "rxc-num", 16); ppc4xx_dcr_realize(PPC4xx_DCR_DEVICE(dev), cpu, &error_fatal); object_unref(OBJECT(dev)); sbdev = SYS_BUS_DEVICE(dev); From patchwork Mon Feb 27 14:01:41 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: 657023 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373089wrb; Mon, 27 Feb 2023 06:13:02 -0800 (PST) X-Google-Smtp-Source: AK7set9jNnQPhP7JJAvmTQVTo1EbpD/E8jueJ+EVrOpFThSNC694PNmykt8dTZXQMW06BgYUnz70 X-Received: by 2002:a05:6214:b61:b0:56f:820:6703 with SMTP id ey1-20020a0562140b6100b0056f08206703mr49419955qvb.43.1677507181923; Mon, 27 Feb 2023 06:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507181; cv=none; d=google.com; s=arc-20160816; b=Wxl8Q+2iMhKzW0MBYln4ftN2gBRhi+1k0GIrg5vbdDOTFB4irQvz9zcUD5f8v+cfNE Y0CzoBWMuIy4AFlAMEIds5bZiXtLgeS7U3xneOSNtAt6P0YbPRb2IKNvJDk5OFKUYx92 DlAV/ILWHT0Ftqd6/45NhfC+M9UyZ/CzHKnFQ5tnTFnaXMY2pWXF5p2yI6OgWZj1oU2P bHg0DdL5GKL4clMCB+6GrRDBtVC8rGaEQ8BlyuzPQWxAume3v2xfrJChm+/WI+B20UM+ VLVQLKLcq+CSARBLquOp06he8bXa8KMaXZYHNDR0K6DhxJSVxnCfGTBjyFjQTHBmwv8o J26A== 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:to:from :dkim-signature; bh=EzB7E811R8ZHY7qXERszEqu5NK1F8fYg7SHHwSsZGtM=; b=tpYVUpX178V4J8ngMZzQ0ZJCKBcCj9FlU+kQ+9ey3+BWuF63rVgjUSkn6PU/id4ldq GtcHmCGOc+6fRxm79kmYmqXS6C7O/ykUoaAvDM4S8qWqLjbSApgwlRiRU1ctI6ay8WIs qVGq7BQM8uIvzqEGAzVDSMfXle7/ZvpDvtP0wotQ10Nz+pDScWPewTJQrLfB5h9yXAeu 7sUpZZHfUFzuNcjZv5PGrJQl/9zuI5YB7IZL9RZ0a6pND9/FHtWScxeTbpAV/S0UvU9I FX5hTTDL2aiStiBIRWTGLiN148hv2W3abjfzGikFOJHIzooU8cLGJ5zr7l5F59KWCkkw 7jGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iPqXnnco; 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 a204-20020ae9e8d5000000b00719e7d0f8fesi5506458qkg.454.2023.02.27.06.13.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:13:01 -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=iPqXnnco; 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 1pWeCf-0006Kt-93; Mon, 27 Feb 2023 09:10:09 -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 1pWeCU-0006FS-Tw for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:58 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeCT-0000fN-7p for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:09:58 -0500 Received: by mail-wm1-x333.google.com with SMTP id c18so4312483wmr.3 for ; Mon, 27 Feb 2023 06:09:56 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=EzB7E811R8ZHY7qXERszEqu5NK1F8fYg7SHHwSsZGtM=; b=iPqXnncokRKjtkkGO8s8NIfLAVXBGdfHMF6ylMFU8q9kbfoHbY/lyJPaGaM6AN4LoT QLohqp2viNpR+l7hkBoAbetetpBJLIMC5R24Eh5s90ZGg5+aO/2HIoZCtF2FrNRJ1ArJ azRlmZOJGuOOXMEjd7ypDVAxm/QU5B5ADmeiCXHDLMfzsY12o6NQnv7FhrK0v6RCGwjb SJEeINU4Sh6w+r0xdxXAxAysyHcNZCJWvakxOBd0uw5ZZWy0b6OEmRtahIeRaF5M9HmI UIL+ZBY3uihkC3KGdaqpu5HhOqjPtS6KKkV25e3M+qapQRoGr0eK1SX+VaQmAS4IjNU2 F4Vw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EzB7E811R8ZHY7qXERszEqu5NK1F8fYg7SHHwSsZGtM=; b=6gw5c0ohA8M4SlV9HbGxpqMqOYMGieKIyRUvpzP0KjQj4uTQZUZwbiVBNTk7ZP2toP lSxzmALgbZbmxAke+pTDce6SCkwF+eNU2FeCIZ+obqQm5rr/30NiZBZ6orxpTJT92hlD 9OVLgMKnROZG/e5mzUM7gBsFokEOwfKqaBG/iHmsVWwXTh9Ot2gV1mC93X28rhDLsxk+ UlSxdbxr6RpcnRX7ZXM0vMp3w6Os5XrgbPfeC0ZASpgJ94P335G/XMSLN4ZjRxJ9ragx Zmziwd79mMjGhuw2oiizsIGmyZZvkLDHa76KbxB22X6Ay1Y8zZV+KbIvzWkV12NZUQnw ZhNQ== X-Gm-Message-State: AO0yUKU+sqjNMcaYzm97t9ESas4Dgn9AXWJQNBvG+/T7iNow/+Zx1SvV NXQtVrzjMBJeGXP0p/xqnwHgeFYtX2R+ALml X-Received: by 2002:a05:600c:4a9e:b0:3eb:2b88:8682 with SMTP id b30-20020a05600c4a9e00b003eb2b888682mr8277989wmp.17.1677506995444; Mon, 27 Feb 2023 06:09:55 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id az11-20020a05600c600b00b003e1202744f2sm12676140wmb.31.2023.02.27.06.09.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:09:55 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 094/126] block/vvfat: Remove pointless check of NDEBUG Date: Mon, 27 Feb 2023 15:01:41 +0100 Message-Id: <20230227140213.35084-85-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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=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 Since commit 262a69f428 ("osdep.h: Prohibit disabling assert() in supported builds") 'NDEBUG' can not be defined, so '#ifndef NDEBUG' is dead code. Remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230221232520.14480-5-philmd@linaro.org> --- block/vvfat.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index d7d775bd2c..fd45e86416 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2784,13 +2784,10 @@ static int handle_commits(BDRVVVFATState* s) fail = -2; break; case ACTION_WRITEOUT: { -#ifndef NDEBUG - /* these variables are only used by assert() below */ direntry_t* entry = array_get(&(s->directory), commit->param.writeout.dir_index); uint32_t begin = begin_of_direntry(entry); mapping_t* mapping = find_mapping_for_cluster(s, begin); -#endif assert(mapping); assert(mapping->begin == begin); From patchwork Mon Feb 27 14:01:42 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: 657048 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2376386wrb; Mon, 27 Feb 2023 06:18:53 -0800 (PST) X-Google-Smtp-Source: AK7set98tWl2VTLzTq1W4G0YBTiHXDwf1DWRSaUb67QEOT1vVrVHVUU1fE32JC62zF/GFQTle9AW X-Received: by 2002:ac8:7d52:0:b0:3b8:4729:8225 with SMTP id h18-20020ac87d52000000b003b847298225mr31200048qtb.9.1677507533615; Mon, 27 Feb 2023 06:18:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507533; cv=none; d=google.com; s=arc-20160816; b=Vyodz6bPNfJx7FaTKg6AqWlVZuv7xbtS9bYInFMOALFzOEC/GTglujgFH/nWuv7Qxp QW88wemxBxYpJN4+ZJf/LVJ9y+Q9P0dnaj9KGSDTNLn7wn9RM0Q7AoJ6S0IODgVlgEcc Qd1nGovnsetNXo/crYBeccRC47E8xvWLdALgoZoEMmpkaieHxjrdnVLkqT39Tk9qSnLB ZwFPFrLidX4vGdgPeNeuw9p+4icfXdiX8c9S9whqdtBxYGHpy5PTiQ2S3hY9qeO3+uiI vkRCpu51s1OHule4RpTJv2IQY0grT9KtonJHu3UsGFsMyA0Ci9A8OvfK0KqOhJskzWbe beJA== 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:to:from :dkim-signature; bh=9i8Ap7rsoDJGC5IE6sGz5Ob3MAuQT6Rsd3pA6gNBUDI=; b=QAv5iyWEOqpuscr6R1ZIfM++7NBR82smhH67eDozS6L4ygGFa0Awsr06KPAKDSTbku 3VFLf3wZAcauCkFxE+iO8zk6ifNM5PE1VlbtlkDoG9vfTRVjxa0v9fQ0ie2OuKJNdy95 v6Fs7hIsUU6DvVoircFElpmD+J8qTQtHwKLUXgrGojZzTL6dwe10Wq3peWSK93WPUAsZ e/gvxXHVjTh0AOxM+1URbSbIJ7+gcw906wOJO+lRVxaG8Vv4LLuymyTvp83W0hKNl/85 GJuBioGVRjHy4BdUUiIBMuusULQdeQEibwm87B1Aac7Csj312ak/Vqf8Ft2mfPw1ezBr vDpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WpkHBP5v; 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 bm18-20020a05620a199200b0073ede8b345dsi6202634qkb.642.2023.02.27.06.18.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:18:53 -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=WpkHBP5v; 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 1pWeCx-0006o3-KW; Mon, 27 Feb 2023 09:10:33 -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 1pWeCa-0006Yb-6n for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:06 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeCY-0000fj-BW for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:03 -0500 Received: by mail-wm1-x32d.google.com with SMTP id o11-20020a05600c4fcb00b003eb33ea29a8so3407538wmq.1 for ; Mon, 27 Feb 2023 06:10:01 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9i8Ap7rsoDJGC5IE6sGz5Ob3MAuQT6Rsd3pA6gNBUDI=; b=WpkHBP5vu/Eg1TybTsaiNo8cESIRxpz5CEo0UI/UChm/dmf5THZRbF7F8aCgNliPAp OGjcfTT14P4FJXtfax94Wzlmn+vpVBtRnriRchNKhL11kE20RJBRmSOEMWgx4TnDEfQZ YaXCI+ga7QXMiIZXUbV2o24KeE7UCPV+yv0sOGc4YvSXcbu9Jh0K1wZFWZ5eHgcyETAG cwfXtmTVOhNn3hQf5vA4/4to8Cop1jJ9VeVjFtSPq0CCRPcFSuLyFBoGq5B1vFAvqx0d ekwNBnfIkP70PhelPvyC+zu2OqUQQ6ZUDG2fNWkK7rQhE0l8k3bPOpaao2u98D3Lf36W zLxA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9i8Ap7rsoDJGC5IE6sGz5Ob3MAuQT6Rsd3pA6gNBUDI=; b=jZLM0xCGqgfqRzc2mFGOnLk4R5jz8jp4CIRtkCOp0NEamx7xMacjGliYRwHPdOAoU3 uom4TA2GF3v/OU90aDZwh2AU6Hz2IlxgSLyHtGB61ZHRw7o85qLRO4NAy4IVodNOr9wG 3LBmZ6RFJTkTn1x1qUTRRwqRjPfP0Qvev23Bl9F/whHEanoX144lweYmtBAnlIR53k+H hZK7jTYKQXePH6M9xdekPRPYZjjUQYCb2WgtvnBGE/3bMJKvnwoB606QA8U3eL8l6iv9 kySa7n/EWoy/STAPeqZ1rzp5hohKdVwaGxcMOJsr4hK6A6VZ4F5xAqzjuGvc3FminB41 9RVg== X-Gm-Message-State: AO0yUKWPSFmxnIGUppCg85wzJkcgt6eVAPP8YCUsySrmHQN0KoOEgvQT 4tgtbuTI9t4Pdd0yt77F5MyD8O6fGz+OnivQ X-Received: by 2002:a05:600c:492a:b0:3dc:42d2:aee4 with SMTP id f42-20020a05600c492a00b003dc42d2aee4mr12956427wmp.25.1677507000532; Mon, 27 Feb 2023 06:10:00 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h8-20020adff188000000b002c54241b4fesm7121983wro.80.2023.02.27.06.09.59 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:00 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 095/126] scripts/checkpatch.pl: Do not allow assert(0) Date: Mon, 27 Feb 2023 15:01:42 +0100 Message-Id: <20230227140213.35084-86-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.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=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 Since commit 262a69f428 ("osdep.h: Prohibit disabling assert() in supported builds") we can not build QEMU with NDEBUG (or G_DISABLE_ASSERT) defined, thus 'assert(0)' always aborts QEMU. However some static analyzers / compilers doesn't notice NDEBUG can't be defined and emit warnings if code is used after an 'assert(0)' call. Apparently such compiler isn't as clever with G_DISABLE_ASSERT, so we can silent these warnings by using g_assert_not_reached() which is easier to read anyway. In order to avoid these annoying warnings, add a checkpatch rule to prohibit 'assert(0)'. Suggest using g_assert_not_reached() instead. For example when reverting the previous patch we get: ERROR: use g_assert_not_reached() instead of assert(0) #21: FILE: target/ppc/dfp_helper.c:124: + assert(0); /* cannot get here */ ERROR: use g_assert_not_reached() instead of assert(0) #30: FILE: target/ppc/dfp_helper.c:141: + assert(0); /* cannot get here */ total: 2 errors, 0 warnings, 16 lines checked Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230221232520.14480-3-philmd@linaro.org> --- scripts/checkpatch.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6ecabfb2b5..d768171dcf 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2982,6 +2982,9 @@ sub process { if ($line =~ /\bsysconf\(_SC_PAGESIZE\)/) { ERROR("use qemu_real_host_page_size() instead of sysconf(_SC_PAGESIZE)\n" . $herecurr); } + if ($line =~ /\b(g_)?assert\(0\)/) { + ERROR("use g_assert_not_reached() instead of assert(0)\n" . $herecurr); + } my $non_exit_glib_asserts = qr{g_assert_cmpstr| g_assert_cmpint| g_assert_cmpuint| From patchwork Mon Feb 27 14:01:43 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: 657019 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373017wrb; Mon, 27 Feb 2023 06:12:54 -0800 (PST) X-Google-Smtp-Source: AK7set9CJenpaPyl5S24KfoV2kdkqew+VmjSDjRl7hA05LqrNiFTNnBJMC8xAm0Qf1v2Xe+fKVac X-Received: by 2002:ac8:5b85:0:b0:3b9:ec33:eabb with SMTP id a5-20020ac85b85000000b003b9ec33eabbmr16032613qta.19.1677507174097; Mon, 27 Feb 2023 06:12:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507174; cv=none; d=google.com; s=arc-20160816; b=zf/AB8U51XSFMeWktcE1UNB89QGZrjdo/eMBNh2V9oBnxRj0T+u1GABljHNwP0l96y qzEkbAqcOnGxmXDgJiiP7CajXnkH+xWuqDicg3dFJZO4Ow+9KSja48Gg4TVzjpBH6r3U +bBDdG3dKqVF5MzAR74YgRPu+h0rB4IkiCd0VY4e23ViKGP+rHLoaB88t3xoPFEPML2f 3A/HxaRYMQWwl24wOWCjWNZ/49iptyQ2ywUQnEb35/BFW+qN9rIph8NMQVn5pXJFLzGA MyuEZQwPUyLSkP4nIdlwdK4RmZvZMDRMlQUMuQU5ZYZ46o2+B5blqJhJlReIjtsEpFJI OPag== 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:to:from :dkim-signature; bh=Wgl0wKqznMofnpduh+UObOE7YnBmp/bW12ATTjBO0Yo=; b=n9mer0xooz2QDLthoWcbyz/9T0PBKmFfCcwTmanXr5pS/zyS9Wk32AcoR+pRE0hicR RNAHAMNZJZ3+2NwdhJxCja9jj7Ns3bowVeJP8JyH2a7l7VAUiSUYD6WNQDdUA730EBux szofPkxGMsnc00cGHu78NJH1S9SatzOOsJKon6SDDwgxK0AoRI5OSJZ72q2P63IGgwA3 D4Pzkfh5FvW/gWvUx3NdusfVfYc2LzLVoxQ0oomJ39LhY3gkqV6AUKAE2iG4sEfmuycW hwq/vxsiGQv2+V/24qRRGaHJ/H7DZrMiCQss2AyvDkrcfyeKv3/SlEDAmv4Ch2J3Ef2G xJow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nivZrbmd; 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 m21-20020a05622a119500b003b8458c31fdsi7040889qtk.286.2023.02.27.06.12.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:12:54 -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=nivZrbmd; 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 1pWeDI-0007To-Ov; Mon, 27 Feb 2023 09:10:48 -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 1pWeCg-0006bE-FE for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:12 -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 1pWeCe-0000sW-OS for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:10 -0500 Received: by mail-wm1-x32f.google.com with SMTP id l7-20020a05600c4f0700b003e79fa98ce1so3919450wmq.2 for ; Mon, 27 Feb 2023 06:10:08 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Wgl0wKqznMofnpduh+UObOE7YnBmp/bW12ATTjBO0Yo=; b=nivZrbmdBgrlXn0rkRjf6Wva6lm23fq96YNMhHQ+R9hoRm8SezOfolEE5TJq5K5TYq 5uorT1zv8n3MBD9ABg/Xqhnp3vjDBFgp+zhzKBEvF1FNo1zZArcsds6qwo6usQukSgZa t1uSMJNIdLo5dZp0Ht8vmY7Q/dvN24PhVPeMJa/m7cGaDmZipTa97w4pS9j2Vj6ePoui zX/GNkHncCVo520x171vOGcQ9hO6/caGypoLHkyPvF0o+lQfxdEWau2i1+B0Btt1tUJX GWPjOy9vKJDue+9Kryz/XkMxtNhfyx7V7CKvikN9hlN4mp83qW2oDtvmuVwT0eOM8ki1 lZPg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Wgl0wKqznMofnpduh+UObOE7YnBmp/bW12ATTjBO0Yo=; b=XalexFKZ7o/dbMBVa3zDYh5yvIIQgJxIRjZAHZ/iNwef3kWRoiBkUamSi1Nv7zIg2k sL35wKfu/Q7W1o37iSVccylhg/Z4dLKcq+tHmX0qjmde31ovhz2cji7tpYB+WzRkXCAw 6QgBhSoeboA6mPc7ZHqKVgKdQEJ4hMGv8OPMLzzVQrS6G/PmLSG1I14ri4Oq2cSD3IEE funcZA2AgdT0sAcMRtjT2hQWvx4j2t+ZFehAYDGeTTdd1Ijl470qkD8gkKMFvabnL5Mv MejDJFfRd6YhIAKqNDoUAZ8KxJJ3zMUwz8QPov7Hq8dvSyo0QdIAeEKqg1FuEHeq6PXb hJOw== X-Gm-Message-State: AO0yUKXWIWnzU+qC6BQDJqfcFWEiKoZI8P6632lTSpAts4SrUk/kE727 4mhYbXwi/a1rBmIoPABKAgPlkpeJxajOC6YZ X-Received: by 2002:a05:600c:4da4:b0:3ea:c100:f18d with SMTP id v36-20020a05600c4da400b003eac100f18dmr10777909wmp.9.1677507007057; Mon, 27 Feb 2023 06:10:07 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id m13-20020a056000008d00b002c54f39d34csm7064865wrx.111.2023.02.27.06.10.05 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:06 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 096/126] MAINTAINERS: Mark IDE and Floppy as "Odd Fixes" Date: Mon, 27 Feb 2023 15:01:43 +0100 Message-Id: <20230227140213.35084-87-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-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=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 From: John Snow I have not been able to give these devices the love they need for a while now. Update the maintainers file to reflect the truth of the matter. Signed-off-by: John Snow Message-Id: <20230206182544.711117-1-jsnow@redhat.com> Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index d54e5c4fb9..38fbece92f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1797,7 +1797,7 @@ F: hw/misc/edu.c IDE M: John Snow L: qemu-block@nongnu.org -S: Supported +S: Odd Fixes F: include/hw/ide.h F: include/hw/ide/ F: hw/ide/ @@ -1822,7 +1822,7 @@ T: git https://github.com/cminyard/qemu.git master-ipmi-rebase Floppy M: John Snow L: qemu-block@nongnu.org -S: Supported +S: Odd Fixes F: hw/block/fdc.c F: hw/block/fdc-internal.h F: hw/block/fdc-isa.c From patchwork Mon Feb 27 14:01:44 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: 657088 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2383285wrb; Mon, 27 Feb 2023 06:32:30 -0800 (PST) X-Google-Smtp-Source: AK7set8AnrZmai7axTKm2NAj0AWwpyhdQHmCcQoJNQBE9+ihuOCImLAIxmJUEzVtAEcG36NkVeVl X-Received: by 2002:a05:6214:b68:b0:56e:b41f:bdcd with SMTP id ey8-20020a0562140b6800b0056eb41fbdcdmr52933113qvb.29.1677508350696; Mon, 27 Feb 2023 06:32:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508350; cv=none; d=google.com; s=arc-20160816; b=oB7G//zUqCREnLO52ayp/nRVAHYmSJ3EFM0c8HxbbtAck4KEKjAhtDEpwwsr0PJqQ6 8V2pkxGB+Oob2sDofpOaB8UvllYTjF2ZYLZ0+S8ygD7nNUklBuuXk1EsEh1q9DXzpWAh OhRN3Ok2X0X/bBdpzSWIZzOPUY+eaz6bIXnXoVdWrigAnVDtnXuLJ8aetp/5tju9muBX JhatG+pZlUke+0V/UJiAwy7EEjOR8l8Jm+20t/2tpaa0LRMzaZwuCqJvpZBSo3CKxWYr Iu8Ny63BYdeLdzskdq7kVgIYENkrm2JBY3285rNSL8DWoeCDGjp1ysxapkLpValUV2Iq XXYw== 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:to:from :dkim-signature; bh=kuw+OhxNdrwt9CAbe1bEPP31vgWl625e+HsfVN1rpYc=; b=HBcJzgibUOAj8iU9RJClPwLBGK1dkGYw3gkE18tYCpxpUo64tetzpzw6R7RSxshwRj Bd/0JBop5pp0PLTgjH37u3/SfrsZ3NKf9YD99eRJVDmz7/uQTMxu8TQsBxRoXF6MiAv/ brCGtGtttiaMcGMSGp5ZT42FAkOzZdADqGEYfaWf7cKxq1Bt1bvErEe9Lm2qgxtg5A51 EYBe12ClhkYh65eVF92Q621c6hKO67nw8KIG+qxnkbRy0mG8u+jer9rIThzQi+eIcXPL w3Ima9SNmbrz2reowDhfDJBh0TDnqoR6lYOEWtGIOu6EFNzQOqIm213SCC7DlTssoI9j geDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="uR+/dHq2"; 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 y19-20020a0cf153000000b0056f2ba3d7c0si6627244qvl.353.2023.02.27.06.32.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:32:30 -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="uR+/dHq2"; 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 1pWeDI-0007VR-UJ; Mon, 27 Feb 2023 09:10:48 -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 1pWeCl-0006lT-Nu for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:16 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeCk-0000t1-0l for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:15 -0500 Received: by mail-wr1-x431.google.com with SMTP id bw19so6331217wrb.13 for ; Mon, 27 Feb 2023 06:10:13 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kuw+OhxNdrwt9CAbe1bEPP31vgWl625e+HsfVN1rpYc=; b=uR+/dHq2aTDSeEnJxrTAN+I6eft9VC4AAMH8rdiWfQ4KUBMb0+e7cdlaT8qBRfl1mW yzsRI/YsscTvBjJwNu0cTjgkEhxIzjEk2WBWEro5JiMsbyMtPhGOYhGuPEzPCOK8aXpw nxwCWRM7hBZu9+8Ub71FmxXmASJcinWSILU3tuof88ub6hFDmZs7WTueNXZHzoVGKyPM /hb5P2NZEhD70fD7pIzS8GKnxjxrMQFgUekKPZOUqxkVSyMuaUq0HbJMMZteT/lvs3L6 Eb025XTIM90W1cG/+SUsPdX+C4C8TKQgoEprvbvEL5G3U1gi2YIlh51WrAdIAeT4A5A8 4vfA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kuw+OhxNdrwt9CAbe1bEPP31vgWl625e+HsfVN1rpYc=; b=Pd6lqFBrYMq12TeZRAvP67FPhGpbMz0dF8u1UyD2lzmbf0wGwALVrWKZ4N2r8FGPYq dxc2kv7EN5JI296+7LMOg/tdrgkA7RWLApIk/csXn7+6i/8rV1/Vqep7etG2lO6oG4gl IiibSgbful15n8S2e6Lwme3UDVU3Yr1mTM0hzqAhErtWk/JnYkGqNu1hiIRlKcP50Vgr VMhvwDrcfJ1N03U0XhLaYHuUyW692Xw8TGz0aCA+XpkgiugyJr+7Rjevfq7SidqP/8rN g4xSBtIEoQP9uJElSmMmd7rKG1Ek6K2AN9jCZcjktdnjZ9bmgyoCLbApjiLq5nHzIivS 5fAw== X-Gm-Message-State: AO0yUKXe9UKW87LGHJD65Eroj1EEpP0sEfE4Zr8izX0aHcP/JGRqTUQx vuJgfW4q/cO7qHyaa/WS3HRtpTbXdIeUuP2s X-Received: by 2002:a5d:6d0a:0:b0:2c5:5938:e6d6 with SMTP id e10-20020a5d6d0a000000b002c55938e6d6mr7688542wrq.35.1677507012354; Mon, 27 Feb 2023 06:10:12 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n3-20020a5d4203000000b002c57384dfe0sm7061551wrq.113.2023.02.27.06.10.11 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:11 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 097/126] hw/i386/xen: Remove unused 'hw/ide.h' include from header Date: Mon, 27 Feb 2023 15:01:44 +0100 Message-Id: <20230227140213.35084-88-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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=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 Signed-off-by: Philippe Mathieu-Daudé Acked-by: Paul Durrant Message-Id: <20230220092707.22584-1-philmd@linaro.org> --- hw/i386/xen/xen_platform.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/i386/xen/xen_platform.c b/hw/i386/xen/xen_platform.c index 66e6de31a6..3795a203d4 100644 --- a/hw/i386/xen/xen_platform.c +++ b/hw/i386/xen/xen_platform.c @@ -25,7 +25,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "hw/ide.h" #include "hw/ide/pci.h" #include "hw/pci/pci.h" #include "hw/xen/xen_common.h" From patchwork Mon Feb 27 14:01:45 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: 657102 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2386104wrb; Mon, 27 Feb 2023 06:38:18 -0800 (PST) X-Google-Smtp-Source: AK7set8+rmYse4aKAEcmBz/nSf/5gJ30uKOb1ItM80Ef9MH4xzSxnfpVOlNOHq90wXYdoKBj9rYO X-Received: by 2002:a05:6214:1d2d:b0:572:6ed8:e494 with SMTP id f13-20020a0562141d2d00b005726ed8e494mr26144904qvd.18.1677508698565; Mon, 27 Feb 2023 06:38:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508698; cv=none; d=google.com; s=arc-20160816; b=iS5ExWoK+z43WeY98fevIPhViAtW7VnsSvQZN7bKv2zwbOslP2IHYi7MlZuGJLG9dQ Nqz6e2kHUmVCmJNJPLCN+dx70JG1cqGHi0rbD6FUXZ/164cg2pM3w7I4pL5MAhnFI3ng zd1r/1zvzitqlhHjmKatwZ+79TVU6OaB+lYcpTRK4Jebilavwb7pJq9PpiFzSCpARDam 53cPOza2HhjB6NOV1mdNKTWrEzIfled3snJnLkJ39dt4CafevhZrKM/GnpttdzzBD9Ep LfJFssIFiS6pDwjge4dHnLaPVH8r2XxL6Q9dljOo8SC+1kd8ZEw9e8B7kkWt+NVvAWgR /+4g== 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:to:from :dkim-signature; bh=BUCyj6jY2NeQmAhDjqNmRrKIVUF0KxHMPTPKs9DAlGM=; b=gkNI1Btmzp/uwJeDgGX3A2O+jFsxHCZ7bFYITOoYhjoYkAyfccj2vmvBTf7wa6POZp VqjQKDPt48TxExYasCZSOvX2gk4aNw3wZ1ZkVr9RpG/JZPEysXWo2gQbQEa969Fy3GOa e8ls2ET/9iU4CWmG5KGJeSD67HUKBQu1QV2rY+5ChOgI0eqtEfvgVBGikmp1dsX38it8 MTtyRhnHw2QPGXBkpJQ0c7s4pknX9BwM58n+Rhh+aZ5DzqCf2luFlXhsbbu+any3ijlK hdRz520hHBHXJ4NBTM2GC+Ww+fskqnWuTZMjkKLIOunL+V+k8xxJpFjEvcARqYEbJZwd P2Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TRr6MFCU; 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 l13-20020a05620a28cd00b0074161deae65si6494102qkp.559.2023.02.27.06.38.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:38:18 -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=TRr6MFCU; 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 1pWeDJ-0007WP-0a; Mon, 27 Feb 2023 09:10: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 ) id 1pWeCr-00078o-3a for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:26 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeCp-0000tX-9V for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:20 -0500 Received: by mail-wr1-x429.google.com with SMTP id h14so6373713wru.4 for ; Mon, 27 Feb 2023 06:10:18 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=BUCyj6jY2NeQmAhDjqNmRrKIVUF0KxHMPTPKs9DAlGM=; b=TRr6MFCUUMV6wYWwo/YqwzFizSyFLxT4fIUh6FnYabC/qhhrn5/lH4uqDBkgHPTf7u mRu0EwX3qRBT3LooIAyeez2AxgBSffhUsw7dx/riilfrhm5Yl5bQTS/K2hw9uZdFWqcm D7IbrZGQWvwdXlbCqjuzxxHvh4Si1xgwkCKMFK1+72wuyemnNOwOwXc5IprJ9IozpqHJ cS+rpD/ce4RNGuypb1lFq2UNLOKlslFU+fM8lA9i/0wGSMEwSY7x+JIQOR+V0XUIq03j G2i3nUo0yzOivF0YpzV0vrmHpfWNB26Y0PZtj7eq5hRtpCAVsm90bGMTgyb7yPPY6N5D l9vQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=BUCyj6jY2NeQmAhDjqNmRrKIVUF0KxHMPTPKs9DAlGM=; b=jOO7CGmdHrSL8vPV70QU3v2Cx0Kypm4AWMYHCnk5mc4oOaV+E51FraBmuEobln7rzM 7qpFw9XQIqGRl1dhLtQ4PmWUcJ3vukBH8u87wiughYuA/DmzXOw5WzD0CdNFjNcTnR6S bag5/0iFN23X0sWl8XxiPn+wdnRKDwVoYXeB9AvJDUM/4DrGN6NC93HIeAvorIEHuKpD N0/VyEdQutsBUIv+1xExTMcuKDrV6/sv0iF5+AAf6BsLdKC0M45SF65X4SiozBcB57uI Nc+pSdrS0/HrsAqcJiV+gZJYSujYj7ayahmYLcuutahwUvb7ORYLtyz5DY0VqGVIgCf0 Uu5Q== X-Gm-Message-State: AO0yUKWeWKtqq2mZJhT7PgEGusd+U0Dbr98qiq/PPrkcpXyWIodwduLj J3I+qQSM2i5jucCkHNhLXQG2hijYHzMwXH7l X-Received: by 2002:a5d:4dd1:0:b0:2c7:a39:6e30 with SMTP id f17-20020a5d4dd1000000b002c70a396e30mr14915301wru.38.1677507017615; Mon, 27 Feb 2023 06:10:17 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l8-20020adff488000000b002c557f82e27sm7266039wro.99.2023.02.27.06.10.16 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:17 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 098/126] hw/ide/ahci: Trace ncq write command as write instead of read Date: Mon, 27 Feb 2023 15:01:45 +0100 Message-Id: <20230227140213.35084-89-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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=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 From: Fiona Ebner Fixes: e4baa9f00b ("AHCI: Replace DPRINTF with trace-events") Signed-off-by: Fiona Ebner Reviewed-by: Alex Bennée Reviewed-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Kevin Wolf Message-Id: <20230217103130.42077-1-f.ebner@proxmox.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c | 4 ++-- hw/ide/trace-events | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 7ce001cacd..595a96203f 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1085,8 +1085,8 @@ static void execute_ncq_command(NCQTransferState *ncq_tfs) ncq_cb, ncq_tfs); break; case WRITE_FPDMA_QUEUED: - trace_execute_ncq_command_read(ad->hba, port, ncq_tfs->tag, - ncq_tfs->sector_count, ncq_tfs->lba); + trace_execute_ncq_command_write(ad->hba, port, ncq_tfs->tag, + ncq_tfs->sector_count, ncq_tfs->lba); dma_acct_start(ide_state->blk, &ncq_tfs->acct, &ncq_tfs->sglist, BLOCK_ACCT_WRITE); ncq_tfs->aiocb = dma_blk_write(ide_state->blk, &ncq_tfs->sglist, diff --git a/hw/ide/trace-events b/hw/ide/trace-events index 15d7921f15..5ef344ae73 100644 --- a/hw/ide/trace-events +++ b/hw/ide/trace-events @@ -91,6 +91,7 @@ ahci_populate_sglist_short_map(void *s, int port) "ahci(%p)[%d]: mapped less tha ahci_populate_sglist_bad_offset(void *s, int port, int off_idx, int64_t off_pos) "ahci(%p)[%d]: Incorrect offset! off_idx: %d, off_pos: %"PRId64 ncq_finish(void *s, int port, uint8_t tag) "ahci(%p)[%d][tag:%d]: NCQ transfer finished" execute_ncq_command_read(void *s, int port, uint8_t tag, int count, int64_t lba) "ahci(%p)[%d][tag:%d]: NCQ reading %d sectors from LBA %"PRId64 +execute_ncq_command_write(void *s, int port, uint8_t tag, int count, int64_t lba) "ahci(%p)[%d][tag:%d]: NCQ writing %d sectors to LBA %"PRId64 execute_ncq_command_unsup(void *s, int port, uint8_t tag, uint8_t cmd) "ahci(%p)[%d][tag:%d]: error: unsupported NCQ command (0x%02x) received" process_ncq_command_mismatch(void *s, int port, uint8_t tag, uint8_t slot) "ahci(%p)[%d][tag:%d]: Warning: NCQ slot (%d) did not match the given tag" process_ncq_command_aux(void *s, int port, uint8_t tag) "ahci(%p)[%d][tag:%d]: Warn: Attempt to use NCQ auxiliary fields" From patchwork Mon Feb 27 14:01:46 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: 657061 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2379100wrb; Mon, 27 Feb 2023 06:24:12 -0800 (PST) X-Google-Smtp-Source: AK7set/q2dMJNcPazTBDbTbHHB5FZ/IC6qtbZVM4mQxVKckRFlScoueNz46GJvD8k/k1vvSSiBK8 X-Received: by 2002:a05:622a:1c8:b0:3bf:ce3e:87db with SMTP id t8-20020a05622a01c800b003bfce3e87dbmr10673623qtw.29.1677507852790; Mon, 27 Feb 2023 06:24:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507852; cv=none; d=google.com; s=arc-20160816; b=lymIiNNRuMCrCH88p5GHRIRdxAV7I9+OY5i9QneWq3hghZonxSLt1FPSGO+J9OQkLX L3Vg7f/XN/cmmjGwRcnmLFC36L2I/S6LQ3t3+lZM7iIYOYZkuDT+W0roZKj4OSFE5d0V tXk1uUU5O9fOA0AQB+/qc2PJmgnFR6Jd8gtN/VYq2/FrFci1Uri+r2RLAsxBf9k4OrZC SB6Mwh+pTKJSqix99WOocDvDwMh/+9xOsi8aWVwwEbtzDTvilkDbnsMsXoIhMufnAsPm lQQ5RjBg7EfbMaV/p/qe33iffVdpbvdXA8kMYZf8TUx0dtb6jO5fKheNt8T9enk1Lw/Y D5RA== 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:to:from :dkim-signature; bh=tl1KX2+HVo5outnBBgTl0z+MxZE/pkgAiqysShOhouw=; b=WorEewVTg+LaWZ4sM9WIQdWN2+RxIuza+oAybR/KGaV5TUrCgx1TP4gpoqVLEOS54G +1p2NCzW8MPyNRlT/X+a92DCvRk7P4id3XZNZUhaK2neHrrNs5sxhwRMiNn8g/5vo+BH rwPzbPtzMRKkNey/Hu6zZ+Wvfqq3xXxHHZvC0AaGcz3D3WrAShWN21vaVRu7CBlpGaVQ v6gzAQH14nF9y216r8iGZ2jcH2UD8+iWn6QMy+ivfE8oSd8qzlE3hF4Zi/+BrcMbzeZZ GRWtmDRbB6sB1F1SQZ37BvSjwbitRjXeH4KOKVc38AMoYzLrP53fzi8pNnOrY8yzx5RT xHqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rqSDBHVc; 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 s16-20020a05622a019000b003bfb7fa15dbsi6361643qtw.651.2023.02.27.06.24.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:24: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=rqSDBHVc; 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 1pWeDZ-00087u-Jd; Mon, 27 Feb 2023 09:11:06 -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 1pWeCw-0007Dl-P6 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:31 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeCv-0000u2-2g for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:26 -0500 Received: by mail-wm1-x335.google.com with SMTP id m14-20020a7bce0e000000b003e00c739ce4so3899515wmc.5 for ; Mon, 27 Feb 2023 06:10:24 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=tl1KX2+HVo5outnBBgTl0z+MxZE/pkgAiqysShOhouw=; b=rqSDBHVcfVBUhQK39orxdTi5Nb4vsHnTtPtnQar4mZjBDsc8gPJnNAcNwXZtBcQLQV QSqURcDCzDqIObIoztR3wyLd9iJyqq1hxR7PGU3Bz1bFphGFMULtap/mve4lHEFlbj2B BRMNZPYmQjIUC6/uqMVf0uhnoXDqS75lHKXCxFIbR40EgsPZJjlJ+AZkwqOz6E4Xiqnj vBF0bXIqs/v4jwPmpkOJsc+qKI3LrJEHUbOTqV2HlmY1Bs38s5eTycqiV24hfqMla3C0 YrNYmGs1NXJ5qn/Kw/+ojE0V65xioQDusVv+7LYCoch2IBbGAxRM/dSF/Q3Aw+zM2a5m jYFA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tl1KX2+HVo5outnBBgTl0z+MxZE/pkgAiqysShOhouw=; b=NeIX4wtwz4GYvM9V47WUzB47YlHw31rNvJVpZf5uG3IrsMRGMObcjoHYfVVXNlpBjf gm+teDl+JtPMG9xQM2244a8QfCL0IWRoOWbdigypnDsjnamq5gCI3re/cVY6x7TsQgZV zOLmNpTFnJCxrSsL7Alki2F81mVm9lPrV2/cyCrcs7NmGeC6Jj0YPJpsKlmylNWDo9ST hU07Lgau6yUC+mMrDfA9wo5wNFk+UJggdAy0dZS9gCmf/jG2rGnr1YhW383HijDSVeBd 0hIMqGZzYqrqfLcCq9hxhyTjxF+xzVwdupUs4+wVlK/gyFjgiCeHQzwnvpkytkrtPK9z QD6Q== X-Gm-Message-State: AO0yUKU0AZyIGszn1rsSDGrWD2ZL5zl7rcuSZsMjWqt03HX92fiujfKS CWog8JszP+C50m/HxcjG2w1JYTJvklnvYADw X-Received: by 2002:a05:600c:a292:b0:3eb:368c:5eb with SMTP id hu18-20020a05600ca29200b003eb368c05ebmr5211259wmb.36.1677507023520; Mon, 27 Feb 2023 06:10:23 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id y7-20020a05600c364700b003e2096da239sm12958002wmq.7.2023.02.27.06.10.22 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:23 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 099/126] hw/ide/mmio: Use CamelCase for MMIO_IDE state name Date: Mon, 27 Feb 2023 15:01:46 +0100 Message-Id: <20230227140213.35084-90-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.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=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 Following docs/devel/style.rst guidelines, rename MMIOIDEState as IdeMmioState. Having the structure name and its typedef named equally, we can manually convert from the old DECLARE_INSTANCE_CHECKER() macro to the more recent OBJECT_DECLARE_SIMPLE_TYPE(). Note, due to that name mismatch, this macro wasn't automatically converted during commit 8063396bf3 ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-Id: <20230220091358.17038-3-philmd@linaro.org> --- hw/ide/mmio.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index fb2ebd4847..08493930b7 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -40,9 +40,7 @@ */ #define TYPE_MMIO_IDE "mmio-ide" -typedef struct MMIOIDEState MMIOState; -DECLARE_INSTANCE_CHECKER(MMIOState, MMIO_IDE, - TYPE_MMIO_IDE) +OBJECT_DECLARE_SIMPLE_TYPE(MMIOIDEState, MMIO_IDE) struct MMIOIDEState { /*< private >*/ @@ -58,7 +56,7 @@ struct MMIOIDEState { static void mmio_ide_reset(DeviceState *dev) { - MMIOState *s = MMIO_IDE(dev); + MMIOIDEState *s = MMIO_IDE(dev); ide_bus_reset(&s->bus); } @@ -66,7 +64,7 @@ static void mmio_ide_reset(DeviceState *dev) static uint64_t mmio_ide_read(void *opaque, hwaddr addr, unsigned size) { - MMIOState *s = opaque; + MMIOIDEState *s = opaque; addr >>= s->shift; if (addr & 7) return ide_ioport_read(&s->bus, addr); @@ -77,7 +75,7 @@ static uint64_t mmio_ide_read(void *opaque, hwaddr addr, static void mmio_ide_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { - MMIOState *s = opaque; + MMIOIDEState *s = opaque; addr >>= s->shift; if (addr & 7) ide_ioport_write(&s->bus, addr, val); @@ -94,14 +92,14 @@ static const MemoryRegionOps mmio_ide_ops = { static uint64_t mmio_ide_status_read(void *opaque, hwaddr addr, unsigned size) { - MMIOState *s= opaque; + MMIOIDEState *s = opaque; return ide_status_read(&s->bus, 0); } static void mmio_ide_ctrl_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { - MMIOState *s = opaque; + MMIOIDEState *s = opaque; ide_ctrl_write(&s->bus, 0, val); } @@ -116,8 +114,8 @@ static const VMStateDescription vmstate_ide_mmio = { .version_id = 3, .minimum_version_id = 0, .fields = (VMStateField[]) { - VMSTATE_IDE_BUS(bus, MMIOState), - VMSTATE_IDE_DRIVES(bus.ifs, MMIOState), + VMSTATE_IDE_BUS(bus, MMIOIDEState), + VMSTATE_IDE_DRIVES(bus.ifs, MMIOIDEState), VMSTATE_END_OF_LIST() } }; @@ -125,7 +123,7 @@ static const VMStateDescription vmstate_ide_mmio = { static void mmio_ide_realizefn(DeviceState *dev, Error **errp) { SysBusDevice *d = SYS_BUS_DEVICE(dev); - MMIOState *s = MMIO_IDE(dev); + MMIOIDEState *s = MMIO_IDE(dev); ide_init2(&s->bus, s->irq); @@ -140,14 +138,14 @@ static void mmio_ide_realizefn(DeviceState *dev, Error **errp) static void mmio_ide_initfn(Object *obj) { SysBusDevice *d = SYS_BUS_DEVICE(obj); - MMIOState *s = MMIO_IDE(obj); + MMIOIDEState *s = MMIO_IDE(obj); ide_bus_init(&s->bus, sizeof(s->bus), DEVICE(obj), 0, 2); sysbus_init_irq(d, &s->irq); } static Property mmio_ide_properties[] = { - DEFINE_PROP_UINT32("shift", MMIOState, shift, 0), + DEFINE_PROP_UINT32("shift", MMIOIDEState, shift, 0), DEFINE_PROP_END_OF_LIST() }; @@ -164,7 +162,7 @@ static void mmio_ide_class_init(ObjectClass *oc, void *data) static const TypeInfo mmio_ide_type_info = { .name = TYPE_MMIO_IDE, .parent = TYPE_SYS_BUS_DEVICE, - .instance_size = sizeof(MMIOState), + .instance_size = sizeof(MMIOIDEState), .instance_init = mmio_ide_initfn, .class_init = mmio_ide_class_init, }; @@ -176,7 +174,7 @@ static void mmio_ide_register_types(void) void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1) { - MMIOState *s = MMIO_IDE(dev); + MMIOIDEState *s = MMIO_IDE(dev); if (hd0 != NULL) { ide_create_drive(&s->bus, 0, hd0); From patchwork Mon Feb 27 14:01:47 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: 657062 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2379104wrb; Mon, 27 Feb 2023 06:24:13 -0800 (PST) X-Google-Smtp-Source: AK7set+5dVmw6WsuoNDYyvi0WFYIq2B5/0fvp4Tponp10FLUazOY8tSHk1TcvKX6/yQORIfDjHVO X-Received: by 2002:a05:6214:1942:b0:56c:1ff0:7647 with SMTP id q2-20020a056214194200b0056c1ff07647mr54392914qvk.49.1677507852715; Mon, 27 Feb 2023 06:24:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507852; cv=none; d=google.com; s=arc-20160816; b=H21dDvVHOsB5eBNmp02EBjh6s1cbukyXm1pPw0cfTDlorRlCjix0I7ndCz8ZLSnQtS D14WJALHqZ4RpS7SRss4Zp9VCSzELQP2+PjBPE/N/lrSRLKZ40WGQi1c5/IZh5jeBDRE 8vnsASjJKtjiYGAM5geqHdXtlaiPDv4BstAfF072TmyrKj9peI0EhqaQl3ff8WUYRdhy H2fvDzX1VXjVp0OhdMG+m12lG7se9eFnru2vyh3u+p8cqlQtnayhRVhJhbM5NdZXUnEQ m8YZqa4cWxFqpcN+xyclGg2ltCektia4b8f4IRescM/6KBTVb3oos7HRCw8hr6r1y/nl inIA== 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:to:from :dkim-signature; bh=DX0+YXyuyC7bCbAN48oSNcnK6nwWOgos2TH5GHnP6Kw=; b=cIdouXp+THDfl+uvZp3n9eJORNOAefhL8tSNz7dv/eGZojAPl/r97xKuJBczeolray wO8pwXjiDxdbxvhBENOAWSj32z/QqtINspF5Mdp02cz07jII0avaZp5aea/isHqtDNWA Wgm1rFrLLDInKvDj5DjZvUp4uzh7AHYsls00fN/Gj57NrmsvP7IvTfZ4lpD7DNU+OdRy u6byGc3iYH2TEq/iKVVfqxgNNGvkoPMRYpfJjIx56uggAV5hTO4lzxiNWTAwb/xJMPvD 0Wxx/nbKngQSK8ua5Sc3DipiBzYebk3vzDcI3bav6aVMqrnIeXUeAaAwgeeBfzG+xU8L AHdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=M9nEvIDl; 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 r12-20020a0ccc0c000000b0056ea07a83edsi6372598qvk.272.2023.02.27.06.24.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:24: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=M9nEvIDl; 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 1pWeEH-0000PY-D4; Mon, 27 Feb 2023 09:11: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 ) id 1pWeD1-0007Fk-Ri for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:38 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeD0-0000uG-81 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:31 -0500 Received: by mail-wm1-x334.google.com with SMTP id j19-20020a05600c191300b003eb3e1eb0caso2617385wmq.1 for ; Mon, 27 Feb 2023 06:10:29 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DX0+YXyuyC7bCbAN48oSNcnK6nwWOgos2TH5GHnP6Kw=; b=M9nEvIDlekQcT9r7mh6gdpw+A8qiUckhK3i1zSaK+3OxtFv+8yhL/yTivzL8jHtlnq +Dtt0lowzp7nWePiWWoYR8fZxMIz8T4557GbieiRdFl2yuVp9IivG6aXhVzkLUoB7rzA SfZC/SDVvFRy68CtfuyIuvQc7LwMxQwgyEHEetlnTtyrF+o/1qzjlxLurFrt13O/CoX2 AG5bh4CDqgcuwBQVJm6rWQ/rf5kSR0XVadMHBzy1wOTVequLMjHesYr1sL9clDqjtOVh vo95aPM8HrzrPvB7Ak+5uADfrUA8IGksXejHN93+ArqkRCRKgZdA2fcIF72hEepVc3si fzoQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DX0+YXyuyC7bCbAN48oSNcnK6nwWOgos2TH5GHnP6Kw=; b=aSk7hWrAIsTcxicj901lCmepb7PBZ++yjK5QZFBtD2g7yMNNLHTIs4mbghrOQG5Y+S 9XaOQMuB2xfMN57ZTPPsUruZHRF7TlloYNsc7CxCcLa9T2wlpXA/4Ki92GwmUDFWpIDJ YIMLKKQzSFQLqVmafipjBAggSoaVLwNPdilS5IoYvDqcOZ1yjZ1UWXv9fupEDjcWnMwp sJP++jycNiVvxxZYqlLXOuXp5QCcc6R1v8idMHzD8QUxwoISucXBei2gEgQgbobWBrmi sJ1CQNBT5ZCDK15bQ0MEuIaJ52qvMUUVfcNA4DIOK4CxxpuGU5pkeC328jP6xoqW5JdQ 5chg== X-Gm-Message-State: AO0yUKUFgvoCrEnkFViS503sv6AWeK0F5pOAUxZBwc8i+iSQKRWTgLBB 9SvFoBgBtejQjEKSkYHQYsAEinhZhO021wjl X-Received: by 2002:a05:600c:a295:b0:3eb:29fe:70ec with SMTP id hu21-20020a05600ca29500b003eb29fe70ecmr8418496wmb.27.1677507028746; Mon, 27 Feb 2023 06:10:28 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n4-20020a7bcbc4000000b003dc3f3d77e3sm8785650wmi.7.2023.02.27.06.10.27 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:28 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 100/126] hw/ide/mmio: Extract TYPE_MMIO_IDE declarations to 'hw/ide/mmio.h' Date: Mon, 27 Feb 2023 15:01:47 +0100 Message-Id: <20230227140213.35084-91-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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=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 "hw/ide.h" is a mixed bag of lost IDE declarations. Extract mmio_ide_init_drives() and the TYPE_MMIO_IDE QOM declarations to a new "hw/ide/mmio.h" header. Document the SysBus interface. Message-Id: <20230215112712.23110-4-philmd@linaro.org> Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/mmio.c | 5 +---- hw/sh4/r2d.c | 2 +- include/hw/ide.h | 3 --- include/hw/ide/mmio.h | 26 ++++++++++++++++++++++++++ 4 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 include/hw/ide/mmio.h diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index 08493930b7..6bf9048b1e 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -29,9 +29,9 @@ #include "qemu/module.h" #include "sysemu/dma.h" +#include "hw/ide/mmio.h" #include "hw/ide/internal.h" #include "hw/qdev-properties.h" -#include "qom/object.h" /***********************************************************/ /* MMIO based ide port @@ -39,9 +39,6 @@ * dedicated ide controller, which is often seen on embedded boards. */ -#define TYPE_MMIO_IDE "mmio-ide" -OBJECT_DECLARE_SIMPLE_TYPE(MMIOIDEState, MMIO_IDE) - struct MMIOIDEState { /*< private >*/ SysBusDevice parent_obj; diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index d7020d6d2b..826a0a31b5 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -38,7 +38,7 @@ #include "hw/qdev-properties.h" #include "net/net.h" #include "sh7750_regs.h" -#include "hw/ide.h" +#include "hw/ide/mmio.h" #include "hw/irq.h" #include "hw/loader.h" #include "hw/usb.h" diff --git a/include/hw/ide.h b/include/hw/ide.h index 60f1f4f714..5f8c36b2aa 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -8,9 +8,6 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, DriveInfo *hd0, DriveInfo *hd1); -/* ide-mmio.c */ -void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1); - int ide_get_geometry(BusState *bus, int unit, int16_t *cyls, int8_t *heads, int8_t *secs); int ide_get_bios_chs_trans(BusState *bus, int unit); diff --git a/include/hw/ide/mmio.h b/include/hw/ide/mmio.h new file mode 100644 index 0000000000..d726a49848 --- /dev/null +++ b/include/hw/ide/mmio.h @@ -0,0 +1,26 @@ +/* + * QEMU IDE Emulation: mmio support (for embedded). + * + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2006 Openedhand Ltd. + * + * SPDX-License-Identifier: MIT + */ + +#ifndef HW_IDE_MMIO_H +#define HW_IDE_MMIO_H + +#include "qom/object.h" + +/* + * QEMU interface: + * + sysbus IRQ 0: asserted by the IDE channel + * + sysbus MMIO region 0: data registers + * + sysbus MMIO region 1: status & control registers + */ +#define TYPE_MMIO_IDE "mmio-ide" +OBJECT_DECLARE_SIMPLE_TYPE(MMIOIDEState, MMIO_IDE) + +void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1); + +#endif From patchwork Mon Feb 27 14:01: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: 657052 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2377711wrb; Mon, 27 Feb 2023 06:21:21 -0800 (PST) X-Google-Smtp-Source: AK7set8nFSxC38Sx3AAWV0vpFt15br7DJV9+kLtdBmrX1TKmsLxt2sBNCnNQ8EvNgernhu9sK4oY X-Received: by 2002:a05:622a:8a:b0:3bd:6c0:9c8e with SMTP id o10-20020a05622a008a00b003bd06c09c8emr15872091qtw.2.1677507681265; Mon, 27 Feb 2023 06:21:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507681; cv=none; d=google.com; s=arc-20160816; b=h1ITnunTttWiIRNn/o+BYNV7zYxrEhfgBVp0QwNpGJUdaojFzLs1IFFXvsZiUzqnVi o/g3VJt31K/dYhEFkDE9fx10kETVRRc+xSagHOK37m/ou5HZ6rUQ6cdN7h3oHWd1JsOj AUffZlkG8fOn/SZxly2C/LjJsIW8FopsSEYPzhYC1T1RZ4vfiGsTSGUE8K2dYt3I3o91 HXYqzgF+Om7pUXftzpRPQsrDV4UZ4cIcFWQQqgm2+a6XzccMAFh76aKYrWVlQvesvqaP Kms4p86BuMDpnCcnPOc6LiNbikgKzVqj69zazB4y8w9rEzBL9/2sZNprMIwA4DN5KLTN qWKw== 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:to:from :dkim-signature; bh=s/VV8gMq+SwEfVdND04j3PKQUCL7nPvwuzVVhOpvlV0=; b=Clmpqp2Xqu6scrfFlGyL0yVHC/7n/W3noHjd9q0//2uB8AaHpT0MUx0RwlFsbNdJY4 kqs27I8fXb1vDtHU1bZfeR14GgTi3Whs5futZ0UCWPii0gmP4gSmJVyPyDPKGK43RxxT Sz3n3NmlfSjJy1E3cwS7ELxCWXSEkfgGua3DLlRGYODLAqs+OGUuEj+b+vsdR7puJWVu W3OAERtJyFmAkr6DC2yyqZ1RTxeXSea9rdF3ysWV6a6HxxGP/pAaZqtsJEAhV0iunGPt rm9mDfXDKf7FlmiVlIVWSmT8yAMaaX/mVxhI1xYeRWWt8yvyUskGnSWaIWoE4P45IekH Bbpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UVoWMWrI; 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 a25-20020ac84359000000b003b86bc67cdasi6579122qtn.329.2023.02.27.06.21.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:21:21 -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=UVoWMWrI; 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 1pWeDZ-00088w-Iy; Mon, 27 Feb 2023 09:11:06 -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 1pWeD7-0007GB-KZ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:39 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeD5-0000xB-S7 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:37 -0500 Received: by mail-wm1-x32c.google.com with SMTP id j3so4333053wms.2 for ; Mon, 27 Feb 2023 06:10:35 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=s/VV8gMq+SwEfVdND04j3PKQUCL7nPvwuzVVhOpvlV0=; b=UVoWMWrIxct28PSvms5AUbv0LnO1h7vmkbHjfIotZ8ud/ne4/9rrTiOrCB0tq+wHbJ cnVptXBXr36X33t0g6Uo10IkFOpfmideOhTryzQrJ79Do2Qb2NPHd5lEgAbGlBqlymWl uRCrrtI4FLePKAQvuGT25UBgmso4kd6MNh9TsLzpA8khsUMfXsjA2DgNiTrdzZBX0SwU CKbZW2VFTGCnFcTsPkzxa/ta3ZcSFgCTf2GYblVcx7M8IC5mJ3pFXD6YtjSvMyE6hqi1 8K51FJD/qt5PjSHJ3FUIfQWF2TpL01tuK/3WdU9PGf1pasLjMdvvHGE3QMJcsNMWlLcX 8cqQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s/VV8gMq+SwEfVdND04j3PKQUCL7nPvwuzVVhOpvlV0=; b=UTl+yysr6YSDsop9dgVWOqh+i+JhYNT43ycn5t/HDvooQP+2DZ2PTsQjQhHdDIj/xO pDwhsXVAfZPbVhNAzozNqb7oJhd1fhR+rGOPWq1YCdgsJ0+9FHxqEGfan3h4IqHUmHQG uWWYnXH1XJ8uZqEAG/UVFBFxia/fBY8Xd5dQOuAKGt6Du78JtP0a6cPLAN7qK2BzDQIN 4xv8lBozeoUnOgXCllhRbmD0REmTjF3/gGS6Fn2YQ7Stzom9ttqTMxtYxV7AoQNvcDxh 8tpHcm4q2k7/H3VqU2K1UGN9yI3AE7qyrwREJApMVve+ZqZkF35YvElSd2nz4yxyp4of cZPQ== X-Gm-Message-State: AO0yUKXER/pvb1vES0ERp5ucYSe8POQbR6Rzfnaqip1XK/jEUFdJd7LN UaqcWTS5+3Hm215JM5IdTiALSBp7QPQRkr0D X-Received: by 2002:a7b:c8ce:0:b0:3eb:248f:a140 with SMTP id f14-20020a7bc8ce000000b003eb248fa140mr8641631wml.6.1677507034094; Mon, 27 Feb 2023 06:10:34 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l21-20020a1c7915000000b003e21ba8684dsm9059689wme.26.2023.02.27.06.10.33 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 101/126] hw/ide/isa: Extract TYPE_ISA_IDE declarations to 'hw/ide/isa.h' Date: Mon, 27 Feb 2023 15:01:48 +0100 Message-Id: <20230227140213.35084-92-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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=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 "hw/ide.h" is a mixed bag of lost IDE declarations. Extract isa_ide_init() and the TYPE_ISA_IDE QOM declarations to a new "hw/ide/isa.h" header. Rename ISAIDEState::isairq as 'irqnum' to emphasize this is not a qemu_irq object but the number (index) of an ISA IRQ. Message-Id: <20230215112712.23110-5-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 1 + hw/ide/isa.c | 14 ++++++-------- include/hw/ide.h | 5 ----- include/hw/ide/isa.h | 20 ++++++++++++++++++++ 4 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 include/hw/ide/isa.h diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 7c48ba30e0..126b6c11df 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -39,6 +39,7 @@ #include "hw/pci/pci_ids.h" #include "hw/usb.h" #include "net/net.h" +#include "hw/ide/isa.h" #include "hw/ide/pci.h" #include "hw/ide/piix.h" #include "hw/irq.h" diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 8bedbd13f1..5c3e83a0fc 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -31,22 +31,20 @@ #include "qemu/module.h" #include "sysemu/dma.h" +#include "hw/ide/isa.h" #include "hw/ide/internal.h" #include "qom/object.h" /***********************************************************/ /* ISA IDE definitions */ -#define TYPE_ISA_IDE "isa-ide" -OBJECT_DECLARE_SIMPLE_TYPE(ISAIDEState, ISA_IDE) - struct ISAIDEState { ISADevice parent_obj; IDEBus bus; uint32_t iobase; uint32_t iobase2; - uint32_t isairq; + uint32_t irqnum; qemu_irq irq; }; @@ -75,13 +73,13 @@ static void isa_ide_realizefn(DeviceState *dev, Error **errp) ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); - s->irq = isa_get_irq(isadev, s->isairq); + s->irq = isa_get_irq(isadev, s->irqnum); ide_init2(&s->bus, s->irq); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); ide_register_restart_cb(&s->bus); } -ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, +ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, DriveInfo *hd0, DriveInfo *hd1) { DeviceState *dev; @@ -92,7 +90,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, dev = DEVICE(isadev); qdev_prop_set_uint32(dev, "iobase", iobase); qdev_prop_set_uint32(dev, "iobase2", iobase2); - qdev_prop_set_uint32(dev, "irq", isairq); + qdev_prop_set_uint32(dev, "irq", irqnum); isa_realize_and_unref(isadev, bus, &error_fatal); s = ISA_IDE(dev); @@ -108,7 +106,7 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, static Property isa_ide_properties[] = { DEFINE_PROP_UINT32("iobase", ISAIDEState, iobase, 0x1f0), DEFINE_PROP_UINT32("iobase2", ISAIDEState, iobase2, 0x3f6), - DEFINE_PROP_UINT32("irq", ISAIDEState, isairq, 14), + DEFINE_PROP_UINT32("irq", ISAIDEState, irqnum, 14), DEFINE_PROP_END_OF_LIST(), }; diff --git a/include/hw/ide.h b/include/hw/ide.h index 5f8c36b2aa..24a7aa2925 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -1,13 +1,8 @@ #ifndef HW_IDE_H #define HW_IDE_H -#include "hw/isa/isa.h" #include "exec/memory.h" -/* ide-isa.c */ -ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq, - DriveInfo *hd0, DriveInfo *hd1); - int ide_get_geometry(BusState *bus, int unit, int16_t *cyls, int8_t *heads, int8_t *secs); int ide_get_bios_chs_trans(BusState *bus, int unit); diff --git a/include/hw/ide/isa.h b/include/hw/ide/isa.h new file mode 100644 index 0000000000..1cd0ff1fa6 --- /dev/null +++ b/include/hw/ide/isa.h @@ -0,0 +1,20 @@ +/* + * QEMU IDE Emulation: ISA Bus support. + * + * Copyright (c) 2003 Fabrice Bellard + * Copyright (c) 2006 Openedhand Ltd. + * + * SPDX-License-Identifier: MIT + */ +#ifndef HW_IDE_ISA_H +#define HW_IDE_ISA_H + +#include "qom/object.h" + +#define TYPE_ISA_IDE "isa-ide" +OBJECT_DECLARE_SIMPLE_TYPE(ISAIDEState, ISA_IDE) + +ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, + DriveInfo *hd0, DriveInfo *hd1); + +#endif From patchwork Mon Feb 27 14:01:49 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: 657020 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373067wrb; Mon, 27 Feb 2023 06:13:00 -0800 (PST) X-Google-Smtp-Source: AK7set8V4jMz4xAZgjDMVsWMqtmtVNNffGMw5ubyhf7MUjDcRf+8CLvCisisk3t66wgpALVpY2B5 X-Received: by 2002:a05:6214:400a:b0:56e:ab31:199d with SMTP id kd10-20020a056214400a00b0056eab31199dmr40675875qvb.40.1677507179995; Mon, 27 Feb 2023 06:12:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507179; cv=none; d=google.com; s=arc-20160816; b=SqlyQwRnmeKOojvZfHLSDa3rTkqn4uP9p4I0yzTpajYzLn1MIK5p7yEGGQ8uyhKQ+q 7CIO3AOnZD2MgTIr+Z5y1/D54VUgGmRYneELdkHrbAGZLCGwIU1hPi5aLHh/t1+UBgOM 9HCHMqiXYJA5+pjfED5DiG89457y3Nyie96P9TPi5kAjgFmblrlFr5Y/qT1y5tGQKq0l Ph6K43Ls2keUZG1YDv6qd13pwbazzbcZhHUA5x+RZ82K1QqZwSossug1v94WTOc65EX3 Wajl8P4UeA/hjMAkI01i36zJ4D1KQ3OYMixbFI1jKFbnhT80mqzFfR7MQpORUg8DHZoK 3Rlg== 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:to:from :dkim-signature; bh=Ep/ieGMZNayE9X06ftc5taHWHa+LemsYZU+KXdgMGEE=; b=UbpNaZCpl7j3SOOLyV6gx5XWVgx3QYgNni6sak9yfJlTctWmHfXnQpxbZiQvhtS4Yo fYwcqQf8W1lKdcojuPjuDdP+eK5q9H7jf+4PR6HSEgQqEM5KvQa8Xq80gRFt7zvOigGJ ag2Tdo23oVx7laFtNxEPfMrnZxzXC5sUtaeZ60Q2o1tylM2tu1cn+sEe/uOVyfnstSiI g4aOZzwg5bcMdC7Pael/5jxrM96uoVwaq/o1Mj82+1JWwPmpMAUnR6sKBKrbaA1tgU6a gKOU3SmSx8P7VtHib+etLX0PTOtV8NKA3W2kOPfDbWJjFlQaiVKhl2l1lmO04QNc/LqI clww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Ih+a+h8f; 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 f22-20020a05620a409600b0073ba8c7df2fsi6485937qko.319.2023.02.27.06.12.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:12:59 -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=Ih+a+h8f; 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 1pWeF1-0000WG-OF; Mon, 27 Feb 2023 09:12:35 -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 1pWeDC-0007HG-MZ for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:47 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDB-000109-25 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:42 -0500 Received: by mail-wr1-x430.google.com with SMTP id bv17so6373855wrb.5 for ; Mon, 27 Feb 2023 06:10:40 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ep/ieGMZNayE9X06ftc5taHWHa+LemsYZU+KXdgMGEE=; b=Ih+a+h8fLWTAN6IN4/2iwsseG5+VzD6WON0t7YEExdFgR+2/4VRfmJr2nGtWb3zOQd CgFlwis06U5KyATf/notj7jeGftnoF/+nW02d/w2WxANXRIjAe8RjgfTvkQsTzfWDqka O6h+a8cYT7ze0IaVoa+n2h2FzwSihxuwjkM1RBL4evVUvw/uY5MzczwVZC8EqbqM4laC xt5lXvYud5LYPfwFjTyZwviBghvQ5oHFH+zLhzhL3dW/9GOPb7IZR5RRra+98epI2Pj3 pq+7tAfJ9d5M4ZXOzb/kT47SuIHCz+AO5sHHtnPH+cELWowkqqIU2buiUX3A8K9pPP7X 3rNw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ep/ieGMZNayE9X06ftc5taHWHa+LemsYZU+KXdgMGEE=; b=KQ9MAyz/vjNg+ueYmtg7f1XP0KmR8IUOFqtRm9Y+K/tRqgGD7f394xMZUC0xvYI26K RLQsvv/hGrsL24BqAcah61Acq31J+9mYXV7ftOVpBwS+nH3PEpni9HU1lNxGqDpKHQQM iuq+Q9alsSIQI9P4e2TngnA9sPayLiZGS1J5lUvzEAQFD3W2VbMN5xITrq+Lt7f9a3Pm Zm78XBAPPpDTMCwj7j8i78Cwdn/er+dQ7Fvocxrxaoq0aWyWx4mRax/ufUHZbnZOdGve 0SEutJ2n8XL0yyDPMIiChVn5stP2lXSVdg9ldWaPV522cwHBiGmO6xuglzwEbuYRuMlY Fupg== X-Gm-Message-State: AO0yUKV6J7+E+5CL/abmFlnkNqlWpYjpE7C3HAhQMvW5St0ov0mA1C3G Ieeh41XWrdPiCkFjK0tdk4Imh5DB1btdpokJ X-Received: by 2002:a5d:570e:0:b0:2bf:d940:29b6 with SMTP id a14-20020a5d570e000000b002bfd94029b6mr21816092wrv.54.1677507039186; Mon, 27 Feb 2023 06:10:39 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a1-20020a05600c224100b003e118684d56sm13065046wmm.45.2023.02.27.06.10.38 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:38 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 102/126] hw/ide/isa: Remove intermediate ISAIDEState::irq variable Date: Mon, 27 Feb 2023 15:01:49 +0100 Message-Id: <20230227140213.35084-93-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 The intermediate ISAIDEState::irq variable just add noise, remove it. Message-Id: <20230215112712.23110-6-philmd@linaro.org> Reviewed-by: Bernhard Beschow Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/isa.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 5c3e83a0fc..ad47e0899e 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -45,7 +45,6 @@ struct ISAIDEState { uint32_t iobase; uint32_t iobase2; uint32_t irqnum; - qemu_irq irq; }; static void isa_ide_reset(DeviceState *d) @@ -73,8 +72,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **errp) ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); - s->irq = isa_get_irq(isadev, s->irqnum); - ide_init2(&s->bus, s->irq); + ide_init2(&s->bus, isa_get_irq(isadev, s->irqnum)); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); ide_register_restart_cb(&s->bus); } From patchwork Mon Feb 27 14:01:50 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: 657058 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2378528wrb; Mon, 27 Feb 2023 06:22:59 -0800 (PST) X-Google-Smtp-Source: AK7set8ZMq9HnWdpvLrNIUoQk4UU+b0+jXzXETZqmqw00tgrfS9aSrce2cz29H2x1h394h5R/s6T X-Received: by 2002:a05:622a:64e:b0:3b8:6763:c25f with SMTP id a14-20020a05622a064e00b003b86763c25fmr28582248qtb.13.1677507779684; Mon, 27 Feb 2023 06:22:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507779; cv=none; d=google.com; s=arc-20160816; b=vtqURy3FNlqE2OC7PTjJtpkItH/WX5zDovJ9tVV2fmU/aS2zi+xXhbclTaDQOgfPzm qSUpjzOTPqmwRTiTX0TZrjOA4koi2k1WBK8pXSpnX1tbmwnTcPah89JqQJY2UOjyve7D 9xzv3bNgwTGrCjkETGP/sY15rW1Osa/oqq39g6EXRx0ypNpevnNEk2hxkH00do5cetKI enukHX37Y2IJiLKjqf+jqxPWRLkgqOTdgRaP2PHWIRBLYM+GpomSiBRvF1hORqQRMR1R Zy52tbqQkXfLnpnK+KcJ29qV+NcfMhzlJqndzjLOi8lbcHypArFkpEaNJffKsqcZwVot FSXQ== 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:to:from :dkim-signature; bh=HqwZ52hr6zNLG2cBZSpTKqrDS8szOBhqgsEVua8GwmQ=; b=M7wUjBomksa1JksPACHAe3SKT6FPdAZmT2Auls9WsnDhzdEnThay1HVY0gqLgmbh+y YJ6yUznSABN1/+cJF7kPYojzGuyNEntqVAPRh6XM8viopTHTVjMXNnBtdUMMszrektpS fjPHU8sbA5knp+BOJhm6Ncl5sO2Lou/OWUr4338VaTFIO6vbtnvJED/w1eOPxzF9C6bx 4d7It/lX/UBnePDn7HpjU4ZTriUHDCOyDCXMc0Ff8953Jv7kU4KPtiNkIy8wC2paMvab z0E4/5S2ZgIGb7fdmQ9Zqjofb4gGhVpinfa6arbcPCr+itCLCRKo/PlqZw+/J/Lo+6pt /2vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K6KBh4ls; 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 u14-20020a05620a454e00b00705dcaac535si7387111qkp.187.2023.02.27.06.22.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:22:59 -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=K6KBh4ls; 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 1pWeEH-0000PQ-D9; Mon, 27 Feb 2023 09:11: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 ) id 1pWeDH-0007Kk-SL for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:47 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDF-00011p-UD for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:47 -0500 Received: by mail-wr1-x435.google.com with SMTP id j2so6350683wrh.9 for ; Mon, 27 Feb 2023 06:10:45 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HqwZ52hr6zNLG2cBZSpTKqrDS8szOBhqgsEVua8GwmQ=; b=K6KBh4lsyNmiJU94VCSXIvfEobVCBGUhSCKD1zPL56uiCZDkspXZfFVFyC8ODYjj4m Fs63H4iepJltytQB9C6+080FlinLj1q9bWGIdB435vyl25RldEdv5n1OzIgOEUSYUSu9 zQAU++l5HcKDpbnFawYB16uzT2jZGnbjh/+xZfPT79RHGb/WosXtZ8oEgwIpHv1Y4Fw8 JreslamcVNJSfh/FhCGm+zKm5Bzyq/OHUvl0Ykay45vkM705AkIhzSyu7A90KLTKJQ6R nDkC9lx6AULcTmrcsFzcyznRSVZ/Z078k8oRqQqT9EmZ8sUKMyZ39MsFXV0H2emtfb9z oZ5w== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HqwZ52hr6zNLG2cBZSpTKqrDS8szOBhqgsEVua8GwmQ=; b=Mqf4E3lGcInOf7+rdmcVLHOhpxPgbZuvLOIECsC//nZ1o7OFUZD4hE6IIBcd1OjEgF fVfQwTVwmNAjJRW/wkrOwt551I9abV7anstu7MlWYAZS4hp5Xt+ZKuHfsrvD/oQTJvQG TqfR6xlTry4RthGPj7kddqEyWhMUg90XbEJWNhn96HhKAs3sA7yBqEr2HzOGWkTFn4nK CLU8UG0Ner7z2F1tIExcPVWU4gZwvEwnHAWeW4R/VrmhXrfcPINWZzclrtNsx7QKLGCA zw/KGH7iQc7C17xNraUczjdsm4ZuZf1fEIZWBS9IbZSJkNHABRzMjWGFGxJ5qR75MsnG +0Gg== X-Gm-Message-State: AO0yUKUlF5IS4OCE/dk0EtK8LC6sVn8B6cKwVTg15wJVt66Srd+s9ZP/ C0RyufTlpWa8pn4yGGxg0ITYdeuvurKqVes7 X-Received: by 2002:a5d:4e08:0:b0:2cb:76d4:42ea with SMTP id p8-20020a5d4e08000000b002cb76d442eamr3658271wrt.36.1677507044482; Mon, 27 Feb 2023 06:10:44 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l3-20020a05600012c300b002c5694aef92sm7166141wrx.21.2023.02.27.06.10.43 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:44 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 103/126] hw/ide/atapi: Restrict 'scsi/constants.h' inclusion Date: Mon, 27 Feb 2023 15:01:50 +0100 Message-Id: <20230227140213.35084-94-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.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=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 Only atapi.c requires the SCSI constants. No need to include it in all files including "hw/ide/internal.h". Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-7-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- hw/ide/atapi.c | 1 + include/hw/ide/internal.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 0a9aa6f009..0c36bd0afd 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -27,6 +27,7 @@ #include "hw/ide/internal.h" #include "hw/scsi/scsi.h" #include "sysemu/block-backend.h" +#include "scsi/constants.h" #include "trace.h" #define ATAPI_SECTOR_BITS (2 + BDRV_SECTOR_BITS) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index fc0aa81a88..29a8e79817 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -13,7 +13,6 @@ #include "hw/isa/isa.h" #include "sysemu/dma.h" #include "hw/block/block.h" -#include "scsi/constants.h" /* debug IDE devices */ #define USE_DMA_CDROM From patchwork Mon Feb 27 14:01:51 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: 657110 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2387706wrb; Mon, 27 Feb 2023 06:41:43 -0800 (PST) X-Google-Smtp-Source: AK7set+wvFTH5ydXk/yJWx0OdBiN8w8IYhCs79c54T7nZCHlAHPpPDqhAuQtx5zJu8LKTEd7bnIh X-Received: by 2002:a05:622a:488:b0:3b6:3b60:e0 with SMTP id p8-20020a05622a048800b003b63b6000e0mr41151008qtx.31.1677508903682; Mon, 27 Feb 2023 06:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508903; cv=none; d=google.com; s=arc-20160816; b=pU7aa9hsOE33uFzlhXINPhTlA4BHTTa7lHr8qT9tBL7ma8LsckCvTLVaGNCZH392jg XyWZTERrD0GH33MPvQ+vOsxovM5SryiRKQyIt4gYcB00Q2vTfyffQ+WhB+9s06+v7jCv yYNmx/0OuS1qhTdzmHZVOWE9IR4wEB8LnKW8A9RvjuVeJ+UxoLiRfDudz/mUtEmfxACl yK5veTdX+T/Hh6ym51+LSokmyStZqu6RW5BJdIXAFOBjTHhElzD1gE/Ov/yWc1mf6nug hcATVl/W0VRTWUQINOqlpr9CPUb5ba72NXrNhLb0STsRbRH/nwYGFG+/epkS2GOq9kxz yDsw== 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:to:from :dkim-signature; bh=CIcWv0TaZDoMbaIrFqE7v6/az4WY6LGOfyL+qqwxUsI=; b=ae2SE7WQsg6a5GqMXP1xsD5oV2p50Ib3g0W7/v4+DT5D6AtDsjhibOwzpmIy3lH2G+ 33X1ZuE3DHQgDJSVfQxuuBpTe2LFtmAbCxN8oXGmY1efAiS16mtPpSqrsS1TnrfTe1Df NiFJsLJlgpUJtFNgtvNwib+JpqBelYfchxPvm5SGd3mSeLSYuhCP2KHZpakhSSstIpqJ Q256aOiuNvyUWSib5W4+XM8VSCIQ6BYMcvbt4pF2ja+VpWry/cdcAmmfyfjV4mgP5CE2 YjvLg6EGsQmpofEzxkGoWZNV34eRHBoDYqG2eIpEPp3cxPcDPV1/cpFIMbc7aqxpyt23 sy4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gQbYxqQH; 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 v9-20020ac85789000000b003b81a2a75easi6923730qta.645.2023.02.27.06.41.43 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:41:43 -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=gQbYxqQH; 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 1pWeFO-0001tg-8r; Mon, 27 Feb 2023 09:12:58 -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 1pWeDN-0007v1-1g for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:56 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDL-0000uG-5Q for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:52 -0500 Received: by mail-wm1-x334.google.com with SMTP id j19-20020a05600c191300b003eb3e1eb0caso2618385wmq.1 for ; Mon, 27 Feb 2023 06:10:50 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=CIcWv0TaZDoMbaIrFqE7v6/az4WY6LGOfyL+qqwxUsI=; b=gQbYxqQHzZdRr7ksqnU8yaLeh9BVZElEhM84a/lHzvAf8Yx8YH55O1si77K/DokadF HFBojcfGdlYVFy1GMnOWZsFaZv2pI5SboLJbKPaPYup7u2knkxnRndbUqXHFLmMxib7X 0OTYwP0mkVWYY4lDTtJx1Or40UiUNbM1mnsfYpuo6fmilhPqwANntQCT08puit8tBGlV WGMqCn0qoAcjL6h6PoGYUQBdrvmDb68Q1Vi2cCWIPk00RR351Fap+5PoZ6WP6LV2k6cP tG5WjNtz8r7mrzXu/dNSjlhPLNuHaRqSOrOwj49N+FdpVKbvBNQQ3dJaYD25bnBHEorj fQ9w== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CIcWv0TaZDoMbaIrFqE7v6/az4WY6LGOfyL+qqwxUsI=; b=IzAduyFwZLwxs8qQNgrUgBCmZH84OWwuxB4UHIQNamIeEWQ4fe2u2XEsHUru8FzM9y W+v/WowmELY/5irRhwcAQPG0zvIypkPpfEYXs5IK5uQqiC7T7zVTmyL9NRuvShub9ygG LelaRO9GUHw8+fT/2K1NbOJFbJML1ogp7zRy45nIRLQ4YQ9l+tIRfqmEuw0wjqUUDBfL lRysOX40ot5mMEvaAXtX6E0CLaWSAstmCcO0GLnxyVvkMdyl2gkpP0O3X1viGiJ0F6je Qx/wd0KFOa8lG3LuGGN7fqaWg4BVQtY3JJE9J3uxR0SpR8GntCMB1lj747VivygDuHBt ilkQ== X-Gm-Message-State: AO0yUKWLoW00eMAo+2k4DyWtRsa0+wsQGgzsFhKxGgmVun8lNWy77cD6 HZwwW4YStsUoxm5gQCels/cEm04NXZbgxFgv X-Received: by 2002:a05:600c:30d2:b0:3eb:3692:644e with SMTP id h18-20020a05600c30d200b003eb3692644emr5282436wmn.33.1677507050231; Mon, 27 Feb 2023 06:10:50 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i13-20020a1c540d000000b003db06224953sm9499129wmb.41.2023.02.27.06.10.49 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:49 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 104/126] hw/ide: Remove unused 'qapi/qapi-types-run-state.h' Date: Mon, 27 Feb 2023 15:01:51 +0100 Message-Id: <20230227140213.35084-95-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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=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 Missed in commit d7458e7754 ("hw/ide/internal: Remove unused DMARestartFunc typedef") which removed the single use of RunState. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-8-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- include/hw/ide/internal.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 29a8e79817..e6deb1c5dc 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -7,7 +7,6 @@ * non-internal declarations are in hw/ide.h */ -#include "qapi/qapi-types-run-state.h" #include "hw/ide.h" #include "hw/irq.h" #include "hw/isa/isa.h" From patchwork Mon Feb 27 14:01:52 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: 657032 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2374046wrb; Mon, 27 Feb 2023 06:14:41 -0800 (PST) X-Google-Smtp-Source: AK7set+E3oF/rWD4ZSAWmNMbDFTWOkstMSe9J/jwdUXVx2ieq4a5rYhShTqpXtkL6A2e00xYL+qh X-Received: by 2002:a05:622a:2d3:b0:3bf:b1d0:ab88 with SMTP id a19-20020a05622a02d300b003bfb1d0ab88mr26498832qtx.5.1677507280993; Mon, 27 Feb 2023 06:14:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507280; cv=none; d=google.com; s=arc-20160816; b=dnb2SSRzkEHl40/Xpt4CCp3gYoVZtAR/A6olWeyP7MW2G81m878KW7ACth4dLkusRc uwoY89CNNyCHfpSUqI4j5FxepjsPz+ZvQUCUejA3aJ/0dFD4UZDVUf0ppUCL8Eq7kRP5 Kr8brNResJ+76qoveSBMXAakkYPUb6uEMSZjYMhEdvnRjzqjEHZ9IYjAOYcMJjBynD/D 0uQzuMv0AoHoMYwQXzpNJ2PPa1wqVZAVlLhFwBdVBBoAlZ7zMsCLTUQmU7nI7WzEMX56 4e6OkSKY4CHUsEwRpmRl2yklDTUdDTB2F4S2oZQtNEBOLCn1O/iy6Cy+zJRpuQAI7yYh huPw== 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:to:from :dkim-signature; bh=kvJnfasId6KgbNDIaJsqs/RNAtBPzSC/BmR0A+kAo0c=; b=rJK1vZ52bP5bkhhM72QtoqCSumfX2KtpjppEfmIVlGNOrN+7HscYO2sc6fBgvTd/dP BJz365irNif75r8b8C6SOoE2wheQWRU37dkGNRsWxzEPubT0hDKKlrsdVXnuOJgnTDNi L+TCEOn6Ywe/yAN42nvQifc696KvNdTja1yu6i1pJq/Bn8C/1dbQFM9FSIAFo4MPDhbx 164SVE+ETH4zGTCDMdQJTK80nzLput2BMmpOuXFYoiHI2wdr7o53UryRCdy2Za1tTAaU OFsfraHJK6PXCKVb07FQctgoi9q5oQM3cL7U2Wdxws/GvmwiWBLDR6ywqIW0RbRXiYLQ p+oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iK88KVBr; 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 f6-20020ac87f06000000b003b2d4a3fe7esi6325906qtk.455.2023.02.27.06.14.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:14:40 -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=iK88KVBr; 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 1pWeFF-00015L-IY; Mon, 27 Feb 2023 09:12: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 ) id 1pWeDa-0008G5-Qa for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:12 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDR-00012y-1m for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:10:59 -0500 Received: by mail-wr1-x42a.google.com with SMTP id l1so3320698wry.12 for ; Mon, 27 Feb 2023 06:10:56 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kvJnfasId6KgbNDIaJsqs/RNAtBPzSC/BmR0A+kAo0c=; b=iK88KVBrdDd2Pj5unro9BTC4Iuai0TrZM3xbOOIDa5LD7IzNQrhxAw1TUlXLiOh3Jv YE/bsSAR8F0ahhXjlQhGmXVtuMxIsi3ZIJ11hylv+31V6BWxQ0kpiNaqZO8XGrjn0YQT x8FGQBqip+8birnGjERQMXfjOZCp2k+9ntFaedy6kBpp80/1OSO0Xvf5uMsxDwFwOFj6 IK5NAf8oTeQhyFs6rizPXLulWnoaztbL5yUSZ61MhQrTBD+K/zaaKELYweipNA77Trrl NFwtkNkD50GOp2JYAQaB3PHRHfDO70ZykYmF5l6Or+UMcmUOajID/Jx39ZkHKrg/yu40 yVgw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kvJnfasId6KgbNDIaJsqs/RNAtBPzSC/BmR0A+kAo0c=; b=TH0ZNBzjLxhxz9DubqCQ4f7/IElBrbjLVYe/YvbkKD1JBZZj4EQeuVhl5oXlwp1d3u xITNsWeeZSLu+OHJvNttAAg/rUecEHXTon0FNiG9oM+SNO7oLcMoDQDIvcWGlSDhj/B9 Wg4ElHyUmJG1Wcj9aafyPzaztT5ObDGTPOQ7aEkVgohnvOarNpXmMKUSsHBx+u23oGzF m4BnbloSRTKFc6kd/lZIJTHctP0j4KPKoaKZHiPt05FHlb3AM1moOVr920AlUzzCsZrE 51xziywO+2hdVtg6j9pEsZoBR+zbLG5QerJa1xffzSYKS7YZG+b5x+DGl+G7XnN85IFV VJzw== X-Gm-Message-State: AO0yUKVNNaQROqMLhq5Tp05LHi6azlahECad6YlKRhGigNxeUG0bfya3 1TMNWpa0U2JFf15L5kBomH0T+Eyit2Cacbc1 X-Received: by 2002:a5d:6d0a:0:b0:2c5:5938:e6d6 with SMTP id e10-20020a5d6d0a000000b002c55938e6d6mr7691470wrq.35.1677507055310; Mon, 27 Feb 2023 06:10:55 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id a13-20020a056000100d00b002c6e84cadcbsm7299747wrx.72.2023.02.27.06.10.54 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:10:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 105/126] hw/ide: Include 'exec/ioport.h' instead of 'hw/isa/isa.h' Date: Mon, 27 Feb 2023 15:01:52 +0100 Message-Id: <20230227140213.35084-96-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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=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 The IDEBus structure has PortioList fields, so we need its declarations from "exec/ioport.h". "hw/isa/isa.h" is not required. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-9-philmd@linaro.org> Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- include/hw/ide/internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index e6deb1c5dc..84d3722d67 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -9,9 +9,9 @@ #include "hw/ide.h" #include "hw/irq.h" -#include "hw/isa/isa.h" #include "sysemu/dma.h" #include "hw/block/block.h" +#include "exec/ioport.h" /* debug IDE devices */ #define USE_DMA_CDROM From patchwork Mon Feb 27 14:01:53 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: 657053 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2378382wrb; Mon, 27 Feb 2023 06:22:46 -0800 (PST) X-Google-Smtp-Source: AK7set913Te9eAQwaWmas2ekQ1KUThut/wM1xK6yyeEWZy+nXZSUqO8lfGLUMdE0uMlrGqYXkwcj X-Received: by 2002:a05:6214:20c4:b0:56e:aa11:daa3 with SMTP id 4-20020a05621420c400b0056eaa11daa3mr57948693qve.14.1677507766481; Mon, 27 Feb 2023 06:22:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507766; cv=none; d=google.com; s=arc-20160816; b=BoWFqIO9sbgNK22I1VON5X8LuDe7CaUXVDPDkmrh5dnBmjZcPgV/EnqCq5Cfa9HbVH fbE7gXZI+fXzfevYoWJRPa4J2aJrEylGvEY7dgxl2ux+/tzz70RNKZYYxJp96+531R/J 1k4xDEHzyYHE76ndtpJdMAlPnkhIUd+ManHn4TPa13kcaac7ddr716guqllDogyONVOw Fv5Y4D/ymVzWKTTdlhqy5l3emKEGsBV3lF+VahuunbL1ybCGnsRtBmUqFGTX0ssuuVlw pYHsDQsqxK0DKVn/Ue658QX+DQolH3emcE9JTfwswRB7cClX2ZEIwVQqqJE051njEgkR uMCg== 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:to:from :dkim-signature; bh=9BKlSKMnDRINkghzZqZAhHYmo0aDImrj9cOx+uErDGk=; b=mkfojTYa3tcIdK+BwWWm/hWbW22IwgGFzIt2YpTG3pw6wVVksbnd1CwyvOO8Bp8bYC BbLtpwGLRBQ0GPx3JyuFhu3Pe5gJ3p+ED/MxgxoOxisb4mQ3ZyLk3Mbgy3yqJPYuqFJV j8MFvYL4MMS5arC4s0s7WbhMeNySgGZ1QGLhoK1h53bqODfSzWLTcX34ukNlt5KUHO33 9OOKrJyKNRxedABPxDlW0OeKgXhizV+G0VgAYcS35ZNVnGrVRRitstKAQvMFkxGUPaEz F+fdahznmyGc+Hr83A+zEgVMacMqgKOVoeYFcwnPwTQddOX22f8IphnIbJfw1Ee/yxDF LtxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JciwVA5c; 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 d205-20020a3768d6000000b0074283f7d02fsi5502613qkc.733.2023.02.27.06.22.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:22:46 -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=JciwVA5c; 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 1pWeFJ-0001Z2-LI; Mon, 27 Feb 2023 09:12: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 1pWeDc-0008GB-7R for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:13 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDZ-000109-0X for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:07 -0500 Received: by mail-wr1-x430.google.com with SMTP id bv17so6375140wrb.5 for ; Mon, 27 Feb 2023 06:11:01 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=9BKlSKMnDRINkghzZqZAhHYmo0aDImrj9cOx+uErDGk=; b=JciwVA5cxvJm3qxKhgzMTvK0pqS+IqbvGL4S+MfFcbxrW4N2HEbApjSS+YHzYPmg4P KrFxeSayGAH/jSfvSNB1zuJzXwUaDngPBEvIikXm8ksDEPOpCGIrcXgS/own/BpE2pUW 9tlVja5Uyw3uY2/5a5fo0Yt3fnLk8k8xADB+w2qbcN14FhtucM/ZGz7JQ485o9m3gHSd Qyr5x04rMw1TxlpZp0AFFB78Ri8aeejXyL5fmaq4thI5rEnBDIlpzEzRiowNaEXG0UZu ci+4cuAjO6Wm9I2b8UILMe884r9s3aR+Yum7EBDEnQg+6dU7kXoSH///s8r+SvItSddO yrag== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9BKlSKMnDRINkghzZqZAhHYmo0aDImrj9cOx+uErDGk=; b=Zg7CjN7Kgh2v456FIsxck/AUvfXLZyNZByMyQifKQgiuQrWRY9B6FAE+stqKau/G0b gb2D1fjXHFqNn0Urwv2Pzqwb6Bocd1EAL33JqjAfsxZwGEQ0RWqmWn8iSDuhkS1cl2Ux mUGT3eZMaHHoRTdRTC89Q+9vwaymFILWhnj725LzXf02cc4geNunAELOb4iNNRCmTmkL RGDA4qIvmOn7hl0+GrIBvIxe4Zur7yIPa8qvWVjuLXqiJ6sEEN1JW/j9dAZUIfiyEazy G+nSRmyChQo1p/82zKCFkf9b0gVGmhR1S4j5L5hA53GgNgg/FEWjFt0xAoFDzgsr98qe /WhA== X-Gm-Message-State: AO0yUKVYZFUxnX63wrBc7i5+VfTxXsjCeWKwqBwuUjHcfKsN6EfbL/vU wfoY9GM16ieh2RU7bNbZbrd482YFGOC/cKfz X-Received: by 2002:a5d:408e:0:b0:2c7:deb:c61 with SMTP id o14-20020a5d408e000000b002c70deb0c61mr13826040wrp.39.1677507060733; Mon, 27 Feb 2023 06:11:00 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id y13-20020adfe6cd000000b002c8476dde7asm7188020wrm.114.2023.02.27.06.10.59 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:00 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 106/126] hw/ide: Un-inline ide_set_irq() Date: Mon, 27 Feb 2023 15:01:53 +0100 Message-Id: <20230227140213.35084-97-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 Only include "hw/irq.h" where appropriate. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-10-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 1 + hw/ide/core.c | 8 ++++++++ hw/ide/ich.c | 1 + hw/ide/macio.c | 1 + hw/ide/microdrive.c | 1 + hw/ide/pci.c | 1 + hw/misc/macio/gpio.c | 1 + hw/sparc64/sun4u.c | 1 + include/hw/ide/internal.h | 9 +-------- 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 595a96203f..08c7ae6e3c 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -22,6 +22,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/pci/msi.h" #include "hw/pci/pci.h" #include "hw/qdev-properties.h" diff --git a/hw/ide/core.c b/hw/ide/core.c index 5d1039378f..1473b6057f 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -24,6 +24,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/isa/isa.h" #include "migration/vmstate.h" #include "qemu/error-report.h" @@ -2782,6 +2783,13 @@ void ide_init2(IDEBus *bus, qemu_irq irq) bus->dma = &ide_dma_nop; } +void ide_set_irq(IDEBus *bus) +{ + if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) { + qemu_irq_raise(bus->irq); + } +} + void ide_exit(IDEState *s) { timer_free(s->sector_write_timer); diff --git a/hw/ide/ich.c b/hw/ide/ich.c index 1007a51fcb..d61faab532 100644 --- a/hw/ide/ich.c +++ b/hw/ide/ich.c @@ -61,6 +61,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/pci/msi.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" diff --git a/hw/ide/macio.c b/hw/ide/macio.c index e604466acb..15fd934831 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -24,6 +24,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/ppc/mac_dbdma.h" #include "hw/qdev-properties.h" #include "migration/vmstate.h" diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 56c5be3655..b9822b939b 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -29,6 +29,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "sysemu/dma.h" +#include "hw/irq.h" #include "hw/ide/internal.h" #include "qom/object.h" diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 84ba733548..ae638dee0d 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -24,6 +24,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/pci/pci.h" #include "migration/vmstate.h" #include "sysemu/dma.h" diff --git a/hw/misc/macio/gpio.c b/hw/misc/macio/gpio.c index c8ac5633b2..4deb330471 100644 --- a/hw/misc/macio/gpio.c +++ b/hw/misc/macio/gpio.c @@ -28,6 +28,7 @@ #include "migration/vmstate.h" #include "hw/misc/macio/macio.h" #include "hw/misc/macio/gpio.h" +#include "hw/irq.h" #include "hw/nmi.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c index 8a56ba9f98..a25e951f9d 100644 --- a/hw/sparc64/sun4u.c +++ b/hw/sparc64/sun4u.c @@ -28,6 +28,7 @@ #include "qapi/error.h" #include "qemu/datadir.h" #include "cpu.h" +#include "hw/irq.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bridge.h" #include "hw/pci/pci_bus.h" diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 84d3722d67..57a6278327 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -8,7 +8,6 @@ */ #include "hw/ide.h" -#include "hw/irq.h" #include "sysemu/dma.h" #include "hw/block/block.h" #include "exec/ioport.h" @@ -572,13 +571,6 @@ static inline IDEState *idebus_active_if(IDEBus *bus) return bus->ifs + bus->unit; } -static inline void ide_set_irq(IDEBus *bus) -{ - if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) { - qemu_irq_raise(bus->irq); - } -} - /* hw/ide/core.c */ extern const VMStateDescription vmstate_ide_bus; @@ -627,6 +619,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind kind, void ide_init2(IDEBus *bus, qemu_irq irq); void ide_exit(IDEState *s); int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); +void ide_set_irq(IDEBus *bus); void ide_register_restart_cb(IDEBus *bus); void ide_exec_cmd(IDEBus *bus, uint32_t val); From patchwork Mon Feb 27 14:01:54 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: 657051 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2377713wrb; Mon, 27 Feb 2023 06:21:21 -0800 (PST) X-Google-Smtp-Source: AK7set9Yzs7S/367bCWuvzNa1WHOa1h9mxtg5v44mXKoti2qnXwuDsxAwqO6D+vpcE03vts0Ix8d X-Received: by 2002:ad4:5be7:0:b0:570:ae8a:f23 with SMTP id k7-20020ad45be7000000b00570ae8a0f23mr51499801qvc.24.1677507681162; Mon, 27 Feb 2023 06:21:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507681; cv=none; d=google.com; s=arc-20160816; b=mjiMmpFwARYigVf1HwXOkTQovNEAkeX+iKvyf8LUoP8D3MVC2/iGVzrOUvQMFCuxsZ uIkXef6JEDyEn++SxIcUfB6Qm+YDoA0S1jx+9rGc0RIldcc9OWkamuWt3Xea9nr6hvtm Hsr4e34KcrEN8vKrDRAOoTpzhl5f7Fw54IjfriaDtUbK+UC2sk1WtBmQBc/YQW/gudem 3/GvH5wbTZo3/azzVaXG8El9PzFj1DH4Ocbug9+BsVqoSmaRBpfoiE9Lat/XWzdKelW1 5VnfpTARwb6912Lu7Gna30d3dUQWWJljLlNvKiCz4bDuGOtI+/njBR3lgGtLeaQervNc ovqg== 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:to:from :dkim-signature; bh=Oa8DUbbs4flxv8hF+ii4Ao3WFQ6UXZovZjAILPYF/Wk=; b=IRjJ905C9eDiO3zJzszCuVF+GKni8z9xwdINRnD4gyn76KNDUUmuBhfSw6sTNtf7EJ 6/QJ46wHJMr89z1O7JVmzvYmlH/THnPdzfBjrG7V1TiXg87iPiINc35JL1/ZIATYdprR tc2O3R+hht254/ouffR1t8FdLMUWA7ddtHd0K5mIMkFAn24t9gfjkVFeSkLh91Ek71EA ZeyQkZTDgXDJ/Sc5gOUf780EZf6FbeaTl43J0kq27AenMJfw9wjkWqaTnD/wqhv6u2eV mX8H38AP4zeQPAickzmYsMuXSC+cxKyt3+UX2RvICS5Jcbo0uYF3RLtYSO474Vi/A1YI vFsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=G59YROJA; 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 u14-20020a05620a454e00b0073b83b0eccbsi7143631qkp.296.2023.02.27.06.21.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:21:21 -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=G59YROJA; 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 1pWeFG-0001GE-9Y; Mon, 27 Feb 2023 09:12:51 -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 1pWeDd-0008LB-Bk for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:13 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDb-00012y-5Z for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:08 -0500 Received: by mail-wr1-x42a.google.com with SMTP id l1so3321344wry.12 for ; Mon, 27 Feb 2023 06:11:06 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Oa8DUbbs4flxv8hF+ii4Ao3WFQ6UXZovZjAILPYF/Wk=; b=G59YROJAEl6fqKLAyMqTfkU/mqUYPsICARkuBNn+7oRK2+KQEqRxCnwH7w0BSAClEd E8eTWbTtzD4VzVmqMDfehfQtN/X6ZLDULkPcprUJ9Nb7ZJgNBLG+j1KM2gatm61BluA0 o7eR1EXFNndTGWoG2Wr4e+8B+R4Bden921bdZgO9P44040W3SreKXafJDpYTlsJp7bbb lSl/CdIFrGgeNKoKyr4tm1IxkhmOVPlcS/t3Nway6jaFpiYBt6T6Rnvk5yLUJlmIp6Fb NjlxDObl6fAT0bJUilJPKi4CCY2H0pydb5lssp2Vd+ptFzu101S2pQV+cncABjxJQqui 7QoA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Oa8DUbbs4flxv8hF+ii4Ao3WFQ6UXZovZjAILPYF/Wk=; b=bGHGa6RFdVhkZx7NBtsg32ALSL5g14vfEd1nPGLdWpkCk2LGCNFFCg0RCygynElaHf fV71MXjF63BcII10CEYrcjoztZ/mI882G3uLiF/CDnRMpgTohCjU/xaBnrM6I5drQuAX Q7Ti3ExAXlNKy2Es5Um5JOWNyBFDCVI4zG+VjaDbOr66MBBo4VcHnDKdZYh8ruWDdqcb i3NiJPsEnNNEcswWY0+ISbD9dIACEBGsFppzkkFgbWPGi5P/CTSji+GyNrTJr0DAUX0k 3DQBmFgyRlFsZxeu9kPM2wPFU+wALYxJ54p87vgu9VNa8R+6QpQC2X+WP1Vt4FYxW3if 2CnA== X-Gm-Message-State: AO0yUKWjYe3oHsem+w7RdglOsIruQra6VKU8xfRYr9cAlcM7HW2T+2u5 zZ1qjegYRW47iXPfA3cq2yNmfGZunSngUMwZ X-Received: by 2002:a5d:6982:0:b0:2c8:bf89:39be with SMTP id g2-20020a5d6982000000b002c8bf8939bemr6264295wru.7.1677507066012; Mon, 27 Feb 2023 06:11:06 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id p10-20020a5d458a000000b002c559def236sm7178406wrq.57.2023.02.27.06.11.05 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 107/126] hw/ide: Rename ide_set_irq() -> ide_bus_set_irq() Date: Mon, 27 Feb 2023 15:01:54 +0100 Message-Id: <20230227140213.35084-98-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=philmd@linaro.org; helo=mail-wr1-x42a.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=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 ide_set_irq() operates on a IDEBus; rename it as ide_bus_set_irq() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_set_irq/ide_bus_set_irq/g' \ $(git grep -l ide_set_irq) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-11-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/atapi.c | 12 +++++------ hw/ide/core.c | 44 +++++++++++++++++++-------------------- hw/ide/macio.c | 2 +- include/hw/ide/internal.h | 2 +- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 0c36bd0afd..dcc39df9a4 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -179,7 +179,7 @@ void ide_atapi_cmd_ok(IDEState *s) s->status = READY_STAT | SEEK_STAT; s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD; ide_transfer_stop(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } void ide_atapi_cmd_error(IDEState *s, int sense_key, int asc) @@ -191,7 +191,7 @@ void ide_atapi_cmd_error(IDEState *s, int sense_key, int asc) s->sense_key = sense_key; s->asc = asc; ide_transfer_stop(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } void ide_atapi_io_error(IDEState *s, int ret) @@ -254,7 +254,7 @@ void ide_atapi_cmd_reply_end(IDEState *s) } else { /* a new transfer is needed */ s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); byte_count_limit = atapi_byte_count_limit(s); trace_ide_atapi_cmd_reply_end_bcl(s, byte_count_limit); size = s->packet_transfer_size; @@ -294,7 +294,7 @@ void ide_atapi_cmd_reply_end(IDEState *s) /* end of transfer */ trace_ide_atapi_cmd_reply_end_eot(s, s->status); ide_atapi_cmd_ok(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } /* send a reply of 'size' bytes in s->io_buffer to an ATAPI command */ @@ -340,7 +340,7 @@ static void ide_atapi_cmd_check_status(IDEState *s) s->error = MC_ERR | (UNIT_ATTENTION << 4); s->status = ERR_STAT; s->nsector = 0; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } /* ATAPI DMA support */ @@ -384,7 +384,7 @@ static void ide_atapi_cmd_read_dma_cb(void *opaque, int ret) if (s->packet_transfer_size <= 0) { s->status = READY_STAT | SEEK_STAT; s->nsector = (s->nsector & ~7) | ATAPI_INT_REASON_IO | ATAPI_INT_REASON_CD; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); goto eot; } diff --git a/hw/ide/core.c b/hw/ide/core.c index 1473b6057f..117e26cef1 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -654,7 +654,7 @@ void ide_set_sector(IDEState *s, int64_t sector_num) static void ide_rw_error(IDEState *s) { ide_abort_command(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } static void ide_buffered_readv_cb(void *opaque, int ret) @@ -773,7 +773,7 @@ static void ide_sector_read_cb(void *opaque, int ret) s->nsector -= n; /* Allow the guest to read the io_buffer */ ide_transfer_start(s, s->io_buffer, n * BDRV_SECTOR_SIZE, ide_sector_read); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } static void ide_sector_read(IDEState *s) @@ -837,7 +837,7 @@ void ide_dma_error(IDEState *s) dma_buf_commit(s, 0); ide_abort_command(s); ide_set_inactive(s, false); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } int ide_handle_rw_error(IDEState *s, int error, int op) @@ -907,7 +907,7 @@ static void ide_dma_cb(void *opaque, int ret) /* end of transfer ? */ if (s->nsector == 0) { s->status = READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); goto eot; } @@ -1007,7 +1007,7 @@ static void ide_sector_write(IDEState *s); static void ide_sector_write_timer_cb(void *opaque) { IDEState *s = opaque; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } static void ide_sector_write_cb(void *opaque, int ret) @@ -1055,7 +1055,7 @@ static void ide_sector_write_cb(void *opaque, int ret) timer_mod(s->sector_write_timer, qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) + (NANOSECONDS_PER_SECOND / 1000)); } else { - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } } @@ -1106,7 +1106,7 @@ static void ide_flush_cb(void *opaque, int ret) } s->status = READY_STAT | SEEK_STAT; ide_cmd_done(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } static void ide_flush_cache(IDEState *s) @@ -1195,7 +1195,7 @@ static void ide_cd_change_cb(void *opaque, bool load, Error **errp) s->cdrom_changed = 1; s->events.new_media = true; s->events.eject_request = false; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } static void ide_cd_eject_request_cb(void *opaque, bool force) @@ -1206,7 +1206,7 @@ static void ide_cd_eject_request_cb(void *opaque, bool force) if (force) { s->tray_locked = false; } - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } static void ide_cmd_lba48_transform(IDEState *s, int lba48) @@ -1440,7 +1440,7 @@ static bool cmd_identify(IDEState *s, uint8_t cmd) } s->status = READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 512, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } else { if (s->drive_kind == IDE_CD) { @@ -1630,7 +1630,7 @@ static bool cmd_specify(IDEState *s, uint8_t cmd) if (s->blk && s->drive_kind != IDE_CD) { s->heads = (s->select & (ATA_DEV_HS)) + 1; s->sectors = s->nsector; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } else { ide_abort_command(s); } @@ -1731,7 +1731,7 @@ static bool cmd_identify_packet(IDEState *s, uint8_t cmd) ide_atapi_identify(s); s->status = READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 512, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } @@ -1756,7 +1756,7 @@ static bool cmd_exec_dev_diagnostic(IDEState *s, uint8_t cmd) * They are part of the regular output (this is why ERR_STAT isn't set) * Device 0 passed, Device 1 passed or not present. */ s->error = 0x01; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } return false; @@ -1788,7 +1788,7 @@ static bool cmd_cfa_req_ext_error_code(IDEState *s, uint8_t cmd) { s->error = 0x09; /* miscellaneous error */ s->status = READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } @@ -1827,7 +1827,7 @@ static bool cmd_cfa_translate_sector(IDEState *s, uint8_t cmd) s->io_buffer[0x1a] = 0x01; /* Hot count */ ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } @@ -1851,7 +1851,7 @@ static bool cmd_cfa_access_metadata_storage(IDEState *s, uint8_t cmd) ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); s->status = 0x00; /* NOTE: READY is _not_ set */ - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; } @@ -1934,7 +1934,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd) s->status = READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; case SMART_READ_DATA: @@ -1975,7 +1975,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd) s->status = READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; case SMART_READ_LOG: @@ -2014,7 +2014,7 @@ static bool cmd_smart(IDEState *s, uint8_t cmd) } s->status = READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 0x200, ide_transfer_stop); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return false; case SMART_EXECUTE_OFFLINE: @@ -2146,7 +2146,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) if (!ide_cmd_permitted(s, val)) { ide_abort_command(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); return; } @@ -2164,7 +2164,7 @@ void ide_exec_cmd(IDEBus *bus, uint32_t val) } ide_cmd_done(s); - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); } } @@ -2783,7 +2783,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq) bus->dma = &ide_dma_nop; } -void ide_set_irq(IDEBus *bus) +void ide_bus_set_irq(IDEBus *bus) { if (!(bus->cmd & IDE_CTRL_DISABLE_IRQ)) { qemu_irq_raise(bus->irq); diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 15fd934831..24fb7a3f9d 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -160,7 +160,7 @@ static void pmac_ide_transfer_cb(void *opaque, int ret) MACIO_DPRINTF("End of IDE transfer\n"); qemu_sglist_destroy(&s->sg); s->status = READY_STAT | SEEK_STAT; - ide_set_irq(s->bus); + ide_bus_set_irq(s->bus); m->dma_active = false; goto done; } diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 57a6278327..7b4b71d0b0 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -619,7 +619,7 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind kind, void ide_init2(IDEBus *bus, qemu_irq irq); void ide_exit(IDEState *s); int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); -void ide_set_irq(IDEBus *bus); +void ide_bus_set_irq(IDEBus *bus); void ide_register_restart_cb(IDEBus *bus); void ide_exec_cmd(IDEBus *bus, uint32_t val); From patchwork Mon Feb 27 14:01:55 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: 657037 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2374768wrb; Mon, 27 Feb 2023 06:15:57 -0800 (PST) X-Google-Smtp-Source: AK7set/GIBA4tELIP430M8+mzIXtZYT9jz4QYuVmlvkSqkWMp8RHd/ty4enlrIwAu39s1Zserj+E X-Received: by 2002:a05:6214:4102:b0:537:708d:3fef with SMTP id kc2-20020a056214410200b00537708d3fefmr42281825qvb.38.1677507356816; Mon, 27 Feb 2023 06:15:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507356; cv=none; d=google.com; s=arc-20160816; b=adyguizS5lmBmaiI3KO5rweSUmO+SqW2sxo5OuzEPjqnmp1F/y4mlTxeg4Bwqp1Erz VEl437EcpZzZvX07NcoJcn3kGaMVstIfa3l0p6TClO7Frj12myHEAngNlz2iM5b05v+s 64U00heGdrhfNWiEfaLRifzo6GtN65NWcBBWIkboM3RO4U5RxgmrVtB1OIIhuth36FRV tjbEKzsGViCm4sSZpaHolaixjTyF7eP0usO8iZyrmgqvOYY9h+0ToXRXka0qm6c4Hwqq ooC+ObW68QnsrXHOVe3sTjzS+FirtH7vF8vBNS8Vnl/JxDuTIFwgDrtBB2+WKkaVTWnP F0vg== 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:to:from :dkim-signature; bh=FBtmLWEVfc53L+I+DhE/R9U7Z3BHDiUh1RKFi7IOBXk=; b=k1saUBVkioi4rwFARzi/r8HcIrIOJvYWR8di9GXnB4HcTxaONZ7h3qi0QmStdqALYw TdAJeSu1ux1/CtLu5KpCoXYaqknpzsCH96+wdjzcR/tc9UFPwsWpxlBRe2GnkWNCeEo5 piYVnZoXX80JLUbRUg9TvzdEHxLA7cX7AiaG2qqSIq77yf2mH2gFieMel8lEaG6eCWng OTNOdUg8Y8rW7KYwSBIqlLdILOJ+f5/VVy7EUp/IaqAQ0XJz4XeZxKJ1LlCIpLhMfnlk 0Bpzx0Ss3Kg9bqMKGFZy0+IsoXsBqm/0Ux/lCSuitjJZQHKymQh6M1rVTmnooc4ILeoP Bh3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pGnv1Sok; 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 bp16-20020a05620a459000b0073ba718e297si1720749qkb.465.2023.02.27.06.15.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:15:56 -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=pGnv1Sok; 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 1pWeFG-000191-9L; Mon, 27 Feb 2023 09:12:51 -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 1pWeDj-00007t-9B for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:19 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDh-00016v-5w for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:14 -0500 Received: by mail-wr1-x436.google.com with SMTP id bx12so3214171wrb.11 for ; Mon, 27 Feb 2023 06:11: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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FBtmLWEVfc53L+I+DhE/R9U7Z3BHDiUh1RKFi7IOBXk=; b=pGnv1Sokm4WuLmtRtLn38gIUPaUifIErTrkbJCBArBXtCaNMNsXHUfQO8eYPnAMlSG HqQv0HlJ7iIUUkJtuEDTSdHNha89R391Duxd/rXh+r/HpjQLgq2Kw1IX892I3UZI6IMO FyRWU9QnT0hiaL6873+gB68+4KUUJXr1dnCovaZQWLJU6INvpp5/Qqs6Y78X4/x1QWUS XLNvU48Zt/r6BddtBrWdSrAcYmAwmvpFA6EDYPbIHDtW1KmLzLgMn15nCiF0XmIaGPvZ DzoK+7uJhMVXssSxCCx8M1a2f41vpbA17N9Dgn+xxyFbS6ccSnwhkkuUKpBeydTLqpN/ U4hQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FBtmLWEVfc53L+I+DhE/R9U7Z3BHDiUh1RKFi7IOBXk=; b=EqJNDsUOvRBGlwdeB03Waj1gpQYAC0Qt1Df5s+8DyqXQwPsOVmJEl17O/xIKQMblK8 8Xuu0wRrFT7I9XNwiAZUwXHQnx/LlxmAfkw9+HcliVTXgg6n2PFufJJNDvMd3sRtfo1h tKJgNiFR9FTfynkfqQd69f6Lulvnjm/GftA7zDobmKUWxoOAQYe6CVtC+o5YU0bD52Ge C5idzRXss0jx0GuF8sbN4o/hBTnOHOh+hmKyCQWvKTM1SAfMZ98Df3s0uVIi1sBCM7BB Bd86YG34GjLFVVXxFaBx1BR8IFtutPV6ZtRpNTJ9ru0cT0M/rxeSgKx34koPLQHaXeCP K1yQ== X-Gm-Message-State: AO0yUKWCpAqMg7+Euhkiy48u7SPF3JW6aKgCniyMw3CRO4nm05ngw9CA Fw2JDZ/qlYnVTyWIglg15TwknklyJkHPMsuR X-Received: by 2002:adf:d84b:0:b0:2c9:f488:5f54 with SMTP id k11-20020adfd84b000000b002c9f4885f54mr4602740wrl.57.1677507071203; Mon, 27 Feb 2023 06:11:11 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id v4-20020a5d6784000000b002425be3c9e2sm7273206wru.60.2023.02.27.06.11.10 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:10 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 108/126] hw/ide: Rename ide_create_drive() -> ide_bus_create_drive() Date: Mon, 27 Feb 2023 15:01:55 +0100 Message-Id: <20230227140213.35084-99-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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=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 ide_create_drive() operates on a IDEBus; rename it as ide_bus_create_drive() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_create_drive/ide_bus_create_drive/g' \ $(git grep -wl ide_create_drive) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-12-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/arm/sbsa-ref.c | 2 +- hw/ide/ahci.c | 2 +- hw/ide/isa.c | 4 ++-- hw/ide/macio.c | 2 +- hw/ide/microdrive.c | 2 +- hw/ide/mmio.c | 4 ++-- hw/ide/pci.c | 2 +- hw/ide/qdev.c | 2 +- include/hw/ide/internal.h | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c index f778cb6d09..0b93558dde 100644 --- a/hw/arm/sbsa-ref.c +++ b/hw/arm/sbsa-ref.c @@ -554,7 +554,7 @@ static void create_ahci(const SBSAMachineState *sms) if (hd[i] == NULL) { continue; } - ide_create_drive(&ahci->dev[i].port, 0, hd[i]); + ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]); } } diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 08c7ae6e3c..f338a55c4e 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1842,7 +1842,7 @@ void ahci_ide_create_devs(PCIDevice *dev, DriveInfo **hd) if (hd[i] == NULL) { continue; } - ide_create_drive(&ahci->dev[i].port, 0, hd[i]); + ide_bus_create_drive(&ahci->dev[i].port, 0, hd[i]); } } diff --git a/hw/ide/isa.c b/hw/ide/isa.c index ad47e0899e..74f7b43137 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -93,10 +93,10 @@ ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, s = ISA_IDE(dev); if (hd0) { - ide_create_drive(&s->bus, 0, hd0); + ide_bus_create_drive(&s->bus, 0, hd0); } if (hd1) { - ide_create_drive(&s->bus, 1, hd1); + ide_bus_create_drive(&s->bus, 1, hd1); } return isadev; } diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 24fb7a3f9d..7efbbc720a 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -501,7 +501,7 @@ void macio_ide_init_drives(MACIOIDEState *s, DriveInfo **hd_table) for (i = 0; i < 2; i++) { if (hd_table[i]) { - ide_create_drive(&s->bus, i, hd_table[i]); + ide_bus_create_drive(&s->bus, i, hd_table[i]); } } } diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index b9822b939b..08504b499f 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -566,7 +566,7 @@ PCMCIACardState *dscm1xxxx_init(DriveInfo *dinfo) qdev_realize(DEVICE(md), NULL, &error_fatal); if (dinfo != NULL) { - ide_create_drive(&md->bus, 0, dinfo); + ide_bus_create_drive(&md->bus, 0, dinfo); } md->bus.ifs[0].drive_kind = IDE_CFATA; md->bus.ifs[0].mdata_size = METADATA_SIZE; diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index 6bf9048b1e..4e2c1a4413 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -174,10 +174,10 @@ void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1) MMIOIDEState *s = MMIO_IDE(dev); if (hd0 != NULL) { - ide_create_drive(&s->bus, 0, hd0); + ide_bus_create_drive(&s->bus, 0, hd0); } if (hd1 != NULL) { - ide_create_drive(&s->bus, 1, hd1); + ide_bus_create_drive(&s->bus, 1, hd1); } } diff --git a/hw/ide/pci.c b/hw/ide/pci.c index ae638dee0d..4223f5e64d 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -489,7 +489,7 @@ void pci_ide_create_devs(PCIDevice *dev) ide_drive_get(hd_table, ARRAY_SIZE(hd_table)); for (i = 0; i < 4; i++) { if (hd_table[i]) { - ide_create_drive(d->bus + bus[i], unit[i], hd_table[i]); + ide_bus_create_drive(d->bus + bus[i], unit[i], hd_table[i]); } } } diff --git a/hw/ide/qdev.c b/hw/ide/qdev.c index 6f6c7462f3..1b3b4da01d 100644 --- a/hw/ide/qdev.c +++ b/hw/ide/qdev.c @@ -124,7 +124,7 @@ static void ide_qdev_realize(DeviceState *qdev, Error **errp) dc->realize(dev, errp); } -IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive) +IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive) { DeviceState *dev; diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 7b4b71d0b0..ccfe064643 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -645,7 +645,7 @@ void ide_atapi_cmd_reply_end(IDEState *s); /* hw/ide/qdev.c */ void ide_bus_init(IDEBus *idebus, size_t idebus_size, DeviceState *dev, int bus_id, int max_units); -IDEDevice *ide_create_drive(IDEBus *bus, int unit, DriveInfo *drive); +IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive); int ide_handle_rw_error(IDEState *s, int error, int op); From patchwork Mon Feb 27 14:01:56 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: 657030 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373951wrb; Mon, 27 Feb 2023 06:14:33 -0800 (PST) X-Google-Smtp-Source: AK7set/X76gzt2OxWpIo32lTw9wcBjZwQBOZ9PNOQhJGKsGt76xQB8cmAEt7upaVhdBWjxdlLqqo X-Received: by 2002:ad4:5ae4:0:b0:568:c5e3:a0ce with SMTP id c4-20020ad45ae4000000b00568c5e3a0cemr52861113qvh.20.1677507272966; Mon, 27 Feb 2023 06:14:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507272; cv=none; d=google.com; s=arc-20160816; b=WdE6s+7aPYjKeebh68OopeRObAyqg10e6OYf8aMwV5X7TZAFxhIBC4CUO1ar+8/y5p iNnMyhHDGrzhsdTt3UF5HBzB9C0rzbeTfciwXI2DZTo/JxDfAzwdQTlErPl29X/Z7Zr7 h2LGDeUQuxz+rEv2mMUDQrS+QwSAYH1VCie7jwcfa5LSi+n6BmFianKl7/S3iPTOuwcU ZmhPjcSLmS/pLB0EdNvPSZTKMLMVMHMNOf+gXfa7SnBK6cPTkr7Bfv94giSu0wvsk19W 7b5j4mfmqx/QUlyXIQNehJv3emVSKBRMTMeMWhaNHd115fSy4esXW+RT1ocTaLD2KcSb kbuw== 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:to:from :dkim-signature; bh=mmKC4FZBmoUZ8iripYdVbSM7O1GiZEKrKFQYRQ+23rg=; b=ZUR0JHamVekkU7p1Qs2h5amYgS6tavbT6AwYP8Mow5N8XEJqkDfkUTjwkyCaFspd8j PV8TZ3x8PP9VcqteY71ZUSfO3N5jbxPGut4XMkdYj0I14vCbVS+wH/HFMOONTiG1J6pZ wpZxL2U6F8TY/+Q03jW7AvV8wV4Fs6A1RE25dljrVx0OrCaDGmB5Qn3E2sq4w1fK3WUB TUPMS/4J+LLt94zUj4gB84OlGkolHH/xhfoORshyTmllsSfS9hzZ7w5VDqmqBiu1s4AQ CIpOwzyAQWQYnl4ocWkc/U3b5eMa0nKsuqlfnwMNKCP9bCOyMj9L2EhjrJFVnLj2ig6l 0dCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EX2d08Vc; 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 p1-20020a0ccb81000000b0056ea83d60f7si6447793qvk.361.2023.02.27.06.14.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:14:32 -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=EX2d08Vc; 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 1pWeFL-0001hf-SS; Mon, 27 Feb 2023 09:12: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 1pWeDo-00009x-56 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:28 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDm-00018q-CR for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:19 -0500 Received: by mail-wm1-x32a.google.com with SMTP id fm20-20020a05600c0c1400b003ead37e6588so7243562wmb.5 for ; Mon, 27 Feb 2023 06:11:17 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=mmKC4FZBmoUZ8iripYdVbSM7O1GiZEKrKFQYRQ+23rg=; b=EX2d08VcWz2Ly0Ymaw01dsWcYLJiK4St8Wmqk3NBfV+/wcNMWVmaFDzeRHzc6j35CK batpTY0XmKnD8UpGCKP4+ihC7qj4Us+U7cFLKtkMo+eDSnQjwTBeLGG9kH0GiD0HFS3V 3JBzLqWXIWCSoFPNt/u0UnwtfmbxYq7fjFJtaNKPyo3l6rpqSQ7Z6aU7wrJLvcq6lrGv nyF+KfEVCB6aviAmoBuc8PyMUpJIFEZmQj7Zc+JdYdLqFlKv373Lp4ALldxJOTOSPKMg +gLJ4RdE2UA2vYOPfR3R6ZXQ6hVkNGhmr7JivwU7bW1l4wNJnxJrCK3DHpS1hIWkWmy8 f9KA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mmKC4FZBmoUZ8iripYdVbSM7O1GiZEKrKFQYRQ+23rg=; b=QNRMcyY7OU8wgIpPq79Tdxk6GZb71VLlj3TuEZLSatiGV3QYlDZHIWXKqnxZxme0QK /fxTA6RE3ccwK9fr4QB2JFpVP/zifPDx8xoyK8XVAaut36+p5jHGWZFAD2fIqMjJJG2i GGeLEOB0vHnnJTi1ihqOPE8KAoiLC1ddXjClKRnBpCZAIoFPDJCnUmD0LKtqFz2jtoUi Aq3icp8DZ7uNWqLkbxNz38Vx0lggD0HHnN5ULq8wQD1d5TkEkAp7lqyIAYH9pQwHNe2d PYDcIdFH5Bs+4IiSaRbTZs2pE2yPt/Rp7Js3/0p2rsKfjTt5AwdO9Y81dzm1EeF6nBnU M4oA== X-Gm-Message-State: AO0yUKVRRxDm/RrrzL17YtdtJNMeoHRtHNCmsA3VBAz1WzJNlWOtR6J2 nWyPdWb8w/4yYDeb7qVB1goJvESG4EFLQA5j X-Received: by 2002:a05:600c:3acc:b0:3de:a525:1d05 with SMTP id d12-20020a05600c3acc00b003dea5251d05mr7202176wms.8.1677507076702; Mon, 27 Feb 2023 06:11:16 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id r23-20020a05600c2f1700b003eae73ee4a1sm9240719wmn.17.2023.02.27.06.11.15 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:16 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 109/126] hw/ide: Rename ide_register_restart_cb -> ide_bus_register_restart_cb Date: Mon, 27 Feb 2023 15:01:56 +0100 Message-Id: <20230227140213.35084-100-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.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=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 ide_register_restart_cb() operates on a IDEBus; rename it as ide_bus_register_restart_cb() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_register_restart_cb/ide_bus_register_restart_cb/g' \ $(git grep -l ide_register_restart_cb) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-13-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/core.c | 2 +- hw/ide/isa.c | 2 +- hw/ide/piix.c | 2 +- hw/ide/sii3112.c | 2 +- hw/ide/via.c | 2 +- include/hw/ide/internal.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index f338a55c4e..316dbb97d3 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1560,7 +1560,7 @@ void ahci_realize(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports) ad->port_no = i; ad->port.dma = &ad->dma; ad->port.dma->ops = &ahci_dma_ops; - ide_register_restart_cb(&ad->port); + ide_bus_register_restart_cb(&ad->port); } g_free(irqs); } diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 94c576262c..2865bc25fc 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -298,7 +298,7 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp) bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; - ide_register_restart_cb(&d->bus[i]); + ide_bus_register_restart_cb(&d->bus[i]); } } diff --git a/hw/ide/core.c b/hw/ide/core.c index 117e26cef1..5897411b95 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2759,7 +2759,7 @@ static void ide_restart_cb(void *opaque, bool running, RunState state) } } -void ide_register_restart_cb(IDEBus *bus) +void ide_bus_register_restart_cb(IDEBus *bus) { if (bus->dma->ops->restart_dma) { bus->vmstate = qemu_add_vm_change_state_handler(ide_restart_cb, bus); diff --git a/hw/ide/isa.c b/hw/ide/isa.c index 74f7b43137..f8ed26b587 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -74,7 +74,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **errp) ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); ide_init2(&s->bus, isa_get_irq(isadev, s->irqnum)); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); - ide_register_restart_cb(&s->bus); + ide_bus_register_restart_cb(&s->bus); } ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int irqnum, diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 267dbf37db..daeb9b605d 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -149,7 +149,7 @@ static int pci_piix_init_ports(PCIIDEState *d) bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; - ide_register_restart_cb(&d->bus[i]); + ide_bus_register_restart_cb(&d->bus[i]); } return 0; diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index 46204f10d7..c918370220 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -288,7 +288,7 @@ static void sii3112_pci_realize(PCIDevice *dev, Error **errp) bmdma_init(&s->bus[i], &s->bmdma[i], s); s->bmdma[i].bus = &s->bus[i]; - ide_register_restart_cb(&s->bus[i]); + ide_bus_register_restart_cb(&s->bus[i]); } } diff --git a/hw/ide/via.c b/hw/ide/via.c index e1a429405d..fd398226d4 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -195,7 +195,7 @@ static void via_ide_realize(PCIDevice *dev, Error **errp) bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; - ide_register_restart_cb(&d->bus[i]); + ide_bus_register_restart_cb(&d->bus[i]); } } diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index ccfe064643..cc95cd47a0 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -620,7 +620,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq); void ide_exit(IDEState *s); int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2); void ide_bus_set_irq(IDEBus *bus); -void ide_register_restart_cb(IDEBus *bus); +void ide_bus_register_restart_cb(IDEBus *bus); void ide_exec_cmd(IDEBus *bus, uint32_t val); From patchwork Mon Feb 27 14:01:57 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: 657065 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380022wrb; Mon, 27 Feb 2023 06:26:08 -0800 (PST) X-Google-Smtp-Source: AK7set9T/nt6f/RbP/ygILwW/4doPuoCHI4kuFmI0ELlw8WdWrpTbyvIAN2OrBru8Pw8RxHLn3+o X-Received: by 2002:ad4:5ec6:0:b0:56e:9dd8:4812 with SMTP id jm6-20020ad45ec6000000b0056e9dd84812mr51981882qvb.3.1677507968265; Mon, 27 Feb 2023 06:26:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507968; cv=none; d=google.com; s=arc-20160816; b=Wd5J6Gzv6DSZVPu+IZbpQ+xeRtLEuFXb5lCPsyrHsMvqAVSecYJYRh2ntgLeVYaTQi PtayD/4VYMbdvcmAsE5wR6l9SCj3gv6IyS0XDIPD5/4pltvtQv3VmjWYYgHEqOJ3k+O8 yvy3Y6QyLo0tuXgLLLwN+gwPQDFs/bdmACAVONX1DXLNEmhpSmwWFUXtsJnJH3ll9+1Z qxkSXwP0TuT1kjjZ3Xd5ITOlyKwU57G7ljsFzWvhdmM83NCf8iw0QwV7CCedxTTGzEVs XIV9NbVQGSpdP5Nip44KYRGx0qUasfhZDTjUBx524MORxPF0dYOq2973l/uMOk8eQDAC xxcQ== 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:to:from :dkim-signature; bh=SxuGCiDEM4B0M1G1+5/Ku1B4TwdzfOaRDWtMa7ZXM5M=; b=bvxg1L6TKMfY3pkTlIR+Bt0XK0Ts/JClhEB8NdXTYlCehtQa7pBf433s3RgWxEcwuK 4r9k91Ntg0JsqK3lKtL6KvAD9HB4CAtk4jpny1E7zpSTRlFeC8x1xCbSXM+Yv25MnMNF lQ6TG41jkcN9/r08AqR2Tdw91KcJAbnOJGd7JSZ2Hek8hw1JiR1NEXZNMbXI3kjJozhS qACRbXPAGyKPTF5sO6l4i7ZI0paPQ5USUAlqudv5mtq1IzfXT0kF80yEKlp/3CBO4rK7 pi14QxFR0T5caUmaCQuurYorYO2s1ksbhS5zBMVvp81Bm2BkWMwnPaQaVMaZ3A61rnSQ MI1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=v+ngnNRk; 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 d4-20020a0cf0c4000000b0056eb1bfcb15si6296398qvl.76.2023.02.27.06.26.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:26: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=v+ngnNRk; 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 1pWeFR-0002ac-Km; Mon, 27 Feb 2023 09:13:01 -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 1pWeE3-0000Km-IH for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:40 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeDx-000197-Pn for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:34 -0500 Received: by mail-wr1-x434.google.com with SMTP id bw19so6335184wrb.13 for ; Mon, 27 Feb 2023 06:11:23 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=SxuGCiDEM4B0M1G1+5/Ku1B4TwdzfOaRDWtMa7ZXM5M=; b=v+ngnNRkK7KZt97Puyy/+fqfZ5hLZm83yxqPNlUUDN+0ZA0XBDT7CICfJ99fWbaWOK rgHVu+0w8BWvQ/ebU2boa/W+AiIXh8/BcDdNPYWYUHe3ZN97ywpxYWsltKhR3HQ4EPjn E0EYrrwcTyeySZuvPcX7gs3QLXgFWVBF3DTeJ5iym/XwMA9lH9KPbn6hPIfevbveZ8Jv I+MWGA2lH2HLVin3zoZ78SpCaedtQQbtmhbbxDRlZYVJlxCF9V5bCIc1Yq7/NpAaqmJL 3NYacHnYXYIsphADR/PjNGXM9aAeoBpfUmT9ahCE24bzriGGXV2mr2RwOTwDYpj8IPZG g92w== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SxuGCiDEM4B0M1G1+5/Ku1B4TwdzfOaRDWtMa7ZXM5M=; b=cOE114oCNXiBxUP2LbLNBTZ6enwm0pF61kdBH/MPbFyktm5qbrJvYF1EjkWoEqtXIu nnT13JgK9clvIpqC8v8t1Z+ufSw6dREdypZeU8IdIOo6yl2S4ag7F2FLBMjrXmNSzIj+ EBBesr5sJQ9RfNsVr+c7ON9+ezKrnSnWcFK3pcYhwqvlAPXYbBwknwM5prjaZRx2oO+S 9kBwkz6OQQvDwqntjgp7N2lNTIejGrMlMrqmL+uj33FWo0JjYi+DAIlxjshKOBAYW2vQ EDEqPUnf3EL9NrGGZOkGAzbXhbtvZ0xxXIJjdCUsj4WXgqSS1FmIJqoTrQESa1Ak2gOh /6HQ== X-Gm-Message-State: AO0yUKX5xJd5L8p7HQIlR887Up1ptVhhMFl3MWY6I++Bg1ZyTcXh2Y5o YLFRORzDCzl+sBbIPM4NXqBuWRKV9ml04Owb X-Received: by 2002:adf:f887:0:b0:2c7:f82:827a with SMTP id u7-20020adff887000000b002c70f82827amr11809947wrp.19.1677507081761; Mon, 27 Feb 2023 06:11:21 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id x6-20020adff646000000b002c56046a3b5sm7059757wrp.53.2023.02.27.06.11.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:21 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 110/126] hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd() Date: Mon, 27 Feb 2023 15:01:57 +0100 Message-Id: <20230227140213.35084-101-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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=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 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 316dbb97d3..e6498964af 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 5ef344ae73..57042cafdd 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); From patchwork Mon Feb 27 14:01:58 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: 657111 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2388482wrb; Mon, 27 Feb 2023 06:43:30 -0800 (PST) X-Google-Smtp-Source: AK7set/0QGUgxScjovcGUVcT3uk9vqjQbUvMfP6ljsiP4WKrLqhGiiK2DpRFnAgOt/eb+T79jKyT X-Received: by 2002:a05:622a:4d2:b0:3ba:18c2:99e7 with SMTP id q18-20020a05622a04d200b003ba18c299e7mr32356494qtx.45.1677509009965; Mon, 27 Feb 2023 06:43:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677509009; cv=none; d=google.com; s=arc-20160816; b=PW/KnXeXy+vYCUSibS+BZCoTGE0Mj6aRtyKhRK/HNxLrKK2E+/N6UUuof0tqRdZC9n a0PZIjaX6I7lWxWA+wLefz9usDf3r2zordtyAdP496J0StXq7nIAHE7UjQS9pafrmZdM ZtucqkzcDuMmFdwfEeus1cDTbl06HB+cHXIXMZIhrhWthV08dW3zsABD9H6aEW/wS7iS MWTDQDMQ7Bd/gvtHMzuAkMz8Ec2AtuzsrJqGAh+whBMrB5XMHaKzFHactE4ZxT+hFcRX yCHUOB/DCtBYc/PQP6PcSHYvgPicjLgPbQiFm3N6z/Uh3YtbSzuiIiJYw2jGx4cN3x4h nsew== 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:to:from :dkim-signature; bh=sBFWnYaBV5LobNifphxCr/7ICfJ1EzExfLTH5mqS1MU=; b=yZMQa789BJW6NPV5kZBf1KOT80kLvAlC4fkwYEvIyO1PwIMsPmYbt490wn2FKgZ14I HxK7qTlN3+DXCE7pjsjDe3YPKhMqLYa4w1bkspNxx/yHcs8/UWMBpxpYITADG936LkBb xCQ8y4vluinRmGdnEQo1juOpxTXSPyn++j8vIHgPFKS4O4M7DMyO4VoB8KnGfRpkr1nv JYGb3iUU3KCxBCpzqp96i3OKoDU+5X3jdifor+DnVMhk6rilrc8TzLbKtiRbvzb9P4nD mjNOAmrIUBy7DinZKRyfbnInyK772MM+Pq6FrIYGTPqYyzeIfsTDXdDaQviV4zBk0Nmu VW5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Y0/FUavW"; 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 s12-20020a05620a254c00b00719fa0dc8e7si7007246qko.64.2023.02.27.06.43.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:43:29 -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="Y0/FUavW"; 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 1pWeFO-0001u1-Az; Mon, 27 Feb 2023 09:12:58 -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 1pWeE4-0000Kn-7e for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:39 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeE1-00019T-5o for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:35 -0500 Received: by mail-wm1-x32b.google.com with SMTP id t25-20020a1c7719000000b003eb052cc5ccso6829433wmi.4 for ; Mon, 27 Feb 2023 06:11:29 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=sBFWnYaBV5LobNifphxCr/7ICfJ1EzExfLTH5mqS1MU=; b=Y0/FUavWfdI56DsxJg7GtASbRBpMN6RBrBooYPHjapwYS98kR6aecCDoG9t9y/Vo7W WLhazEh57Bs9rL3oLPx/CvyBZ1vdIX22Ca9OWgA3aguhFL8rufHx1SU1NJSZjhWD7FQG YjyUirnNRV+c1zk7Q3EtHuY7MbnxqEToYSd9l9H5BCp1rEepfMaFwKMWn0jJUJr6PE09 M5PTee+KvZaq4eRtI6mFMutVSmrg8+IDctuYTtM0W9xjZndAJWMek0ugDNz/mhytAi3e DXunMJAzXvH8gX8sMpnJNUSmjWo4wwL+n6ZnfhHRELcnDosTZ6rI9OhBHMTfebDxLx20 X4rg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=sBFWnYaBV5LobNifphxCr/7ICfJ1EzExfLTH5mqS1MU=; b=b/Th6/GcpIOxb4NfQXMs3lKARl1VGTh+XFdRyuKIgMqkow7RJHH+hcRm79eLvOLr9j RNEqQ+o9P5daV2IMvamUmNtca+sD0/VSCqCkEaAYkiTQkoDW6PWNOiFoPnLb8f9d5f9x CPsEcHz2cu6wJR+ZrllH8pXq2mm8ihpay/uQ0i3/vWxqS6rRjan0vkgAgcL1sReSYO7r mDT/Wdn+Z87docgykCtD+BEMGlG6Er7uERGY4HiWiffFjhbI/GkS5y7vt+bGi2FmecxA OZDUAgMkj8mbGJtPHYdn9hjb4vlsLGV2eomz8AlZSYQy3WUkaFvSf4s5Cpy3iR6zKYzb UL+Q== X-Gm-Message-State: AO0yUKUXPdCctyydIZ4qvBackX48sSBHVidaYL3q2Wb0GMvGeXx29MFU c8PoF3F+E9esCDhKhZmKRmMoZY7UykJu4B5i X-Received: by 2002:a05:600c:714:b0:3e2:a8e:ba4a with SMTP id i20-20020a05600c071400b003e20a8eba4amr17970875wmn.21.1677507087750; Mon, 27 Feb 2023 06:11:27 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id k24-20020a05600c0b5800b003e00c453447sm12353398wmr.48.2023.02.27.06.11.26 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 111/126] hw/ide: Rename ide_init2() -> ide_bus_init_output_irq() Date: Mon, 27 Feb 2023 15:01:58 +0100 Message-Id: <20230227140213.35084-102-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.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=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 ide_init2() initializes a IDEBus, and set its output IRQ. To emphasize this, rename it as ide_bus_init_output_irq(). Mechanical change using: $ sed -i -e 's/ide_init2/ide_bus_init_output_irq/g' \ $(git grep -l ide_init2) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-15-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ahci.c | 2 +- hw/ide/cmd646.c | 2 +- hw/ide/core.c | 4 ++-- hw/ide/isa.c | 2 +- hw/ide/macio.c | 2 +- hw/ide/microdrive.c | 2 +- hw/ide/mmio.c | 2 +- hw/ide/piix.c | 3 ++- hw/ide/sii3112.c | 2 +- hw/ide/via.c | 2 +- include/hw/ide/internal.h | 4 ++-- 11 files changed, 14 insertions(+), 13 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index e6498964af..55902e1df7 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1554,7 +1554,7 @@ void ahci_realize(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports) AHCIDevice *ad = &s->dev[i]; ide_bus_init(&ad->port, sizeof(ad->port), qdev, i, 1); - ide_init2(&ad->port, irqs[i]); + ide_bus_init_output_irq(&ad->port, irqs[i]); ad->hba = s; ad->port_no = i; diff --git a/hw/ide/cmd646.c b/hw/ide/cmd646.c index 2865bc25fc..26a90ed45f 100644 --- a/hw/ide/cmd646.c +++ b/hw/ide/cmd646.c @@ -294,7 +294,7 @@ static void pci_cmd646_ide_realize(PCIDevice *dev, Error **errp) qdev_init_gpio_in(ds, cmd646_set_irq, 2); for (i = 0; i < 2; i++) { ide_bus_init(&d->bus[i], sizeof(d->bus[i]), ds, i, 2); - ide_init2(&d->bus[i], qdev_get_gpio_in(ds, i)); + ide_bus_init_output_irq(&d->bus[i], qdev_get_gpio_in(ds, i)); bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; diff --git a/hw/ide/core.c b/hw/ide/core.c index 1be0731d1a..fd2215c506 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -2771,7 +2771,7 @@ static IDEDMA ide_dma_nop = { .aiocb = NULL, }; -void ide_init2(IDEBus *bus, qemu_irq irq) +void ide_bus_init_output_irq(IDEBus *bus, qemu_irq irq_out) { int i; @@ -2779,7 +2779,7 @@ void ide_init2(IDEBus *bus, qemu_irq irq) ide_init1(bus, i); ide_reset(&bus->ifs[i]); } - bus->irq = irq; + bus->irq = irq_out; bus->dma = &ide_dma_nop; } diff --git a/hw/ide/isa.c b/hw/ide/isa.c index f8ed26b587..95053e026f 100644 --- a/hw/ide/isa.c +++ b/hw/ide/isa.c @@ -72,7 +72,7 @@ static void isa_ide_realizefn(DeviceState *dev, Error **errp) ide_bus_init(&s->bus, sizeof(s->bus), dev, 0, 2); ide_init_ioport(&s->bus, isadev, s->iobase, s->iobase2); - ide_init2(&s->bus, isa_get_irq(isadev, s->irqnum)); + ide_bus_init_output_irq(&s->bus, isa_get_irq(isadev, s->irqnum)); vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_isa, s); ide_bus_register_restart_cb(&s->bus); } diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 7efbbc720a..6be29e44bc 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -420,7 +420,7 @@ static void macio_ide_realizefn(DeviceState *dev, Error **errp) { MACIOIDEState *s = MACIO_IDE(dev); - ide_init2(&s->bus, s->ide_irq); + ide_bus_init_output_irq(&s->bus, s->ide_irq); /* Register DMA callbacks */ s->dma.ops = &dbdma_ops; diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 08504b499f..84452ae4ef 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -599,7 +599,7 @@ static void microdrive_realize(DeviceState *dev, Error **errp) { MicroDriveState *md = MICRODRIVE(dev); - ide_init2(&md->bus, qemu_allocate_irq(md_set_irq, md, 0)); + ide_bus_init_output_irq(&md->bus, qemu_allocate_irq(md_set_irq, md, 0)); } static void microdrive_init(Object *obj) diff --git a/hw/ide/mmio.c b/hw/ide/mmio.c index 4e2c1a4413..3aeacab3bb 100644 --- a/hw/ide/mmio.c +++ b/hw/ide/mmio.c @@ -122,7 +122,7 @@ static void mmio_ide_realizefn(DeviceState *dev, Error **errp) SysBusDevice *d = SYS_BUS_DEVICE(dev); MMIOIDEState *s = MMIO_IDE(dev); - ide_init2(&s->bus, s->irq); + ide_bus_init_output_irq(&s->bus, s->irq); memory_region_init_io(&s->iomem1, OBJECT(s), &mmio_ide_ops, s, "ide-mmio.1", 16 << s->shift); diff --git a/hw/ide/piix.c b/hw/ide/piix.c index daeb9b605d..2f71376b93 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -145,7 +145,8 @@ static int pci_piix_init_ports(PCIIDEState *d) if (ret) { return ret; } - ide_init2(&d->bus[i], isa_get_irq(NULL, port_info[i].isairq)); + ide_bus_init_output_irq(&d->bus[i], + isa_get_irq(NULL, port_info[i].isairq)); bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index c918370220..f9becdff8e 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -284,7 +284,7 @@ static void sii3112_pci_realize(PCIDevice *dev, Error **errp) qdev_init_gpio_in(ds, sii3112_set_irq, 2); for (i = 0; i < 2; i++) { ide_bus_init(&s->bus[i], sizeof(s->bus[i]), ds, i, 1); - ide_init2(&s->bus[i], qdev_get_gpio_in(ds, i)); + ide_bus_init_output_irq(&s->bus[i], qdev_get_gpio_in(ds, i)); bmdma_init(&s->bus[i], &s->bmdma[i], s); s->bmdma[i].bus = &s->bus[i]; diff --git a/hw/ide/via.c b/hw/ide/via.c index fd398226d4..ab9e43e244 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -191,7 +191,7 @@ static void via_ide_realize(PCIDevice *dev, Error **errp) qdev_init_gpio_in(ds, via_ide_set_irq, 2); for (i = 0; i < 2; i++) { ide_bus_init(&d->bus[i], sizeof(d->bus[i]), ds, i, 2); - ide_init2(&d->bus[i], qdev_get_gpio_in(ds, i)); + ide_bus_init_output_irq(&d->bus[i], qdev_get_gpio_in(ds, i)); bmdma_init(&d->bus[i], &d->bmdma[i], d); d->bmdma[i].bus = &d->bus[i]; diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 11a4931ef9..c687282a78 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -488,7 +488,7 @@ struct IDEBus { IDEDMA *dma; uint8_t unit; uint8_t cmd; - qemu_irq irq; + qemu_irq irq; /* bus output */ int error_status; uint8_t retry_unit; @@ -616,8 +616,8 @@ int ide_init_drive(IDEState *s, BlockBackend *blk, IDEDriveKind kind, uint64_t wwn, uint32_t cylinders, uint32_t heads, uint32_t secs, int chs_trans, Error **errp); -void ide_init2(IDEBus *bus, qemu_irq irq); void ide_exit(IDEState *s); +void ide_bus_init_output_irq(IDEBus *bus, qemu_irq irq_out); 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); From patchwork Mon Feb 27 14:01:59 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: 657084 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381890wrb; Mon, 27 Feb 2023 06:30:02 -0800 (PST) X-Google-Smtp-Source: AK7set/NBP4dwmHxYWm6A1vqy0lSsASKZ29gjFMr5QU8WoDRnCQaADNLXpNp9Rp394vP41I/2ZbO X-Received: by 2002:ac8:58d6:0:b0:3bf:c3be:758e with SMTP id u22-20020ac858d6000000b003bfc3be758emr15267063qta.16.1677508202490; Mon, 27 Feb 2023 06:30:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508202; cv=none; d=google.com; s=arc-20160816; b=smbtNH8MQbCy/sQ0BILVJTrawgG+8YmAw/nFem5B3Hch4/fLmu0mjsDnsBFdHx+6M5 ZhZpjUUE4rnG9qYGdHjjV5E8hagZBmgwnWBCujEolGx7RHYpQpvmkOdTipv6i2YbchvY jcGXKwHAF9DJNP/3lwaBPk6T5OiqE12LN3JldXFXhzpolRvA88LOb7EXGpjT5XFrjlf/ YXgYyEaGDXcMcnhsALjgv+yBSe5Px+dI/uEp4qbpxtXL5SQETyBzhkMrB8mcEzFTFIU4 LqkxO5ThH2hlHufRaI90j7K6sDZ7SciaTdFgjVkvDWYxx0SPw1xVE+5aUt6TuYM7FXcl NVEQ== 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:to:from :dkim-signature; bh=GmYjWCEsiUBPMCRPive1LnJSR/mOAyhsLDC4dgmpYdk=; b=g+fus59toZ3y+aM4jhgt60iUN7R4mxY5AY9lH0/WjrWDhbIro0uYq9JdlIPfW8Y0ir AF/Wg/a2RclgOfbzOlqOeRmq7dy/aS+P+RXcwDSOsZHRVZQR3l6nX9KLTI2vTjmMUA1g CCEc4XjC9Ic7z2n5QRSRi8Zsrqv7k1JeBvXDKY83oJvEEvbXxobTEXxXhnRbRvSMh63y gmK3WWyA2Aid1z7azwO2zzVMOe0PO8UKSFZ/UoXmDGCoh379yrIUEQtmDlclzrMx7pJm nHbAfddFP8hevJ9bI8KNlHagOXl4I/wT2jsN2yTlwV0Z+a4/Vy75jMKn1WibKcgIsIfX tvEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uhJ0239+; 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 h21-20020a05622a171500b003b3e31a8791si6887262qtk.443.2023.02.27.06.30.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:30:02 -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=uhJ0239+; 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 1pWeFM-0001o9-Px; Mon, 27 Feb 2023 09:12:56 -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 1pWeED-0000NG-ER for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:47 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeE3-000109-B3 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:37 -0500 Received: by mail-wr1-x430.google.com with SMTP id bv17so6376998wrb.5 for ; Mon, 27 Feb 2023 06:11:33 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GmYjWCEsiUBPMCRPive1LnJSR/mOAyhsLDC4dgmpYdk=; b=uhJ0239+Fcb8688pttInZ2CwWzaSCZhocBfBMVs0n53Ow3TGRSROxG0tuytCmEN0bx lUVxxvQY2LA0AiA4cYfUk+eBVid/TQyCQhvBlavTsyc9GxDLH8h1jxvQPIqhM5jLailW ffkKN1w6fWX6639LeyaGZSEGz8O3LA3tApcvHjpNvn42qLLd9yismB2AqbJeF+fPqAAT C48ObzB9x2AyCnYgkZhxpCZ7NgZM3DTrAqsqw7e4fnRDeMebo+hsQglwURvYBmuTOHyB bJymWg5gwesCfQ9nlP3dRsqcFFE2eOQPk3JDzejJwfrbUZ49psh8AQAKyxsQXF2D5D1n N9NA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GmYjWCEsiUBPMCRPive1LnJSR/mOAyhsLDC4dgmpYdk=; b=zfyFnX3IxAnUqIPoKpw8sclbYaMOoyQIdd2lyYj6zTsRWUABwCeM2IP9WZMUNagxLe QXxh/6fneAwfmXbOecd2EbQVEZV6hN+rxYrgTg6AThf40TdgzbLnie0FRJ1GEJiwOz+X iJNe/hsqM0lmAnJPMgLkJT/RXefjRQMH913LJbg//Xf358ezkXdsz4TeM+jT0IovK1Ft bjVGGYb6+53grvgIc1EsY9Lpo7OeT8aBkJPpyYjv0VxHZfWpZ7B7znoqIThytXPP68Q2 l3giav9DwgGh4ufIu9lztBoTWSNtruMdel1aPYTKkIrDuyqkpQ55aCtIT4PooVF7mU16 hiEA== X-Gm-Message-State: AO0yUKXDpItc7acnN5jSTNpqJM7iyfSeSZT5Fl3qcEqebkMv4exg6aMY S6qO2tNyZ1RK0JlzL7J46WwUfUmo/1+d0OW/ X-Received: by 2002:a5d:5049:0:b0:2cb:8f6a:6e7f with SMTP id h9-20020a5d5049000000b002cb8f6a6e7fmr2531770wrt.35.1677507093054; Mon, 27 Feb 2023 06:11:33 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id z5-20020a5d6545000000b002c5501a5803sm7215260wrv.65.2023.02.27.06.11.32 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:32 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 112/126] hw/ide: Rename idebus_active_if() -> ide_bus_active_if() Date: Mon, 27 Feb 2023 15:01:59 +0100 Message-Id: <20230227140213.35084-103-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 idebus_active_if() operates on a IDEBus; rename it as ide_bus_active_if() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/idebus_active_if/ide_bus_active_if/g' \ $(git grep -l idebus_active_if) Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-16-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/core.c | 18 +++++++++--------- hw/ide/macio.c | 8 ++++---- hw/ide/microdrive.c | 4 ++-- hw/ide/pci.c | 2 +- include/hw/ide/internal.h | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index fd2215c506..2d034731cf 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1265,7 +1265,7 @@ const char *ATA_IOPORT_WR_lookup[ATA_IOPORT_WR_NUM_REGISTERS] = { void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); int reg_num = addr & 7; trace_ide_ioport_write(addr, ATA_IOPORT_WR_lookup[reg_num], val, bus, s); @@ -2128,7 +2128,7 @@ void ide_bus_exec_cmd(IDEBus *bus, uint32_t val) IDEState *s; bool complete; - s = idebus_active_if(bus); + s = ide_bus_active_if(bus); trace_ide_bus_exec_cmd(bus, s, val); /* ignore commands to non existent slave */ @@ -2195,7 +2195,7 @@ const char *ATA_IOPORT_RR_lookup[ATA_IOPORT_RR_NUM_REGISTERS] = { uint32_t ide_ioport_read(void *opaque, uint32_t addr) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint32_t reg_num; int ret, hob; @@ -2281,7 +2281,7 @@ uint32_t ide_ioport_read(void *opaque, uint32_t addr) uint32_t ide_status_read(void *opaque, uint32_t addr) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); int ret; if ((!bus->ifs[0].blk && !bus->ifs[1].blk) || @@ -2370,7 +2370,7 @@ static bool ide_is_pio_out(IDEState *s) void ide_data_writew(void *opaque, uint32_t addr, uint32_t val) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint8_t *p; trace_ide_data_writew(addr, val, bus, s); @@ -2406,7 +2406,7 @@ void ide_data_writew(void *opaque, uint32_t addr, uint32_t val) uint32_t ide_data_readw(void *opaque, uint32_t addr) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint8_t *p; int ret; @@ -2444,7 +2444,7 @@ uint32_t ide_data_readw(void *opaque, uint32_t addr) void ide_data_writel(void *opaque, uint32_t addr, uint32_t val) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint8_t *p; trace_ide_data_writel(addr, val, bus, s); @@ -2472,7 +2472,7 @@ void ide_data_writel(void *opaque, uint32_t addr, uint32_t val) uint32_t ide_data_readl(void *opaque, uint32_t addr) { IDEBus *bus = opaque; - IDEState *s = idebus_active_if(bus); + IDEState *s = ide_bus_active_if(bus); uint8_t *p; int ret; @@ -2711,7 +2711,7 @@ static void ide_restart_bh(void *opaque) return; } - s = idebus_active_if(bus); + s = ide_bus_active_if(bus); is_read = (bus->error_status & IDE_RETRY_READ) != 0; /* The error status must be cleared before resubmitting the request: The diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 6be29e44bc..dca1cc9efc 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -60,7 +60,7 @@ static void pmac_ide_atapi_transfer_cb(void *opaque, int ret) { DBDMA_io *io = opaque; MACIOIDEState *m = io->opaque; - IDEState *s = idebus_active_if(&m->bus); + IDEState *s = ide_bus_active_if(&m->bus); int64_t offset; MACIO_DPRINTF("pmac_ide_atapi_transfer_cb\n"); @@ -136,7 +136,7 @@ static void pmac_ide_transfer_cb(void *opaque, int ret) { DBDMA_io *io = opaque; MACIOIDEState *m = io->opaque; - IDEState *s = idebus_active_if(&m->bus); + IDEState *s = ide_bus_active_if(&m->bus); int64_t offset; MACIO_DPRINTF("pmac_ide_transfer_cb\n"); @@ -220,7 +220,7 @@ done: static void pmac_ide_transfer(DBDMA_io *io) { MACIOIDEState *m = io->opaque; - IDEState *s = idebus_active_if(&m->bus); + IDEState *s = ide_bus_active_if(&m->bus); MACIO_DPRINTF("\n"); @@ -251,7 +251,7 @@ static void pmac_ide_transfer(DBDMA_io *io) static void pmac_ide_flush(DBDMA_io *io) { MACIOIDEState *m = io->opaque; - IDEState *s = idebus_active_if(&m->bus); + IDEState *s = ide_bus_active_if(&m->bus); if (s->bus->dma->aiocb) { blk_drain(s->blk); diff --git a/hw/ide/microdrive.c b/hw/ide/microdrive.c index 84452ae4ef..f1017f7333 100644 --- a/hw/ide/microdrive.c +++ b/hw/ide/microdrive.c @@ -250,14 +250,14 @@ static uint16_t md_common_read(PCMCIACardState *card, uint32_t at) case 0xd: /* Error */ return ide_ioport_read(&s->bus, 0x1); case 0xe: /* Alternate Status */ - ifs = idebus_active_if(&s->bus); + ifs = ide_bus_active_if(&s->bus); if (ifs->blk) { return ifs->status; } else { return 0; } case 0xf: /* Device Address */ - ifs = idebus_active_if(&s->bus); + ifs = ide_bus_active_if(&s->bus); return 0xc2 | ((~ifs->select << 2) & 0x3c); default: return ide_ioport_read(&s->bus, at); diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 4223f5e64d..2ddcb49b27 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -296,7 +296,7 @@ void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val) /* Ignore writes to SSBM if it keeps the old value */ if ((val & BM_CMD_START) != (bm->cmd & BM_CMD_START)) { if (!(val & BM_CMD_START)) { - ide_cancel_dma_sync(idebus_active_if(bm->bus)); + ide_cancel_dma_sync(ide_bus_active_if(bm->bus)); bm->status &= ~BM_STATUS_DMAING; } else { bm->cur_addr = bm->addr; diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index c687282a78..c2b794150f 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -566,7 +566,7 @@ static inline uint8_t ide_dma_cmd_to_retry(uint8_t dma_cmd) return 0; } -static inline IDEState *idebus_active_if(IDEBus *bus) +static inline IDEState *ide_bus_active_if(IDEBus *bus) { return bus->ifs + bus->unit; } From patchwork Mon Feb 27 14:02:00 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: 657071 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380645wrb; Mon, 27 Feb 2023 06:27:19 -0800 (PST) X-Google-Smtp-Source: AK7set/IuOrmDX0libxBkzSpD7Wfc/Z+hqC52LsJLuR/eJEUrHSngWAq/x/TMvV+CG+iVYDVOG/X X-Received: by 2002:a05:6214:519d:b0:56b:fb18:adcd with SMTP id kl29-20020a056214519d00b0056bfb18adcdmr42874125qvb.8.1677508039438; Mon, 27 Feb 2023 06:27:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508039; cv=none; d=google.com; s=arc-20160816; b=dUSYcgj7UzeAfQMnY1KPCr7GKR3qBSdJE8HjYiwSnsYBox+VcRbClXli2SBcpxE2f+ iTNXlEip8kzucQD0YJw8ha2cgRRxE11vwGNADwSYm1fgv3Sr8YNcGrOU+UA3dTFK0DQY dPF4OEokaZVRSCQCSxMs52BFS6M6zRICPwzgtSBDAcMmaHn8xuo+xPNGKFQG0wm6lSU9 DL1PNOl7EDxD9XoSLQjh/3E0ys9aQTVlKmtQcHMTm88p+5qGggsKiQwO1TLhwEwNW9z3 TYAJh9nLUH9M5uZt6FL0wSExialH2+1kp6EhcGi3SW4XtJMei9lbrHL4MJev7mY4cNG9 FZjQ== 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:to:from :dkim-signature; bh=WAAv2NL3QoMZlMFQUgIQZmf6j2u7rmtL1deiCwTIQao=; b=YiyD19IjdkqjitkoN5FTpI7FtHnAysqbCChewf6HO9DPpU4cihmhUbDBwaN4tPTIak +Pu6AIkLBY+CeZo1wL5y1o3vsZkVDknD4d3AYE7d+OMavC0zANxxraPGzoa/SojadrkT zf+dYrK/Bhjk4aFcA9+l2iLbwbDgsU/Rxkg4l8JhsiCzomlva4Z6UjzwYhCYS+n9UI6B rHnpz73OVjeYfrBO6KLUtRhu+PkYfb5Hnyx/hCHP5SbHU1/xcM5MXpGUiCHqv/8uXte+ 2RPBkmRVR2mcERp/oxdPf1pdjiAllPg5Q4/OwuesU87BwmDRgFyPIA5OVkL84No8eQDn dPWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Flrp+z/L"; 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 t11-20020a37ea0b000000b0073b8805c4afsi5792245qkj.730.2023.02.27.06.27.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:27:19 -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="Flrp+z/L"; 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 1pWeFR-0002ZX-FJ; Mon, 27 Feb 2023 09:13:01 -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 1pWeED-0000NI-EM for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:47 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeE7-00016v-I7 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:40 -0500 Received: by mail-wr1-x436.google.com with SMTP id bx12so3215845wrb.11 for ; Mon, 27 Feb 2023 06:11:38 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WAAv2NL3QoMZlMFQUgIQZmf6j2u7rmtL1deiCwTIQao=; b=Flrp+z/LvNgumA1/pzbnMH5TZrPJToCPEZbnF3PEImYcYLoQ3Fy4S1pfWjPtlXE2fD u+9SZ2ZVCPguQV7TtUL2pjoidLpHukvgnFaTyftfH9idc2q1gzaDSmzcCeI/4Y+uNO3g VI22PZm/k3TM09b4uud55IC5GXfISyw6dk2BBVzAz8i9kstAuAg04rScqQgXOXZSjMRy BE+cKN7HgV0VF/39UDNEThVw4V+UZoR3Z5uT/FYlKTt7AYgAKpzg5zhTeFwzjz4Us8UV PMLNWiPvj2MFsACAvheKyJd/5doe4p84uO2i97uB7b3fPM9FcmYoq2jJ2SPWO08voRw/ 7A0A== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WAAv2NL3QoMZlMFQUgIQZmf6j2u7rmtL1deiCwTIQao=; b=d+GFFT3ZrXmJyIbiSl+wmc0FRxEPbMXjIUl8uUX/nnp+m2pcyBP6Vq3UHkTTudpdk2 n7ByXy6RN+6RrUw3LVo9/3k7x5Rra1iHXqtlcbaS4Ni+YTnRh2aIIGVuHCQb7P2G9YsH aaLgYqNYAW7bzzs2frWyaPisUB0IjHdREt+IN7ma4VfJGW5F8H2I2E1pc2nvYx7HfgnG zOP/XsylVJ21IODjF39HxlmoP9amxmoJSXA9M1Zrho6Fk93u74hICAIexxRfNfc9R/h4 pNIX79p/ZTsvAuKv2LUHxdMWo93frdwp9+6WIUqyEBx+u3NOQV1WeuZ/efcfjA+xVAFY 9nVg== X-Gm-Message-State: AO0yUKUgBnelTf+0PLqi2xbhbJX0xT6alHYUWkklHIJAJJAdb0LRP4rr Q0IKhPRnnx8+gGlFbHlBHg3+OE5gzvWT1cGP X-Received: by 2002:a5d:4692:0:b0:2c7:16c3:1756 with SMTP id u18-20020a5d4692000000b002c716c31756mr11372254wrq.61.1677507098265; Mon, 27 Feb 2023 06:11:38 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id k24-20020a05600c0b5800b003e00c453447sm12353884wmr.48.2023.02.27.06.11.37 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:37 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 113/126] hw/ide: Declare ide_get_[geometry/bios_chs_trans] in 'hw/ide/internal.h' Date: Mon, 27 Feb 2023 15:02:00 +0100 Message-Id: <20230227140213.35084-104-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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=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 ide_get_geometry() and ide_get_bios_chs_trans() are only used by the TYPE_PC_MACHINE. "hw/ide.h" is a mixed bag of lost IDE declarations. In order to remove this (almost) pointless header soon, move these declarations to "hw/ide/internal.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-Id: <20230220091358.17038-18-philmd@linaro.org> --- hw/i386/pc.c | 3 ++- include/hw/ide.h | 4 ---- include/hw/ide/internal.h | 4 ++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 98c2becc11..992951c107 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -33,7 +33,8 @@ #include "hw/i386/vmport.h" #include "sysemu/cpus.h" #include "hw/block/fdc.h" -#include "hw/ide.h" +#include "hw/ide/internal.h" +#include "hw/ide/isa.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bus.h" #include "hw/pci-bridge/pci_expander_bridge.h" diff --git a/include/hw/ide.h b/include/hw/ide.h index 24a7aa2925..db963bdb77 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -3,10 +3,6 @@ #include "exec/memory.h" -int ide_get_geometry(BusState *bus, int unit, - int16_t *cyls, int8_t *heads, int8_t *secs); -int ide_get_bios_chs_trans(BusState *bus, int unit); - /* ide/core.c */ void ide_drive_get(DriveInfo **hd, int max_bus); diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index c2b794150f..d9f1f77dd5 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -647,6 +647,10 @@ void ide_bus_init(IDEBus *idebus, size_t idebus_size, DeviceState *dev, int bus_id, int max_units); IDEDevice *ide_bus_create_drive(IDEBus *bus, int unit, DriveInfo *drive); +int ide_get_geometry(BusState *bus, int unit, + int16_t *cyls, int8_t *heads, int8_t *secs); +int ide_get_bios_chs_trans(BusState *bus, int unit); + int ide_handle_rw_error(IDEState *s, int error, int op); #endif /* HW_IDE_INTERNAL_H */ From patchwork Mon Feb 27 14:02:01 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: 657105 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2386397wrb; Mon, 27 Feb 2023 06:38:52 -0800 (PST) X-Google-Smtp-Source: AK7set8ZJeE/ZVlviYZdckx8CJxUbuBf+CWueETeOfHnJ5bF36tHYfIL9tCfVgr3xRM1jyxmqdIl X-Received: by 2002:ad4:5ecc:0:b0:537:7bd7:29d4 with SMTP id jm12-20020ad45ecc000000b005377bd729d4mr46997413qvb.47.1677508732340; Mon, 27 Feb 2023 06:38:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508732; cv=none; d=google.com; s=arc-20160816; b=vpqv9mEzvVVmn3hCXe7GgBuOEr04x6ktSnwwtGK7RMWm9jy7TgdgF3jbhU/y3M+hlZ D8m/5BEk6PNZp2yxWQkDf7rHsR01I6NexjertIUEzaXsdWeiUE/3Xe0TKMr+fdpmmyD7 2YMsNe0Dm0etCzAleralBwSN8DMnicdMESvA5H7+eDoQNeD+3B33fXwIBiSYC9l4hGYC f/SrFq7hBnABduiDVWncO07LA7MJT5yGQMbm6u0EGtnRz0VrKgm+AMxfjPwlaMMDAsWE +/BfV+VC1ZYau3WB0R8Fc3xAwsFHM1rFZfMD89fL1Xj9TExTscOKN5NVEQ9IMIQvU+jw mhUQ== 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:to:from :dkim-signature; bh=boxJ68eJA67XnJT9rYf8WV4k46uWX8EKHHrm/LJLj1s=; b=n7cbK4mEttVSeMal/Vw8xYdg4/NS9GbRUWYolVlQPOIFkh0vUhE+X5wyrJfGpoIrDm EYe105VF1rNI9htqQMKMNO7FlbT+WmJnSzpktGVgvXeNGgpbrpb+xoRMFqbiLjQySegR jsVZt3SiyB2q/XfRlMdtuxsynPeOqxn+zdIciWPftoBRHvbPcGwWXL8FvijIERZkqsl4 YFzJ+EFlH2OI+lKB2L5KA4sEL7cQtiGI4SAXcBkpv+36K2uB0deUTwR84V5IWrQ2MdSU MNiHlwwOdCnKCHruDXuPGIn3RQL7SllL2Bc4TsEautol48YoWojz3YcA9xiQLIHFoxjy Dqig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eSWQAD6C; 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 k9-20020a05620a414900b007427f149f38si7064917qko.597.2023.02.27.06.38.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:38:52 -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=eSWQAD6C; 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 1pWeFT-0002lY-1J; Mon, 27 Feb 2023 09:13:03 -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 1pWeEF-0000OZ-5M for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:47 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeED-0001CS-Hh for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:46 -0500 Received: by mail-wr1-x429.google.com with SMTP id j2so6354316wrh.9 for ; Mon, 27 Feb 2023 06:11:45 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=boxJ68eJA67XnJT9rYf8WV4k46uWX8EKHHrm/LJLj1s=; b=eSWQAD6CcgyPQ1iPA2AIG+VX0FfnPPTEL8cW0kTPSQ+lNxqRYCnuKpCSD/9y5dJCIV 0t71E1LPQjMq7YBmJRJcRGqaignk9vgGhrk34+8UPe1+MUvIP0mGhzxU15hq256p+ihp XLUDSM6GE1vzsEK051io3LgxF7dPA4OxRVWChR3owkAjTe281YDL3U73Q/jp0jrZhPN2 xOZ3srxjuSEnVtCzn6OmdzVEvyhW07QdUXmitWdiaYjUwnxfJqCIBA5BPGy7+q3OqQxT SF1Ti3Tj7Nios18VxCLaOJzEbFYi9yJQbujwvLnQ4M8IjxFlqJr8HP7QNsf05jzqzzkl lviA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=boxJ68eJA67XnJT9rYf8WV4k46uWX8EKHHrm/LJLj1s=; b=w5CWr2TIdFtRvtvpfwMXGA3FmEQ/FtBfE+Hy9qkwlhICKEW2q7RG+k1QRBAJ0x0I/v khl3nIIrLX71W1UB/2WsVlNNGjGuyq5NWYPGhPaxjttGyTkO3We5NR6+ClmGbTf4NArd piGvrF+B1b65PU89pktpyrf7t09BpdhIzGBvc6R3Y93FOziiyuXJ7C7AsoVPW4OpSY69 0jId9XhKQJ/ebe1SOlBQlXQ+x9ACrv3SmphofO7Dd3LxByq69z+eefhHhgXHitk2GJHQ Cw+aymwJcpqWFdeeYw2mSr2eOhje+DivgRakLf+M9DQPGF2T/qmoA25w7XbeaH254e9B KN+A== X-Gm-Message-State: AO0yUKXtBS5+Yy5Br/wqkltw8FIdwmQAtQIPHoNjVG/43winiBaPEQp9 xH/1hB5IV6Dlf0Qy82+ZguyQwkNP8R0L/gCw X-Received: by 2002:a5d:6812:0:b0:2c7:f2f:e47 with SMTP id w18-20020a5d6812000000b002c70f2f0e47mr13043859wru.22.1677507103941; Mon, 27 Feb 2023 06:11:43 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id c4-20020adffb04000000b002c70bfe505esm7159484wrr.82.2023.02.27.06.11.43 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:43 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 114/126] hw/ide/ioport: Remove unnecessary includes Date: Mon, 27 Feb 2023 15:02:01 +0100 Message-Id: <20230227140213.35084-105-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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=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 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-17-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/ioport.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/hw/ide/ioport.c b/hw/ide/ioport.c index e6caa537fa..e2ecc6230c 100644 --- a/hw/ide/ioport.c +++ b/hw/ide/ioport.c @@ -25,16 +25,6 @@ #include "qemu/osdep.h" #include "hw/isa/isa.h" -#include "qemu/error-report.h" -#include "qemu/timer.h" -#include "sysemu/blockdev.h" -#include "sysemu/dma.h" -#include "hw/block/block.h" -#include "sysemu/block-backend.h" -#include "qapi/error.h" -#include "qemu/cutils.h" -#include "sysemu/replay.h" - #include "hw/ide/internal.h" #include "trace.h" From patchwork Mon Feb 27 14:02:02 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: 657109 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2387646wrb; Mon, 27 Feb 2023 06:41:36 -0800 (PST) X-Google-Smtp-Source: AK7set8kDkra7ZoplE7NPilOdiDem5d59blwvdktP2xUBFar/5NdvGjdhYD3drDY60Qw5s3gpC8u X-Received: by 2002:a05:622a:1483:b0:3b9:bd8d:bb22 with SMTP id t3-20020a05622a148300b003b9bd8dbb22mr16413978qtx.14.1677508896412; Mon, 27 Feb 2023 06:41:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508896; cv=none; d=google.com; s=arc-20160816; b=UU4Jmh7FUf1mb4jySelTDUWOvLdyVTt2MfPE/resg8IiHz3Q7ZdOzZYfYSrFX5DSJ6 4KctNJVt58s0z+nSMKFKdB6TUPiB3mxXA8aYy6/g8p1p+Py9XJcPuf3IGwSil6D7Vrcc ICdPPoC4MR04/d7L5Nj33PdpMssKTeNMFGVI/OB1BfML5OwO+4f612Q/nVdhhWy9s7c3 yI5PeKyoX5/FbHIZd53Re7n0xzUBwlpjF6YIXm42CWmsWqL9ik3Ph85ok8YP+moDxASZ HMlhjKr7j4sQDfRAZ5YCIlsxYv5Yym6IHlhAE/kv1VGmOlIoAGGU6NfFKQ7Qh4c2griX 01Sg== 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:to:from :dkim-signature; bh=fusPliZxFroR31tM0titpPE2I3vuj4ZeCjqW1pWpihU=; b=hxvO7+ltXC1/7EeWFVlt+8QuSBkQxhvvqHUe2+nlZm8kg7m6EpgaBL49LuqWK7VIcR ovDlh3V0+yuWTAvnvaqhRXoksynywoXf5YodH8z3FRr7kXOH9RF6V3mGLPgPIB9J17Y1 GePoPAjsWKSLgh0ZBSrXkuze0BUEA60kWsotrla4Zuyy1EEXZUbFHhY7dDq4FiZXIhEu TcyQIZeoNznyEbS8r6M6N5l4pHt8F7T2V0wJUqizg2064aksbsPdRUExY9bbYCg/iI2a dQ4YQN0+fmIe0H8bDEiD0Pk63EDBwNnkplkC5CqbUkeLo5PbirB18sPFX74o4AbnaIdZ F72Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VbkeYioH; 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 o8-20020a05622a138800b003ac35eb41aesi6469333qtk.757.2023.02.27.06.41.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:41:36 -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=VbkeYioH; 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 1pWeFP-00029f-OP; Mon, 27 Feb 2023 09:12:59 -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 1pWeEd-0000RW-E1 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:12 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeEI-0001Cr-QV for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:52 -0500 Received: by mail-wm1-x329.google.com with SMTP id j19-20020a05600c191300b003eb3e1eb0caso2621044wmq.1 for ; Mon, 27 Feb 2023 06:11:50 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=fusPliZxFroR31tM0titpPE2I3vuj4ZeCjqW1pWpihU=; b=VbkeYioHaKWC9ppe0N3KlVLItL89O7jqZU5XvsrRy5MEAMqM3c5RJhcrqqz9liGJXw U0loIbNBreHKE22SKQW05imGz8fwl9NECH3ThURz/io26GbaVoG0QepMr8wM60OhQ4yE NME2+XKfScC93V1bHTy0k3cIqGXS4BOCHdqAAV+uGTuhdQnyihd3hIxQZ6Px3ms6TXpB WGmliWRYOYL0woQnXRAewm1qT8m/db7sYn3p4h9aytvDsc76ZwFWTJuvBvmWO34viTS4 WemN1EfsOdpd2DXOwcHLvTiXiajaKTJzUuJOj5nuw9PgOx87y/YNHKfvKk0hr9AojXvf dnfQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fusPliZxFroR31tM0titpPE2I3vuj4ZeCjqW1pWpihU=; b=1JHMLAYoWlJPgmMmrzEiKG4hJaDRIjSfwJ3lnDwkQ6vOJqPfEzWCdxqrvXJb0Lpj1y zFteEDr5J9HEhcbpA98edvKNaucGYerwdFMVk+IgAda3Pu99GYM6VwFfNuVrjZFnmjDZ KN3gPQY2ubAL2/e3ZaIeaaMvw5jSqCpzgrZ/lGL0me0U181CqiqH9+mabsBoZUYuCTTU 9a/zvBK7gc0d7F8hJe2VvHcyJM9kyzVHxRCqByrGmEl7hh4paD4U+A9+XxoHpd18BFnp n316zPWc4O7gkbp6bKiH5bn2DT2qlJRo4QQp95+TAui3S9nsSv8qRQE//jB9+aDGXepi vwlw== X-Gm-Message-State: AO0yUKV6si6Ku8A84ud7WO2Sfu3XscHGu1kEPY7pZF5MqWT/jOotIXoo fntSfVM3aIzjHXQ2JBbrh10u3CxotsefHbjr X-Received: by 2002:a05:600c:4d18:b0:3ea:e554:7808 with SMTP id u24-20020a05600c4d1800b003eae5547808mr9946317wmp.19.1677507109187; Mon, 27 Feb 2023 06:11:49 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id d24-20020a1c7318000000b003dc522dd25esm9082325wmb.30.2023.02.27.06.11.48 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:48 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 115/126] hw/ide/pci: Unexport bmdma_active_if() Date: Mon, 27 Feb 2023 15:02:02 +0100 Message-Id: <20230227140213.35084-106-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.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=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 From: Bernhard Beschow The function is only used inside ide/pci.c, so doesn't need to be exported. Signed-off-by: Bernhard Beschow Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-18-philmd@linaro.org> --- hw/ide/pci.c | 6 ++++++ include/hw/ide/pci.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 2ddcb49b27..fc9224bbc9 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -104,6 +104,12 @@ const MemoryRegionOps pci_ide_data_le_ops = { .endianness = DEVICE_LITTLE_ENDIAN, }; +static IDEState *bmdma_active_if(BMDMAState *bmdma) +{ + assert(bmdma->bus->retry_unit != (uint8_t)-1); + return bmdma->bus->ifs + bmdma->bus->retry_unit; +} + static void bmdma_start_dma(const IDEDMA *dma, IDEState *s, BlockCompletionFunc *dma_cb) { diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h index 2a6284acac..7b5e3f6e1c 100644 --- a/include/hw/ide/pci.h +++ b/include/hw/ide/pci.h @@ -55,12 +55,6 @@ struct PCIIDEState { MemoryRegion data_bar[2]; }; -static inline IDEState *bmdma_active_if(BMDMAState *bmdma) -{ - assert(bmdma->bus->retry_unit != (uint8_t)-1); - return bmdma->bus->ifs + bmdma->bus->retry_unit; -} - void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d); void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val); extern MemoryRegionOps bmdma_addr_ioport_ops; From patchwork Mon Feb 27 14:02:03 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: 657099 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385364wrb; Mon, 27 Feb 2023 06:36:36 -0800 (PST) X-Google-Smtp-Source: AK7set+l/okSRZ89m3NnE95Vj6yXTbR2D82V/hbCquwNTFsbMiZhHgOw9qK9RPu/pKTzWWkUbbh5 X-Received: by 2002:a05:6214:21ac:b0:56e:fe99:b2a6 with SMTP id t12-20020a05621421ac00b0056efe99b2a6mr16472672qvc.10.1677508596002; Mon, 27 Feb 2023 06:36:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508595; cv=none; d=google.com; s=arc-20160816; b=C8ZQxf7EAv4hLZQkz6AJ8RJlNdA+WQA01jacctiZyCh2VoQgKAK1ANZgHtKodwO+iW 88wgvTcpccPd4CtMV0fbe/uL57Jdm2EzTWbed7/wiBJhJAaWFtkP+DG0a6hhoU6f0n1M b3JBih74YLQwHajnFqyZaJZh4c8CLcZH7p7kpXUTNsDsMaDCw2O2jDrJOBjHDn4hA/No 4trH6Tb7fYd0V54Mg9egON/cBxEbe74LZEotzSZ+0slgSIdBJdtEJrssd3i8PGpzI/XR 1BMYiVO1H4f24T4o7oIgFBQWKx2VNBruZRYvrcuZqaB2YsawqdFMoAbTNnoxzXuL4ryF C0+A== 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:to:from :dkim-signature; bh=jD/AgMbY1XM7XEOywFgDqrCzK2fQrhv4LmiUJ1k8b2E=; b=YlXRc1fL/kBQSMblhwyIJCS8ePbPBUZDe+PXD6XVR/Bj24EXTfJuqWbQmhzUqBGKBm lUZfHplHsGIqXpjIoxi7dvatbKg86KeKbjBUFr2x4mxfJaqIrsrGQcr2D3qzvjLsypLw KCmvnu+Ogh3IbZbnh/3c+FAkW9rrMK/WS+HDO8tBcpr1LxCfodo2um8/EsxZw0Fc2bY0 yrssVEnQBH8cGEpzVKi471XJxZSPy7/Dr7hjaf0MhBRqA2DAx5LfdXHivLO0g1ywWfBO MXCM4UTMvh0ZfmmLUXMH5s1uubkFsSUZO3E0670Ksr/wmrtmx1ZBZ89Jkux/e7TxHDaR MYPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZC3R3nyX; 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 p2-20020a0cf542000000b0056ea2a635casi6188733qvm.258.2023.02.27.06.36.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:36:35 -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=ZC3R3nyX; 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 1pWeFR-0002WY-44; Mon, 27 Feb 2023 09:13:01 -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 1pWeEd-0000Re-HD for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:14 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeEO-0001F9-3v for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:11:57 -0500 Received: by mail-wm1-x32c.google.com with SMTP id m25-20020a7bcb99000000b003e7842b75f2so3909475wmi.3 for ; Mon, 27 Feb 2023 06:11:55 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jD/AgMbY1XM7XEOywFgDqrCzK2fQrhv4LmiUJ1k8b2E=; b=ZC3R3nyXCJm/Y6hmkOZsAj6ForOphXQzKRsgjXrivdo44/NGNTljmWSaxF7VCWGR0t r0v0qDfpQPyfthysTzLBMP6g8kAzvjEMEJ1T+d+x84KQNUfL85O1CXvc7HYRTJpdF1J7 wKStECThNG18I2iX0neSOmyj8fOOSt1C8L7sdsbCB83tSzzpM9QmZs8IvByOYuEVodnS 3GpZTx7e9R/MFSFVCu0/d5T1aorLqqfs+yCEFz3xuj9Qf6wvhgw5F4PWPCKf3jYb5UvJ ulhfeaczSjo7ufLgfov1n5WqjQLjDhGprqZX5NhgimsiSyqC53UDnVwdsyzDszPixtsn E2ew== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jD/AgMbY1XM7XEOywFgDqrCzK2fQrhv4LmiUJ1k8b2E=; b=LXJQbuiCvdEY7zTXYi/YusmBx0aBcAos9HdGK5y30yr6a+goH4vC8IHGqtsyEs9OJP xIUuw69GfplYDaRyZqg2y9m0EfG0pq87wtcR0XcUO+qTbBgy+10rptHwtOTnl9bfk+T1 cnP11AsQqJhIJqXHWpeDWJE4M82RufhlXEMl2Zw9CJvcvPslDws3QYF5sEMH0bsAv5j+ y/NbQZa1/j62LAIBNBZhRSTeIKkJLRqLsm7EK4FENydOxRGLjDOSvzfn+1cEWresgznp HEzYvttUzH93+VlNf4QyFYcChjBgdxum1EQpsBVJv8jjhFJnt4Xnj0kF+IV2g4fKlZ2P HRoA== X-Gm-Message-State: AO0yUKU/A4lCDbRtHs92nh3LKwSKbJErWYHDjvx9ugHirCYrutVf1Xch V5b23t9O1c+h0QfJc69YPl4NbDWNeCZQ/hWz X-Received: by 2002:a05:600c:3b9e:b0:3ea:f6c4:5f26 with SMTP id n30-20020a05600c3b9e00b003eaf6c45f26mr9714872wms.17.1677507114581; Mon, 27 Feb 2023 06:11:54 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id fl16-20020a05600c0b9000b003e1f6e18c95sm13307668wmb.21.2023.02.27.06.11.53 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 116/126] hw/ide/piix: Remove unused includes Date: Mon, 27 Feb 2023 15:02:03 +0100 Message-Id: <20230227140213.35084-107-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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=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 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-19-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 2f71376b93..6354ae740b 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -28,14 +28,9 @@ */ #include "qemu/osdep.h" -#include "hw/pci/pci.h" #include "migration/vmstate.h" #include "qapi/error.h" -#include "qemu/module.h" -#include "sysemu/block-backend.h" -#include "sysemu/blockdev.h" -#include "sysemu/dma.h" - +#include "hw/pci/pci.h" #include "hw/ide/piix.h" #include "hw/ide/pci.h" #include "trace.h" From patchwork Mon Feb 27 14:02: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: 657112 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2388641wrb; Mon, 27 Feb 2023 06:43:49 -0800 (PST) X-Google-Smtp-Source: AK7set/zt1S3A3kqdD486tRKLpy/06hIait/756ZJcu/ELh0A3BZLud+6VFkkKDP2N+NgnksYrYd X-Received: by 2002:a05:6214:27c3:b0:56c:2ee:2641 with SMTP id ge3-20020a05621427c300b0056c02ee2641mr47375298qvb.22.1677509029420; Mon, 27 Feb 2023 06:43:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677509029; cv=none; d=google.com; s=arc-20160816; b=Xtbrc2+Z3jX91nOuOncliWxE0N65MpO+vRtzgxlNUX7sFCgXOQDhvF2ZwnqiONpZ1c 5+QmIaKbI+eAlfk/HW0f495TdzEEvPA7quD0Dz0ybKOD0i34xSuHyi1gPBBo/2ub7XfK QAgtnZatGP0080aExUM7F9isPtPqhL2UnDx4hm4gruyxlobZhjzap75uyX7Pa/aroHPe GqzYwC0vcuTkxyJbCFWSHgEsqH7kbXt/jw6dAuUjMwD5Ytg+cimcM9QJ/YrX7vuldLgD eV/hAZaLyDEwlnHAIFBvRs1LImc/I8TQFKrlbCI2cyZoioP845NeTIsUGm4/jIikHJPL 8jAw== 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:to:from :dkim-signature; bh=yM9TeJs0ek6ciQN9256F7MMNBJln7mQ/1ROtgdvo/kY=; b=mzT/85aDgaTVvBwYIRP9wLNIQZkKQjFrfm2JJu191gZjAKy6HOlJTs2L5HrkF5ZtMr 418w2sIgl2xMwsD+U6d15YcJmtTy+Hh3bdTH277g9lABX9GvLix7zgzN8HJPMDkwrQz7 zLo/EyxaqKYclCIkAIDfzFI0UeU4666HrZn8WM6/UheVLuEfXuubXdEvjQ6sJrRE4Ykj S2ZnG3yJQnCZZyNzTDEJA6qrA9CKP6boB2xWi/8kQjXyXn5OatFJCbDcfspwUwj1DkpL 3NDxQyEymAGAfjrnosuqHGJ6FT+n2oyFGGdhIXQ4CNRq/bAWZRe6N2pz2Fv1JTqbEwfs DY4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=m+uuNfut; 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 w22-20020a05620a445600b0073b4c66f1cfsi6971126qkp.668.2023.02.27.06.43.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:43:49 -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=m+uuNfut; 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 1pWeFT-0002tE-OB; Mon, 27 Feb 2023 09:13:03 -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 1pWeF1-0000Vz-7J for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:35 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeEU-0001I8-NY for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:04 -0500 Received: by mail-wr1-x432.google.com with SMTP id r7so6371715wrz.6 for ; Mon, 27 Feb 2023 06:12:01 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yM9TeJs0ek6ciQN9256F7MMNBJln7mQ/1ROtgdvo/kY=; b=m+uuNfutLciGYHLbb/CtvunYE+zgbtbWYuJjlN85BgLTXHibADkK1IUzYV3ul4Uash tFAEPwJ7btFEVJ67o8Zbytw6zbs6S1ooELJ3p9HRXY5WzlOPM3QYdxuqlBS7S3UqWBIv q9xsy3vK1acjAPmGl566I1WZcu0Y9BVyV9MdFZsHtPmIIUPlNhEP9NiZCGkBStVLLoCf OLmFlWRc3mJAKN5EWAKQDqneFYkR2zlhzbv/seoYrkiflesN4JZu5MI6T6SXU1mNM+4d kmOYVuasDjQMk0bLO3OiJSDl7VNJYfh2UmIQ+Ipre0dU005cBpg8cNia+/uUWZy6qbtw /I6Q== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yM9TeJs0ek6ciQN9256F7MMNBJln7mQ/1ROtgdvo/kY=; b=V4yXj2JBEZlKtfSS7Toj4l0WuOVEDHMhANvSeAI5379IKfu/+BlK0kfOq8ifdv8lXU rHtFS3OVEsCaxze+QP4nSFVWBe2ObbXltxOlsojeno1sMUsV0Y0PW7U1TqmDAOFl8O+M z29ETMBjt1odIl9IKat+0AJeedx8a5nnyrGvkWNdmHtftvewfIhNf35rfEKkw3CXRNSP EjRG38Wguav5ptSarSUrVRKdrXvPqzjP7ssmJbXu5qbz8iZRvIe0rYzep3cl0i43GKj6 r7bKxuZ+A0PFrntIj2H0qYfxyhAWaDDDUQPJi/tSc2sJ2gBYD1UIIRUvPYyKQP8B+bd3 NMIA== X-Gm-Message-State: AO0yUKWVOwDidSX7E0Tk6W+g4w0yzK2SaLUB4P9LMyHFFPmcjbiU+5u3 a3zo6Kg/6CQNxvRg33JxZS92ESsQDfk7bOk2 X-Received: by 2002:a5d:4207:0:b0:2c7:11a5:d7bc with SMTP id n7-20020a5d4207000000b002c711a5d7bcmr11671700wrq.43.1677507119725; Mon, 27 Feb 2023 06:11:59 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id y13-20020adfe6cd000000b002c8476dde7asm7190300wrm.114.2023.02.27.06.11.58 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:11:59 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 117/126] hw/ide/piix: Pass Error* to pci_piix_init_ports() for better error msg Date: Mon, 27 Feb 2023 15:02:04 +0100 Message-Id: <20230227140213.35084-108-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philmd@linaro.org; helo=mail-wr1-x432.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=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 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-20-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index 6354ae740b..f10bdf39ff 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -121,7 +121,7 @@ static void piix_ide_reset(DeviceState *dev) pci_set_byte(pci_conf + 0x20, 0x01); /* BMIBA: 20-23h */ } -static int pci_piix_init_ports(PCIIDEState *d) +static bool pci_piix_init_ports(PCIIDEState *d, Error **errp) { static const struct { int iobase; @@ -138,7 +138,9 @@ static int pci_piix_init_ports(PCIIDEState *d) ret = ide_init_ioport(&d->bus[i], NULL, port_info[i].iobase, port_info[i].iobase2); if (ret) { - return ret; + error_setg_errno(errp, -ret, "Failed to realize %s port %u", + object_get_typename(OBJECT(d)), i); + return false; } ide_bus_init_output_irq(&d->bus[i], isa_get_irq(NULL, port_info[i].isairq)); @@ -148,14 +150,13 @@ static int pci_piix_init_ports(PCIIDEState *d) ide_bus_register_restart_cb(&d->bus[i]); } - return 0; + return true; } static void pci_piix_ide_realize(PCIDevice *dev, Error **errp) { PCIIDEState *d = PCI_IDE(dev); uint8_t *pci_conf = dev->config; - int rc; pci_conf[PCI_CLASS_PROG] = 0x80; // legacy ATA mode @@ -164,10 +165,8 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp) vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); - rc = pci_piix_init_ports(d); - if (rc) { - error_setg_errno(errp, -rc, "Failed to realize %s", - object_get_typename(OBJECT(dev))); + if (!pci_piix_init_ports(d, errp)) { + return; } } From patchwork Mon Feb 27 14:02:05 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: 657098 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2385322wrb; Mon, 27 Feb 2023 06:36:30 -0800 (PST) X-Google-Smtp-Source: AK7set9xvDwg5j2ADnz0GkqXfG6qtrBq6Ynt9qZ1+zZMYI2E+sI4y74Ur3EYaDpoOENyWl3eFTfr X-Received: by 2002:ac8:7c46:0:b0:3bf:d254:bb9b with SMTP id o6-20020ac87c46000000b003bfd254bb9bmr8855338qtv.44.1677508589910; Mon, 27 Feb 2023 06:36:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508589; cv=none; d=google.com; s=arc-20160816; b=Gkz4GSu9EXmswdJQZe4D4mRgPJSlkRY9ZMUTaCMwL//6ckvCr462G6lxxGGN+ot1UM XLW40MJFkYPZ9BpqcQKwDhECM/WwJeY86saQflmwvO6jjpt3S4jT9Jt3NoNQOnZlPiwj 4iiRL8hubVzONpMhSQFuAqCMGMmVjliWVYBGJVk2zHysjrB6TFDwWuVVNQgjdlbRWf9X qCOauZxJj94g3be9UZRxj+ck8Twuqi261AkypaCrbgAw3hnUe5SFh4pjuXdFZNusbDc0 mfc2FANey7rEUQvzlLU0wrOFDNPEOm0f/DXCi4S9aLEtqOKp6ilzu3o8WyCjeebt37UF j9Sg== 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:to:from :dkim-signature; bh=XtxNKvcZ3XKeJ9IU2NxfSQHl2tOAm2Whlka61SEn0a4=; b=oObWq9xeITtvOT3VpUxpDppV85AZKFBWHuditxUHtLtXqNUDyeQ/CEP9jlCwTEGR8k eNkSqw1/3jOpF0vxFDZGxkNmG0QTuWYfZLKZcsih+O2XmPIziDf4Ix6MbLLuv1Nt9nSA Js9jYtTEgzoVZcU1k1iW9Fag0o4qh8mBDvGd+qAb6IHmyUQIDQ0gL1v6/qShGx1GEMh1 LT409rUacmy7LV/bpuTw7RB2LzF2Vm5RhuZNRjRzj5BAnev0UF0izcWe3RmQoZKZtecD W12BXIivS+QlKafi21xdNUhnF7kp7Am8mn0peZerw8dgmGzNLyGEINYemDiWjeSWYn7r 8ODw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="TZBzrKI/"; 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 l10-20020ac8458a000000b0035a89595940si6124772qtn.19.2023.02.27.06.36.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:36:29 -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="TZBzrKI/"; 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 1pWeFU-0002zv-Gm; Mon, 27 Feb 2023 09:13:04 -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 1pWeF1-0000WX-Cz for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:35 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeEY-0001Ih-MN for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:08 -0500 Received: by mail-wr1-x42c.google.com with SMTP id l1so3324912wry.12 for ; Mon, 27 Feb 2023 06:12:06 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=XtxNKvcZ3XKeJ9IU2NxfSQHl2tOAm2Whlka61SEn0a4=; b=TZBzrKI/tHC6hf1tjSXJkuk6hIvm2s/hSmdm/Gt7i7so1wk1+VEtCYrObxnZOGeCLW 5v/t2zNFGzZ9Ltp4UFbH2bR3vo6IKIeJ46701t6hoQPPjw4GuGNCiRZmMZVQEety3Hxm DsutjobE/G+cxX4KJebi5yVSsdbsS82LMdbizMkLKSLrwt4/kfIvSEdvy4cGwXxVge5s X4nqAuYA95qWfNmZ/X0rO+Ff3hT/oa74QchVbr6efUlhPr2j9RsiFfitP7Y57foR6YvA uzTWFWjLxgWRv3UwZWhzNFAnVMGJEr6wNiSYpYBpDkmOF/KVkFKUMy552Zwf1kx0w7yo gXYQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XtxNKvcZ3XKeJ9IU2NxfSQHl2tOAm2Whlka61SEn0a4=; b=vgA8+W5ONlKnADZkQwtg00m/UIsaiVu1ar2HE80XFBhjIBC1z4IT+GJutm7UxhJwWN dbrcXFZ3ujjbu6KdEL49IqmcND79s0GhkZVKgrxxMSEYkI4+CgItEkEzhGgBiV1e6poU 3hhZc8qCULZaFdIftralDq9t7Fm9UFQiLi3vqxNF5LrKM6qiP0cZVvganspaTLu73IMN 2sQQ9G06cjc+b22zvw4icCMXjChMN7w2GknQqSuh3LlMmQohlYaa+pVB/UHHEKYElkxX 49ER37igGEGwgdSoNgCKr1k08zHBIUJZaGdWaMOJSfCEkLoqCZAVrbVUFB38dr8YppAY H8lA== X-Gm-Message-State: AO0yUKUbSYBNVBURUHjoWSuvjTuBoOKdcy3353Ad9fKCrKy8s6reTpXf SadQm9aQe/6QPErLE6XXLoBf20kEeoDvIZri X-Received: by 2002:a05:6000:1:b0:2c7:1e60:3518 with SMTP id h1-20020a056000000100b002c71e603518mr8796096wrx.13.1677507124801; Mon, 27 Feb 2023 06:12:04 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id 21-20020a05600c229500b003e1f2e43a1csm9103814wmf.48.2023.02.27.06.12.04 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:12:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 118/126] hw/ide/piix: Refactor pci_piix_init_ports as pci_piix_init_bus per bus Date: Mon, 27 Feb 2023 15:02:05 +0100 Message-Id: <20230227140213.35084-109-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=philmd@linaro.org; helo=mail-wr1-x42c.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=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 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20230215112712.23110-21-philmd@linaro.org> Reviewed-by: Richard Henderson --- hw/ide/piix.c | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/hw/ide/piix.c b/hw/ide/piix.c index f10bdf39ff..41d60921e3 100644 --- a/hw/ide/piix.c +++ b/hw/ide/piix.c @@ -121,7 +121,7 @@ static void piix_ide_reset(DeviceState *dev) pci_set_byte(pci_conf + 0x20, 0x01); /* BMIBA: 20-23h */ } -static bool pci_piix_init_ports(PCIIDEState *d, Error **errp) +static bool pci_piix_init_bus(PCIIDEState *d, unsigned i, Error **errp) { static const struct { int iobase; @@ -131,24 +131,21 @@ static bool pci_piix_init_ports(PCIIDEState *d, Error **errp) {0x1f0, 0x3f6, 14}, {0x170, 0x376, 15}, }; - int i, ret; + int ret; - for (i = 0; i < 2; i++) { - ide_bus_init(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2); - ret = ide_init_ioport(&d->bus[i], NULL, port_info[i].iobase, - port_info[i].iobase2); - if (ret) { - error_setg_errno(errp, -ret, "Failed to realize %s port %u", - object_get_typename(OBJECT(d)), i); - return false; - } - ide_bus_init_output_irq(&d->bus[i], - isa_get_irq(NULL, port_info[i].isairq)); - - bmdma_init(&d->bus[i], &d->bmdma[i], d); - d->bmdma[i].bus = &d->bus[i]; - ide_bus_register_restart_cb(&d->bus[i]); + ide_bus_init(&d->bus[i], sizeof(d->bus[i]), DEVICE(d), i, 2); + ret = ide_init_ioport(&d->bus[i], NULL, port_info[i].iobase, + port_info[i].iobase2); + if (ret) { + error_setg_errno(errp, -ret, "Failed to realize %s port %u", + object_get_typename(OBJECT(d)), i); + return false; } + ide_bus_init_output_irq(&d->bus[i], isa_get_irq(NULL, port_info[i].isairq)); + + bmdma_init(&d->bus[i], &d->bmdma[i], d); + d->bmdma[i].bus = &d->bus[i]; + ide_bus_register_restart_cb(&d->bus[i]); return true; } @@ -165,8 +162,10 @@ static void pci_piix_ide_realize(PCIDevice *dev, Error **errp) vmstate_register(VMSTATE_IF(dev), 0, &vmstate_ide_pci, d); - if (!pci_piix_init_ports(d, errp)) { - return; + for (unsigned i = 0; i < 2; i++) { + if (!pci_piix_init_bus(d, i, errp)) { + return; + } } } From patchwork Mon Feb 27 14:02:06 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: 657077 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381139wrb; Mon, 27 Feb 2023 06:28:25 -0800 (PST) X-Google-Smtp-Source: AK7set/a5WGbikHt0pOC3MYI83TexyO5cKJJwVewKxl3tsSqaDBACn9KrgngXvMR10uJ7khbMqrc X-Received: by 2002:a05:6214:20eb:b0:570:bf43:499 with SMTP id 11-20020a05621420eb00b00570bf430499mr43383929qvk.9.1677508105066; Mon, 27 Feb 2023 06:28:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508105; cv=none; d=google.com; s=arc-20160816; b=rbtpvu5G2tTfh83AF1fn+wcsN6NB/pwLMbb9xz1Qnd0GckiDl9LbMtw8SBcbkVQirV 51ezmtuwndh9PtVFWbLAo4GbgYbM2MLCadWcDs7tB9hGYkRyntc6T3OxwWeJQoOrmvqP dZQdLlHYFk5MMvVI95p6yc8JNVUZTO/ay72X5CSwPJRV26edcbYtLocvCnyxyurmoljO Z2lzdpaB/D7vHmZWYx9MTwy5L/Un4PCphLfcl6cC/mBeDYhn6lRbzw0RmWWcKxSfF13o 4BNmE6L+msI+fWeQzp5j7BRUVsf8mvb7Kf08VRkOvJapNyY2ADWG/yPrkJJaYs/DQt1b Fukw== 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:to:from :dkim-signature; bh=uyj2N1V5KX2b0ID+h6AUIAfOe3fyRF4wROR42WY2Q44=; b=i9gHCnViwWWR7LpMMSgGj+cXL5IERDr1hgDTZyZJJcC2yRKLNl6bo3f2vyGsBy4TFU +9GEcTcwgFWVZeA7olVeih6UfRysL+Uld1xPBPTEM5JTbo+Dltq0fUAu6lNKLqk7i0Ww zFQP6+OcSix6A0zkNN5yJV+a5BEr2TLb0sBN2xvLui81nbyQVQCB1tj5TQXYl73m3QIg dKOtk15DT3RINHvWwQygscqqIIWAcIE6exB12tZRDEsDeeigs9qEvZFCW40jC40eeMxy 2aZzRUT3xJZFnYNUlYNfYRoryxk/GYc8xKF/lbmZyMtxlatf8wojsHiMAK3K2wxZjOnp Ttsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="AsNa9WX/"; 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 k1-20020a0cf581000000b0056ec16234f8si6417348qvm.350.2023.02.27.06.28.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28:25 -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="AsNa9WX/"; 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 1pWeFY-0003dG-E3; Mon, 27 Feb 2023 09:13:08 -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 1pWeF2-0000Y7-Ol for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:36 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeEc-0001CS-KX for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:11 -0500 Received: by mail-wr1-x429.google.com with SMTP id j2so6355919wrh.9 for ; Mon, 27 Feb 2023 06:12:10 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=uyj2N1V5KX2b0ID+h6AUIAfOe3fyRF4wROR42WY2Q44=; b=AsNa9WX/16QecpF96hurnU10OuXV4myfnh9bWP44tyseaErE6ppuW0Dh59PBJO5cp2 SlnCf8bpcJfCD6ugO+PkxBTbksTDDvtP7VOy8k7QuHt8ClVukfC4h5txuXr5HqT07dCK 2TCsizl9Q4kF8Z9y7m0QdzeYBEsWuwsGR1UoTv49ji7SEvjBH44oReztAGmnX/izC4+d 2PG2Aj7M86Fa7xiaNcpxeVbHKmWtCKrdUB3tNjrlvNyFo6qhTPG9pD4StoQcRMnJzz81 ix2PrPL2FG3VH5kgUovp+fFxHLLkpDox6+m1bVc7dW04hIKvsIV5hB+0Iukzo7Cmwfb2 dfzA== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uyj2N1V5KX2b0ID+h6AUIAfOe3fyRF4wROR42WY2Q44=; b=M4LD0qImeNBePZJ8hjPeAfH3Acg+EmRo7NPpXZn+VwCb8MDvw1XyvCjmFpw7PJDA3f OvXF9KvNLOo0/T7gcz7sNLnpT5PNrF3eEBITcs84USrn6tok2DfToN81dFSaL6u0yVYJ YuWYsXyDZn8n/SMP90dKZH/K4xK+Vf9T0G9TEYRX3PM7K4FgU9SMHYg0sCxg7dOzNl1B Huq1+Rdx9E/XNK+uYt2pIPp4GWcyo0Kayr674M2o1V+0ZP7o0omTRYfippr7u34mZKyV AF1GI+I9N4WxoRMLInV1fCDQlet+bJKcPTCSBu+4bFi4GEC4iG2qMgeEKFZUXiC50j1d 3AYg== X-Gm-Message-State: AO0yUKVnWbIdmZ2AtembPtvTYRW+rL6BxLaE7nBE95eqgrWoQrmofr9e AePBf/+YS27otqko3xm2uwoTbN47cVCN9Ul5 X-Received: by 2002:a5d:5e8c:0:b0:2c3:d707:7339 with SMTP id ck12-20020a5d5e8c000000b002c3d7077339mr6942335wrb.6.1677507129727; Mon, 27 Feb 2023 06:12:09 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id n7-20020a5d4c47000000b002c5534db60bsm7088284wrt.71.2023.02.27.06.12.09 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:12:09 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 119/126] hw/ide/via: Replace magic 2 value by ARRAY_SIZE / MAX_IDE_DEVS Date: Mon, 27 Feb 2023 15:02:06 +0100 Message-Id: <20230227140213.35084-110-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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=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 From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Acked-by: John Snow Message-Id: <20210511041848.2743312-5-f4bug@amsat.org> Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/via.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index ab9e43e244..177baea9a7 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -90,7 +90,7 @@ static void bmdma_setup_bar(PCIIDEState *d) int i; memory_region_init(&d->bmdma_bar, OBJECT(d), "via-bmdma-container", 16); - for(i = 0;i < 2; i++) { + for (i = 0; i < ARRAY_SIZE(d->bmdma); i++) { BMDMAState *bm = &d->bmdma[i]; memory_region_init_io(&bm->extra_io, OBJECT(d), &via_bmdma_ops, bm, @@ -122,7 +122,7 @@ static void via_ide_reset(DeviceState *dev) uint8_t *pci_conf = pd->config; int i; - for (i = 0; i < 2; i++) { + for (i = 0; i < ARRAY_SIZE(d->bus); i++) { ide_bus_reset(&d->bus[i]); } @@ -188,9 +188,9 @@ static void via_ide_realize(PCIDevice *dev, Error **errp) bmdma_setup_bar(d); pci_register_bar(dev, 4, PCI_BASE_ADDRESS_SPACE_IO, &d->bmdma_bar); - qdev_init_gpio_in(ds, via_ide_set_irq, 2); - for (i = 0; i < 2; i++) { - ide_bus_init(&d->bus[i], sizeof(d->bus[i]), ds, i, 2); + qdev_init_gpio_in(ds, via_ide_set_irq, ARRAY_SIZE(d->bus)); + for (i = 0; i < ARRAY_SIZE(d->bus); i++) { + ide_bus_init(&d->bus[i], sizeof(d->bus[i]), ds, i, MAX_IDE_DEVS); ide_bus_init_output_irq(&d->bus[i], qdev_get_gpio_in(ds, i)); bmdma_init(&d->bus[i], &d->bmdma[i], d); @@ -204,7 +204,7 @@ static void via_ide_exitfn(PCIDevice *dev) PCIIDEState *d = PCI_IDE(dev); unsigned i; - for (i = 0; i < 2; ++i) { + for (i = 0; i < ARRAY_SIZE(d->bmdma); ++i) { memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].extra_io); memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].addr_ioport); } From patchwork Mon Feb 27 14:02:07 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: 657106 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2386421wrb; Mon, 27 Feb 2023 06:38:57 -0800 (PST) X-Google-Smtp-Source: AK7set+9UTSmCt+3E9g8yugx8dyawH9UB0l98dNl3WowXrEO+fG6ZueTkuT8ATAAX0ldhLMYXjQz X-Received: by 2002:ad4:5bc5:0:b0:56e:a6f1:8db with SMTP id t5-20020ad45bc5000000b0056ea6f108dbmr43456440qvt.20.1677508736832; Mon, 27 Feb 2023 06:38:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508736; cv=none; d=google.com; s=arc-20160816; b=Fzgt597SckdF3pkZcbvdRT6W/AJ4Tq13wnHDSVOxJhRGx0SvGeulxPwLVUFtG+yqO4 +TaivVTk/kZ+Jo78GcazitWdtM1zUrYZfLis+vHsVccJZInnJjDSMm3XzOq37LOx5CZK eCeMw6w7y+pLMIG5uzPEgggwNNJ9NqFXuk3egTWRDY+66RmpLiLL0LyaqvbQTXI9J5bu BLc+G3Fj3+7drjti8Voa15Qvjlt7DLuJ3z/HJZT58yqoztKfvEVVbwLFfaL2BijeNkf4 f3lEhbMGhEuta+4MR2nKImD5TBERhwqSmkX9CJg5a1pS7wnU6p+yRQ9E1Y2onzCiZa+3 /9FQ== 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:to:from :dkim-signature; bh=OccisqI4WNIDr8E7Yjsdl5GaM3rLNuobwKRrMT0Br6E=; b=DVJZOgej4Il4GKYiXFc+vg45Q12/IoWpXWl+JP18h87th9q9j2v6l/xn8IqYDg7WKp B6EFPM+x2y/bjZHQ9xIc58S/D2gDfU2h7lDK9D2FZMPTMI8IR/VfDxrvt+fWaj8reU36 gyPc5EyQQ1aR7tdtx9LfECCXvy1xGElAzPM0f83zEcxZp/X6eXcxvi4NK6rApBBv5+77 nnqdDJajvpgGwpAWRzYbWi9Bfn3sSOZZ6dAcQhMNHP/vES4EYKxnV67lrVb9Fe+3i1+T OhxZCQPWHjazZdnFPWVjiLXf+WAYDdXlD9rGnchU7qJsAB7n8dV1gzmz4HWXBgI0Aunj LmCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vBj7v8dQ; 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 m19-20020a0cf193000000b0056eb2269008si6242411qvl.498.2023.02.27.06.38.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:38:56 -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=vBj7v8dQ; 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 1pWeFP-00029z-PU; Mon, 27 Feb 2023 09:12:59 -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 1pWeF2-0000YL-Ux for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:37 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeEj-0001JK-5H for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:18 -0500 Received: by mail-wr1-x436.google.com with SMTP id bx12so3218053wrb.11 for ; Mon, 27 Feb 2023 06:12:16 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OccisqI4WNIDr8E7Yjsdl5GaM3rLNuobwKRrMT0Br6E=; b=vBj7v8dQCQDsRnqJG3milKwjXTdwIJ+Vew7E16Vgv52ADlfwQhBjeC+mjac7dn+NuH d9m889U4Znm/9zSNl63JhmSiBY5VdJmA6atRZ03+FVUtp3hpGfay9UbNHRaN2VsmMBHW yU6+GSu1KKrePN+gHy8EZkb+zpIX5eSOrSU72WA67zOxLvyXhVtFs1G8U5R8N36z6yH5 IJl5cLQP96RowaTfRvVKnqujJJ1Kec1y74xbwOdqFRR7K8Ksj8RD1TOPhji8+Ud84JEw LWQ7w6K0BbJSZi/gySARysI4byzMkvgN1Ojp1iTEGfIawfRF/yUwS4kkZ0xNE6/Phxm8 3NGw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OccisqI4WNIDr8E7Yjsdl5GaM3rLNuobwKRrMT0Br6E=; b=Nb5sPgxvPvRTfjeVV7K1c6f4ayvGDjIzEzhpttOpgY+zDvG+wvPgZt1/7plMGp1Uyw P3HymZHClEuoDACnL1CI5jcQ9ndVtz1pH3RTlsARXtjcwquOTHoewAKSY+RoHtd1mT8D 3WAnI4gtxyZ/chcKbcyOMxR0xTcCZS0B9Lfnx4LttR23fiY1qY62Gl33C+1ZWU8jaA6L KHkvz5ykZMQSY7f7TD+WIlYsslv1Tw3aEJqk9XyaFyieXv6ii/I/PChkHmPcZ8B+AUG0 my1pryyzqxXnxAgdHjaGjXMPsIWp/iooce2dcpVxyoHpqSqi8FsNQ7Gl8vpwz57upzOu vWJg== X-Gm-Message-State: AO0yUKW7gzAsGpPCMlVlLFBBi0nsnnq/TcyzzDSaVjDFPhhgmZq5pkzW qY6vHEujI/CcEjGvtaVKSPrOiyVxxM6H+dyK X-Received: by 2002:adf:cd8b:0:b0:2c7:bfe:4f60 with SMTP id q11-20020adfcd8b000000b002c70bfe4f60mr16526846wrj.15.1677507135226; Mon, 27 Feb 2023 06:12:15 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7181688wrr.6.2023.02.27.06.12.14 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:12:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 120/126] hw/ide/pci: Add PCIIDEState::isa_irq[] Date: Mon, 27 Feb 2023 15:02:07 +0100 Message-Id: <20230227140213.35084-111-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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=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 From: Bernhard Beschow These legacy ISA IRQs allow the PIIX IDE functions to be wired up in their south bridges and the VIA IDE functions to disuse PCI_INTERRUPT_LINE as outlined in https://lists.nongnu.org/archive/html/qemu-devel/2020-03/msg01707.html Suggested-by: Mark Cave-Ayland Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230126211740.66874-7-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/ide/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/ide/pci.h b/include/hw/ide/pci.h index 7b5e3f6e1c..74c127e32f 100644 --- a/include/hw/ide/pci.h +++ b/include/hw/ide/pci.h @@ -49,6 +49,7 @@ struct PCIIDEState { IDEBus bus[2]; BMDMAState bmdma[2]; + qemu_irq isa_irq[2]; uint32_t secondary; /* used only for cmd646 */ MemoryRegion bmdma_bar; MemoryRegion cmd_bar[2]; From patchwork Mon Feb 27 14:02:08 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: 657104 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2386311wrb; Mon, 27 Feb 2023 06:38:44 -0800 (PST) X-Google-Smtp-Source: AK7set/rJzZJLxFuHoqB8VzMhL20iPU1qk6577V5vIED4AFpcA5E0I3GEp4QTwhKcn4hAElNsgtC X-Received: by 2002:a05:622a:104d:b0:3bf:d1b3:2be2 with SMTP id f13-20020a05622a104d00b003bfd1b32be2mr9131549qte.63.1677508724392; Mon, 27 Feb 2023 06:38:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508724; cv=none; d=google.com; s=arc-20160816; b=Mu0Yb0AJdWM43PURN5hPjGly0QlcEMsWfQ+kUHrIVYTnioyZax4QkeYl2bOacDUmLg R6U0f6Fq8kPPOIXHwgP0rXH8zhjJAJFkogjQW43AlnhS23mq0BHls8Ha3MxFvKsly9zf CurKmdutSm5ez4KfKuBpOwHs207g3j/kz/kWv3m4J/COOmHwQ7kNzkMlVECagMVPrfQO V8+OXyQuU9CyfwfLIA3+jnsb2wK0j2malpwqZL3dkwhFPOq1PRA82DDH4OSDL6ap8xcV kHKSqIgEjX61jaZLGNUr4vWf7U7C8m2vpPz9vmVHJeQlWwfb79WavAWwpob5wDs14nrM F5Cg== 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:to:from :dkim-signature; bh=0Wm8wUq0a5iz19694eHb2ATNFE27FYGPtcFCbACRkdY=; b=lvPZYe0cDJbiKzQ7ZZI82hzAtqdpXAP0nLRTavLiT5kmGS76fZsCYJ+G56vqblaUxP 1Y2c3YoQPQYCYltWtEk2WR7grEiMfzpzvY6pB7lKkKYWBMQKSO6F3w4Q42E6/GLwZfMD 4Y2Q9Xe460ZSRfSVK4IjNqGc9mw2TTEcO5yGeJVf1cfR6i628qj7xyyhqx4WoGgixC7t Vw/W7ew+HytK6ncPQJxU1MEtzkTYLYFgMOLnWxzqfnqZvy8ggBNM+GIdUd/rWRlXRWZb YoC0PDlQ61bgV59PWW3sY1Eu6NpAPnIKJ9l+k2hR5A9RZUFBdBoCM3xHebLcVfJPyuZ0 uq4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="oJ4GoZV/"; 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 y14-20020a05622a004e00b003b9c4961c87si6766840qtw.228.2023.02.27.06.38.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:38:44 -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="oJ4GoZV/"; 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 1pWeFW-0003Oo-Op; Mon, 27 Feb 2023 09:13:06 -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 1pWeF3-0000Yv-6Z for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:37 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeEp-0001JX-2H for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:24 -0500 Received: by mail-wr1-x42f.google.com with SMTP id bv17so6379787wrb.5 for ; Mon, 27 Feb 2023 06:12:22 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0Wm8wUq0a5iz19694eHb2ATNFE27FYGPtcFCbACRkdY=; b=oJ4GoZV/VB2o9JuVoACwtxpeWStDtuE5eN8Jjai8aJwBA5cYEl3f/oqNtZqZBC5GK9 SPeS8u2sOsSdLGAB8WD2NoLFPyUUZg2WxEa+yChtTy+hZXrCh9yiqb4259O/2PF8WET9 +4W6x/IfEUTcvJGpBRRs+S1w1KXTI9fvFLPx9D248AUxOWJ2JmtPtxNft3ZgYEzmhuNU lqF5qNUdg2QgLmCdLir3YMMhDwvQksHP3GD+me7B2NGCE8CMp+DCqQO1O2prRQSROiGm rUki6YD4Jm31wKQxmX0MOz7e7YneGZ6mZL18uEST3XqZoLr3snboX+uWE6PTI+yR0wQt iDAg== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0Wm8wUq0a5iz19694eHb2ATNFE27FYGPtcFCbACRkdY=; b=q64Jqoa1b/Ygeg1cNgK3Uj/KciHiJ3D1VHLGZX5t1htT7TrtSv17mhOLsHV9C4m2Hv 2PAyeoVpxnD5eaYfWmFfCLNKV9rQnq6WF5KfDMBvhsp2L5KA4hHrsJ/Qt/tH40/72xrt vRkL8ondHeqlSegp8eqevEBCc16rYrr5U7fX9ZXcBpnRUN7X+YJthfsnUAaB3I8/09Zt MfGagzoGqNDdJmOSqziR5J7y2CjjshZ3QbukWXllzfXUDevCdI/W88zfcMKEqKuO7/bD IsFMiSLxFrjvWQmiP79Y9P4CJ71eRvx2Dr5PfVTctG0TZGfknHcRYDW7M7CJF8CDsbRt oBGA== X-Gm-Message-State: AO0yUKUH6ej9fZgjsDEliEQ4FveP3t8GDQwZhX8PK8h/KDQ83YcGDzMH iSHb1mlsF03MyxUGxZcdt0kKPaT1sRDKhMgp X-Received: by 2002:a5d:6a03:0:b0:2c7:84e:1cfa with SMTP id m3-20020a5d6a03000000b002c7084e1cfamr16964008wru.40.1677507141024; Mon, 27 Feb 2023 06:12:21 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i12-20020adfefcc000000b002c54f4d0f71sm7140915wrp.38.2023.02.27.06.12.20 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:12:20 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 121/126] dump: Replace tswapN() -> cpu_to_dumpN() Date: Mon, 27 Feb 2023 15:02:08 +0100 Message-Id: <20230227140213.35084-112-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=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 All uses of tswap in that file are wrong, and should be using cpu_to_dumpN, which correctly tests the endianness of the output. Reported-by: Richard Henderson Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Marc-André Lureau Message-Id: <20230225094903.53167-2-philmd@linaro.org> --- dump/dump.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index 1362810991..0ab229e5e9 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -907,13 +907,13 @@ static void get_note_sizes(DumpState *s, const void *note, if (dump_is_64bit(s)) { const Elf64_Nhdr *hdr = note; note_head_sz = sizeof(Elf64_Nhdr); - name_sz = tswap64(hdr->n_namesz); - desc_sz = tswap64(hdr->n_descsz); + name_sz = cpu_to_dump64(s, hdr->n_namesz); + desc_sz = cpu_to_dump64(s, hdr->n_descsz); } else { const Elf32_Nhdr *hdr = note; note_head_sz = sizeof(Elf32_Nhdr); - name_sz = tswap32(hdr->n_namesz); - desc_sz = tswap32(hdr->n_descsz); + name_sz = cpu_to_dump32(s, hdr->n_namesz); + desc_sz = cpu_to_dump32(s, hdr->n_descsz); } if (note_head_size) { From patchwork Mon Feb 27 14:02:09 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: 657075 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2381019wrb; Mon, 27 Feb 2023 06:28:06 -0800 (PST) X-Google-Smtp-Source: AK7set/yYiXg79SjZ6XrE1ANz2xxp+Ub60Ejfxlyk0i4dPh81PzBSqymUqUBVGVBE22ACar+3QEI X-Received: by 2002:ad4:5bae:0:b0:56e:a2cb:5732 with SMTP id 14-20020ad45bae000000b0056ea2cb5732mr40747344qvq.9.1677508086399; Mon, 27 Feb 2023 06:28:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508086; cv=none; d=google.com; s=arc-20160816; b=Ieu7RodRg9RDwdFI7Q06M9JLOEx15Kw2a8YCjUyKBJhivgmPzCgVIB59vUHdi86sn+ rfOJlcVzoWEZn0uU9sIflwHWQxBlQpA/FQp9ILxf8SVBOY1d9n0qo3BA3Od+D4/NDRR5 mnqBP1xxjZjF2NCe85J+xw8SMJUTMuKBE8CWWzLzT5dH+b082Rc+5Ew/ZKRWhw69Vpdc xzkqfXPS5ElLBGKMMBwKCJgB1r7eezt28j5AQRjgj99ePo4GKkh+QkE3YPQUfie2DzuB 9+4IcO1Uj9PabFbJ4FnQ2rCua7HA3yCRoN/VAr0D7d0gpt35wGwiZ2JF3YG+ziZYmJB7 IBMQ== 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:to:from :dkim-signature; bh=oXB4UAGDvhJyfq+xzN5wPHpDHJCrN79at2VjI6Dm6fg=; b=xIEFqubEIE9vEQSZf8JpO+w2t+n3vpnAUvb1m+CooX66tZ7gfBb5qB90b5lhdXCZDe DDWWWrF12JCtIlKqPTMqaGW/uwR1RVOGZo2S3LFlR5ulK0ufDIdwBgnQHpt5xVR9FX2s G6P/336Vc62C6/Ekc0jm0thDJlQSr4r9p0pvn/slZfC17gni2TZLtx+WFXiPdTxDGfA/ /ldARyoGvTGzV/QZB5Ean2mk4zEVhSZjNEJ7ut5npugFlrtSu5//ErEM0HCsZXAt7tXQ /u6hmQ+Gm1cieFkErUfCVSUTW9eFzE/+SJ9t/wz23fdrNonWDOZWNMAdEKfeQWkFLZih pGvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cGffYHf9; 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 g28-20020a05620a109c00b0073b7b5e34b3si5983460qkk.157.2023.02.27.06.28.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:28:06 -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=cGffYHf9; 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 1pWeFZ-0003hT-Dc; Mon, 27 Feb 2023 09:13:09 -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 1pWeF4-0000aB-71 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:38 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeEt-0001KP-VP for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:29 -0500 Received: by mail-wm1-x32c.google.com with SMTP id o38-20020a05600c512600b003e8320d1c11so6641915wms.1 for ; Mon, 27 Feb 2023 06:12:27 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=oXB4UAGDvhJyfq+xzN5wPHpDHJCrN79at2VjI6Dm6fg=; b=cGffYHf9mJ6lYR3sLe38pW3wph8/CKJBzCtiOSUvHG6fdkC6Z5l2O9rXEcYR53h/0J uWcziZvaogXRWcmEjqOGk23TNopYiGJ7Cu7Y72+EjaFBx3CnFbdk9QSfA/GkBcoXoP6l 0w9x0ds1ItaMx47TxEkLk8Lv0ypcIOzTuucXEYEFrWSp3m8puO/XJpSFobfgzQq4hnL7 xcLB/d7gtIReLRx5EK1m2ckVcR5xfg2lYz7iTy4nsFkP+n1OAvOPvdBEwVEOyYNABl43 H/GK3QbftfDWm0P/W08dYW4RQqgnW8POpBy5200fMdHkm4+sba3dg7PI/EWqpS7ZuG6T LYSw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oXB4UAGDvhJyfq+xzN5wPHpDHJCrN79at2VjI6Dm6fg=; b=G2ipMryaLfG0gO/ye2cAX5cK8d0Xo3JhBkyV6BE4LH7OX/oZ/uLdcWEsBpPyTHUGqG U2YDE1QJPRMcBHnEW22TDLWlHuPiKGVbGHXOycEIkmHBop1IAD2BAZ5q/9S8J8ogcX48 m0eFekjU5exQK/Lhs+bSc3rf7HAmheM6A1s8Hz81K4BA+sZq6WlKgVPGecxs9mDVBk8d M23CYtdMFq53DE2n0yuJ+ZesP9ue7SoCsgHRP5sqU6TK9oOtTNatQGveeARSrYcRG6J0 kg3DphT7qOqbiChp+fca0UFAHcQ38BrzH10pL8D2T0pf0o6ybjVwby23mqGf45O8Lpm2 J9vw== X-Gm-Message-State: AO0yUKWnuTy5TGW9vpfv38HXiP0ZLZpAwjv1WKUoA/Xo/GQE/BzGxjo9 HxRe5O5AJgSbkEPr+qaBvzvvW9qpLQoj3ztc X-Received: by 2002:a05:600c:3088:b0:3d3:49db:9b25 with SMTP id g8-20020a05600c308800b003d349db9b25mr19990095wmn.26.1677507146287; Mon, 27 Feb 2023 06:12:26 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h18-20020a05600c351200b003eb192787bfsm9526180wmq.25.2023.02.27.06.12.25 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:12:25 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 122/126] dump: Replace TARGET_PAGE_SIZE -> qemu_target_page_size() Date: Mon, 27 Feb 2023 15:02:09 +0100 Message-Id: <20230227140213.35084-113-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.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=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 TARGET_PAGE_SIZE is target specific. In preparation of making dump.c target-agnostic, replace the compile-time TARGET_PAGE_SIZE definition by runtime qemu_target_page_size(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: Marc-André Lureau Message-Id: <20230225094903.53167-3-philmd@linaro.org> --- dump/dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dump/dump.c b/dump/dump.c index 0ab229e5e9..4d68a74ffa 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -15,6 +15,7 @@ #include "qemu/cutils.h" #include "elf.h" #include "exec/hwaddr.h" +#include "exec/target_page.h" #include "monitor/monitor.h" #include "sysemu/kvm.h" #include "sysemu/dump.h" @@ -1860,7 +1861,7 @@ static void dump_init(DumpState *s, int fd, bool has_format, } if (!s->dump_info.page_size) { - s->dump_info.page_size = TARGET_PAGE_SIZE; + s->dump_info.page_size = qemu_target_page_size(); } s->note_size = cpu_get_note_size(s->dump_info.d_class, From patchwork Mon Feb 27 14:02:10 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: 657089 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2383438wrb; Mon, 27 Feb 2023 06:32:45 -0800 (PST) X-Google-Smtp-Source: AK7set//xBaTexbujvilghkEgQBVeeNhJIYJ0/GeHb/ZpixucGOYfvOkUV9AiKqs9J5iYQ3y/Esm X-Received: by 2002:a05:622a:1009:b0:3bf:c04a:8d47 with SMTP id d9-20020a05622a100900b003bfc04a8d47mr17365824qte.18.1677508364875; Mon, 27 Feb 2023 06:32:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508364; cv=none; d=google.com; s=arc-20160816; b=h2BdwyFKHG6QDg+AK9+WAToxnbcqHkVSeoMgk2q+I12rJwae1FdP/JGLUMeMnohEBN SALRum7/A8L5gLRE0XfRz5JV4lMm/o1DqsL2SnxwP86Bl+vPyKIM2co81PHeDNdhrqgP vwLuK09bRQX94TVPnpNO2+0xvQPlfUalRxp0IWTiac+ZLToV6S7UYL2MQQRawsnRexPk OxxmldpY4V5qmkcuKmV2UUotM2kK9MKzXCqQ81oopoVH5CJRqgNkDlDPBA2GgiFkpMeE AEWW6KFrctSk8/opDQpA4YH8TENAW1VtpH4joo0wP7tljNTh0QhSP5O7fr7ib6iym5CA 8OIg== 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:to:from :dkim-signature; bh=UvspQ/VBF3M0wOKvRS1ObiXSHGJAYd524IYPVL8lVZs=; b=S/ssMbKhGfYFOhVqjhiVMoruxs27MiRv+DJHYG5E4OzcB2pI4nYezyvF4HAx4MRHmj 8dLITX2j7bYnHvbIaj1zlakQB9PgGmPfv9EX1x5INvvLVtro27lS7l8nCIa3ZQWNAEiq MgSoDVmpstRlRz+Izv/ymQ3uRJnqUnSMdcJqY2GESYeIgAhyxcekk/iXVfovEFdcnBcK OayoOLXLKpUex+C/y4ffMUiWCU3q2vhPJ/P+f3O7qGv/10ZbBF5CmcOdWV93GbCex7Dg 0oOGDKw9nT27en33W/Fo9ot3ZD34uh6yHdMW3IcpYzaqEAQ8gJ4vsO3uic++ABQ2+qq7 atxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aVWE7y9V; 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 f30-20020a05622a1a1e00b003ab73b7bb06si6683995qtb.488.2023.02.27.06.32.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:32:44 -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=aVWE7y9V; 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 1pWeFS-0002gx-CE; Mon, 27 Feb 2023 09:13:02 -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 1pWeF4-0000aP-Ah for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:40 -0500 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeEz-0001L2-JW for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:35 -0500 Received: by mail-wr1-x434.google.com with SMTP id q16so6392576wrw.2 for ; Mon, 27 Feb 2023 06:12:32 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UvspQ/VBF3M0wOKvRS1ObiXSHGJAYd524IYPVL8lVZs=; b=aVWE7y9VdH+5wu+v/tU46odSWWAyHFe34qGMb0OZUfdxjQrry/MorshwTXJJ1tnffm fYyKn1Kh/IVA6LUg13ABJ8ydHldYmlB41dcqQ5keSPa8j+Et8/aZ6G+zfe9GsvGux2Gg Qz9Darnb+qmvf/xSGY3Hcg/QiTOmZpJnh2Gd0FH/csKdWKJlHHUu/n/KZwAO0SM1Ktsg fnuC1k2GZ8dWW6z0NYSifS5sKv0ZqD5ktXCMBZlInFEenLMw6XR4RMIhpAjfxajR74ZA 9Z2dImjvbd93IO8Fo5MyYrdclsgHaNnMnU8h+UARUvep4dCOkyvVqwphxcrEa4BofSeO BCgQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UvspQ/VBF3M0wOKvRS1ObiXSHGJAYd524IYPVL8lVZs=; b=8OCQn8wE/odaEFy9/4gGhpotOVRtz9iWPmAI6+C4yCulOHXc3jf1gDy4AR0fRrS3Xk IN8U2vQi5h6wuatB5sbAd/kdYrf3RZJQoq3QeyUzExCve7sxcS4TJZScIdJx47o4nqBj TRLHCUgNSp4Fefs0lAU3qt0DL9t0L7nTpwe3rY9OzJRhDtIGdCOIy+sRJloqXuMuW4fw l0cq48982hE+bPNfN2WH01XhwdUiwLDFBsvvrGKwSHf3Iv39f071DZknP51g6kR/hl/7 ZE7iXsmL7DZRMU89zFm6m653tjtr7pZoJUv9SUh2NyzoluDPRPiXrHIN0QdnvaUgRiUU 5LCw== X-Gm-Message-State: AO0yUKVJEfWU4aeqVzzLWmy0B248U/8orDblKPl/dbFkEPXJMcdNyfxd 9PNkZ6E9z9e7KTXgaELHRhOw1hYSOPpt0OQu X-Received: by 2002:a5d:43d1:0:b0:2c9:e996:8275 with SMTP id v17-20020a5d43d1000000b002c9e9968275mr5292833wrr.13.1677507151526; Mon, 27 Feb 2023 06:12:31 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id h10-20020a05600c350a00b003daffc2ecdesm14019924wmq.13.2023.02.27.06.12.30 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:12:31 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 123/126] dump: Clean included headers Date: Mon, 27 Feb 2023 15:02:10 +0100 Message-Id: <20230227140213.35084-114-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philmd@linaro.org; helo=mail-wr1-x434.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=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 "qemu/win_dump_defs.h" is only required by win_dump.c, but win_dump.h requires "sysemu/dump.h" which declares the DumpState type. Remove various unused headers. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Message-Id: <20230225094903.53167-4-philmd@linaro.org> --- dump/dump-hmp-cmds.c | 2 +- dump/dump.c | 6 ++---- dump/win_dump.c | 15 +++++---------- dump/win_dump.h | 2 +- 4 files changed, 9 insertions(+), 16 deletions(-) diff --git a/dump/dump-hmp-cmds.c b/dump/dump-hmp-cmds.c index e5053b04cd..b038785fee 100644 --- a/dump/dump-hmp-cmds.c +++ b/dump/dump-hmp-cmds.c @@ -1,5 +1,5 @@ /* - * Human Monitor Interface commands + * Windows crashdump (Human Monitor Interface commands) * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. diff --git a/dump/dump.c b/dump/dump.c index 4d68a74ffa..da63129825 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -14,22 +14,20 @@ #include "qemu/osdep.h" #include "qemu/cutils.h" #include "elf.h" -#include "exec/hwaddr.h" +#include "qemu/bswap.h" #include "exec/target_page.h" #include "monitor/monitor.h" -#include "sysemu/kvm.h" #include "sysemu/dump.h" -#include "sysemu/memory_mapping.h" #include "sysemu/runstate.h" #include "sysemu/cpus.h" #include "qapi/error.h" #include "qapi/qapi-commands-dump.h" #include "qapi/qapi-events-dump.h" #include "qapi/qmp/qerror.h" -#include "qemu/error-report.h" #include "qemu/main-loop.h" #include "hw/misc/vmcoreinfo.h" #include "migration/blocker.h" +#include "hw/core/cpu.h" #ifdef TARGET_X86_64 #include "win_dump.h" diff --git a/dump/win_dump.c b/dump/win_dump.c index f20b6051b6..ba7fa404fe 100644 --- a/dump/win_dump.c +++ b/dump/win_dump.c @@ -1,5 +1,5 @@ /* - * Windows crashdump + * Windows crashdump (target specific implementations) * * Copyright (c) 2018 Virtuozzo International GmbH * @@ -9,19 +9,14 @@ */ #include "qemu/osdep.h" -#include "qemu/cutils.h" -#include "elf.h" -#include "exec/hwaddr.h" -#include "monitor/monitor.h" -#include "sysemu/kvm.h" #include "sysemu/dump.h" -#include "sysemu/memory_mapping.h" -#include "sysemu/cpus.h" #include "qapi/error.h" #include "qapi/qmp/qerror.h" -#include "qemu/error-report.h" -#include "hw/misc/vmcoreinfo.h" +#include "exec/cpu-defs.h" +#include "hw/core/cpu.h" +#include "qemu/win_dump_defs.h" #include "win_dump.h" +#include "cpu.h" static size_t win_dump_ptr_size(bool x64) { diff --git a/dump/win_dump.h b/dump/win_dump.h index b8c25348f4..56f63683c3 100644 --- a/dump/win_dump.h +++ b/dump/win_dump.h @@ -11,7 +11,7 @@ #ifndef WIN_DUMP_H #define WIN_DUMP_H -#include "qemu/win_dump_defs.h" +#include "sysemu/dump.h" void create_win_dump(DumpState *s, Error **errp); From patchwork Mon Feb 27 14:02:11 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: 657029 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373931wrb; Mon, 27 Feb 2023 06:14:29 -0800 (PST) X-Google-Smtp-Source: AK7set9O1M3sdqDYPIoRF28GeWSMh7WtP15aNbOY0N/EAEc/UFXEe8h9D3O2VJaDk9KFG7PgkMAd X-Received: by 2002:a05:6214:ccd:b0:56f:6ba:af98 with SMTP id 13-20020a0562140ccd00b0056f06baaf98mr46392852qvx.1.1677507269824; Mon, 27 Feb 2023 06:14:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507269; cv=none; d=google.com; s=arc-20160816; b=XZNnR5b0eAsYMX6Y3tUJddVOsyP53+HWYlWO4LS7M7Y7F5R4QfDyLtOsnLPy9+fP/p ZuSeXl+HIEyTu6nQ30vX8Guyxb6pZoGodDd7/7kMkjoRX5N88kBxEOL42jdCiMJ8oBx0 6X6l6Rw5A1Hw472bVAtXNzakMFb7bRudzEWCscAVDpzoYv9peAWdOWbvDrIDxITi+VeY gZX+W8lYeLOnAhXTyY1giYLuyCTGwiIvABdVZzrNkctTXTLMx256ITryGjfcWrLs5YB3 nx/OEkl97Tb/jpKUX3WoabLmnoH7vEa/ShXXqEkICzF2Xi6hm3bkE4bz6IEtxGqXQfvh m79g== 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:to:from :dkim-signature; bh=IaVs6FOwXp7HWgaVY9BxYKdINeZMyNNvs9/2KbcKP1Y=; b=HhCYQ6bUP/rbWJB2qqUMVrl+vRkCv/0aQ+OGzjjU1oK02V+9y9b/WMNqzHPtlMtwlT uvWhoDkv76ZNL9apRYxd8SfUm9+2jEmrxuZbLlm+yQ3AEnjQTwQ3JMIarDU34FgOp1SE FGPIbT7/TaxMZUC7HO6LQ7RLljF0yV498IBQXa6tPXpHJRBYWODlgpSqOl2IA3fhwHc2 rJRaIxIz7p22OA5H524DUdIGkK+rXs73XR7nscv26E+PA3cSi26aYK5nSAIHrLdcW0TX y6SHVvZWvrZaqTj9ftgIcSMEMZzaaWZDQ1kXPJiEp+GEl9XZc2MnFAR1JDhK2HTAQoSo 6SPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EXwQ86Rc; 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 s26-20020a0cb31a000000b0056ea94f2164si7172030qve.30.2023.02.27.06.14.29 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:14:29 -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=EXwQ86Rc; 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 1pWeFj-0003o7-Bn; Mon, 27 Feb 2023 09:13: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 1pWeF6-0000p3-DY for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:43 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeF4-0001Lz-Cw for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:39 -0500 Received: by mail-wr1-x433.google.com with SMTP id t15so6372647wrz.7 for ; Mon, 27 Feb 2023 06:12:37 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=IaVs6FOwXp7HWgaVY9BxYKdINeZMyNNvs9/2KbcKP1Y=; b=EXwQ86RcHS/CX0U5AG8RXdVF3z3BR12ZekRsD85Pip1x26MkCHVnEdjKlG+k/0RDTj cEC1mSH6lsFn1lVHY40VMZlcEKiKUjYKhw5Jl+ax5LqcX5Ztw/axHwz+Lq7DlfhXOWfH KSiiml6XZLYGTOhu3U8XdaQy1gjSGzztfYBux1qwivvqiICpTtZIKkRwfsyu+MUahiLq LnF6E/VWK/GSz1myzModh00e2FP0rNhR923B6PwG1F2d5amqoxdVLA7jdQQiWXpfg3MY ZdWBIih28oNIAUUx6ARWCycE+9BRDybZ94nVuwEy2ArLXxoNEI0Y9tDYpT/BNy7uOUU6 iEbQ== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IaVs6FOwXp7HWgaVY9BxYKdINeZMyNNvs9/2KbcKP1Y=; b=gvV+7YReQw9ePMvTIGDC17uXhuQfs1HFHYNSysrWo8mTw9PDMIz8lz/kkf2LVGnTtS klRgM/qXXadD2U2oKdqkCmBm+vF1f1H7Ap7U8cI47aIAgkt9l6TrYsn3DyGspdi1lCqj 0P0IuxsTIfUCPP6Ls99Eo2FHVf9/6Pq35tNJNN2zzDqLlNIpmc5wh5CjMD+VWsJtfftx LDVPc5iFMuHXbfvUnFL3/qRjMQSwkxkjns/EzKOqbR8yFNMSwlrg1SQps1Z+oYFMbr7t CkPCWup0rGSZ5Fq4jx1qv0L5PLC/+4fG8K1s8YukL+OywYdViGqIO3KMr61RB4po1h7x ROwA== X-Gm-Message-State: AO0yUKUWtmpHXDnCegSoCTfGDibP5DYe9hzjm+UjdgOespldroFRoJji Ghg3j+nPROTfiix+k6LBflzEoLrDQGrpFXjq X-Received: by 2002:adf:f883:0:b0:2c7:3d5:9faa with SMTP id u3-20020adff883000000b002c703d59faamr18061653wrp.11.1677507156734; Mon, 27 Feb 2023 06:12:36 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id iz10-20020a05600c554a00b003e2243cfe15sm9213969wmb.39.2023.02.27.06.12.35 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:12:36 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 124/126] dump: Simplify compiling win_dump.o by introducing win_dump_available() Date: Mon, 27 Feb 2023 15:02:11 +0100 Message-Id: <20230227140213.35084-115-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.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=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 To make dump.c less target dependent, move the TARGET_X86_64 #ifdef'ry from dump.c to win_dump.c (introducing a win_dump_available() method there). By doing so we can build win_dump.c on any target, and simplify the meson rule. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Message-Id: <20230225094903.53167-5-philmd@linaro.org> --- dump/dump.c | 16 +++++----------- dump/meson.build | 2 +- dump/win_dump.c | 18 ++++++++++++++++++ dump/win_dump.h | 3 +++ 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index da63129825..fa650980d8 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -28,10 +28,7 @@ #include "hw/misc/vmcoreinfo.h" #include "migration/blocker.h" #include "hw/core/cpu.h" - -#ifdef TARGET_X86_64 #include "win_dump.h" -#endif #include #ifdef CONFIG_LZO @@ -2126,12 +2123,10 @@ void qmp_dump_guest_memory(bool paging, const char *file, } #endif -#ifndef TARGET_X86_64 - if (has_format && format == DUMP_GUEST_MEMORY_FORMAT_WIN_DMP) { - error_setg(errp, "Windows dump is only available for x86-64"); + if (has_format && format == DUMP_GUEST_MEMORY_FORMAT_WIN_DMP + && !win_dump_available(errp)) { return; } -#endif #if !defined(WIN32) if (strstart(file, "fd:", &p)) { @@ -2213,10 +2208,9 @@ DumpGuestMemoryCapability *qmp_query_dump_guest_memory_capability(Error **errp) QAPI_LIST_APPEND(tail, DUMP_GUEST_MEMORY_FORMAT_KDUMP_SNAPPY); #endif - /* Windows dump is available only if target is x86_64 */ -#ifdef TARGET_X86_64 - QAPI_LIST_APPEND(tail, DUMP_GUEST_MEMORY_FORMAT_WIN_DMP); -#endif + if (win_dump_available(NULL)) { + QAPI_LIST_APPEND(tail, DUMP_GUEST_MEMORY_FORMAT_WIN_DMP); + } return cap; } diff --git a/dump/meson.build b/dump/meson.build index 2eff29c3ea..f13b29a849 100644 --- a/dump/meson.build +++ b/dump/meson.build @@ -1,4 +1,4 @@ softmmu_ss.add(files('dump-hmp-cmds.c')) specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo]) -specific_ss.add(when: ['CONFIG_SOFTMMU', 'TARGET_X86_64'], if_true: files('win_dump.c')) +specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('win_dump.c')) diff --git a/dump/win_dump.c b/dump/win_dump.c index ba7fa404fe..ff9c5bd339 100644 --- a/dump/win_dump.c +++ b/dump/win_dump.c @@ -18,6 +18,13 @@ #include "win_dump.h" #include "cpu.h" +#if defined(TARGET_X86_64) + +bool win_dump_available(Error **errp) +{ + return true; +} + static size_t win_dump_ptr_size(bool x64) { return x64 ? sizeof(uint64_t) : sizeof(uint32_t); @@ -470,3 +477,14 @@ out_cr3: return; } + +#else /* !TARGET_X86_64 */ + +bool win_dump_available(Error **errp) +{ + error_setg(errp, "Windows dump is only available for x86-64"); + + return false; +} + +#endif diff --git a/dump/win_dump.h b/dump/win_dump.h index 56f63683c3..c9b49f87dc 100644 --- a/dump/win_dump.h +++ b/dump/win_dump.h @@ -13,6 +13,9 @@ #include "sysemu/dump.h" +/* Check Windows dump availability for the current target */ +bool win_dump_available(Error **errp); + void create_win_dump(DumpState *s, Error **errp); #endif /* WIN_DUMP_H */ From patchwork Mon Feb 27 14:02:12 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: 657042 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2375854wrb; Mon, 27 Feb 2023 06:17:47 -0800 (PST) X-Google-Smtp-Source: AK7set98PPiFPyc8yoLbZwsOidHZd0kLGIOA6rBLNYKIjoX0tZNhKom7uQyxsIrUHlYACATrxqWq X-Received: by 2002:a05:622a:1a24:b0:3bf:a030:2e50 with SMTP id f36-20020a05622a1a2400b003bfa0302e50mr41737740qtb.64.1677507467731; Mon, 27 Feb 2023 06:17:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507467; cv=none; d=google.com; s=arc-20160816; b=HBqJu6ofNhABwnaA55ecosWdOP0VcYv+EpKRv7dEbpPRAAL9ZUoivxPzdUWLwQkxAG nACmr5UslyOO5vS6fhPD90Pti25VZxvQehFTzD3qy9b5NT8Q2LDuz8qAY6ORuIbe7AF3 KFkpnlnRqRMoKvSW39vSZJbHuoZxwjiN6jbqId1xLTpTPYivv105LXSvUbf3jbi1k9Un 8LYuVepjtmAlgWFZ8E0AoT9/xCY36mVtx6xtr1fj1EJ8Mn32rBWb5bsuDXJ0MvXIhNZw Rl7yQ8ZOWZzqtbMiUYFWqHD67RJ+Kdta77WN8U89MxUzIOimRQzF3oWptmmdpWskvXDP XD6Q== 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:to:from :dkim-signature; bh=dk2Ura4QRUYq4OfGhCjuiJiTdsch+c3zilubabnaDK4=; b=P2/k8hZSaDz9YaUZ+k9cNuQy0HZjoymRUC+kPt/kn435ZhrNUjdnmWTkDYYI1Mo1Nn bRgw8puNLGoN6ABjQWph5TGHgzTvRsT32hNWPTIinmkJoO9hUtqNcCIa3rzxxwv9ja2n YzQq4miIaIvqo/Cd0aXl9LvaDQr+x9Oa7+R7faj+r7VYvFxeriUjsv1ig6tsSwVb4Hjg P/VIRD5YQ8kIGGFd3lrqxYUbbvWk1q6Aks/NDfrCYhTVIDD+V8cJOCb8RT5Z/ABAJvex JCWtUNqBjFxMjTVhzDPRgAdt0rKucaQTzWUXhW++Uo+ZVR33PBnAjCWwHHsngsVbRnZD eUyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cSQ7PfGy; 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 d14-20020a05622a05ce00b003ba1c1dab50si6559221qtb.296.2023.02.27.06.17.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:17:47 -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=cSQ7PfGy; 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 1pWeFM-0001il-Pl; Mon, 27 Feb 2023 09:12:56 -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 1pWeFB-0000zg-Mh for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:47 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeF9-0001MS-S7 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:45 -0500 Received: by mail-wr1-x430.google.com with SMTP id l1so3326989wry.12 for ; Mon, 27 Feb 2023 06:12:43 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=dk2Ura4QRUYq4OfGhCjuiJiTdsch+c3zilubabnaDK4=; b=cSQ7PfGy9Q8Zg2g0aGw0NshIQH0GRRFaSEhr3qAsnDN4bFo18+nSy9oqi3h/mXCZGb eF/PezzMKSEM3MixWuqFemD8Eh17AGCQh1iiApk++CfNo0PTDyP8EuyV+KwO84HZrKEC cpX4mWRxD019Kyx0ILhq5+vemh6OuZuAmXTNnkmBGTUWu7NUCb7gAUIlCaDOQzLa7jiG kC/YSeRXLgHtEy3SH3nJL7jpqfE+cf7Snf7KlvXlsRpbwZ7AogCspOT/blf9QErL48Id vbd26h+BEv8Go0GHy8Ul3l3eoxDaZOIFaYmlTT/X/yVQwhaW60Cu7lFzIXhcVy5Xjn2g gY0Q== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dk2Ura4QRUYq4OfGhCjuiJiTdsch+c3zilubabnaDK4=; b=2cKFlrrzgNOYWc0SrYhuqPW7W+hmVpWiQ0W4JjZM5AXfq+RXO1wLmzkXsgOJLiWswc jVPy6+TgA5KldG7jV0Z0SF/6cIoMUoUh04zVnUW7KOD87ZgGvwJh4t+ncjyfnwx46WFY d+6k4CpxJudkkiOrNyk1zR/w93PzHxinytok0ybrTP4xFpSThkg0A0JKt09misN79gAm +cpmEzyxD/Kkdh1/Q+yY+bUveDyFWBpe7KC0ZvRXOs17GDC9/I89ZVk7i5/2yysK1LD0 voGiGUuQ53Lrw3CTxmzCUUYS6bJ74r00ntOx7jb2AFlPF2uE+tYD7ChSws0gJncEDBaL EIww== X-Gm-Message-State: AO0yUKUvEhOydCCs/3mJ17waAVImZCbwFn7pdqT418gXKM2gK33mIStQ V7MZt2v5wjhhAoFj7vIVTVajGwYLVpUBFBDy X-Received: by 2002:a5d:690e:0:b0:2c7:1e52:c5a8 with SMTP id t14-20020a5d690e000000b002c71e52c5a8mr9151539wru.21.1677507161997; Mon, 27 Feb 2023 06:12:41 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id l16-20020adfe590000000b002c70e60eb40sm7247590wrm.11.2023.02.27.06.12.41 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:12:41 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 125/126] dump: Add create_win_dump() stub for non-x86 targets Date: Mon, 27 Feb 2023 15:02:12 +0100 Message-Id: <20230227140213.35084-116-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philmd@linaro.org; helo=mail-wr1-x430.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=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 Implement the non-x86 create_win_dump(). We can remove the last TARGET_X86_64 #ifdef'ry in dump.c, which thus becomes target-independent. Update meson accordingly. Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Message-Id: <20230225094903.53167-6-philmd@linaro.org> --- dump/dump.c | 2 -- dump/meson.build | 4 +--- dump/win_dump.c | 5 +++++ 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index fa650980d8..544d5bce3a 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -2018,9 +2018,7 @@ static void dump_process(DumpState *s, Error **errp) DumpQueryResult *result = NULL; if (s->has_format && s->format == DUMP_GUEST_MEMORY_FORMAT_WIN_DMP) { -#ifdef TARGET_X86_64 create_win_dump(s, errp); -#endif } else if (s->has_format && s->format != DUMP_GUEST_MEMORY_FORMAT_ELF) { create_kdump_vmcore(s, errp); } else { diff --git a/dump/meson.build b/dump/meson.build index f13b29a849..df52ee4268 100644 --- a/dump/meson.build +++ b/dump/meson.build @@ -1,4 +1,2 @@ -softmmu_ss.add(files('dump-hmp-cmds.c')) - -specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: [files('dump.c'), snappy, lzo]) +softmmu_ss.add([files('dump.c', 'dump-hmp-cmds.c'), snappy, lzo]) specific_ss.add(when: 'CONFIG_SOFTMMU', if_true: files('win_dump.c')) diff --git a/dump/win_dump.c b/dump/win_dump.c index ff9c5bd339..0152f7330a 100644 --- a/dump/win_dump.c +++ b/dump/win_dump.c @@ -487,4 +487,9 @@ bool win_dump_available(Error **errp) return false; } +void create_win_dump(DumpState *s, Error **errp) +{ + win_dump_available(errp); +} + #endif From patchwork Mon Feb 27 14:02:13 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: 657050 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2377440wrb; Mon, 27 Feb 2023 06:20:54 -0800 (PST) X-Google-Smtp-Source: AK7set8gUj09EUNnKC32NehNPSIV98UOKtzYAOwPUKxFiaI5ODdXi0rqxl6X+/xi941sirWBexBm X-Received: by 2002:a05:6102:150e:b0:412:f05:675b with SMTP id f14-20020a056102150e00b004120f05675bmr4582252vsv.15.1677507653933; Mon, 27 Feb 2023 06:20:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507653; cv=none; d=google.com; s=arc-20160816; b=AP6GGuV2DSa4l2rKeoA5gNiG6zzMBMRSzghsIu1Mmp7f5gQ9cBTuvkKHtxQU0WeIVW ZDLt9focRIiW5EdmJUFJ0PV7r9Ckt0Hy0ydlgQdX3p9Gq97b59LwokZaPWyv0q6pJ+qt iVloiiUvSHAR4Cs5+VAEF7KVZsghI7rAuHguxvRr5moURn4zkIiLLit8HLRBLBMTlqRU 8HIH7Yb0IEz95AryWoIdlRI4i7cNkv75XDWOnybBvT3n2bZ2AW0C82gRktRC7Qt1YHo6 Oh2vRgwfU4DPRXI9w/6E313ich1xBcWlNOV9ynafm2PWWbmUBMZax+2TA4l2y9z734nM qQsg== 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:to:from :dkim-signature; bh=ky6Vfjb7nqfdzoG0sGMRpKArH4PwqBfUvvv4AQpaXAo=; b=pBUK07KQWotZE5umc9m8LyQIVfzQYzJDqj/KIhZMxfX10QTl0NuWCY2P8OjRKOycpf VakEfBC0ZBlLotAj6SHfSzdO2QTxneodBgesmH/HflwN8pLvmlC9oNQagsDzSd+omITE SQUCiQCj82P5oEpKezxf2ue8wXR0TH8pnpQ73c9LcoUlHrmQJWqV56qMb+b1TQkaot4K Sqtz8TVtB/wEOwSUN6QRpSMjGaxTt6ne2C6Qooie2NHkkzbxcqUc0lhMjIY1xdsXHIoy hVNIA4UNfvOprwysiwQ27cgV1y5rrz92qJ1p8IxvFJaTTXqhLsAPDgxVnHiWRilQS6N/ s3eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=up0NhAZU; 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 bh18-20020a056102357200b00411fb5055a9si2154982vsb.344.2023.02.27.06.20.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:20:53 -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=up0NhAZU; 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 1pWeFy-0004kK-Q2; Mon, 27 Feb 2023 09:13:34 -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 1pWeFG-0001Hk-In for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:52 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWeFE-0001JX-Qf for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:12:50 -0500 Received: by mail-wr1-x42f.google.com with SMTP id bv17so6381247wrb.5 for ; Mon, 27 Feb 2023 06:12:48 -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:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ky6Vfjb7nqfdzoG0sGMRpKArH4PwqBfUvvv4AQpaXAo=; b=up0NhAZUHLAcaAocudB2yV6otzA4+WPraXMi9nAr72tD1Mp2HXmLsSCch6AY3mR6uD Ut27ne1sZ/y7cDCseMbMlpfq44ELBxcbzCqRbr2WyFwS6OffxUAXCIPL+tTv/bYM6dZf LdwhJ6tOvoUgIifaGF0UXVeEtXlpmLSBiaQ1Cubz8GhSJ1hNPibhshMKXzlf+spmWsLD KHp8JX4Eydhuz16OwhrcblP5GzS3CwWkBLCt7zT0e0fmu6zdGK+echpHNOeQMKZ0Tjuo WiZHVkocufn4ulv5g4qT5XbM1EZHo60XAFqi/xhEM3GGvtDTrMX+M3LIN+kRy1o5nj7o uWYw== 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:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ky6Vfjb7nqfdzoG0sGMRpKArH4PwqBfUvvv4AQpaXAo=; b=6cuVWA+SxJvf8/nVOuh1E5yjmnYGZ13KKopXQKE+M9BpzqC/DaQZsUGWBRxvTjEXRW H6tdnBNDlprm9l+U2llY5JWdtbgjT6NKS0rg0chv3lXMdpCHMqhJ8jhpxx6FcCWCEy2r JSB1kcwmSW7YspZ27cVks/1HXCPjaw5m9ldQXL1BYApQzAmj+OwQuQRA/5mGYyKVms73 F+AIDuLC9Gsi4N3t8qnbZz1ziEWXLobosg8L2j3PR3bAwivxL5na6IBWYHgOSdz72dxY HFsU114RCwYQJDgWjp+LV3xmFnDTPjHJlOjRilowZun8G7JnaR2G2o8+HbpkwngKIK/O CcdQ== X-Gm-Message-State: AO0yUKUBWpmSlIP8BeCmKPikZ5l7hC0C7ROQjnKufOY579+52q5mqk9D 92xQCeKAgUaYHQDUJiplXGapnwNwdWlFoN6+ X-Received: by 2002:a5d:58cd:0:b0:2c7:5247:e496 with SMTP id o13-20020a5d58cd000000b002c75247e496mr9756639wrf.60.1677507167930; Mon, 27 Feb 2023 06:12:47 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id i20-20020a5d5234000000b002c5493a17efsm7331677wra.25.2023.02.27.06.12.46 for (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 27 Feb 2023 06:12:47 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 126/126] ui/cocoa: user friendly characters for release mouse Date: Mon, 27 Feb 2023 15:02:13 +0100 Message-Id: <20230227140213.35084-117-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230227140213.35084-1-philmd@linaro.org> References: <20230227140213.35084-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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=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 From: Christian Schoenebeck While mouse is grabbed, window title contains a hint for the user what keyboard keys to press to release the mouse. Make that hint text a bit more user friendly for a Mac user: - Replace "Ctrl" and "Alt" by appropriate symbols for those keyboard keys typically displayed for them on a Mac (encode those symbols by using UTF-8 characters). - Drop " + " in between the keys, as that's not common on macOS for documenting keyboard shortcuts. - Convert lower case "g" to upper case "G", as that's common on macOS. - Add one additional space at start and end of key stroke set, to visually separate the key strokes from the rest of the text. Signed-off-by: Christian Schoenebeck Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Message-Id: Signed-off-by: Philippe Mathieu-Daudé --- ui/cocoa.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index e915c344a8..289a2b193e 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -72,6 +72,9 @@ #define cgrect(nsrect) (*(CGRect *)&(nsrect)) +#define UC_CTRL_KEY "\xe2\x8c\x83" +#define UC_ALT_KEY "\xe2\x8c\xa5" + typedef struct { int width; int height; @@ -1135,9 +1138,9 @@ - (void) grabMouse if (!isFullscreen) { if (qemu_name) - [normalWindow setTitle:[NSString stringWithFormat:@"QEMU %s - (Press ctrl + alt + g to release Mouse)", qemu_name]]; + [normalWindow setTitle:[NSString stringWithFormat:@"QEMU %s - (Press " UC_CTRL_KEY " " UC_ALT_KEY " G to release Mouse)", qemu_name]]; else - [normalWindow setTitle:@"QEMU - (Press ctrl + alt + g to release Mouse)"]; + [normalWindow setTitle:@"QEMU - (Press " UC_CTRL_KEY " " UC_ALT_KEY " G to release Mouse)"]; } [self hideCursor]; CGAssociateMouseAndMouseCursorPosition(isAbsoluteEnabled);