All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@hp.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH] setup max dma addr earlier on hp boxes
Date: Mon, 05 Apr 2004 17:22:42 +0000	[thread overview]
Message-ID: <1081185762.2277.10.camel@patsy.fc.hp.com> (raw)


   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.  Thanks,

	Alex

-- 
Alex Williamson                             HP Linux & Open Source Lab

=== arch/ia64/hp/common/sba_iommu.c 1.41 vs edited ==--- 1.41/arch/ia64/hp/common/sba_iommu.c	Mon Mar 22 03:52:38 2004
+++ edited/arch/ia64/hp/common/sba_iommu.c	Mon Apr  5 11:14:20 2004
@@ -1732,7 +1732,6 @@
 
 	if ((long) ~iovp_mask > (long) ia64_max_iommu_merge_mask)
 		ia64_max_iommu_merge_mask = ~iovp_mask;
-	MAX_DMA_ADDRESS = ~0UL;
 
 	printk(KERN_INFO PFX
 		"%s %d.%d HPA 0x%lx IOVA space %dMb at 0x%lx\n",
@@ -1965,6 +1964,18 @@
 }
 
 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
 nosbagart(char *str)
=== include/asm-ia64/machvec_hpzx1.h 1.10 vs edited ==--- 1.10/include/asm-ia64/machvec_hpzx1.h	Tue Mar 23 17:28:49 2004
+++ edited/include/asm-ia64/machvec_hpzx1.h	Mon Apr  5 11:07:18 2004
@@ -2,6 +2,7 @@
 #define _ASM_IA64_MACHVEC_HPZX1_h
 
 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_free_coherent	sba_free_coherent;
 extern ia64_mv_dma_map_single		sba_map_single;
@@ -19,7 +20,7 @@
  * the macros are used directly.
  */
 #define platform_name			"hpzx1"
-#define platform_setup			dig_setup
+#define platform_setup			sba_setup
 #define platform_dma_init		machvec_noop
 #define platform_dma_alloc_coherent	sba_alloc_coherent
 #define platform_dma_free_coherent	sba_free_coherent



                 reply	other threads:[~2004-04-05 17:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1081185762.2277.10.camel@patsy.fc.hp.com \
    --to=alex.williamson@hp.com \
    --cc=linux-ia64@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.