public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Greg KH <gregkh@suse.de>
Cc: Rafa? Bilski <rafalbilski@interia.pl>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] (Longhaul 1/5) PCI: Protect bus master DMA from Longhaul by rw semaphores
Date: Wed, 28 Jun 2006 14:10:59 -0400	[thread overview]
Message-ID: <20060628181059.GE23396@redhat.com> (raw)
In-Reply-To: <20060628173448.GA2371@suse.de>

On Wed, Jun 28, 2006 at 10:34:48AM -0700, Greg KH wrote:
 > On Wed, Jun 28, 2006 at 03:56:50PM +0200, Rafa? Bilski wrote:
 > > 	This patch will allow Longhaul cpufreq driver to change frequency
 > > without breaking BMDMA. In order to work properly it needs:
 > > - adding rw_semaphore to pci_device and bus structures - this is
 > > patch below,
 > > - Longhaul should find host bridge and lock write on bus before
 > > frequency change,
 > 
 > Eeek!  You mean the longhaul driver can change the frequency of the PCI
 > bus?  Oh, that's a recipe for disaster...

It *can* scale the FSB on some CPUs, but the Linux driver doesn't do that
as there a lot of systems that it just doesn't work on.  (Probably any
that have FSB+PCI speed tied together).  So we just scale the multiplier
and the voltage (Though currently in the driver, voltage scaling is missing,
so we never save any power, and just run at the maximum voltage the whole time).

The situation is : It needs there to be no bus mastering occuring at the time
of a CPU speed transition. Though I'm unable to find the part that mentions
this in the specs I have right now.

The really bizarre thing is that all this was working once.  Circa 2.5.late/2.6.reallyearly
I had reliable scaling of both voltage and speed on a C3.  Over time the
driver just seemed to fall apart. Perhaps we just got lucky before, and some
change occured that results changed behaviour of pci bus mastering for
some devices.

 > No, this is not acceptable.  What exactly do you want to do here?  Make
 > sure the PCI drivers are not doing DMA when the longhaul driver wants to
 > change the pci bus speed?
 > 
 > How often will this bus change happen?
 >
 > Does it really save battery?

99% of C3s aren't in battery powered devices, but it can save a considerable
amount of power (~75% on some of the earlier chips iirc).

Thankfully their newer cpu's aren't affected by this brain damage,
but there's a _lot_ of the older CPUs out there (all those EPIA boards etc).

		Dave

-- 
http://www.codemonkey.org.uk

  parent reply	other threads:[~2006-06-28 18:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-28 13:56 [PATCH] (Longhaul 1/5) PCI: Protect bus master DMA from Longhaul by rw semaphores Rafał Bilski
2006-06-28 17:34 ` Greg KH
2006-06-28 18:03   ` Alan Cox
2006-06-28 18:00     ` Jeremy Fitzhardinge
2006-06-28 18:10   ` Dave Jones [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-06-28 18:25 Rafał Bilski
2006-06-29 11:37 ` Alan Cox
2006-06-29 12:03   ` Bart Hartgers
2006-06-29 12:50     ` Rafał Bilski
2006-06-29 14:12     ` Rafał Bilski
2006-06-29 15:01       ` Bart Hartgers
2006-06-29 15:40         ` Rafał Bilski
2006-06-30 10:46           ` Bart Hartgers
2006-06-29 15:16       ` Bart Hartgers
2006-06-29 15:55         ` Alan Cox
2006-06-29 18:54         ` Rafał Bilski
2006-06-29 15:52     ` Alan Cox
     [not found] <fa.lpmuYQxc6OV7Bh11JMM/FzqVWyY@ifi.uio.no>
2006-06-29 23:17 ` Robert Hancock
2006-07-01 18:02   ` Rafał Bilski

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=20060628181059.GE23396@redhat.com \
    --to=davej@redhat.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafalbilski@interia.pl \
    /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