linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RE: VME driver patch for PowerPC
@ 2004-06-09 13:59 Heater, Daniel (GE Infrastructure)
  2004-06-09 14:29 ` Oliver Korpilla
  0 siblings, 1 reply; 8+ messages in thread
From: Heater, Daniel (GE Infrastructure) @ 2004-06-09 13:59 UTC (permalink / raw)
  To: Oliver Korpilla; +Cc: linuxppc-embedded


> +#ifdef CONFIG_PPC32
> +       vma->vm_page_prot.pgprot |= _PAGE_NO_CACHE | _PAGE_GUARDED;
> +       DPRINTF("PowerPC protection flags set.\n");
> +#endif

Cool. I was just about to suggest _PAGE_NO_CACHE | _PAGE_GUARDED.

>          /* Don't swap these pages out
>           */
> -       vma->vm_flags |= VM_RESERVED;
> +       vma->vm_flags |= VM_LOCKED | VM_IO | VM_SHM;

I'm trying to understand this change. VM_IO looks like it needs to
be there to prevent deadlocks on core dumps.
http://www.uwsg.iu.edu/hypermail/linux/kernel/0202.0/1309.html

and if I'm interpreting some older mailing list postings correctly,
VM_RESERVED is a replacement for VM_LOCKED | VM_SHM but VM_RESERVED
may yield some performance advantages. Thus, in later kernels you
only see VM_RESERVED and not VM_LOCKED | VM_SHM.

Maybe since this is an out of tree driver, it should have
> +       vma->vm_flags |= VM_LOCKED | VM_IO | VM_SHM | VM_RESERVED;

to handle older kernels and still get the advantages of VM_RESERVED
on newer kernels.

What do you think? Am I interpreting this correctly?

Daniel.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: VME driver patch for PowerPC
@ 2004-06-09 20:01 Heater, Daniel (GE Infrastructure)
  0 siblings, 0 replies; 8+ messages in thread
From: Heater, Daniel (GE Infrastructure) @ 2004-06-09 20:01 UTC (permalink / raw)
  To: okorpil; +Cc: linuxppc-embedded


> >>Could you check, whether the patch to your driver (version
> >>7433-3.2 of your
> >>Linux support) still compiles on an Intel platform, and works
> >>as intended?
> >>
> >Yep. I only did a quick test, but it appears to work fine on x86.
> >I've merged your patch up with the code base for the next release.
> >
> Great!
>
> I don't know about x86 bus organization, but maybe it limits
> the address
> range for available addresses too strongly (on a single bus,
> where the
> Universe is on). Comparing how much window space you can map with the
> old version and the new one on x86 could prove useful.

Your dead on right. I cannot allocate as much space. In fact,
on a VMIVME-7750 I'm only able to allocate 768KB now vs. the
~2MB I could access before.

> Adding the patch below activated correct behaviour for vme_peek/poke,
> with correct data width (tested VME_D8, VME_D16 and VME_D32), and
> without cache bursts.
>
> It simply sets the cache-inhibited and guarded bits before
> remapping the pages (these flags are PowerPC-specific, and the
> pci_mmap_page_range() function is sadly no exported kernel symbol).
>
> Would you again be so kind to run some "still works"-test on an
> Intel board?

That part still works.

Thanks,
Daniel L. Heater
Software Development, Embedded Systems
GE Fanuc Automation Americas, Inc.
VMIC, Inc.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: VME driver patch for PowerPC
@ 2004-06-09  2:55 Heater, Daniel (GE Infrastructure)
  2004-06-09  6:40 ` Oliver Korpilla
  0 siblings, 1 reply; 8+ messages in thread
From: Heater, Daniel (GE Infrastructure) @ 2004-06-09  2:55 UTC (permalink / raw)
  To: Oliver Korpilla; +Cc: linuxppc-embedded


> Could you check, whether the patch to your driver (version
> 7433-3.2 of your
> Linux support) still compiles on an Intel platform, and works
> as intended?

Yep. I only did a quick test, but it appears to work fine on x86.
I've merged your patch up with the code base for the next release.

I think I have an idea for the read/write question, but I need to
look at it a little closer. I'll get back to you in a bit.

Thanks,
Daniel L. Heater
Software Development, Embedded Systems
GE Fanuc Automation Americas, Inc.
VMIC, Inc.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: [Fwd: Memory layout question]
@ 2004-05-18 15:25 Heater, Daniel (GE Infrastructure)
  2004-06-07 15:30 ` VME driver patch for PowerPC Oliver Korpilla
  0 siblings, 1 reply; 8+ messages in thread
From: Heater, Daniel (GE Infrastructure) @ 2004-05-18 15:25 UTC (permalink / raw)
  To: linuxppc-embedded; +Cc: okorpil


> I'm currently trying out the VMIC Tundra Universe II driver, a
> PCI-VME bus bridge quite common in embedded devices (from VMIC and
> Motorola). VMIC manufactures mostly x86 boards, but I try to use
> the driver on a MVME5500 with 7455 Motorola PPC.
> There seems to be a memory problem involved, as follows:

-- snip --

> Actually the addresses returned by allocate_resource seem to come from
> system memory, because ioremap_nocache logs a debug statement
> that is only triggered if the remapping is below the high_memory
bound.
> (And there already seems to be a virtual address associated with it -
> physical 0x40000000 is RAM 0xc<whatever> - kernel space, I guess)
>
> But the address returned is 0x40000000 !! Isn't that the 2nd
> GB of address space? My board only has 512 MB of storage, and is only
> upgradable to 1GB, so shouldn't an address starting at 0x40000000
> physically never be a memory address and never be below the
> high_memory bound?

Can you post a copy of /proc/iomem, and /proc/vme/master, and any
relevant portions of the output from dmesg if available?

> Can I even dereference an I/O memory pointer on the PowerPC?
> (It can be done on x86) I know, I know, I _should_ use readb and
> friends, but can it be done? Or _must_ I strictly use the macros
> because it won't work the other way round?

That's the way I do it on x86. I haven't tried PPC.

BTW, please copy me directly on replies to this thread. I am not
subscribed to this list.

Daniel L. Heater
Software Development, Embedded Systems
GE Fanuc Automation Americas, Inc.
VMIC, Inc.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-06-09 20:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-09 13:59 VME driver patch for PowerPC Heater, Daniel (GE Infrastructure)
2004-06-09 14:29 ` Oliver Korpilla
  -- strict thread matches above, loose matches on Subject: below --
2004-06-09 20:01 Heater, Daniel (GE Infrastructure)
2004-06-09  2:55 Heater, Daniel (GE Infrastructure)
2004-06-09  6:40 ` Oliver Korpilla
2004-05-18 15:25 [Fwd: Memory layout question] Heater, Daniel (GE Infrastructure)
2004-06-07 15:30 ` VME driver patch for PowerPC Oliver Korpilla
2004-06-09 11:25   ` Oliver Korpilla
2004-06-09 12:59   ` Oliver Korpilla

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).