Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: tsbogend@alpha.franken.de (Thomas Bogendoerfer)
To: Martin Michlmayr <tbm@cyrius.com>
Cc: Dmitri Vorobiev <dmitri.vorobiev@gmail.com>,
	linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: Malta build errors with 2.6.26-rc1
Date: Thu, 29 May 2008 22:05:07 +0200	[thread overview]
Message-ID: <20080529200506.GA27783@alpha.franken.de> (raw)
In-Reply-To: <20080528151025.GA15325@deprecation.cyrius.com>

On Wed, May 28, 2008 at 05:10:25PM +0200, Martin Michlmayr wrote:
> * Thomas Bogendoerfer <tsbogend@alpha.franken.de> [2008-05-28 10:50]:
> > I didn't fix the problems above. The change to traps.c only fixes
> > traps.c for 64bit builds and it's a totally different issue. Looking
> > at the warning/errors someone needs to fix some data types and use
> > CKSEG0ADDR(). I don't have the hardware, so I could only provide an
> > untested patch, if no one else steps forward...
> 
> QEMU emulates Malta, so I (or someone else here) should be able to
> test the patch.


Fix 64bit Malta by using CKSEG0ADDR and correct casts

Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
---

 arch/mips/mips-boards/generic/amon.c |    4 ++--
 include/asm-mips/gic.h               |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/mips/mips-boards/generic/amon.c b/arch/mips/mips-boards/generic/amon.c
index b7633fd..96236bf 100644
--- a/arch/mips/mips-boards/generic/amon.c
+++ b/arch/mips/mips-boards/generic/amon.c
@@ -28,7 +28,7 @@
 
 int amon_cpu_avail(int cpu)
 {
-	struct cpulaunch *launch = (struct cpulaunch *)KSEG0ADDR(CPULAUNCH);
+	struct cpulaunch *launch = (struct cpulaunch *)CKSEG0ADDR(CPULAUNCH);
 
 	if (cpu < 0 || cpu >= NCPULAUNCH) {
 		pr_debug("avail: cpu%d is out of range\n", cpu);
@@ -53,7 +53,7 @@ void amon_cpu_start(int cpu,
 		    unsigned long gp, unsigned long a0)
 {
 	volatile struct cpulaunch *launch =
-		(struct cpulaunch  *)KSEG0ADDR(CPULAUNCH);
+		(struct cpulaunch  *)CKSEG0ADDR(CPULAUNCH);
 
 	if (!amon_cpu_avail(cpu))
 		return;
diff --git a/include/asm-mips/gic.h b/include/asm-mips/gic.h
index 3a492f2..954807d 100644
--- a/include/asm-mips/gic.h
+++ b/include/asm-mips/gic.h
@@ -24,8 +24,8 @@
 
 #define MSK(n) ((1 << (n)) - 1)
 #define REG32(addr)		(*(volatile unsigned int *) (addr))
-#define REG(base, offs)		REG32((unsigned int)(base) + offs##_##OFS)
-#define REGP(base, phys)	REG32((unsigned int)(base) + (phys))
+#define REG(base, offs)		REG32((unsigned long)(base) + offs##_##OFS)
+#define REGP(base, phys)	REG32((unsigned long)(base) + (phys))
 
 /* Accessors */
 #define GIC_REG(segment, offset) \


-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2008-05-30  0:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-12 16:31 Malta build errors with 2.6.26-rc1 Martin Michlmayr
2008-05-12 16:32 ` Martin Michlmayr
2008-05-12 19:46 ` Dmitri Vorobiev
2008-05-28  7:12   ` Martin Michlmayr
2008-05-28  8:50     ` Thomas Bogendoerfer
2008-05-28 15:10       ` Martin Michlmayr
2008-05-29 20:05         ` Thomas Bogendoerfer [this message]
2008-06-02 15:40           ` Dmitri Vorobiev
2008-06-03  8:38             ` Dmitri Vorobiev
2008-06-15  8:22           ` Ralf Baechle
2008-05-29  6:25       ` Dmitri Vorobiev
2008-05-30 12:48     ` Dmitri Vorobiev

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=20080529200506.GA27783@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=dmitri.vorobiev@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=tbm@cyrius.com \
    /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