From nobody Wed Nov 27 20:40:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1697666046; cv=none; d=zohomail.com; s=zohoarc; b=P5xZWqw6soIFYGYOhB2TDzktTkYravKWtO8O/N83bdXXMbG6ZLSci/W80ZM6jaYs8+6Uyh2LnL02iuOXHYZqaNafjV2fJL/eSc9ar9IGbxV9fnX7A0e5RVsxme5YFnfxjBind3KJsxWxVaLW2KKUZHX2KaLkJlAZcc50gGI0XfQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697666046; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=BuwEn/6tALxgxX8K5Z/25NI6Kvm0qV/PZyiXdtk4l3g=; b=fPwqci8RKRYeVX1ITgSA/eMZ9ER/5UQ1bOcoKIJdLbuSp2KCq9nBeTJpXxP+FpYFF28kGzwjJfyLuQjLTxNmL7CcLNEndO0bAnuY9jCjZPz2obUOrzzxseoHRad0pOkrDgqwWPq7f3n74jqhj4LqV9auD94mKKpHCcHo32GIb8Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697666046524848.0570549860762; Wed, 18 Oct 2023 14:54:06 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtESi-0001nA-3I; Wed, 18 Oct 2023 17:52:20 -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 1qtESF-000171-Qu for qemu-devel@nongnu.org; Wed, 18 Oct 2023 17:51:52 -0400 Received: from mail-ot1-x32a.google.com ([2607:f8b0: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 1qtESE-0004P1-AX for qemu-devel@nongnu.org; Wed, 18 Oct 2023 17:51:51 -0400 Received: by mail-ot1-x32a.google.com with SMTP id 46e09a7af769-6cd0964a994so634634a34.0 for ; Wed, 18 Oct 2023 14:51:49 -0700 (PDT) Received: from stoup.. ([71.212.149.95]) by smtp.gmail.com with ESMTPSA id w17-20020a63f511000000b005b61a024ec7sm2176380pgh.74.2023.10.18.14.51.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 14:51:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697665909; x=1698270709; 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=BuwEn/6tALxgxX8K5Z/25NI6Kvm0qV/PZyiXdtk4l3g=; b=cS4i09oyx+YNPo+afAne13vVJfcog+vH08H05bAPOhfcRFFY7LU66CDv1GrNe6oTe2 eUQuC6m6PXCUV8OfKTGmEREklFCLe+jvlQrOCUDx3s4IOcAAj2lkRenJ+AunZc30ZwbD 5iaRCnvJ7ZX/SiNAEt3cCLY5+1y0r2QkxefunOD0wNB8pBh5rVfCZGKtIbdHXPbcuWZ1 5/ACpGyM6hiuV9nIDFG5lUjWdso1gBakKG0Mifqp7bS0jgBZ5uthqGC5yTJQBI7DQrXd jSRlBA+gB2c4u96J3//jVWEBQIYHyZeuliyaO9uyDViEF4MhLeeaDCP/GdH6fdCG+/cr 0OLw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697665909; x=1698270709; 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=BuwEn/6tALxgxX8K5Z/25NI6Kvm0qV/PZyiXdtk4l3g=; b=W6WzgdAh0pY9qNORNPyEuAUQ48wpdfVvmIdwMK3oeTy2/kcDS5+2c4irccHjyexeb+ ga/oQV2AF+1R6XqdgcPhPpFZg25WAj+7zTeSWHh9/i5QGnkfgK4vwqXztItYZXrR2S1/ d+YhW3aP50mOpJikhuCUvu5tj4TVpNqNtr5V6iYJyaVvrGOjtvQqsg1eaDf/Ed/+aSyh 93ij8UQoyy7DDI2zmBapBgBBksply/lY4U4jX8kx4UENxt5kLm+cLsj4kM7KZ1yeyGJo Kksnaw7BMOqDj/txcCuHiSpbwq63dOqzCUd33iZddOKOvq/ZCvTSTOokMWK7BB+RKthb B2zA== X-Gm-Message-State: AOJu0Yz6XWNcSN5dWgrwpiEEE8w+vDCrvzUWBZkj1ahUf8X9USweb2hF goLNvn/yf+TYJdFFuvivtz+nS28ZwlcCLHzM47Q= X-Google-Smtp-Source: AGHT+IHYHnK3atizDl6phSRbdyOQL15QChj5TNvOEetpYj1HN9Z95r5Vpa3tS4B3vehxwT8p6suAwg== X-Received: by 2002:a05:6830:3493:b0:6b9:bd9d:e333 with SMTP id c19-20020a056830349300b006b9bd9de333mr831791otu.3.1697665909039; Wed, 18 Oct 2023 14:51:49 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: deller@gmx.de Subject: [PATCH 15/61] target/hppa: Implement hppa_cpu_class_by_name Date: Wed, 18 Oct 2023 14:50:49 -0700 Message-Id: <20231018215135.1561375-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231018215135.1561375-1-richard.henderson@linaro.org> References: <20231018215135.1561375-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::32a; envelope-from=richard.henderson@linaro.org; helo=mail-ot1-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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1697666048510100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson --- linux-user/hppa/target_elf.h | 2 +- target/hppa/cpu.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/linux-user/hppa/target_elf.h b/linux-user/hppa/target_elf.h index 82b4e9535e..9bb865ae92 100644 --- a/linux-user/hppa/target_elf.h +++ b/linux-user/hppa/target_elf.h @@ -9,6 +9,6 @@ #define HPPA_TARGET_ELF_H static inline const char *cpu_get_model(uint32_t eflags) { - return "any"; + return TYPE_HPPA_CPU; } #endif diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 1975aa9621..6bf415139f 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -159,7 +159,15 @@ static void hppa_cpu_initfn(Object *obj) =20 static ObjectClass *hppa_cpu_class_by_name(const char *cpu_model) { - return object_class_by_name(TYPE_HPPA_CPU); + g_autofree char *typename =3D g_strconcat(cpu_model, "-cpu", NULL); + ObjectClass *oc =3D object_class_by_name(typename); + + if (oc && + !object_class_is_abstract(oc) && + object_class_dynamic_cast(oc, TYPE_HPPA_CPU)) { + return oc; + } + return NULL; } =20 static void hppa_cpu_list_entry(gpointer data, gpointer user_data) --=20 2.34.1