Re: Questions on Hugetlb for bookE and PHYS_64BIT

2012-06-18 Thread Becky Bruce
On Jun 15, 2012, at 1:11 PM, Scott Wood wrote: > On 06/15/2012 09:43 AM, telenn barz wrote: >> Hi all, >> >> CONFIG_PHYS_64BIT enables kernel support for larger than 32-bit physical >> addresses. Is it this configuration option we have to enable for the >> support of 36-bit real memory (as are c

Re: [PATCH] powerpc: Fix swiotlb ops for ppc64

2011-12-13 Thread Becky Bruce
On Dec 12, 2011, at 10:27 PM, Benjamin Herrenschmidt wrote: > On Mon, 2011-12-12 at 21:55 -0600, Becky Bruce wrote: >> 1) dma_direct_alloc_coherent strips GFP_HIGHMEM out of the flags field >> when calling the actual allocator and the iotlb version does not. I >> don

Re: [PATCH] powerpc: Fix swiotlb ops for ppc64

2011-12-12 Thread Becky Bruce
On Dec 7, 2011, at 11:46 PM, Kumar Gala wrote: > > On Dec 7, 2011, at 9:23 PM, Benjamin Herrenschmidt wrote: > >> On Wed, 2011-12-07 at 11:19 -0600, Kumar Gala wrote: >> >>> struct dma_map_ops swiotlb_dma_ops = { >>> +#ifdef CONFIG_PPC64 >>> + .alloc_coherent = swiotlb_alloc_coherent, >>> +

[PATCH] powerpc: Define/use HUGETLB_NEED_PRELOAD insead of complicated #if

2011-11-29 Thread Becky Bruce
From: Becky Bruce Define HUGETLB_NEED_PRELOAD in mmu-book3e.h for CONFIG_PPC64 instead of having a much more complicated #if block. This is easier to read and maintain. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/hugetlb.h|3 +-- arch/powerpc/include/asm/mmu-book3e.h

Re: [PATCH 02/13] powerpc: hugetlb: fix huge_ptep_set_access_flags return value

2011-11-29 Thread Becky Bruce
On Nov 28, 2011, at 9:58 PM, Benjamin Herrenschmidt wrote: > On Mon, 2011-10-10 at 15:50 -0500, Becky Bruce wrote: > >> diff --git a/arch/powerpc/include/asm/hugetlb.h >> b/arch/powerpc/include/asm/hugetlb.h >> index 8600493..70f9885 100644 >> --- a/arch/powerpc/

Re: [PATCH 04/13] powerpc: Update hugetlb huge_pte_alloc and tablewalk code for FSL BOOKE

2011-11-29 Thread Becky Bruce
On Nov 28, 2011, at 11:25 PM, Benjamin Herrenschmidt wrote: > On Mon, 2011-10-10 at 15:50 -0500, Becky Bruce wrote: >> From: Becky Bruce >> >> This updates the hugetlb page table code to handle 64-bit FSL_BOOKE. >> The previous 32-bit work counted on the inn

[PATCH] powerpc/book3e: Change hugetlb preload to take vma argument

2011-11-28 Thread Becky Bruce
From: Becky Bruce This avoids an extra find_vma() and is less error-prone. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/hugetlb.h |3 ++- arch/powerpc/mm/hugetlbpage-book3e.c |8 ++-- arch/powerpc/mm/mem.c|2 +- 3 files changed, 9 insertions(+), 4

Re: [PATCH 03/13] powerpc: Fix booke hugetlb preload code for PPC_MM_SLICES and 64-bit

2011-11-28 Thread Becky Bruce
On Nov 24, 2011, at 6:43 PM, Benjamin Herrenschmidt wrote: > On Mon, 2011-10-10 at 15:50 -0500, Becky Bruce wrote: > > .../... > >> #ifdef CONFIG_PPC_MM_SLICES >> -psize = mmu_get_tsize(get_slice_psize(mm, ea)); >> -tsize = mmu_get_psize(psize); >>

[PATCH v2] powerpc/fsl-booke: Fix settlbcam for 64-bit

2011-10-12 Thread Becky Bruce
From: Becky Bruce Currently, it does a cntlzd on the size and then subtracts it from 21 this doesn't take into account the varying size of a "long". Just use __ilog instead (and subtract the 10 we have to subtract to get to the tsize encoding). Also correct the comment a

[PATCH] powerpc/fsl-booke: Fix settlbcam for 64-bit

2011-10-12 Thread Becky Bruce
From: Becky Bruce Currently, it does a cntlzd on the size and then subtracts it from 21 this doesn't take into account the varying size of a "long". Just use __ilog instead (and subtract the 10 we have to subtract to get to the tsize encoding). Signed-off-by: Becky Bruce --

[PATCH 13/13] powerpc: Enable hugetlb by default for corenet64 platforms

2011-10-10 Thread Becky Bruce
From: Becky Bruce Signed-off-by: Becky Bruce --- arch/powerpc/configs/corenet64_smp_defconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/configs/corenet64_smp_defconfig b/arch/powerpc/configs/corenet64_smp_defconfig index 782822c..53741f4 100644

[PATCH 12/13] powerpc: Update corenet64_smp_defconfig

2011-10-10 Thread Becky Bruce
From: Becky Bruce Updates from make savedefconfig. Signed-off-by: Becky Bruce --- arch/powerpc/configs/corenet64_smp_defconfig |5 - 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/configs/corenet64_smp_defconfig b/arch/powerpc/configs

[PATCH 11/13] powerpc: Enable Hugetlb by default for 32-bit 85xx/corenet

2011-10-10 Thread Becky Bruce
From: Becky Bruce Signed-off-by: Becky Bruce --- arch/powerpc/configs/corenet32_smp_defconfig |1 + arch/powerpc/configs/mpc85xx_defconfig |1 + arch/powerpc/configs/mpc85xx_smp_defconfig |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc

[PATCH 10/13] powerpc: Update mpc85xx/corenet 32-bit defconfigs

2011-10-10 Thread Becky Bruce
From: Becky Bruce Results from updates via make savedefconfig. Signed-off-by: Becky Bruce --- arch/powerpc/configs/corenet32_smp_defconfig |8 arch/powerpc/configs/mpc85xx_defconfig |5 + arch/powerpc/configs/mpc85xx_smp_defconfig |6 +- 3 files changed, 2

[PATCH 09/13] powerpc: Kconfig updates for FSL BookE HUGETLB 64-bit

2011-10-10 Thread Becky Bruce
From: Becky Bruce Allow hugetlb to be enabled on 64b FSL_BOOK3E. No platforms enable it by default yet. Signed-off-by: Becky Bruce --- arch/powerpc/platforms/Kconfig.cputype |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/Kconfig.cputype b

[PATCH 08/13] powerpc: Add gpages reservation code for 64-bit FSL BOOKE

2011-10-10 Thread Becky Bruce
From: Becky Bruce For 64-bit FSL_BOOKE implementations, gigantic pages need to be reserved at boot time by the memblock code based on the command line. This adds the call that handles the reservation, and fixes some code comments. It also removes the previous pr_err when reserve_hugetlb_gpages

[PATCH 07/13] powerpc: Add hugepage support to 64-bit tablewalk code for FSL_BOOK3E

2011-10-10 Thread Becky Bruce
From: Becky Bruce Before hugetlb, at each level of the table, we test for !0 to determine if we have a valid table entry. With hugetlb, this compare becomes: < 0 is a normal entry 0 is an invalid entry > 0 is huge This works because the hugepage code pulls the t

[PATCH 06/13] powerpc: Whitespace/comment changes to tlb_low_64e.S

2011-10-10 Thread Becky Bruce
From: Becky Bruce I happened to comment this code while I was digging through it; we might as well commit that. I also made some whitespace changes - the existing code had a lot of unnecessary newlines that I found annoying when I was working on my tiny laptop. No functional changes. Signed

[PATCH 05/13] powerpc: hugetlb: modify include usage for FSL BookE code

2011-10-10 Thread Becky Bruce
From: Becky Bruce The original 32-bit hugetlb implementation used PPC64 vs PPC32 to determine which code path to take. However, the final hugetlb implementation for 64-bit FSL ended up shared with the FSL 32-bit code so the actual check needs to be FSL_BOOK3E vs everything else. This patch

[PATCH 04/13] powerpc: Update hugetlb huge_pte_alloc and tablewalk code for FSL BOOKE

2011-10-10 Thread Becky Bruce
From: Becky Bruce This updates the hugetlb page table code to handle 64-bit FSL_BOOKE. The previous 32-bit work counted on the inner levels of the page table collapsing. Signed-off-by: Becky Bruce --- arch/powerpc/mm/hugetlbpage.c | 48 +++- 1 files

[PATCH 03/13] powerpc: Fix booke hugetlb preload code for PPC_MM_SLICES and 64-bit

2011-10-10 Thread Becky Bruce
From: Becky Bruce This patch does 2 things: It corrects the code that determines the size to write into MAS1 for the PPC_MM_SLICES case (this originally came from David Gibson and I had incorrectly altered it), and it changes the methodolody used to calculate the size for !PPC_MM_SLICES to work

[PATCH 02/13] powerpc: hugetlb: fix huge_ptep_set_access_flags return value

2011-10-10 Thread Becky Bruce
From: Becky Bruce There was an unconditional return of "1" in the original code from David Gibson, and I dropped it because it wasn't needed for FSL BOOKE 32-bit. However, not all systems (including 64-bit FSL BOOKE) do loading of the hpte from the fault handler asm and depend o

[PATCH 01/13] powerpc: Only define HAVE_ARCH_HUGETLB_UNMAPPED_AREA if PPC_MM_SLICES

2011-10-10 Thread Becky Bruce
From: Becky Bruce If we don't have slices, we should be able to use the generic hugetlb_get_unmapped_area() code Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/page_64.h |2 ++ arch/powerpc/mm/hugetlbpage.c |6 ++ 2 files changed, 4 insertions(+), 4 dele

[PATCH 0/13] Hugetlb for 64-bit Freescale Book3E

2011-10-10 Thread Becky Bruce
This series of patches contains mostly cleanup code that allows the enablement of hugetlb for 64-bit Freescale BookE processors. There are also some bits that I dropped from the 32-bit release that are added back, as they are needed by other implementations. Otherwise, it's mostly a bunch of code r

Re: [PATCH] powerpc: Fix hugetlb with CONFIG_PPC_MM_SLICES=y

2011-09-23 Thread Becky Bruce
On Sep 21, 2011, at 12:58 AM, Paul Mackerras wrote: > Commit 41151e77a4 ("powerpc: Hugetlb for BookE") added some > #ifdef CONFIG_MM_SLICES conditionals to hugetlb_get_unmapped_area() > and vma_mmu_pagesize(). Unfortunately this is not the correct config > symbol; it should be CONFIG_PPC_MM_SLIC

Re: [PATCH 2/5] hugetlb: add phys addr to struct huge_bootmem_page

2011-07-22 Thread Becky Bruce
On Jul 21, 2011, at 5:44 PM, Andrew Morton wrote: > On Tue, 28 Jun 2011 14:54:45 -0500 > Becky Bruce wrote: > >> From: Becky Bruce >> >> This is needed on HIGHMEM systems - we don't always have a virtual >> address so store the physical address and map

Re: [PATCH 2/5] hugetlb: add phys addr to struct huge_bootmem_page

2011-06-30 Thread Becky Bruce
On Jun 28, 2011, at 4:39 PM, Benjamin Herrenschmidt wrote: > On Tue, 2011-06-28 at 14:54 -0500, Becky Bruce wrote: >> struct page *alloc_huge_page_node(struct hstate *h, int nid); >> diff --git a/mm/hugetlb.c b/mm/hugetlb.c >> index 6402458..2db81ea 100644 >> ---

[PATCH 5/5] powerpc: Hugetlb for BookE

2011-06-28 Thread Becky Bruce
From: Becky Bruce Enable hugepages on Freescale BookE processors. This allows the kernel to use huge TLB entries to map pages, which can greatly reduce the number of TLB misses and the amount of TLB thrashing experienced by applications with large memory footprints. Care should be taken when

[PATCH 4/5] powerpc: Create next_tlbcam_idx percpu variable for FSL_BOOKE

2011-06-28 Thread Becky Bruce
From: Becky Bruce This is used to round-robin TLBCAM entries. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/mmu.h |5 + arch/powerpc/kernel/smp.c |4 arch/powerpc/mm/mem.c |9 + arch/powerpc/mm/tlb_nohash.c |6 ++ 4 files changed

[PATCH 3/5] powerpc: mem_init should call memblock_is_reserved with phys_addr_t

2011-06-28 Thread Becky Bruce
From: Becky Bruce This has been broken for a while but hasn't been an issue until now because nobody was reserving regions at high addresses. Signed-off-by: Becky Bruce --- arch/powerpc/mm/mem.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/mm/me

[PATCH 2/5] hugetlb: add phys addr to struct huge_bootmem_page

2011-06-28 Thread Becky Bruce
From: Becky Bruce This is needed on HIGHMEM systems - we don't always have a virtual address so store the physical address and map it in as needed. Signed-off-by: Becky Bruce --- include/linux/hugetlb.h |3 +++ mm/hugetlb.c|8 +++- 2 files changed, 10 insertions(

[PATCH 1/5] fs/hugetlbfs/inode.c: Fix pgoff alignment checking on 32-bit

2011-06-28 Thread Becky Bruce
From: Becky Bruce This: vma->vm_pgoff & ~(huge_page_mask(h) >> PAGE_SHIFT) is incorrect on 32-bit. It causes us to & the pgoff with something that looks like this (for a 4m hugepage): 0xfff003ff. The mask should be flipped and *then* shifted, to give you 0x_03fff. Sig

[PATCH 0/5] Hugetlb for 32-bit FSL PowerPC BookE

2011-06-28 Thread Becky Bruce
Implement HugeTLB for 32-bit BookE PowerPC. There is also some infrastructure in place for 64-bit BookE as well from David Gibson; I'm not sure if we want to include this at this time or not. I have only been able to build test the 64-bit configurations. Ben, let me know how you want to proceed

[PATCH] powerpc: Whitespace fix to include/asm/pgtable-ppc64.h

2011-06-28 Thread Becky Bruce
From: Becky Bruce Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/pgtable-ppc64.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h index 81576ee..c420561 100644 --- a/arch

[PATCH V2] powerpc: Fix comments in fsl_booke_mmu code that mention BATS

2010-06-30 Thread Becky Bruce
There are no BATS on BookE - we have the TLBCAM instead. Also correct the page size information to included extended sizes. We don't actually allow a 4G page size to be used, so comment on that as well. Signed-off-by: Becky Bruce --- Even lamer, I forgot that we don't actually allo

[PATCH] powerpc/fsl-booke: Fix comments that refer to BAT registers

2010-06-30 Thread Becky Bruce
There are no BATS on BookE - we have the TLBCAM instead. Also correct the page size information to included extended (1G and 4G) sizes. Signed-off-by: Becky Bruce --- Lame, I know, but this drives me batty every time I see it, and I've had customers get confused because of it. I'

Re: [PATCH] powerpc/fsl-booke: Move loadcam_entry back to asm code to fix SMP ftrace

2010-05-14 Thread Becky Bruce
entry doesn't use the stack pointer the easiest solution is to just have it in asm code. Signed-off-by: Kumar Gala Looks good on 8572 SMP - both cpus come up properly now with ftrace enabled, and I am able to run the tracers. Tested-by: Becky Bruce --- arch/powerpc/kernel/asm-offset

[PATCH V2] fsl_booke: Correct test for MMU_FTR_BIG_PHYS

2010-04-12 Thread Becky Bruce
The code was looking for this in cpu_features, not mmu_features. Fix this. Signed-off-by: Becky Bruce --- Switched to mmu_has_feature. arch/powerpc/mm/fsl_booke_mmu.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc

[PATCH] fsl_booke: Correct test for MMU_FTR_BIG_PHYS

2010-04-09 Thread Becky Bruce
The code was looking for this in cpu_features, not mmu_features. Fix this. Signed-off-by: Becky Bruce --- arch/powerpc/mm/fsl_booke_mmu.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c index c539472

Re: [PATCH v4 05/11] swiotlb: add swiotlb_set_default_size()

2010-03-16 Thread Becky Bruce
On Mar 16, 2010, at 5:08 AM, FUJITA Tomonori wrote: On Tue, 16 Mar 2010 06:58:41 +0100 Albert Herranz wrote: FUJITA Tomonori wrote: On Fri, 12 Mar 2010 20:12:40 +0100 Albert Herranz wrote: The current SWIOTLB code uses a default of 64MB for the IO TLB area. This size can be influenced u

[PATCH] powerpc: Fix DEBUG_HIGHMEM build break from d4515646699

2009-11-23 Thread Becky Bruce
so hopefully we will remember to remove this. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/kmap_types.h | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/include/asm/kmap_types.h b/arch/powerpc/include/asm/kmap_types.h index b6bac6f

[PATCH v2 2/2] powerpc: Change archdata dma_data to a union

2009-09-21 Thread Becky Bruce
Sometimes this is used to hold a simple offset, and sometimes it is used to hold a pointer. This patch changes it to a union containing void * and dma_addr_t. get/set accessors are also provided, because it was getting a bit ugly to get to the actual data. Signed-off-by: Becky Bruce --- arch

[PATCH v2 1/2] powerpc: rename get_dma_direct_offset get_dma_offset

2009-09-21 Thread Becky Bruce
used in configs where there is no simple dma offset, such as the iommu case. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/dma-mapping.h | 21 ++--- arch/powerpc/kernel/dma.c | 15 --- 2 files changed, 22 insertions(+), 14 deletions(-) diff

[PATCH 2/2] powerpc: Change archdata dma_data to a union

2009-09-02 Thread Becky Bruce
Sometimes this is used to hold a simple offset, and sometimes it is used to hold a pointer. This patch changes it to a union containing void * and dma_addr_t. get/set accessors are also provided, because it was getting a bit ugly to get to the actual data. Signed-off-by: Becky Bruce --- arch

[PATCH 1/2] powerpc: rename get_dma_direct_offset get_dma_offset

2009-09-02 Thread Becky Bruce
The former is no longer really accurate with the swiotlb case now a possibility. I also move it into dma-mapping.h - it no longer needs to be in dma.c, and there are about to be some more accessors that should all end up in the same place. Signed-off-by: Becky Bruce --- arch/powerpc/include

Re: [PATCH] powerpc: Change archdata dma_data type to dma_addr_t

2009-08-26 Thread Becky Bruce
On Aug 26, 2009, at 9:08 AM, Michael Ellerman wrote: On Wed, 2009-08-26 at 22:29 +1000, Benjamin Herrenschmidt wrote: On Mon, 2009-08-24 at 21:48 +0200, Christoph Hellwig wrote: On Mon, Aug 24, 2009 at 11:17:14AM -0500, Becky Bruce wrote: Previously, this was specified as a void *, but

[PATCH] powerpc: Change archdata dma_data type to dma_addr_t

2009-08-24 Thread Becky Bruce
Previously, this was specified as a void *, but that's not large enough on 32-bit systems with 36-bit physical addressing support. Change the type to dma_addr_t so it will scale based on the size of a dma address. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/device.h|

[PATCH] powerpc: Name xpn & x fields in HW pte format

2009-08-24 Thread Becky Bruce
Previously, the 36-bit code was using these bits, but they had never been named in the pte format definition. This patch just gives those fields their proper names and adds a comment that they are only present on some processors. There is no functional code change. Signed-off-by: Becky Bruce

Re: [PATCH/RFC] powerpc/mm: Cleanup handling of execute permission

2009-08-19 Thread Becky Bruce
On Aug 18, 2009, at 5:33 PM, Benjamin Herrenschmidt wrote: On Tue, 2009-08-18 at 16:56 -0400, Josh Boyer wrote: On Fri, Aug 14, 2009 at 05:39:42PM -0500, Becky Bruce wrote: Ben, This breaks the boot on 8572. I don't know why yet (and I'm probably not going to figure it out b

Re: Poll: Rebasing of powerpc-next

2009-08-17 Thread Becky Bruce
On Aug 15, 2009, at 5:20 PM, Benjamin Herrenschmidt wrote: Hi ! I'd like to rebase powerpc-next ... a few bugs have been found that it would be nice to fix in the original patch rather than introducing a bisection breakage, and Kumar also just noticed a potentially misleading error in a com

Re: [PATCH/RFC] powerpc/mm: Cleanup handling of execute permission

2009-08-14 Thread Becky Bruce
Ben, This breaks the boot on 8572. I don't know why yet (and I'm probably not going to figure it out before I go home, because, frankly, it's late on a Friday afternoon and I need a glass of wine or, perhaps, a beer). Kumar and I will poke into this more and let you know what we find out

[PATCH] powerpc: Fix __tlb_remove_tlb_entry for PPC_STD_MMU_32

2009-08-14 Thread Becky Bruce
Ben's recent patches are missing the CONFIG_ prefix to PPC_STD_MMU_32, which results in not properly flushing hash entries. On 8641, this showed up as a platform that would boot, but deny logins. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/tlb.h |2 +- 1 files chang

Re: [PATCH 5/5] powerpc: use asm-generic/dma-mapping-common.h

2009-07-27 Thread Becky Bruce
On Jul 23, 2009, at 10:24 PM, FUJITA Tomonori wrote: Signed-off-by: FUJITA Tomonori Fujita, Since you're removing all the uses of it, you should probably remove PPC_NEED_DMA_SYNC_OPS from arch/powerpc/Kconfig: diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 0603b6c..fb3f4

Re: [PATCH 4/5] powerpc: use dma_map_ops struct

2009-07-27 Thread Becky Bruce
On Jul 23, 2009, at 10:24 PM, FUJITA Tomonori wrote: This converts uses dma_map_ops struct (in include/linux/dma-mapping.h) instead of POWERPC homegrown dma_mapping_ops. Signed-off-by: FUJITA Tomonori Acked-by: Becky Bruce --- arch/powerpc/include/asm/device.h |4 +- arch

Re: [PATCH 3/5] add set_dma_mask hook to struct dma_map_ops

2009-07-27 Thread Becky Bruce
On Jul 23, 2009, at 10:24 PM, FUJITA Tomonori wrote: POWERPC needs this hook. SPARC could use it too. Signed-off-by: FUJITA Tomonori Acked-by: Becky Bruce --- include/linux/dma-mapping.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux/dma-mapping.h

Re: [PATCH 2/5] powerpc: remove swiotlb_pci_dma_ops

2009-07-27 Thread Becky Bruce
On Jul 23, 2009, at 10:24 PM, FUJITA Tomonori wrote: Now swiotlb_pci_dma_ops is identical to swiotlb_dma_ops; we can use swiotlb_dma_ops with any devices. This removes swiotlb_pci_dma_ops. Signed-off-by: FUJITA Tomonori Acked-by: Becky Bruce --- arch/powerpc/include/asm/swiotlb.h

Re: [PATCH 1/5] powerpc: remove addr_needs_map in struct dma_mapping_ops

2009-07-27 Thread Becky Bruce
(), called via ppc_md.pci_dma_dev_setup hook. For further information: http://marc.info/?t=12471906021&r=1&w=2 Signed-off-by: FUJITA Tomonori Acked-by: Becky Bruce --- arch/powerpc/include/asm/device.h |3 ++ arch/powerpc/include/asm/dma-mapping.h |8 +++--- arch

Re: removing addr_needs_map in struct dma_mapping_ops

2009-07-15 Thread Becky Bruce
On Jul 13, 2009, at 7:49 PM, FUJITA Tomonori wrote: On Mon, 13 Jul 2009 16:50:43 -0500 Becky Bruce wrote: talked about defining something like struct dma_data. Then we could struct dev_archdata { ... struct dma_data *ddata; }; or struct dev_archdata { ... struct

Re: [00/15] swiotlb cleanup

2009-07-15 Thread Becky Bruce
On Jul 13, 2009, at 10:13 PM, Becky Bruce wrote: On Jul 10, 2009, at 12:12 AM, Ingo Molnar wrote: * FUJITA Tomonori wrote: - removes unused (and unnecessary) hooks in swiotlb. - adds dma_capable() and converts swiotlb to use it. It can be used to know if a memory area is dma capable

Re: [00/15] swiotlb cleanup

2009-07-13 Thread Becky Bruce
On Jul 10, 2009, at 12:12 AM, Ingo Molnar wrote: * FUJITA Tomonori wrote: - removes unused (and unnecessary) hooks in swiotlb. - adds dma_capable() and converts swiotlb to use it. It can be used to know if a memory area is dma capable or not. I added is_buffer_dma_capable() for the same

Re: [PATCH 04/15] swiotlb: remove unnecessary swiotlb_bus_to_virt

2009-07-13 Thread Becky Bruce
On Jul 9, 2009, at 8:04 PM, FUJITA Tomonori wrote: swiotlb_bus_to_virt is unncessary; we can use swiotlb_bus_to_phys and phys_to_virt instead. phys_to_virt (also, virt_to_phys) is invalid for highmem addresses on ppc. In most of the uses in this file, it doesn't matter, as the iotlb buff

Re: removing addr_needs_map in struct dma_mapping_ops

2009-07-13 Thread Becky Bruce
On Jul 9, 2009, at 8:47 PM, FUJITA Tomonori wrote: I'm trying to convert POWERPC to use asm-generic/dma-mapping-common.h. POWERPC needs addr_needs_map() in struct dma_mapping_ops for SWIOTLB support but I want to avoid add addr_needs_map() in struct dma_map_ops. IIRC, you guys think it as a te

Re: dma_ops->map_page == NULL

2009-07-07 Thread Becky Bruce
On Jul 7, 2009, at 9:37 AM, Kumar Gala wrote: On Jul 7, 2009, at 6:08 AM, Benjamin Herrenschmidt wrote: On Tue, 2009-07-07 at 10:15 +1000, Mark Nelson wrote: When the 32 and 64bit DMA code was merged in .28 , map_/ unmap_page() was added in favour of map_/unmap_single() (which was later r

Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit

2009-05-27 Thread Becky Bruce
On May 27, 2009, at 3:29 PM, Ian Campbell wrote: On Wed, 2009-05-27 at 15:05 -0400, Becky Bruce wrote: On May 22, 2009, at 6:11 AM, Ian Campbell wrote: BTW do you need swiotlb_bus_to_virt to be __weak or is the fact that it is implemented in terms of swiotlb_bus_to_phys sufficient? The

Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit

2009-05-27 Thread Becky Bruce
On May 26, 2009, at 7:51 AM, Ian Campbell wrote: On Fri, 2009-05-22 at 19:55 -0400, Jeremy Fitzhardinge wrote: Ian Campbell wrote: On Thu, 2009-05-21 at 14:27 -0400, Becky Bruce wrote: I can work with that, but it's going to be a bit inefficient, as I actually need the dma_addr_t, no

Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit

2009-05-27 Thread Becky Bruce
On May 22, 2009, at 5:51 AM, FUJITA Tomonori wrote: On Thu, 21 May 2009 13:18:54 -0700 Jeremy Fitzhardinge wrote: Becky Bruce wrote: I can work with that, but it's going to be a bit inefficient, as I actually need the dma_addr_t, not the phys_addr_t, so I'll have to convert. In

Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit

2009-05-27 Thread Becky Bruce
On May 22, 2009, at 6:11 AM, Ian Campbell wrote: BTW do you need swiotlb_bus_to_virt to be __weak or is the fact that it is implemented in terms of swiotlb_bus_to_phys sufficient? The default one in swiotlb calls phys_to_virt on the result of swiotlb_bus_to_phys, which only works on low

Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit

2009-05-21 Thread Becky Bruce
On May 21, 2009, at 12:43 PM, Jeremy Fitzhardinge wrote: Becky Bruce wrote: If we have something like in arch/{x86|ia64|powerpc}/dma-mapping.h: static inline int is_buffer_dma_capable(struct device *dev, dma_addr_t addr, size_t size) then we don't need two checking func

Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit

2009-05-19 Thread Becky Bruce
On May 19, 2009, at 12:27 AM, FUJITA Tomonori wrote: CC'ed linux-kernel On Thu, 14 May 2009 17:42:28 -0500 Becky Bruce wrote: This patch includes the basic infrastructure to use swiotlb bounce buffering on 32-bit powerpc. It is not yet enabled on any platforms. Probably the

Re: [PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit

2009-05-19 Thread Becky Bruce
On May 19, 2009, at 8:04 AM, Kumar Gala wrote: On May 18, 2009, at 4:49 PM, Benjamin Herrenschmidt wrote: On Mon, 2009-05-18 at 08:25 -0500, Kumar Gala wrote: Part of this is how the generic swiotlb code works and part of it was our desire not to bloat dev archdata by adding such info that

[PATCH V2 2/3] powerpc: Add support for swiotlb on 32-bit

2009-05-14 Thread Becky Bruce
mapped by a device is device-specific. Signed-off-by: Becky Bruce --- arch/powerpc/Kconfig | 12 ++- arch/powerpc/include/asm/dma-mapping.h | 11 ++ arch/powerpc/include/asm/swiotlb.h | 27 + arch/powerpc/kernel/Makefile |1 + arch/powerpc/kernel/dma

[PATCH V2 3/3] powerpc: Add 86xx support for SWIOTLB

2009-05-14 Thread Becky Bruce
than can be mapped by the inbound PCI windows. Signed-off-by: Becky Bruce --- arch/powerpc/platforms/86xx/Kconfig|1 + arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 15 +++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/86xx/Kconfig b

[PATCH V2 1/3] powerpc: Use sg->dma_length in sg_dma_len() macro on 32-bit

2009-05-14 Thread Becky Bruce
64-bit ifdefs, and is needed by the swiotlb code which actually distinguishes between dma_length and length. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/scatterlist.h |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/scatterlist.h

Re: [PATCH] sata_fsl: Fix compile warnings

2009-05-13 Thread Becky Bruce
On May 13, 2009, at 4:12 PM, Kumar Gala wrote: We we build with dma_addr_t as a 64-bit quantity we get: drivers/ata/sata_fsl.c: In function 'sata_fsl_fill_sg': drivers/ata/sata_fsl.c:340: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'dma_addr_t' Signed-off-by:

[PATCH] powerpc: Allow mem=x cmdline to work with 4G+

2009-05-08 Thread Becky Bruce
We're currently choking on mem=4g (and above) due to memory_limit being specified as an unsigned long. Make memory_limit phys_addr_t to fix this. Signed-off-by: Becky Bruce --- Ben, This is a fix for something I missed in the earlier large physical patches. I've tested it on MPC8641

Re: [PATCH 2/5] powerpc: Add 36-bit device tree for mpc8641hpcn

2009-04-21 Thread Becky Bruce
On Apr 20, 2009, at 8:10 PM, David Gibson wrote: On Mon, Apr 20, 2009 at 11:26:47AM -0500, Becky Bruce wrote: The new dts places most of the devices in physical address space above 32-bits, which allows us to have more than 4GB of RAM present. Signed-off-by: Becky Bruce --- arch/powerpc

Re: [PATCH 1/5] powerpc: Use sg->dma_length in sg_dma_len() macro on 32-bit

2009-04-21 Thread Becky Bruce
On Apr 20, 2009, at 3:06 PM, Kumar Gala wrote: On Apr 20, 2009, at 11:26 AM, Becky Bruce wrote: Currently, the 32-bit code uses sg->length instead of sg->dma_lentgh to report sg_dma_len. However, since the default dma code for 32-bit (the dma_direct case) sets dma_length and length

Re: [PATCH 4/5] powerpc: Add support for swiotlb on 32-bit

2009-04-20 Thread Becky Bruce
On Apr 20, 2009, at 1:31 PM, Kumar Gala wrote: On Apr 20, 2009, at 11:26 AM, Becky Bruce wrote: +static int ppc_swiotlb_bus_notify(struct notifier_block *nb, + unsigned long action, void *data) +{ + struct device *dev = data; + + /* We are only

Re: [PATCH 4/5] powerpc: Add support for swiotlb on 32-bit

2009-04-20 Thread Becky Bruce
On Apr 20, 2009, at 11:57 AM, Kumar Gala wrote: On Apr 20, 2009, at 11:26 AM, Becky Bruce wrote: This patch includes the basic infrastructure to use swiotlb bounce buffering on 32-bit powerpc. It is not yet enabled on any platforms. Signed-off-by: Becky Bruce --- arch/powerpc/Kconfig

Re: [PATCH 5/5] powerpc: Add 86xx support for SWIOTLB

2009-04-20 Thread Becky Bruce
On Apr 20, 2009, at 12:00 PM, Kumar Gala wrote: On Apr 20, 2009, at 11:26 AM, Becky Bruce wrote: Minor code to allow enabling swiotlb on mpc86xx, including Kconfig addition for SWIOTLB. Signed-off-by: Becky Bruce --- arch/powerpc/Kconfig | 10 ++ arch

Re: [PATCH 0/5] Allow swiotlb use on ppc/mpc86xx

2009-04-20 Thread Becky Bruce
FAIL. Here's the text that should have been there :) -B This patch series allows the use of swiotlb on mpc86xx, with 85xx upport soon to follow. The most notable change here is the addition of addr_needs_map to dma_ops. This is used to tell if a device can reach an address without bounce buff

[PATCH 4/5] powerpc: Add support for swiotlb on 32-bit

2009-04-20 Thread Becky Bruce
This patch includes the basic infrastructure to use swiotlb bounce buffering on 32-bit powerpc. It is not yet enabled on any platforms. Signed-off-by: Becky Bruce --- arch/powerpc/Kconfig |2 +- arch/powerpc/include/asm/dma-mapping.h | 11 ++ arch/powerpc/include/asm

[PATCH 2/5] powerpc: Add 36-bit device tree for mpc8641hpcn

2009-04-20 Thread Becky Bruce
The new dts places most of the devices in physical address space above 32-bits, which allows us to have more than 4GB of RAM present. Signed-off-by: Becky Bruce --- arch/powerpc/boot/dts/mpc8641_hpcn_36b.dts | 597 1 files changed, 597 insertions(+), 0 deletions

[PATCH 5/5] powerpc: Add 86xx support for SWIOTLB

2009-04-20 Thread Becky Bruce
Minor code to allow enabling swiotlb on mpc86xx, including Kconfig addition for SWIOTLB. Signed-off-by: Becky Bruce --- arch/powerpc/Kconfig | 10 ++ arch/powerpc/kernel/dma-swiotlb.c |2 ++ arch/powerpc/platforms/86xx/mpc86xx_hpcn.c |3 +++ 3

[PATCH 0/5] SWIOTLB for ppc/mpc86xx

2009-04-20 Thread Becky Bruce
This patch series allows the use of swiotlb on mpc86xx, with 85xx support soon to follow. The most notable change here is the addition of addr_needs_map to dma_ops. This is used to tell if a device can reach an address without bounce buffering. I believe that patches will be coming out soon to

[PATCH 1/5] powerpc: Use sg->dma_length in sg_dma_len() macro on 32-bit

2009-04-20 Thread Becky Bruce
64-bit ifdefs, and is needed by the swiotlb code which actually distinguishes between dma_length and length. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/scatterlist.h |6 +- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/scatterlist.h

[PATCH 3/5] powerpc: make dma_window_* in pci_controller struct avail on 32b

2009-04-20 Thread Becky Bruce
ering. For now, initialize them to a standard value; in the near future, the value will be calculated based on how the inbound windows are programmed. Signed-off-by: Becky Bruce --- arch/powerpc/include/asm/pci-bridge.h |6 -- arch/powerpc/sysdev/fsl_pci.c |4 2 files ch

[PATCH 0/5] enable swiotlb on ppc/86xx

2009-04-20 Thread Becky Bruce
GIT: Please enter your email below. GIT: Lines beginning in "GIT: " will be removed. GIT: Consider including an overall diffstat or table of contents GIT: for the patch you are writing. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs

[PATCH 0/5] Allow swiotlb use on ppc/mpc86xx

2009-04-20 Thread Becky Bruce
GIT: Please enter your email below. GIT: Lines beginning in "GIT: " will be removed. GIT: Consider including an overall diffstat or table of contents GIT: for the patch you are writing. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs

Re: 8641D with linux 2.6.29 did'n show second cpu

2009-03-31 Thread Becky Bruce
On Mar 31, 2009, at 10:06 AM, Eduard Fuchs wrote: Hi, Am Dienstag 31 März 2009 15:20:21 schrieb Kumar Gala: On Mar 31, 2009, at 5:15 AM, Eduard Fuchs wrote: Hi, I'm testing the evaluation board from freescale (MPC8641DHPCN) with the latest linux kernel (2.6.29) and the second core seems disa

Re: [PATCH] net/fec_mpc52xx: fix BUG on missing dma_ops

2009-03-31 Thread Becky Bruce
you? Reviewed-by: Becky Bruce I think this is OK now, and Kumar agrees Thanks! B g. drivers/net/fec_mpc52xx.c | 19 --- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 049b0a7..f99463f 100644

Re: [PATCH] net/fec_mpc52xx: fix BUG on missing dma_ops

2009-03-30 Thread Becky Bruce
On Mar 30, 2009, at 1:53 PM, Grant Likely wrote: From: Grant Likely The driver triggers a BUG_ON() when allocating DMA buffers if the arch/powerpc dma_ops from the of_platform device are not copied into net_device structure. Signed-off-by: Grant Likely --- David, do you want to pick this on

Re: [PATCH] gianfar: pass the proper dev to DMA ops

2009-03-17 Thread Becky Bruce
hdata to be setup correctly. Signed-off-by: Kumar Gala Boots on 8641D stock config and gets rid of the panic I was seeing. Acked-by: Becky Bruce Cheers, Becky --- Dave, This is for net-next. We are working on having per device dma ops for .30 and expect the struct device archdata to be

Re: [PATCH 3/3] powerpc: expect all devices calling dma ops to have archdata set

2009-02-20 Thread Becky Bruce
if this condition shows up and the driver should be fixed. Signed-off-by: Kumar Gala Acked-by: Benjamin Krill Tested on ppc 86xx, looks good. Acked-by: Becky Bruce -B ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org

Re: [PATCH 2/3] powerpc: setup archdata for {of_}platform via a single platform_notify

2009-02-20 Thread Becky Bruce
oks good. Acked-by: Becky Bruce -B ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH 1/3] powerpc/pci: Default to dma_direct_ops for pci dma_ops

2009-02-20 Thread Becky Bruce
forward. Signed-off-by: Kumar Gala Acked-by: Benjamin Krill Tested on ppc 86xx, looks good. Acked-by: Becky Bruce -B ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH] powerpc/mm: Fix _PAGE_COHERENT support on classic ppc32 HW

2009-02-10 Thread Becky Bruce
number of fails. So Acked-by: Becky Bruce -B --- arch/powerpc/mm/hash_low_32.S |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/ hash_low_32.S index 67850ec..14af8ce 100644 --- a/arch/powerpc/mm/hash_low_32.S +++ b/ar

Re: Booting 2.6.29-rc3 on mpc8661d_hpcn failing

2009-01-30 Thread Becky Bruce
On Jan 30, 2009, at 8:42 AM, Kumar Gala wrote: On Jan 30, 2009, at 6:31 AM, Martyn Welch wrote: Hi Guys, It seems that 2.6.29-rc3 is not booting on the MPC8641 HPCN. I have just updated u-boot to the latest git to see if that improved matters, however I get stuck at the following. Any i

[PATCH] powerpc: Update 8641hpcn dts file to match latest u-boot

2008-12-19 Thread Becky Bruce
exclusive in the hardware, and they now are occupying the same space in the address map. The Rapidio node is commented out of the .dts since PCI is the common use case. Signed-off-by: Becky Bruce --- arch/powerpc/boot/dts/mpc8641_hpcn.dts | 56 ++- 1 files changed, 32

[PATCH] powerpc: Fix !CONFIG_PPC_NEED_DMA_SYNC_OPS build warning

2008-12-04 Thread Becky Bruce
Change #define stubs of dma_sync ops to be empty static inlines to avoid build warning. Signed-off-by: Becky Bruce <[EMAIL PROTECTED]> --- arch/powerpc/include/asm/dma-mapping.h | 41 +++ 1 files changed, 35 insertions(+), 6 deletions(-) diff --git a/arch/p

  1   2   >