From patchwork Wed May 24 14:59: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: 685364 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp298423wrt; Wed, 24 May 2023 08:01:37 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4P0QF6lfFPkBk+NHgyQYPA7EH/HcT3ZECQ/EYz/bTcJ3BBZqBpUqSRPxRHjimjOlsqMTCC X-Received: by 2002:ad4:596f:0:b0:623:66d3:e546 with SMTP id eq15-20020ad4596f000000b0062366d3e546mr26604393qvb.17.1684940496760; Wed, 24 May 2023 08:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684940496; cv=none; d=google.com; s=arc-20160816; b=RfjnjxrRtY+0OOlBSXsn5nNI74HfeBIj+3q0+X5C2FSXiymEw2Ic/Zi/tBvJU9Dg5c BY86EnJk1t6nNPo6+sq9isO/MT6yS+3W+VngJzc/WUy01BlcNMdSz6dEiJbN1CKqC2d+ w37d8hs2JFjnyGEPje8gN1e0E6OH1c+DYnC9i8DHRWepRoz3iZeqj3tkuT24iY1zlltc d9WRJUY5mk2JwBT8/eL79X6lVxNw7Li3jlZMT3jiHd/Lbh54IfElpKszEgiOvBtLiByo QhEOArZ3k0tJf+/6WXwDycumR7/Rc9xSo1grMsT3JZCyYGJdbRqfzYia8fSOFceLTnqi nFmQ== 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=PydogO+S2zKNTlFPp3mMYMrTOfo1Vgivo42WoSUjgRg=; b=erm7DHyKRD/lvc2buZ5IzUPncnsUGnLOE3/XP7xcj+Fj3s/NmlBkY0HX1r5mwrY6Ex Uk1CWi7oMzHFkRrFqheM+D+diiPqMR5flODvvuvJZ26rPqE3/wd3EdL6BE7/KF8jTAJa CEBe/qBc7T/EnpAc4r7SwXCWSkFJDqTtUZ25zBWRJ7AXBQH92H5g7+x2ndStgKOidSAH l+MfORlKeGby5b1HWE9W2DyczNVhlzWsviv5hHuA/bxTstwckWlf8mylrCN47FVakxMQ ULDR267JfDnTihrHLkvErUtlPYGIWG/PJjeGBCv7Dc3udxRBMoxZYajdtB3mEJvt3IAo lv2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E7sOogTi; 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 f21-20020ac859d5000000b003f52fa443besi6971999qtf.746.2023.05.24.08.01.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 May 2023 08:01:36 -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=E7sOogTi; 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 1q1pxt-0006X8-GS; Wed, 24 May 2023 10:59:49 -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 1q1pxe-0006JD-Dc for qemu-devel@nongnu.org; Wed, 24 May 2023 10:59:36 -0400 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 1q1pxc-0006PT-C4 for qemu-devel@nongnu.org; Wed, 24 May 2023 10:59:33 -0400 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-3f607766059so11691865e9.3 for ; Wed, 24 May 2023 07:59:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684940371; x=1687532371; 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=PydogO+S2zKNTlFPp3mMYMrTOfo1Vgivo42WoSUjgRg=; b=E7sOogTiv9Y4kFslJcA9lUcIb+HVt34jqG1gfk/jOyTxLEV/idizywt0a+uNW6kho5 M7gCzXbtMw+WtVSvzp/HGH0ArrUmQ6RUpyjI1iv/lR3bMy0fW6h0C1HBTnURRqDHZUjh A4oIY4DdCkPDW42HLhvBToC1miDHYOa+9SVBlHOyoDq+CxBRKFc3YQ4us2naLZ4uJz2k FUvKwIHbpdUazrBribvg8ac6J+IWQICtb8bxKx05QurgjcMTo7nht98a5RQL+r8+iJcH /Wgnz1L7fYkQVLvqcJblMXfylARGUbN8nhLjL5sYd351K2usywllzODlPHBxMPsvTF6j e0SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684940371; x=1687532371; 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=PydogO+S2zKNTlFPp3mMYMrTOfo1Vgivo42WoSUjgRg=; b=At69EO71kl/g8bk6+TZKa4u4l22UY3N1MNWy16AkqnZ2Q0049Z8jQVqKqCg+ye95ti LW2dlogeiS9N+uX5HwLnS/dSkwWyJ+f7y3ezHpHUbthu3JOWa0OTWgykT7Gcv4GyhVN2 j9CpO8c8vo0xLIgU7+QljgNqyotwiAklV84puZxylKicnfVhXUd8jdxkCrzBOyDsk9Mb P3eh3AsWWfIkcNI22qkzhSxdF3eGoxcu8tBMqpBE6lO1P7q/KQrphUoFhwllG77NHxOd 7bucTQiv4prV7by6QR50M0auM/LuhP6eVx1tutGNaLGuUvMt7TYppj925xkwvZwW/CbS kb5Q== X-Gm-Message-State: AC+VfDxTwFCpczxNo5bxngkBBPHKHkYPolJvWhYB3O+WQ9Mg4fp4Ww20 OyWAS+RdsO4An6VsQCttWa85SdvwxhLFMwcYxJi4lQ== X-Received: by 2002:a7b:c411:0:b0:3f4:f7c2:d681 with SMTP id k17-20020a7bc411000000b003f4f7c2d681mr33149wmi.29.1684940370857; Wed, 24 May 2023 07:59:30 -0700 (PDT) Received: from localhost.localdomain (fac34-h02-176-184-31-193.dsl.sta.abo.bbox.fr. [176.184.31.193]) by smtp.gmail.com with ESMTPSA id x15-20020a1c7c0f000000b003f4268f51f5sm2670695wmc.0.2023.05.24.07.59.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 24 May 2023 07:59:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 04/10] hw/arm/realview: Factor realview_common_class_init() out Date: Wed, 24 May 2023 16:59:00 +0200 Message-Id: <20230524145906.33156-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230524145906.33156-1-philmd@linaro.org> References: <20230524145906.33156-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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Introduce realview_common_class_init() where we'll set fields common to all Realview classes. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/arm/realview.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/arm/realview.c b/hw/arm/realview.c index f0a8a93b08..6970e8a469 100644 --- a/hw/arm/realview.c +++ b/hw/arm/realview.c @@ -410,6 +410,13 @@ static void realview_pbx_a9_init(MachineState *machine) realview_init(machine, BOARD_PBX_A9); } +static void realview_common_class_init(ObjectClass *oc, void *data) +{ + MachineClass *mc = MACHINE_CLASS(oc); + + mc->ignore_memory_transaction_failures = true; +} + static void realview_eb_class_init(ObjectClass *oc, void *data) { MachineClass *mc = MACHINE_CLASS(oc); @@ -417,7 +424,6 @@ static void realview_eb_class_init(ObjectClass *oc, void *data) mc->desc = "ARM RealView Emulation Baseboard (ARM926EJ-S)"; mc->init = realview_eb_init; mc->block_default_type = IF_SCSI; - mc->ignore_memory_transaction_failures = true; mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm926"); } @@ -429,7 +435,6 @@ static void realview_eb_mpcore_class_init(ObjectClass *oc, void *data) mc->init = realview_eb_mpcore_init; mc->block_default_type = IF_SCSI; mc->max_cpus = 4; - mc->ignore_memory_transaction_failures = true; mc->default_cpu_type = ARM_CPU_TYPE_NAME("arm11mpcore"); } @@ -439,7 +444,6 @@ static void realview_pb_a8_class_init(ObjectClass *oc, void *data) mc->desc = "ARM RealView Platform Baseboard for Cortex-A8"; mc->init = realview_pb_a8_init; - mc->ignore_memory_transaction_failures = true; mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a8"); } @@ -450,7 +454,6 @@ static void realview_pbx_a9_class_init(ObjectClass *oc, void *data) mc->desc = "ARM RealView Platform Baseboard Explore for Cortex-A9"; mc->init = realview_pbx_a9_init; mc->max_cpus = 4; - mc->ignore_memory_transaction_failures = true; mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9"); } @@ -475,6 +478,7 @@ static const TypeInfo realview_machine_types[] = { .name = TYPE_REALVIEW_MACHINE, .parent = TYPE_MACHINE, .class_size = sizeof(RealviewMachineClass), + .class_init = realview_common_class_init, .abstract = true, } };