Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,T_FUZZY_SPRM,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F34E0C04AAF for ; Tue, 21 May 2019 06:41:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C064421743 for ; Tue, 21 May 2019 06:41:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.b="ATy1qFz1" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C064421743 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([127.0.0.1]:47482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSySL-0006nr-26 for qemu-devel@archiver.kernel.org; Tue, 21 May 2019 02:41:01 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hSyHV-0005sf-KX for qemu-devel@nongnu.org; Tue, 21 May 2019 02:29:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hSyHT-0007kx-K4 for qemu-devel@nongnu.org; Tue, 21 May 2019 02:29:49 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:45007 helo=ozlabs.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hSyHT-0007h6-7J; Tue, 21 May 2019 02:29:47 -0400 Received: by ozlabs.org (Postfix, from userid 1007) id 457Qpf3pTQz9sD4; Tue, 21 May 2019 16:29:30 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gibson.dropbear.id.au; s=201602; t=1558420170; bh=DhoK2motTlgMA6PD1KwSyR0Bct17q6LIWfIaLI4TIJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ATy1qFz148RznOdQjfMyFEZmSYFniH7Aggx3lo7+GvKSwp+gG7eotEHbcYJlVGsLK bsXfwOViVu6L+AXek4KJKG+jSIhQlkTl6MM5IL7eSrqf2C4yPNA8ren7uPuMT97HKV WQExDvKiRNyJQwoRaFXklQ6PMKEsICGSfYnD2cEw= From: David Gibson To: peter.maydell@linaro.org Date: Tue, 21 May 2019 16:28:53 +1000 Message-Id: <20190521062924.6930-8-david@gibson.dropbear.id.au> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190521062924.6930-1-david@gibson.dropbear.id.au> References: <20190521062924.6930-1-david@gibson.dropbear.id.au> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 203.11.71.1 Subject: [Qemu-devel] [PULL 07/38] target/ppc: Add ibm, purr and ibm, spurr device-tree properties X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lvivier@redhat.com, gkurz@kaod.org, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, clg@kaod.org, Suraj Jitindar Singh , David Gibson Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Suraj Jitindar Singh The ibm,purr and ibm,spurr device tree properties are used to indicate that the processor implements the Processor Utilisation of Resources Register (PURR) and Scaled Processor Utilisation of Resources Registers (SPURR), respectively. Each property has a single value which represents the level of architecture supported. A value of 1 for ibm,purr means support for the version of the PURR defined in book 3 in version 2.02 of the architecture. A value of 1 for ibm,spurr means support for the version of the SPURR defined in version 2.05 of the architecture. Add these properties for all processors for which the PURR and SPURR registers are generated. Fixes: 0da6f3fef9a "spapr: Reorganize CPU dt generation code" Signed-off-by: Suraj Jitindar Singh Message-Id: <20190506014803.21299-1-sjitindarsingh@gmail.com> Signed-off-by: David Gibson --- hw/ppc/spapr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 2ef3ce4362..8580a8dc67 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -500,7 +500,10 @@ static void spapr_populate_cpu_dt(CPUState *cs, void= *fdt, int offset, _FDT((fdt_setprop(fdt, offset, "64-bit", NULL, 0))); =20 if (env->spr_cb[SPR_PURR].oea_read) { - _FDT((fdt_setprop(fdt, offset, "ibm,purr", NULL, 0))); + _FDT((fdt_setprop_cell(fdt, offset, "ibm,purr", 1))); + } + if (env->spr_cb[SPR_SPURR].oea_read) { + _FDT((fdt_setprop_cell(fdt, offset, "ibm,spurr", 1))); } =20 if (ppc_hash64_has(cpu, PPC_HASH64_1TSEG)) { --=20 2.21.0