public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: SA products <super.aorta@ntlworld.com>
To: linux-kernel@vger.kernel.org
Subject: Write-combining
Date: Tue, 12 Feb 2002 14:29:59 +0000	[thread overview]
Message-ID: <3C6926E7.90F7C781@ntlworld.com> (raw)

Dear list,

Sorry this maybe off topic-- I am writing a device driver for a kind of
framebuffer device.
This is virtually complete and working, all I wish to add is
write-combining but I can find
very little information on how to do this.  Looking at other device
drivers MTRR crops
up a few times but I is still not clear to me what I have to do.

So far-
I grab the memory region for the framebuffer (1/4Mb) something like so;
......

memio=ioremap(pci_resource_start(dev,MEMIO)&PCI_BASE_ADDRESS_MEM_MASK,MEMIO_SIZE);

......
then try to mtrr it
.....
    err=mtrr_add(memio,MEMIO_SIZE,MTRR_TYPE_WRCOMB,1);
......
which fails because memio is not aligned correctly

my code generates the following messages
slm: init: mtrr option enabled- trying region cc960000
mtrr: base(0xcc960000) is not aligned on a size(0x40000) boundary
slm: init: mtrr: unable to set write combining for slm memory :(

Before I go any further I would like to ask is this a sensible approach
or have I missed
something somewhere?

If this is not the most sensible way please point me towards a sensible
solution-

If this is the correct way of doing things is there
> an easy way to discover the mtrr alignment requirements prior to
mtrr_add?
> Can I align memio properly (how?) or
>   do I start by defining a larger mtrr region below memio and then
masking off the
    unwanted regions either side of my memory region with
mtrr(...MTRR_TYPE_WRBACK..)?
> What happens on none x86 type processors?

any other advice?


Thanks SA



             reply	other threads:[~2002-02-12 14:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-12 14:29 SA products [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-02-12 19:41 Write-combining SA
2004-05-11 14:49 Write-combining Thiago Robert
2004-05-11 15:05 ` Write-combining Sean Neakums
2004-05-11 18:42   ` Write-combining Thiago Robert
2004-05-12 18:00 Write-combining Venkatesan, Ganesh

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=3C6926E7.90F7C781@ntlworld.com \
    --to=super.aorta@ntlworld.com \
    --cc=linux-kernel@vger.kernel.org \
    /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