lkml.org 
[lkml]   [1999]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kmalloc


On Thu, 28 Jan 1999, Petr Vandrovec Ing. VTEI wrote:
>
> At first, ioremap does not exist on sparc32, if I did not
> critically miss something (I'm not sure whether sparc32 can have PCI,
> but there should be one interface, for SBUS too).

ioremap() only makes sense on a IO bus basis - it's entirely possible (and
even probable) that it doesn't make sense to any sbus drivers.

As such, any drivers you compile on sparc32 wouldn't use it anyway, so it
not being there is not a problem.

> And I'm not sure, whether
> ioremap works correctly on PReP.

Entirely possible. You might want to talk to the PPC people.

> (FYI, PowerStack I, 32MB RAM). I found only one working way:
> `virt = vga_base + _ISA_MEM_BASE' - because of whole PCI MMIO space is
> mapped at _ISA_MEM_BASE on PReP (sorry, do not ask me for patches for PPC,
> I do not understand neither that architecture nor their assembly language).

This is WRONG!

If that is indeed the case, then what _should_ happen on PPC is:

- ioremap() does nothing:

#define ioremap(x,y) ((void *)(_ISA_MEM_BASE + (unsigned long)(x))

- readX/writeX: probably just do something like

#define readb(addr) (*(unsigned char *)(addr))

but in NO case is your approach correct, and you should really complain to
the PPC people if using ioremap/readb doesn't work.
-
> At second, on some (all?) big endian archs, readl/writel stores data
> in little-endian format. I do not know, whether this idea is correct
> and I'm sure that it is not documented.

Drivers that care about endianness should probably do the conversion
themselves.

> And at third, in structure pci_device, there is array with addresses
> of PCI devices. It should contain CPU view of device address, i.e.
> something suitable for ioremap(). It contains PCI bus view... So another
> case.

No, they should not. The driver should use ioremap().

In short, the current setup is correct, but PPC may be seriously broken.
Not my problem, I only care about the design being ok.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.207 / U:0.572 seconds]
©2003-2014 Jasper Spaans. Advertise on this site