13 Mar, 2010
40 commits
-
We can use pci-dma-compat.h to implement pci_set_dma_mask and
pci_set_consistent_dma_mask as we do with the other PCI DMA API.We can remove HAVE_ARCH_PCI_SET_DMA_MASK too.
Signed-off-by: FUJITA Tomonori
Cc: Jesse Barnes
Cc: Greg KH
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This converts arm to the generic pci_set_dma_mask and
pci_set_consistent_dma_mask (removes HAVE_ARCH_PCI_SET_DMA_MASK for
dmabounce).Signed-off-by: FUJITA Tomonori
Looked-over-by: Russell King
Cc: Jesse Barnes
Cc: Greg KH
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This converts powerpc to use the generic pci_set_dma_mask and
pci_set_consistent_dma_mask (drivers/pci/pci.c).The generic pci_set_dma_mask does what powerpc's pci_set_dma_mask does.
Unlike powerpc's pci_set_consistent_dma_mask, the gneric
pci_set_consistent_dma_mask sets only coherent_dma_mask. It doesn't work
for powerpc? pci_set_consistent_dma_mask API should set only
coherent_dma_mask?Signed-off-by: FUJITA Tomonori
Acked-by: Benjamin Herrenschmidt
Cc: Jesse Barnes
Cc: Greg KH
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
dma_set_coherent_mask corresponds to pci_set_consistent_dma_mask. This is
necessary to move to the generic device model DMA API from the PCI bus
specific API in the long term.dma_set_coherent_mask works in the exact same way that
pci_set_consistent_dma_mask does. So this patch also changes
pci_set_consistent_dma_mask to call dma_set_coherent_mask.Signed-off-by: FUJITA Tomonori
Cc: James Bottomley
Cc: David S. Miller
Cc: Jesse Barnes
Cc: Benjamin Herrenschmidt
Cc: Russell King
Cc: Greg KH
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This changes pci_set_dma_mask to call the generic DMA API, dma_set_mask.
pci_set_dma_mask (in drivers/pci/pci.c) does the same things that
dma_set_mask does on all the architectures that use pci_set_dma_mask;
calls dma_supprted and sets dev->dma_mask. So we safely change
pci_set_dma_mask to simply call dma_set_mask.Signed-off-by: FUJITA Tomonori
Cc: James Bottomley
Cc: David S. Miller
Cc: Jesse Barnes
Acked-by: Benjamin Herrenschmidt
Cc: Russell King
Cc: Greg KH
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This converts Alpha to use include/linux/pci-dma-compat.h. Alpha is the
only architecutre that implements the PCI DMA API in the own way. That
makes it difficult to implement the generic DMA API via the PCI bus
specific DMA API.The generic DMA API calls the PCI DMA API implementation in
arch/alpha/kernel/pci_iommu.c on non Jensen systems. It calls the DMA API
in arch/alpha/kernel/pci-noop.c on Jensen systems.Signed-off-by: FUJITA Tomonori
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Matt Turner
Cc: Jesse Barnes
Cc: Greg KH
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patchset transforms the PCI DMA API into the generic device model.
It's one of the reasons why we introduced the generic DMA API long ago;
driver writers are always able to use the generic DMA API with any bus
instead of using bus specific DMA APIs such as pci_map_single,
sbus_map_single, etc (only two bus specific APIs exist now; pci and ssb).Some of the PCI DMA API are already implented on the top of the generic
DMA API (include/asm-generic/pci-dma-compat.h). But there are some
exceptions. This patchset finishes the transformation.This patch:
sparc has two dma_set_mask implementations for 32bit and 64bit. They are
same except for the error returned value. We can safely unify them since
the error returned value doesn't matter as long as it is negative (as
DMA-API.txt describes).This patch also changes dma_set_mask not to call
pci_set_dma_mask. Instead, dma_set_mask does the same thing that
pci_set_dma_mask does. This change enables ut to change
pci_set_dma_mask to call dma_set_mask; we can implement
pci_set_dma_mask as pci-dma-compat.h does.Signed-off-by: FUJITA Tomonori
Acked-by: David Miller
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Matt Turner
Cc: James Bottomley
Cc: Jesse Barnes
Cc: Benjamin Herrenschmidt
Cc: Russell King
Cc: Greg KH
Cc: Kay Sievers
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
pci_dma_sync_single was obsoleted long ago.
All the comments are generic, not architecture specific, simply describes
some of the DMA-API (and the same comments are in other files).
Documentation/DMA-API.txt have more detailed descriptions.This removes the above obsolete and unnecessary DMA API
comments. Let's describe the DMA API in only
Documentation/DMA-API.txt.Signed-off-by: FUJITA Tomonori
Cc: David Howells
Cc: Koichi Yasutake
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
pci_dma_sync_single was obsoleted long ago.
All the comments are generic, not architecture specific, simply describes
some of the DMA-API (and the same comments are in other files).
Documentation/DMA-API.txt have more detailed descriptions.This removes the above obsolete and unnecessary DMA API comments. Let's
describe the DMA API in only Documentation/DMA-API.txt.Signed-off-by: FUJITA Tomonori
Cc: Mike Frysinger
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
pci_dma_sync_single was obsoleted long ago.
All the comments are generic, not architecture specific, simply describes
some of the DMA-API (and frv has the same comments in three files).
Documentation/DMA-API.txt have more detailed descriptions.This removes the above obsolete and unnecessary DMA API comments. Let's
describe the DMA API in only Documentation/DMA-API.txt.Signed-off-by: FUJITA Tomonori
Cc: David Howells
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Adds the following macros:
DECLARE_DMA_UNMAP_ADDR(ADDR_NAME)
DECLARE_DMA_UNMAP_LEN(LEN_NAME)
dma_unmap_addr(PTR, ADDR_NAME)
dma_unmap_addr_set(PTR, ADDR_NAME, VAL)
dma_unmap_len(PTR, LEN_NAME)
dma_unmap_len_set(PTR, LEN_NAME, VAL)The API corresponds to the pci_unmap state API. We'll move to this new
generic API from the PCI specific API in the long term. As
include/asm-generic/pci-dma-compat.h does, the pci_unmap API simply calls
the new generic API for some time.Signed-off-by: FUJITA Tomonori
Cc: James Bottomley
Cc: David S. Miller
Cc: Jesse Barnes
Cc: Arnd Bergmann
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
All the architectures properly set NEED_DMA_MAP_STATE now so we can safely
add linux/pci-dma.h to linux/pci.h and remove the linux/pci-dma.h
inclusion in arch's asm/pci.hSigned-off-by: FUJITA Tomonori
Acked-by: Arnd Bergmann
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Acked-by: Mikael Starvik
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Cc: Chris Zankel
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Acked-by: David S. Miller
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Acked-by: Paul Mundt
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Cc: Benjamin Herrenschmidt
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Acked-by: Kyle McMartin
Cc: Helge Deller
Cc: James Bottomley
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Cc: Ralf Baechle
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Cc: Tony Luck
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Acked-by: David Howells
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Acked-by: Russell King
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Matt Turner
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: FUJITA Tomonori
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "H. Peter Anvin"
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This patch adds include/linux/pci-dma.h that defines the pci_unmap state
API:DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
DECLARE_PCI_UNMAP_LEN(LEN_NAME)
pci_unmap_addr(PTR, ADDR_NAME)
pci_unmap_addr_set(PTR, ADDR_NAME, VAL)
pci_unmap_len(PTR, LEN_NAME)
pci_unmap_len_set(PTR, LEN_NAME, VAL)This enables us to remove lots of the duplication in architecture
implementations since there are only two ways to define the API.If architectures define CONFIG_NEED_DMA_MAP_STATE, they get the real
definition of pci_unmap state API. If not, they get the noop definition.In the long term, it's better to replace the API with the generic device
model API such as DECLARE_DMA_UNMAP_ADDR. We can map the API to the
generic one (like dma-mapping-compat.h does). This patch also makes the
migration process easier. We can remove this file after the migration.It might be simpler to add the API to include/linux/pci.h but looks it's
already too large. We'll remove pci-dma.h after finishing moving to the
generic device model. So I put the API to a separate file.Signed-off-by: FUJITA Tomonori
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: "H. Peter Anvin"
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Matt Turner
Acked-by: Russell King
Acked-by: David Howells
Cc: Tony Luck
Cc: Ralf Baechle
Cc: Kyle McMartin
Cc: Helge Deller
Cc: James Bottomley
Cc: Benjamin Herrenschmidt
Cc: Paul Mundt
Cc: David S. Miller
Cc: Chris Zankel
Acked-by: Arnd Bergmann
Cc: Jesse Barnes
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
dma_sync_single_for_cpu/for_device supports a partial sync so there is no
point to have dma_sync_single_range (also dma_sync_single was obsoleted
long ago, replaced with dma_sync_single_for_cpu/for_device).There is no user of dma_sync_single_range() in mainline and only Alpha
architecture supports dma_sync_single_range(). So it's unlikely that
someone out of the tree uses it.Signed-off-by: FUJITA Tomonori
Cc: Jeff Dike
Acked-by: David S. Miller
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
dma_sync_single_for_cpu/for_device supports a partial sync so there is no
point to have dma_sync_single_range (also dma_sync_single was obsoleted
long ago, replaced with dma_sync_single_for_cpu/for_device).There is no user of dma_sync_single_range() in mainline and only Alpha
architecture supports dma_sync_single_range(). So it's unlikely that
someone out of the tree uses it.Signed-off-by: FUJITA Tomonori
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Acked-by: Matt Turner
Acked-by: David S. Miller
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
dma_sync_single_for_cpu/for_device supports a partial sync so there is no
point to have dma_sync_single_range (also dma_sync_single was obsoleted
long ago, replaced with dma_sync_single_for_cpu/for_device).There is no user of dma_sync_single_range() in mainline and only Alpha
architecture supports dma_sync_single_range(). So it's unlikely that
someone out of the tree uses it.Signed-off-by: FUJITA Tomonori
Acked-by: David Miller
Acked-by: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This adds the description of the following eight function:
dma_sync_single_for_cpu
pci_dma_sync_single_for_cpu
dma_sync_single_for_device
pci_dma_sync_single_for_device
dma_sync_sg_for_cpu
pci_dma_sync_sg_for_cpu
dma_sync_sg_for_device
pci_dma_sync_sg_for_deviceIt was unclear that the API permits a partial sync (some network drivers
already do though). I made it clear that the sync_single API can do a
partial sync but the sync_sg API can't.We could do a partial sync with the sync_sg API too, however, it's
difficult for driver writers to correctly use the sync_sg API for a
partial sync since the scatterlists passed in to the mapping API can't be
modified. It's unlikely that driver writers want to do a partial sync
with the sync_sg API (because the sync_sg API are usually used for block
drivers). So I think that it's better to forbid a partial sync with the
sync_sg API.Signed-off-by: FUJITA Tomonori
Acked-by: David Miller
Acked-by: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
dma_sync_single(), pci_dma_sync_single(), dma_sync_sg(), and
pci_dma_sync_sg() are deprecated. We should not advertise them.Signed-off-by: FUJITA Tomonori
Acked-by: David S. Miller
Acked-by: Joerg Roedel
Cc: James Bottomley
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add support to scrub DRAM using the e752x integrated memory scrubbing
engine. The e7320/7520/e7525 chipsets support scrubbing at one rate while
the i3100 chipset supports a normal and fast rate.A similar patch was originally sent back in 2008:
http://sourceforge.net/mailarchive/forum.php?thread_name=1204835866.25206.70.camel@localhost.localdomain&forum_name=bluesmoke-develThis version has the following updates:
- Use 16-bit PCI config cycles to access MCHSCRB register
e7320/7520/e7525 docs say register is 16bits wide, i3100 says 8. I
tested 16bits on the i3100 to be safe.
- Recalcuate and round actual scrub ratesThe changes have been tested on an i3100-based board.
Signed-off-by: Peter Tyser
Signed-off-by: Doug Thompson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
FSB parity is only supported on the Xeon processor. Previously it was
incorrectly enabled for the Celeron as well.Signed-off-by: Konstantin Olifer
Signed-off-by: Doug Thompson
Cc: Peter Tyser
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Use resource_size() instead of arithmetic.
Signed-off-by: H Hartley Sweeten
Signed-off-by: Doug Thompson
Acked-by: Dave Jiang
Cc: Peter Tyser
Cc: Kumar Gala
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add the ability to detect the specific data line or ECC line which failed
when printing out SDRAM single-bit errors. An example of a single-bit
SDRAM ECC error is below:EDAC MPC85xx MC1: Err Detect Register: 0x80000004
EDAC MPC85xx MC1: Faulty data bit: 59
EDAC MPC85xx MC1: Expected Data / ECC: 0x7f80d000_409effa0 / 0x6d
EDAC MPC85xx MC1: Captured Data / ECC: 0x7780d000_409effa0 / 0x6d
EDAC MPC85xx MC1: Err addr: 0x00031ca0
EDAC MPC85xx MC1: PFN: 0x00000031Knowning which specific data or ECC line caused an error can be useful in
tracking down hardware issues such as improperly terminated signals, loose
pins, etc.Note that this feature is only currently enabled for 64-bit wide data
buses, 32-bit wide bus support should be added.I don't have any 32-bit wide systems to test on. If someone has one and
is willing to give this patch a shot with the check for a 64-bit data bus
removed it would be much appreciated and I can re-submit with both 32 and
64 bit buses supported.Signed-off-by: Peter Tyser
Signed-off-by: Doug Thompson
Cc: Kumar Gala
Cc: Dave Jiang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
With a 64-bit wide data bus only the lowest 8-bits of the ECC syndrome are
relevant. With a 32-bit wide data bus only the lowest 16-bits are
relevant on most architectures.Without this change, the ECC syndrome displayed can be mildly confusing,
eg:EDAC MPC85xx MC1: syndrome: 0x25252525
When in reality the ECC syndrome is 0x25.
A variety of Freescale manuals say a variety of different things about how
to decode the CAPTURE_ECC (syndrome) register. I don't have a system with
a 32-bit bus to test on, but I believe the change is correct. It'd be
good to get an ACK from someone at Freescale about this change though.Signed-off-by: Peter Tyser
Signed-off-by: Doug Thompson
Cc: Kumar Gala
Cc: Dave Jiang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Remove INIT_NSPROXY(), use C99 initializer.
Remove INIT_IPC_NS(), INIT_NET_NS() while I'm at it.Note: headers trim will be done later, now it's quite pointless because
results will be invalidated by merge window.Signed-off-by: Alexey Dobriyan
Acked-by: Serge Hallyn
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
zap_pid_ns_processes() uses force_sig(SIGKILL) to ensure SIGKILL will be
delivered to sub-namespace inits as well. This is correct, but we are
going to change force_sig_info() semantics. See
http://bugzilla.kernel.org/show_bug.cgi?id=15395#c31We can use send_sig_info(SEND_SIG_NOINFO) instead, since
614c517d7c00af1b26ded20646b329397d6f51a1 ("signals: SEND_SIG_NOINFO should
be considered as SI_FROMUSER()") SEND_SIG_NOINFO means "from user" and
therefore send_signal() will get the correct from_ancestor_ns = T flag.Signed-off-by: Oleg Nesterov
Acked-by: Serge Hallyn
Acked-by: Linus Torvalds
Acked-by: Roland McGrath
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
There is no need for linux/ipmi_smi.h to include itself.
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Actually use the slave_addrs module parameter if it is specified, and make
things consistent about passing zero in for the slave address for the
default.Signed-off-by: Bela Lubkin
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
In some cases kipmid can use a lot of CPU. This adds a way to tune the
CPU used by kipmid to help in those cases. By setting kipmid_max_busy_us
to a value between 100 and 500, it is possible to bring down kipmid CPU
load to practically 0 without loosing too much ipmi throughput
performance. Not setting the value, or setting the value to zero,
operation is unaffected.Signed-off-by: Martin Wilck
Signed-off-by: Corey Minyard
Cc: Jean Delvare
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds