Commit eab10312 authored by Alex Williamson's avatar Alex Williamson Committed by David Mosberger

[PATCH] ia64: setup max dma addr earlier on hp boxes

sba_iommu was setting up MAX_DMA_ADDRESS way too late to do any
good.  This patch makes it get setup via platform_setup, so it's ready
for paging_init().  All pages should show up in zone DMA now.  Against
latest 2.6.
parent 1ec5fa5c
...@@ -1732,7 +1732,6 @@ ioc_init(u64 hpa, void *handle) ...@@ -1732,7 +1732,6 @@ ioc_init(u64 hpa, void *handle)
if ((long) ~iovp_mask > (long) ia64_max_iommu_merge_mask) if ((long) ~iovp_mask > (long) ia64_max_iommu_merge_mask)
ia64_max_iommu_merge_mask = ~iovp_mask; ia64_max_iommu_merge_mask = ~iovp_mask;
MAX_DMA_ADDRESS = ~0UL;
printk(KERN_INFO PFX printk(KERN_INFO PFX
"%s %d.%d HPA 0x%lx IOVA space %dMb at 0x%lx\n", "%s %d.%d HPA 0x%lx IOVA space %dMb at 0x%lx\n",
...@@ -1966,6 +1965,18 @@ sba_init(void) ...@@ -1966,6 +1965,18 @@ sba_init(void)
subsys_initcall(sba_init); /* must be initialized after ACPI etc., but before any drivers... */ subsys_initcall(sba_init); /* must be initialized after ACPI etc., but before any drivers... */
extern void dig_setup(char**);
/*
* MAX_DMA_ADDRESS needs to be setup prior to paging_init to do any good,
* so we use the platform_setup hook to fix it up.
*/
void __init
sba_setup(char **cmdline_p)
{
MAX_DMA_ADDRESS = ~0UL;
dig_setup(cmdline_p);
}
static int __init static int __init
nosbagart(char *str) nosbagart(char *str)
{ {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define _ASM_IA64_MACHVEC_HPZX1_h #define _ASM_IA64_MACHVEC_HPZX1_h
extern ia64_mv_setup_t dig_setup; extern ia64_mv_setup_t dig_setup;
extern ia64_mv_setup_t sba_setup;
extern ia64_mv_dma_alloc_coherent sba_alloc_coherent; extern ia64_mv_dma_alloc_coherent sba_alloc_coherent;
extern ia64_mv_dma_free_coherent sba_free_coherent; extern ia64_mv_dma_free_coherent sba_free_coherent;
extern ia64_mv_dma_map_single sba_map_single; extern ia64_mv_dma_map_single sba_map_single;
...@@ -19,7 +20,7 @@ extern ia64_mv_dma_mapping_error sba_dma_mapping_error; ...@@ -19,7 +20,7 @@ extern ia64_mv_dma_mapping_error sba_dma_mapping_error;
* the macros are used directly. * the macros are used directly.
*/ */
#define platform_name "hpzx1" #define platform_name "hpzx1"
#define platform_setup dig_setup #define platform_setup sba_setup
#define platform_dma_init machvec_noop #define platform_dma_init machvec_noop
#define platform_dma_alloc_coherent sba_alloc_coherent #define platform_dma_alloc_coherent sba_alloc_coherent
#define platform_dma_free_coherent sba_free_coherent #define platform_dma_free_coherent sba_free_coherent
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment