public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership•com>
To: Randy Dunlap <randy.dunlap@oracle•com>
Cc: "Sachin P. Sant" <sachinp@in•ibm.com>,
	Stephen Rothwell <sfr@canb•auug.org.au>,
	linux-next@vger•kernel.org, LKML <linux-kernel@vger•kernel.org>,
	linux-scsi <linux-scsi@vger•kernel.org>,
	jgsf@goop•org
Subject: Re: next Feb 13 drivers/scsi/aha1542.ko build break
Date: Fri, 13 Feb 2009 12:52:44 -0600	[thread overview]
Message-ID: <1234551164.3252.20.camel@localhost.localdomain> (raw)
In-Reply-To: <4995BA4B.9050209@oracle.com>

On Fri, 2009-02-13 at 10:22 -0800, Randy Dunlap wrote:
> Sachin P. Sant wrote:
> > Feb 13 next x86 allmodconfig build breaks with
> > 
> > ERROR: "__udivdi3" [drivers/scsi/aha1542.ko] undefined!
> > 
> > .config attached.
> 
> 
> I'm seeing that also.  I think that it's this line in aha1542.c:
> 
> 495:		mbo = (scsi2int(mb[mbi].ccbptr) - (SCSI_BUF_PA(&ccb[0]))) / sizeof(struct ccb);
> 
> since I can comment out the "/ sizeof(struct ccb)" and the driver builds successfully.
> 
> This may need a patch to use one of the div() macros (?).

It shouldn't ... the two inputs should be longs and the sizeof should be
dividing by a constant size_t.  __udivdi3 is used for 64 bit division on
a 32 bit platform, so where's it getting the idea that something in the
division is 64 bit?

The culprit looks to be

commit 976e8f677e42757e5586ea04a9ac8bb8ddaa037e
Author: Jeremy Fitzhardinge <jeremy@goop•org>
Date:   Fri Feb 6 13:29:44 2009 -0800

    x86: asm/io.h: unify virt_to_phys/phys_to_virt

Because it changed the return of virt_to_phys from long to phys_addr_t
which is unsigned long long on a PAE platform, which this is.

So, I could suggest a fix below since isa addresses may never be above
32 bits, but I think this issue has more ramifications for the other
legacy users of virt_to_phys.

James

---

diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h
index e5a2ab4..4f8e820 100644
--- a/arch/x86/include/asm/io.h
+++ b/arch/x86/include/asm/io.h
@@ -125,7 +125,7 @@ static inline void *phys_to_virt(phys_addr_t address)
 /*
  * ISA I/O bus memory addresses are 1:1 with the physical address.
  */
-#define isa_virt_to_bus virt_to_phys
+#define isa_virt_to_bus (unsigned long)virt_to_phys
 #define isa_page_to_bus page_to_phys
 #define isa_bus_to_virt phys_to_virt
 




  reply	other threads:[~2009-02-13 18:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-13  6:55 linux-next: Tree for February 13 Stephen Rothwell
2009-02-13 10:03 ` [S390] next Feb13 build break appldata/built-in.o Sachin P. Sant
2009-02-13 11:28   ` [Patch] [S390] Fix appldata build break with !NET Sachin P. Sant
2009-02-13 13:43     ` Heiko Carstens
2009-02-13 11:44 ` next Feb 13 drivers/scsi/aha1542.ko build break Sachin P. Sant
2009-02-13 18:22   ` Randy Dunlap
2009-02-13 18:52     ` James Bottomley [this message]
2009-02-13 20:03       ` Ingo Molnar
2009-02-13 19:13     ` Joe Eykholt
2009-02-13 19:34       ` Al Viro
2009-02-13 19:35       ` Bart Van Assche
2009-02-13 19:22 ` [PATCH -next] usb: fix ehci printk formats Randy Dunlap

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=1234551164.3252.20.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership$(echo .)com \
    --cc=jgsf@goop$(echo .)org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=linux-scsi@vger$(echo .)kernel.org \
    --cc=randy.dunlap@oracle$(echo .)com \
    --cc=sachinp@in$(echo .)ibm.com \
    --cc=sfr@canb$(echo .)auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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