From nobody Mon May 6 04:25:57 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1557107376; cv=none; d=zoho.com; s=zohoarc; b=TaEL0ygKfAHlbHWNtRQhJy7yppoH5PZjFfA+/G4lGgoX53oByE2H8YfuqJwkLm5jr4UuNq9xydH3xv79v1+4YrjoMUKPIwuNpUcf07S99O1WjHVQIvM22+VRm/uaWdt6AGzx5PxKAUOWRgOci85tWU7P4Odra8meOMV31pdFTDA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557107376; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=Vp/MT/jroWhReVC2u5/9wEFlWAD6qiho+mThlsJtS7w=; b=N7wFyKLdxmZbgGMQbmgasb0xUdDziKEyIvHQT8Jt2bAMOR/smOs/kfBW9rLu5EMeBZllT1u59eWynwTY8DgLNg2rb1N95DiYY9WlKbucL5dGX1s3amEbjg/ZKx4dJfR/fBnjvq0JpraIauxcSBw6npYmIL4P3Y7+29TKpfFoZrU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1557107376931403.44414101365794; Sun, 5 May 2019 18:49:36 -0700 (PDT) Received: from localhost ([127.0.0.1]:48746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNSkr-00040O-EB for importer@patchew.org; Sun, 05 May 2019 21:49:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hNSjr-0003eX-Nh for qemu-devel@nongnu.org; Sun, 05 May 2019 21:48:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hNSjq-0002cb-Po for qemu-devel@nongnu.org; Sun, 05 May 2019 21:48:19 -0400 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]:39838) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hNSjo-0002ab-No; Sun, 05 May 2019 21:48:16 -0400 Received: by mail-pg1-x542.google.com with SMTP id w22so4341022pgi.6; Sun, 05 May 2019 18:48:16 -0700 (PDT) Received: from surajjs2.ozlabs.ibm.com.ozlabs.ibm.com ([122.99.82.10]) by smtp.gmail.com with ESMTPSA id j5sm10675277pfe.15.2019.05.05.18.48.11 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 05 May 2019 18:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Vp/MT/jroWhReVC2u5/9wEFlWAD6qiho+mThlsJtS7w=; b=aBVCbuHp2xw9y1zR+sGUlVSciwReihvdl3/9jnNLvfc/fKnYU4u09MQ9tX64BppHvr iz2iAE6XLGUOAmRUFZgSj7bn6Hw2eR5BLhPuG7+Chl+0U31DRw7d4sxtjbF2wr2WSPtO D/7gfY7pujHw+mt2Ap9rik1wtex9UvBHL3IUNEs2Y1R408f7w/cRRmil1CIjfLY/67Az 4hS/uJ2b+IDuyLFQlMAxmOhvvuF9uMxuMqQS4NaK/XeiiSbhFDUE8/vzp1iigYEF52Q7 FUA0haSiVIKlz6qATpO91/Zdb5LAswrbXmlaeUUv7U2maLNsIr0Dxu7oU6FL0bWU+XPY RIbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Vp/MT/jroWhReVC2u5/9wEFlWAD6qiho+mThlsJtS7w=; b=PvCWa9rc1Pxroes7SY1mogs/I2gRdRVzGvzDgwXa+7jvJBdBFtRatePqL+SloJrdq5 ncL0PgXB80pDIts347IkIxw9wObylKcBCv0d29ma+eB4mCWDwQ8kEacasDTmVKRCCy5r MoQkIWyO+9XNx1at8AVU6S6TdnFG4OVGLdI77bFZh/gRyNRRurvug0Qo0VLLGJVck3jK ySIMEyrEgaFp2ZjL+bmjyjWHXMFzshWsU2XHVCPxe/8vm+jHCP4DSBzbNTGe0Ch8StWU HCKF6Zlo6s1IsfdLqvMelbbetwcN508BrspbV3fnx89axBWf9oyMjfmRoVvlKUkoXlkb FseQ== X-Gm-Message-State: APjAAAVouAkFTSpvC2lTVRrxQtboZuSK8lTkhZTpmzyK08uIQp0mAVf2 QNbKEqHwsYLT9v9TrKHr8/RQc8Nx X-Google-Smtp-Source: APXvYqwhgZP4B1xq0aQW7/qfS2GT3KIL2ufCDSadPGUo5BtgBXs8MSMCGuZxUn2POXKj89Tat0HjGw== X-Received: by 2002:a65:4649:: with SMTP id k9mr5386282pgr.239.1557107294649; Sun, 05 May 2019 18:48:14 -0700 (PDT) From: Suraj Jitindar Singh To: qemu-ppc@nongnu.org Date: Mon, 6 May 2019 11:48:03 +1000 Message-Id: <20190506014803.21299-1-sjitindarsingh@gmail.com> X-Mailer: git-send-email 2.13.6 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::542 Subject: [Qemu-devel] [QEMU-PPC] [PATCH] 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: paulus@ozlabs.org, qemu-devel@nongnu.org, Suraj Jitindar Singh , david@gibson.dropbear.id.au Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Suraj Jitindar Singh --- 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.13.6