From ffe57d02b23ebc5422cf81566b3ce566d68a3e22 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Mon, 7 Jun 2010 15:17:55 +0200 Subject: microblaze: Define ARCH_SLAB_MINALIGN to fix slab crash The commit "mm: Move ARCH_SLAB_MINALIGN and ARCH_KMALLOC_MINALIGN to " 1f0ce8b3dd667dca7 which moved the ARCH_SLAB_MINALIGN default into the global header broke FLAT for Microblaze. Error message: slab error in verify_redzone_free(): cache `idr_layer_cache': memory outside object was overwritten Signed-off-by: Michal Simek --- arch/microblaze/include/asm/page.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/microblaze') diff --git a/arch/microblaze/include/asm/page.h b/arch/microblaze/include/asm/page.h index de493f8..464ff32 100644 --- a/arch/microblaze/include/asm/page.h +++ b/arch/microblaze/include/asm/page.h @@ -34,6 +34,8 @@ /* MS be sure that SLAB allocates aligned objects */ #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES +#define ARCH_SLAB_MINALIGN L1_CACHE_BYTES + #define PAGE_UP(addr) (((addr)+((PAGE_SIZE)-1))&(~((PAGE_SIZE)-1))) #define PAGE_DOWN(addr) ((addr)&(~((PAGE_SIZE)-1))) -- cgit v1.1 From fcdcddbcbbd39a3363bd48414bfe44553b6d698a Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 8 Jun 2010 20:03:15 +0900 Subject: microblaze: Fix sg_dma_len() regression The commit "asm-generic: add NEED_SG_DMA_LENGTH to define sg_dma_len()" 18e98307de0d746cb0845ebf66535ce2184c25a2 broke microblaze compilation. dma_direct_map_sg() sets sg->dma_length, however microblaze doesn't set NEED_SG_DMA_LENGTH so scatterlist strcutres doesn't include dma_length. sg->dma_length is always equal to sg->length on microblaze. So we don't need to set set dma_length, that is, microblaze can simply use sg->length. Signed-off-by: FUJITA Tomonori Signed-off-by: Michal Simek --- arch/microblaze/kernel/dma.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/microblaze') diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c index 9dcd90b..79c7465 100644 --- a/arch/microblaze/kernel/dma.c +++ b/arch/microblaze/kernel/dma.c @@ -90,7 +90,6 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, /* FIXME this part of code is untested */ for_each_sg(sgl, sg, nents, i) { sg->dma_address = sg_phys(sg) + get_dma_direct_offset(dev); - sg->dma_length = sg->length; __dma_sync_page(page_to_phys(sg_page(sg)), sg->offset, sg->length, direction); } -- cgit v1.1 From 837c4ef13c44296bb763a0ca0e84a076592474cf Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Thu, 3 Jun 2010 13:43:03 -0700 Subject: PCI: clear bridge resource range if BIOS assigned bad one Yannick found that video does not work with 2.6.34. The cause of this bug was that the BIOS had assigned the wrong range to the PCI bridge above the video device. Before 2.6.34 the kernel would have shrunk the size of the bridge window, but since d65245c PCI: don't shrink bridge resources the kernel will avoid shrinking BIOS ranges. So zero out the old range if we fail to claim it at boot time; this will cause us to allocate a new range at startup, restoring the 2.6.34 behavior. Fixes regression https://bugzilla.kernel.org/show_bug.cgi?id=16009. Reported-by: Yannick Acked-by: Bjorn Helgaas Signed-off-by: Yinghai Lu Signed-off-by: Jesse Barnes --- arch/microblaze/pci/pci-common.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/microblaze') diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 9cb782b..23be25f 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c @@ -1277,6 +1277,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus) printk(KERN_WARNING "PCI: Cannot allocate resource region " "%d of PCI bridge %d, will remap\n", i, bus->number); clear_resource: + res->start = res->end = 0; res->flags = 0; } -- cgit v1.1