From: "Jeff V. Merkey" <jmerkey@vger.timpanogas.org>
To: Steffen Persvold <sp@scali.com>
Cc: linux-kernel@vger.kernel.org, jmerkey@timpanogas.org
Subject: Re: ioremap()/PCI sickness in 2.4.18-rc2 (FIXED ALMOST)
Date: Fri, 22 Feb 2002 11:17:56 -0700 [thread overview]
Message-ID: <20020222111756.A11081@vger.timpanogas.org> (raw)
In-Reply-To: <20020220103320.A32211@vger.timpanogas.org> <20020220103539.B32211@vger.timpanogas.org> <3C73DC34.E83CCD35@mandrakesoft.com> <20020220.093034.112623671.davem@redhat.com> <20020220110004.A32431@vger.timpanogas.org> <20020220145449.A1102@vger.timpanogas.org> <20020220151053.A1198@vger.timpanogas.org> <3C7626A9.330A9249@scali.com>
In-Reply-To: <3C7626A9.330A9249@scali.com>; from sp@scali.com on Fri, Feb 22, 2002 at 12:08:25PM +0100
On Fri, Feb 22, 2002 at 12:08:25PM +0100, Steffen Persvold wrote:
> "Jeff V. Merkey" wrote:
> >
> > On Wed, Feb 20, 2002 at 02:54:49PM -0700, Jeff V. Merkey wrote:
> >
> > > struct vm_struct * get_vm_area(unsigned long size, unsigned long flags)
> > > {
> > > unsigned long addr;
> > > struct vm_struct **p, *tmp, *area;
> > >
> > > area = (struct vm_struct *) kmalloc(sizeof(*area), GFP_KERNEL);
> > > if (!area)
> > > return NULL;
> > > size += PAGE_SIZE;
> > > addr = VMALLOC_START;
> > > write_lock(&vmlist_lock);
> > > for (p = &vmlist; (tmp = *p) ; p = &tmp->next) {
> > >
> > > ===============> we barf here since the size + addr wraps
> > >
> >
> > Also, this function should be moved to the /arch/i386/mm area since
> > it is doing pointer arithmetic with 32 bit assumptions (i.e.
> > unsigned long + unsigned long) Last time I checked, unsigned long
> > was a construct for a 32 bit value in any gcc compiler version, ia64
> > or not.
> >
>
> Jeff,
>
> I think you'll have to check again. In LP64 programming models (used on most
> 64-bit OS'es) 'long' is 64 bit. Thus a 'unsigned long' is always safe to use
> for pointer arithmetic since it will be 32 bit on 32bit machines and 64bit on
> 64bit machines.
>
> Regards,
> --
Hi Steffan,
On early IA64 long long was assumed to be 64 bit, long 32 bit. After
emailing some folks off line I relaize this may not be the case
any longer, but still is on some compiler options.
Say hi to Hugo for me next time you see him. :-) I have reviewed this
and we will need some changes to the page table setup in Linux
and copy to/from user macros in order to get around this problem
for preallocating prefetch space.
Any ideas and joint work on this problem is appreciated.
Jeff
> Steffen Persvold | Scalable Linux Systems | Try out the world's best
> mailto:sp@scali.com | http://www.scali.com | performing MPI implementation:
> Tel: (+47) 2262 8950 | Olaf Helsets vei 6 | - ScaMPI 1.13.8 -
> Fax: (+47) 2262 8951 | N0621 Oslo, NORWAY | >320MBytes/s and <4uS latency
next prev parent reply other threads:[~2002-02-22 18:00 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-20 17:33 ioremap()/PCI sickness in 2.4.18-rc2 Jeff V. Merkey
2002-02-20 17:35 ` Jeff V. Merkey
2002-02-20 17:26 ` Jeff Garzik
2002-02-20 17:46 ` Jeff V. Merkey
2002-02-20 17:30 ` David S. Miller
2002-02-20 18:00 ` Jeff V. Merkey
2002-02-20 21:54 ` ioremap()/PCI sickness in 2.4.18-rc2 (FIXED ALMOST) Jeff V. Merkey
2002-02-20 21:51 ` Jeff Garzik
2002-02-20 22:20 ` Jeff V. Merkey
2002-02-20 22:53 ` Jeff V. Merkey
2002-02-20 23:06 ` Alan Cox
2002-02-20 23:35 ` Jeff V. Merkey
2002-02-20 23:44 ` Pete Zaitcev
2002-02-20 22:10 ` Jeff V. Merkey
2002-02-20 22:08 ` arjan
2002-02-22 11:08 ` Steffen Persvold
2002-02-22 18:17 ` Jeff V. Merkey [this message]
2002-02-22 18:42 ` David Mosberger
2002-02-22 18:51 ` Jeff Garzik
2002-02-22 19:01 ` David Mosberger
2002-02-22 19:42 ` Jeff V. Merkey
2002-02-23 2:22 ` Richard Henderson
2002-02-20 18:44 ` ioremap()/PCI sickness in 2.4.18-rc2 Steffen Persvold
2002-02-20 20:36 ` Jeff V. Merkey
2002-02-22 11:49 ` Steffen Persvold
2002-02-22 18:21 ` Jeff V. Merkey
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=20020222111756.A11081@vger.timpanogas.org \
--to=jmerkey@vger.timpanogas.org \
--cc=jmerkey@timpanogas.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sp@scali.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
all inboxes | Powered by JetHome®