* Howto allocate non-cacheable memory
@ 2006-05-27 5:38 Muneeswaran P - TLS, Chennai
2006-05-28 15:36 ` Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Muneeswaran P - TLS, Chennai @ 2006-05-27 5:38 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
How to allocate non-cacheable kernel memory ?
Pls help me.
I am writing device driver (kernel 2.6 ) for PCI-X card.
Pls clarify the following doubts:
1. DPRAM is memory mapped to PCI-X card.
2. I have to transfer data from main memory to DPRAM using bus
master concept and vice-versa.
3. How to make this memory area as non-cacheable one ?=20
4. Whether DMA mapping (pci_map_single() call ) should be done for
both DPRAM and main memory ?
4.a) I will get the physical address of DPRAM memory (memory
mapped to PCI-X card) from BAR-0 register. Can i use this physical =
addres
directly for data transer using bus master (without pci_map_single() =
call.)
?
4.b) How to make main memory area as non-cacheable one ?
Regards,
Munees.
DISCLAIMER=20
The contents of this e-mail and any attachment(s) are confidential and =
intended for the=20
named recipient(s) only. It shall not attach any liability on the =
originator or HCL or its=20
affiliates. Any views or opinions presented in this email are solely =
those of the author and=20
may not necessarily reflect the opinions of HCL or its affiliates. Any =
form of reproduction,=20
dissemination, copying, disclosure, modification, distribution and / or =
publication of this=20
message without the prior written consent of the author of this e-mail =
is strictly=20
prohibited. If you have received this email in error please delete it =
and notify the sender=20
immediately. Before opening any mail and attachments please check them =
for viruses and=20
defect.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Howto allocate non-cacheable memory
2006-05-27 5:38 Howto allocate non-cacheable memory Muneeswaran P - TLS, Chennai
@ 2006-05-28 15:36 ` Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: Arnd Bergmann @ 2006-05-28 15:36 UTC (permalink / raw)
To: linuxppc-embedded; +Cc: Muneeswaran P - TLS, Chennai
On Saturday 27 May 2006 07:38, Muneeswaran P - TLS, Chennai wrote:
> =A0=A0=A0=A0=A0=A0=A0=A0Pls clarify the following doubts:
> =A0=A0=A0=A0=A0=A0=A0=A01. DPRAM is memory mapped to PCI-X card.
> =A0=A0=A0=A0=A0=A0=A0=A02. I have to transfer data from main memory to DP=
RAM using bus
> master concept and vice-versa.
> =A0=A0=A0=A0=A0=A0=A0=A03. How to make this memory area as non-cacheable =
one ?=20
> =A0=A0=A0=A0=A0=A0=A0=A04. Whether DMA mapping (pci_map_single() call ) s=
hould be done for
> both DPRAM and main memory ?
> =A0=A0=A0=A0=A0=A0=A0=A0 =A0 4.a) I will get the physical address of DPRA=
M memory (memory
> mapped to PCI-X card) from BAR-0 register. Can i use this physical addres
> directly for data transer using bus master (without pci_map_single() call=
=2E)
> ?
> =A0=A0=A0=A0=A0=A0=A0=A0 =A0 4.b) =A0How to make main memory area as non-=
cacheable one ?
You need pci_map_single() for all bus-master accesses from the PCI-X card
and ioremap() to map the card's registers and/or memory into your kernel
address space as cache-inhibited.
Depending on what your adapter does, you might want to map memory areas
on the card with __ioremap(addr, size, _PAGE_NO_CACHE) instead of
ioremap(addr, size) in order to get a non-guarded mapping.
Arnd <><
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-05-28 15:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-27 5:38 Howto allocate non-cacheable memory Muneeswaran P - TLS, Chennai
2006-05-28 15:36 ` Arnd Bergmann
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).