public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: paulus@samba.org
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	cbe-oss-dev@ozlabs.org, Christian Krafft <krafft@de.ibm.com>,
	Jeremy Kerr <jk@ozlabs.org>,
	Arnd Bergmann <arnd.bergmann@de.ibm.com>
Subject: [patch 1/5] spu_manage: use newer physical-id attribute
Date: Wed, 22 Aug 2007 19:01:25 +0200	[thread overview]
Message-ID: <20070822170731.984791109@arndb.de> (raw)
In-Reply-To: 20070822170124.764128591@arndb.de

[-- Attachment #1: 36162.diff --]
[-- Type: text/plain, Size: 2119 bytes --]

From: Christian Krafft <krafft@de.ibm.com>
Legacy device tree used the reg property for the physical id of an spe.
On newer device tree layouts the reg property contains the "correct" value
in the reg attribute. So there has been intoduced the "physical-id" on newer
devicetree layouts. The id is stored by spu_manage into the spu struct as spe_id.
cbe_thermal has been changed to use the spu->spe_id.
There's no need for the thermal code has to check devicetree attributes for itself.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>
Cc: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>

---

Jeremy, please Ack

Index: linux-2.6/arch/powerpc/platforms/cell/cbe_thermal.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/cbe_thermal.c
+++ linux-2.6/arch/powerpc/platforms/cell/cbe_thermal.c
@@ -88,17 +88,13 @@ static struct cbe_pmd_regs __iomem *get_
 /* returns the value for a given spu in a given register */
 static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iomem *reg)
 {
-	const unsigned int *id;
 	union spe_reg value;
 	struct spu *spu;
 
-	/* getting the id from the reg attribute will not work on future device-tree layouts
-	 * in future we should store the id to the spu struct and use it here */
 	spu = container_of(sysdev, struct spu, sysdev);
-	id = of_get_property(spu_devnode(spu), "reg", NULL);
 	value.val = in_be64(&reg->val);
 
-	return value.spe[*id];
+	return value.spe[spu->spe_id];
 }
 
 static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf)
Index: linux-2.6/arch/powerpc/platforms/cell/spu_manage.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spu_manage.c
+++ linux-2.6/arch/powerpc/platforms/cell/spu_manage.c
@@ -48,7 +48,7 @@ static u64 __init find_spu_unit_number(s
 {
 	const unsigned int *prop;
 	int proplen;
-	prop = of_get_property(spe, "unit-id", &proplen);
+	prop = of_get_property(spe, "physical-id", &proplen);
 	if (proplen == 4)
 		return (u64)*prop;
 

--


  reply	other threads:[~2007-08-22 17:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-22 17:01 [patch 0/5] (hopefully) final 2.6.23 fixes for cell platform Arnd Bergmann
2007-08-22 17:01 ` Arnd Bergmann [this message]
2007-08-22 17:01 ` [patch 2/5] cell: support pinhole-reset on IBM cell blades Arnd Bergmann
2007-08-22 17:01 ` [patch 3/5] Axonram module modification for latest firmware API changes Arnd Bergmann
2007-08-22 17:01 ` [patch 4/5] axonram: do not delete gendisks queue in error path Arnd Bergmann
2007-08-22 17:09 ` [patch 5/5] update cell_defconfig for 2.6.23 Arnd Bergmann
2007-08-22 17:15 ` git tree, Re: [patch 0/5] (hopefully) final 2.6.23 fixes for cell platform Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070822170731.984791109@arndb.de \
    --to=arnd@arndb.de \
    --cc=arnd.bergmann@de.ibm.com \
    --cc=cbe-oss-dev@ozlabs.org \
    --cc=jk@ozlabs.org \
    --cc=krafft@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox