linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christian Krafft <krafft@de.ibm.com>
To: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>
Cc: Christian Krafft <krafft@de.ibm.com>, Paul Mackerras <paulus@samba.org>
Subject: Re: PMI breakage in cell_defconfig
Date: Thu, 28 Jun 2007 13:14:38 +0200	[thread overview]
Message-ID: <20070628131438.274a796e@localhost> (raw)
In-Reply-To: <20070628115049.393e8a6d@localhost>

[-- Attachment #1: Type: text/plain, Size: 2381 bytes --]

Subject: cbe_cpufreq: fix build error

From: Christian Krafft <krafft@de.ibm.com>

The cbe_cpufreq driver should build without PMI
interface. The code that deals with PMI has been
#ifdef'ed out. This is not the optimal solution for now.
A later version of the cpufreq driver has been cleaned out
from all PMI code. Until that patch makes it into the kernel
use this patch to fix build issues when building cpufreq driver without PMI.

Signed-off-by: Christian Krafft <krafft@de.ibm.com>

Index: linux/arch/powerpc/platforms/cell/cbe_cpufreq.c
===================================================================
--- linux.orig/arch/powerpc/platforms/cell/cbe_cpufreq.c
+++ linux/arch/powerpc/platforms/cell/cbe_cpufreq.c
@@ -74,6 +74,7 @@ static unsigned int pmi_frequency_limit 
 
 static struct of_device *pmi_dev;
 
+#ifdef CONFIG_PPC_PMI
 static int set_pmode_pmi(int cpu, unsigned int pmode)
 {
 	int ret;
@@ -102,7 +103,7 @@ static int set_pmode_pmi(int cpu, unsign
 #endif
 	return ret;
 }
-
+#endif
 
 static int get_pmode(int cpu)
 {
@@ -157,9 +158,11 @@ static int set_pmode_reg(int cpu, unsign
 }
 
 static int set_pmode(int cpu, unsigned int slow_mode) {
+#ifdef CONFIG_PPC_PMI
 	if (pmi_dev)
 		return set_pmode_pmi(cpu, slow_mode);
 	else
+#endif
 		return set_pmode_reg(cpu, slow_mode);
 }
 
@@ -323,26 +326,28 @@ static struct cpufreq_driver cbe_cpufreq
 
 static int __init cbe_cpufreq_init(void)
 {
+#ifdef CONFIG_PPC_PMI
 	struct device_node *np;
-
+#endif
 	if (!machine_is(cell))
 		return -ENODEV;
-
+#ifdef CONFIG_PPC_PMI
 	np = of_find_node_by_type(NULL, "ibm,pmi");
 
 	pmi_dev = of_find_device_by_node(np);
 
 	if (pmi_dev)
 		pmi_register_handler(pmi_dev, &cbe_pmi_handler);
-
+#endif
 	return cpufreq_register_driver(&cbe_cpufreq_driver);
 }
 
 static void __exit cbe_cpufreq_exit(void)
 {
+#ifdef CONFIG_PPC_PMI
 	if (pmi_dev)
 		pmi_unregister_handler(pmi_dev, &cbe_pmi_handler);
-
+#endif
 	cpufreq_unregister_driver(&cbe_cpufreq_driver);
 }
 


-- 
Mit freundlichen Gruessen,
kind regards,

Christian Krafft
IBM Systems & Technology Group,
Linux Kernel Development
IT Specialist


Vorsitzender des Aufsichtsrats:	Martin Jetter
Geschaeftsfuehrung:		Herbert Kircher
Sitz der Gesellschaft:		Boeblingen
Registriergericht:		Amtsgericht Stuttgart, HRB 243294


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

       reply	other threads:[~2007-06-28 11:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1182902559.32153.13.camel@concordia.ozlabs.ibm.com>
     [not found] ` <20070627161545.468b03ba@localhost>
     [not found]   ` <18051.5736.648631.189740@cargo.ozlabs.ibm.com>
     [not found]     ` <20070628115049.393e8a6d@localhost>
2007-06-28 11:14       ` Christian Krafft [this message]
2007-06-28 12:20         ` [patch] cell: pmi remove support for mutiple devices Christian Krafft

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=20070628131438.274a796e@localhost \
    --to=krafft@de.ibm.com \
    --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;
as well as URLs for NNTP newsgroup(s).