From patchwork Mon Sep 18 16:02: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: 724160 Delivered-To: patch@linaro.org Received: by 2002:adf:f0d1:0:b0:31d:da82:a3b4 with SMTP id x17csp1773580wro; Mon, 18 Sep 2023 09:05:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHet3EKkAVWX3NKryVxNQnim2WJ9QlYAX8SAZfLCMqG8lSKdqXPmMkMucY/ZyJMBybx05Z X-Received: by 2002:a0c:aacb:0:b0:63f:7c62:63dd with SMTP id g11-20020a0caacb000000b0063f7c6263ddmr7062460qvb.46.1695053133482; Mon, 18 Sep 2023 09:05:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695053133; cv=none; d=google.com; s=arc-20160816; b=d1fQu3/siHwSG/1sLAaAp1TAqupJ77bUQCKCBV7+kmqLKTu/EdR+XADucpCE781PcL E7Rg8nMniEO8GJE5+YR+J5fqNMyBLPMiN+Muu6yqrW9vgStz4ONMevo5wXNfMlDfr3Oh BfYllFAJnUTSxqt7At/FZlyK+X4z5sa3Qv3G6UOxUgPoDi9aV8/GM74XfQmxIjxnM+y2 WAtUUQh52z2rL5dN/odJqwWLJBiesopMZMC6Whf6rL6dqKVks166+ELkPzsNUZT86wrS RAN/8freEN48wlQCU2APN1foxQoGMNNK0cwY/RhnKAMpQ494SSWMvNrPAnyFfnmyJ38s 7vrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dCQpcHiGYl2b5PMw9sHU7Xzs4il9aZ3go8echWC+OUY=; fh=AIYNAcrfQPdTp+tiOBYg2bCy2NfWRbXD73JV9SLWbpM=; b=gZF9IGd/AxW72q/GBecBAIt9kd1+JbggmAsMF5gytGHlusr7Po9qnE/KpXLEnYS8Bt SomYV5wm6jH17FAvjZTXc97vqAHW7BfcDbau//nowL6A53G3tnjqXk/hJYfRlgo2rMxY oweWaATUh8KUdYMpePt2uswziQvGQZ2ITPnHZFbPjFH5W+U8qGrCvGqp8LVt3Dt1dJpf LnSQEuIeAWa0Tik7IsIWsbHxlJz7ismxhHIrtgzq+j69K4YqDqECzFqmery37ooXDHf7 AEcJ80F6wM8TW3gbl90W1adg2y23T5RbS95m1047eYXU8AFE4m6al9VYWwZqkANZTjSP dKeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FQYTnb2i; 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-20020a0ca9c2000000b00656174d7419si6089363qvb.153.2023.09.18.09.05.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Sep 2023 09:05:33 -0700 (PDT) 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=FQYTnb2i; 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 1qiGjc-0008Oj-A0; Mon, 18 Sep 2023 12:04:28 -0400 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 1qiGj6-0006li-7t for qemu-devel@nongnu.org; Mon, 18 Sep 2023 12:03:57 -0400 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiGj4-00047P-0P for qemu-devel@nongnu.org; Mon, 18 Sep 2023 12:03:55 -0400 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50305abe5f0so3128444e87.2 for ; Mon, 18 Sep 2023 09:03:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695053031; x=1695657831; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dCQpcHiGYl2b5PMw9sHU7Xzs4il9aZ3go8echWC+OUY=; b=FQYTnb2iEsJtLlSXmuBujvnttvgfO0zf1nBecTbg6e06R/UPi6rfb5RPyAmpEzj7o6 vfmMniuY+qJGEUf6ihj3bTI4yRlgNxM3Z2fmkhOJlnx2WLNnoxePcFgy4upgbeJ11Zve OAcxC+RhPjRRflhUrIWFg1iydcrxJEHxDt3x4PxrDOceOuS3X0Y8fjThLq/y2LFuG5to pM1z7MTtS6FKWqpqeCocdZkLC6wQie+DUVt7vcXChlwt6XNZEaItb/kAXGYnyY+DDmWI 2DORwyvoad9lugoVC/suAfsnOW0nOXhVGTyvt+bFj/bapJkx5kgxm/3OaSUrEM8y6isU 5LXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695053031; x=1695657831; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dCQpcHiGYl2b5PMw9sHU7Xzs4il9aZ3go8echWC+OUY=; b=Vd6LteFobx2Sk11UXn+iUhPvwtrgz3umQMlqu4fw4W5QmIi8NOIYe4UTkN8/oXDs66 E5mNa/EgX1KyKcIjJpemzE0MLEe4pzoOCBvfn2OfJZAWYx3PsEVAJv0fJEfjdZAlnOAM Cx391UupXh0+/ik+Nb6qfAfV8Fopq0AwmmxYM3RP9I7TW29khtGDAuKMWCgKP71CjFLj h8zWqEoSoyQnvfj0GcxmWz10vNXwT358RRSfF7xNKLMwZS4PuQSkowANp+ukoGEo6yTr HMc0Y4rRtJlDWaBMmXCWXtaxaPRTuqwH/NVNmUYWPvxOsNdXNL0skiZ8ISiPE7bOcUCm Zy1w== X-Gm-Message-State: AOJu0YwejeRWixYcM2Sv7aFD7+iIOHzRgtbC5WWB223XyNhgGKInMVHl QQPEsDakH6hXKMHfF0NxbzLndURvyBezoTGz9Fwx6NEy X-Received: by 2002:a05:6512:3a9:b0:4fe:5860:7abf with SMTP id v9-20020a05651203a900b004fe58607abfmr6929316lfp.13.1695053031505; Mon, 18 Sep 2023 09:03:51 -0700 (PDT) Received: from localhost.localdomain (static-212-193-78-212.thenetworkfactory.nl. [212.78.193.212]) by smtp.gmail.com with ESMTPSA id n3-20020a50cc43000000b0053132e5ea61sm913803edi.30.2023.09.18.09.03.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 18 Sep 2023 09:03:51 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Paolo Bonzini , Max Filippov , David Hildenbrand , Peter Xu , Anton Johansson , Peter Maydell , kvm@vger.kernel.org, Marek Vasut , David Gibson , Brian Cain , Yoshinori Sato , "Edgar E . Iglesias" , Claudio Fontana , Daniel Henrique Barboza , Artyom Tarasenko , Marcelo Tosatti , qemu-ppc@nongnu.org, Liu Zhiwei , Aurelien Jarno , Ilya Leoshkevich , Daniel Henrique Barboza , Bastian Koppelmann , =?utf-8?q?C=C3=A9dric_?= =?utf-8?q?Le_Goater?= , Alistair Francis , Alessandro Di Federico , Song Gao , Marcel Apfelbaum , Chris Wulff , "Michael S. Tsirkin" , Alistair Francis , Fabiano Rosas , qemu-s390x@nongnu.org, Yanan Wang , Luc Michel , Weiwei Li , Bin Meng , Stafford Horne , Xiaojuan Yang , "Daniel P . Berrange" , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , qemu-arm@nongnu.org, Jiaxun Yang , Richard Henderson , Aleksandar Rikalo , Bernhard Beschow , Mark Cave-Ayland , qemu-riscv@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Nicholas Piggin , Greg Kurz , Michael Rolnik , Eduardo Habkost , Markus Armbruster , Palmer Dabbelt Subject: [PATCH 10/22] target/hppa: Create timer *after* accelerator vCPU is realized Date: Mon, 18 Sep 2023 18:02:43 +0200 Message-ID: <20230918160257.30127-11-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230918160257.30127-1-philmd@linaro.org> References: <20230918160257.30127-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=philmd@linaro.org; helo=mail-lf1-x130.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 Architecture specific hardware doesn't have a particular dependency on the accelerator vCPU (created with cpu_exec_realizefn), and can be initialized *after* the vCPU is realized. Doing so allows further generic API simplification (in few commits). Signed-off-by: Philippe Mathieu-Daudé --- target/hppa/cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 49082bd2ba..b0d106b6c7 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -131,8 +131,6 @@ static void hppa_cpu_realizefn(DeviceState *dev, Error **errp) return; } - acc->parent_realize(dev, errp); - #ifndef CONFIG_USER_ONLY { HPPACPU *cpu = HPPA_CPU(cs); @@ -140,6 +138,8 @@ static void hppa_cpu_realizefn(DeviceState *dev, Error **errp) hppa_cpu_alarm_timer, cpu); } #endif + + acc->parent_realize(dev, errp); } static void hppa_cpu_initfn(Object *obj)