[PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-24 Thread Joerg Roedel
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
iommu_aperture_allowed, iommu_aperture_disabled. All these symbols are only
used for the GART implementation of IOMMUs.

It adds and additional gart_ prefix to them.

Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]>
---
 arch/x86/kernel/aperture_64.c  |   13 +++--
 arch/x86/kernel/early-quirks.c |4 ++--
 arch/x86/kernel/pci-dma_64.c   |2 +-
 arch/x86/kernel/pci-gart_64.c  |8 
 include/asm-x86/gart.h |   12 ++--
 5 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 70c854f..5b69927 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -25,9 +25,9 @@
 #include 
 #include 
 
-int iommu_aperture;
-int iommu_aperture_disabled __initdata = 0;
-int iommu_aperture_allowed __initdata = 0;
+int gart_iommu_aperture;
+int gart_iommu_aperture_disabled __initdata = 0;
+int gart_iommu_aperture_allowed __initdata = 0;
 
 int fallback_aper_order __initdata = 1; /* 64MB */
 int fallback_aper_force __initdata = 0; 
@@ -204,14 +204,15 @@ static __u32 __init search_agp_bridge(u32 *order, int 
*valid_agp)
return 0;
 }
 
-void __init iommu_hole_init(void) 
+void __init gart_iommu_hole_init(void)
 { 
int fix, num; 
u32 aper_size, aper_alloc = 0, aper_order = 0, last_aper_order = 0;
u64 aper_base, last_aper_base = 0;
int valid_agp = 0;
 
-   if (iommu_aperture_disabled || !fix_aperture || !early_pci_allowed())
+   if (gart_iommu_aperture_disabled || !fix_aperture ||
+   !early_pci_allowed())
return;
 
printk(KERN_INFO  "Checking aperture...\n");
@@ -222,7 +223,7 @@ void __init iommu_hole_init(void)
continue;
 
iommu_detected = 1;
-   iommu_aperture = 1; 
+   gart_iommu_aperture = 1;
 
aper_order = (read_pci_config(0, num, 3, 0x90) >> 1) & 7; 
aper_size = (32 * 1024 * 1024) << aper_order; 
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 5330745..7b24ab7 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -25,11 +25,11 @@ static void __init via_bugs(void)
 {
 #ifdef CONFIG_GART_IOMMU
if ((end_pfn > MAX_DMA32_PFN ||  force_iommu) &&
-   !iommu_aperture_allowed) {
+   !gart_iommu_aperture_allowed) {
printk(KERN_INFO
   "Looks like a VIA chipset. Disabling IOMMU."
   " Override with iommu=allowed\n");
-   iommu_aperture_disabled = 1;
+   gart_iommu_aperture_disabled = 1;
}
 #endif
 }
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c
index 66b3dc5..aa805b1 100644
--- a/arch/x86/kernel/pci-dma_64.c
+++ b/arch/x86/kernel/pci-dma_64.c
@@ -299,7 +299,7 @@ void __init pci_iommu_alloc(void)
 * fall-back/fail-over reasons
 */
 #ifdef CONFIG_GART_IOMMU
-   iommu_hole_init();
+   gart_iommu_hole_init();
 #endif
 
 #ifdef CONFIG_CALGARY_IOMMU
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 7097ef8..dcca30b 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -628,12 +628,12 @@ void __init gart_iommu_init(void)
return;
 
/* Did we detect a different HW IOMMU? */
-   if (iommu_detected && !iommu_aperture)
+   if (iommu_detected && !gart_iommu_aperture)
return;
 
if (no_iommu ||
(!force_iommu && end_pfn <= MAX_DMA32_PFN) ||
-   !iommu_aperture ||
+   !gart_iommu_aperture ||
(no_agp && init_k8_gatt() < 0)) {
if (end_pfn > MAX_DMA32_PFN) {
printk(KERN_ERR "WARNING more than 4GB of memory "
@@ -734,9 +734,9 @@ void __init gart_parse_options(char *p)
fix_aperture = 0;
/* duplicated from pci-dma.c */
if (!strncmp(p,"force",5))
-   iommu_aperture_allowed = 1;
+   gart_iommu_aperture_allowed = 1;
if (!strncmp(p,"allowed",7))
-   iommu_aperture_allowed = 1;
+   gart_iommu_aperture_allowed = 1;
if (!strncmp(p, "memaper", 7)) {
fallback_aper_force = 1;
p += 7;
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h
index cb7e989..27b4469 100644
--- a/include/asm-x86/gart.h
+++ b/include/asm-x86/gart.h
@@ -9,16 +9,16 @@ extern int iommu_detected;
 extern void gart_iommu_init(void);
 extern void gart_iommu_shutdown(void);
 extern void __init gart_parse_options(char *);
-extern void iommu_hole_init(void);
+extern void gart_iommu_hole_init(void);
 extern int fallback_aper_order;
 extern int fallback_aper_force;
-extern int iommu_aperture;
-extern int iommu_aperture_allowed;
-extern int iommu_aperture_disabled;
+extern int 

[PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-24 Thread Joerg Roedel
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
iommu_aperture_allowed, iommu_aperture_disabled. All these symbols are only
used for the GART implementation of IOMMUs.

It adds and additional gart_ prefix to them.

Signed-off-by: Joerg Roedel [EMAIL PROTECTED]
---
 arch/x86/kernel/aperture_64.c  |   13 +++--
 arch/x86/kernel/early-quirks.c |4 ++--
 arch/x86/kernel/pci-dma_64.c   |2 +-
 arch/x86/kernel/pci-gart_64.c  |8 
 include/asm-x86/gart.h |   12 ++--
 5 files changed, 20 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 70c854f..5b69927 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -25,9 +25,9 @@
 #include asm/dma.h
 #include asm/k8.h
 
-int iommu_aperture;
-int iommu_aperture_disabled __initdata = 0;
-int iommu_aperture_allowed __initdata = 0;
+int gart_iommu_aperture;
+int gart_iommu_aperture_disabled __initdata = 0;
+int gart_iommu_aperture_allowed __initdata = 0;
 
 int fallback_aper_order __initdata = 1; /* 64MB */
 int fallback_aper_force __initdata = 0; 
@@ -204,14 +204,15 @@ static __u32 __init search_agp_bridge(u32 *order, int 
*valid_agp)
return 0;
 }
 
-void __init iommu_hole_init(void) 
+void __init gart_iommu_hole_init(void)
 { 
int fix, num; 
u32 aper_size, aper_alloc = 0, aper_order = 0, last_aper_order = 0;
u64 aper_base, last_aper_base = 0;
int valid_agp = 0;
 
-   if (iommu_aperture_disabled || !fix_aperture || !early_pci_allowed())
+   if (gart_iommu_aperture_disabled || !fix_aperture ||
+   !early_pci_allowed())
return;
 
printk(KERN_INFO  Checking aperture...\n);
@@ -222,7 +223,7 @@ void __init iommu_hole_init(void)
continue;
 
iommu_detected = 1;
-   iommu_aperture = 1; 
+   gart_iommu_aperture = 1;
 
aper_order = (read_pci_config(0, num, 3, 0x90)  1)  7; 
aper_size = (32 * 1024 * 1024)  aper_order; 
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 5330745..7b24ab7 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -25,11 +25,11 @@ static void __init via_bugs(void)
 {
 #ifdef CONFIG_GART_IOMMU
if ((end_pfn  MAX_DMA32_PFN ||  force_iommu) 
-   !iommu_aperture_allowed) {
+   !gart_iommu_aperture_allowed) {
printk(KERN_INFO
   Looks like a VIA chipset. Disabling IOMMU.
Override with iommu=allowed\n);
-   iommu_aperture_disabled = 1;
+   gart_iommu_aperture_disabled = 1;
}
 #endif
 }
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c
index 66b3dc5..aa805b1 100644
--- a/arch/x86/kernel/pci-dma_64.c
+++ b/arch/x86/kernel/pci-dma_64.c
@@ -299,7 +299,7 @@ void __init pci_iommu_alloc(void)
 * fall-back/fail-over reasons
 */
 #ifdef CONFIG_GART_IOMMU
-   iommu_hole_init();
+   gart_iommu_hole_init();
 #endif
 
 #ifdef CONFIG_CALGARY_IOMMU
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 7097ef8..dcca30b 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -628,12 +628,12 @@ void __init gart_iommu_init(void)
return;
 
/* Did we detect a different HW IOMMU? */
-   if (iommu_detected  !iommu_aperture)
+   if (iommu_detected  !gart_iommu_aperture)
return;
 
if (no_iommu ||
(!force_iommu  end_pfn = MAX_DMA32_PFN) ||
-   !iommu_aperture ||
+   !gart_iommu_aperture ||
(no_agp  init_k8_gatt(info)  0)) {
if (end_pfn  MAX_DMA32_PFN) {
printk(KERN_ERR WARNING more than 4GB of memory 
@@ -734,9 +734,9 @@ void __init gart_parse_options(char *p)
fix_aperture = 0;
/* duplicated from pci-dma.c */
if (!strncmp(p,force,5))
-   iommu_aperture_allowed = 1;
+   gart_iommu_aperture_allowed = 1;
if (!strncmp(p,allowed,7))
-   iommu_aperture_allowed = 1;
+   gart_iommu_aperture_allowed = 1;
if (!strncmp(p, memaper, 7)) {
fallback_aper_force = 1;
p += 7;
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h
index cb7e989..27b4469 100644
--- a/include/asm-x86/gart.h
+++ b/include/asm-x86/gart.h
@@ -9,16 +9,16 @@ extern int iommu_detected;
 extern void gart_iommu_init(void);
 extern void gart_iommu_shutdown(void);
 extern void __init gart_parse_options(char *);
-extern void iommu_hole_init(void);
+extern void gart_iommu_hole_init(void);
 extern int fallback_aper_order;
 extern int fallback_aper_force;
-extern int iommu_aperture;
-extern int iommu_aperture_allowed;
-extern int iommu_aperture_disabled;
+extern int gart_iommu_aperture;

Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Muli Ben-Yehuda
On Tue, Oct 23, 2007 at 08:10:54PM +0200, Andi Kleen wrote:

> I think his goal was to get an prefix that describes the module
> uniquely.  gart_* clearly does not fulfill that criteria.
> 
> So basically he's replacing an
> ambigious-with-other-IOMMU-implementations prefix with an
> ambigious-with-AGP prefix. Seems like a rather pointless change.

Not at all - the present situation where GART specific code
masquerades as generic IOMMU code is confusing. I've heard from more
than one person who was confused by "how come I can enable an IOMMU
while CONFIG_IOMMU is off?" and "how come some iommu_xxx options
(which were really gart options...) don't actually affect the
(Calgary) IOMMU"?

If the variable names clash the correct solution is to s/gart/agpgart/
in the AGP code and then continue renaming gart specific bits 'gart'
rather than 'iommu'.

Cheers,
Muli
-- 
SYSTOR 2007 --- 1st Annual Haifa Systems and Storage Conference 2007
http://www.haifa.il.ibm.com/Workshops/systor2007/

Virtualization workshop: Oct 29th, 2007 | Storage workshop: Oct 30th, 2007
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Joerg Roedel
On Tue, Oct 23, 2007 at 08:10:54PM +0200, Andi Kleen wrote:
> On Tuesday 23 October 2007 20:04:36 H. Peter Anvin wrote:
> > Dave Jones wrote:
> > > On Tue, Oct 23, 2007 at 07:47:11PM +0200, Joerg Roedel wrote:
> > >  > On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
> > >  > > On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
> > >  > > > This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
> > >  > > > iommu_aperture_allowed, iommu_aperture_disabled.
> > >  > > > 
> > >  > > > It replaces the iommu_ with gart_ in the symbol name. All these 
> > > symbols are
> > >  > > > only used for the GART implementation of IOMMUs.
> > >  > > 
> > >  > > That makes it still potentially conflicting with the AGP GART code.
> > >  > 
> > >  > Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config
> > >  > option. So I don't see a problem here.
> > >  
> > > It shouldn't.  It's perfectly feasible to use both IOMMU and GART for AGP 
> > > at
> > > the same time.
> > > 
> > 
> > And even if did, it's a big difference between being not able to compile 
> > in two drivers in the same kernel and not being able to use them at the 
> > same time.
> 
> You can already compile them in all. The functions are not really
> conflicting -- otherwise allyesconfig would not work.
> 
> I think his goal was to get an prefix that describes the module uniquely.
> gart_* clearly does not fulfill that criteria.
> 
> So basically he's replacing an ambigious-with-other-IOMMU-implementations
> prefix with an ambigious-with-AGP prefix. Seems like a rather pointless
> change.

Ok, sorry, right. I misunderstood the Kconfig entry for the AGP GART
driver. I will change the prefix to gart_iommu and resubmit.

Joerg

-- 
   |   AMD Saxony Limited Liability Company & Co. KG
 Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System|  Register Court Dresden: HRA 4896
 Research  |  General Partner authorized to represent:
 Center| AMD Saxony LLC (Wilmington, Delaware, US)
   | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Andi Kleen
On Tuesday 23 October 2007 20:04:36 H. Peter Anvin wrote:
> Dave Jones wrote:
> > On Tue, Oct 23, 2007 at 07:47:11PM +0200, Joerg Roedel wrote:
> >  > On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
> >  > > On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
> >  > > > This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
> >  > > > iommu_aperture_allowed, iommu_aperture_disabled.
> >  > > > 
> >  > > > It replaces the iommu_ with gart_ in the symbol name. All these 
> > symbols are
> >  > > > only used for the GART implementation of IOMMUs.
> >  > > 
> >  > > That makes it still potentially conflicting with the AGP GART code.
> >  > 
> >  > Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config
> >  > option. So I don't see a problem here.
> >  
> > It shouldn't.  It's perfectly feasible to use both IOMMU and GART for AGP at
> > the same time.
> > 
> 
> And even if did, it's a big difference between being not able to compile 
> in two drivers in the same kernel and not being able to use them at the 
> same time.

You can already compile them in all. The functions are not really
conflicting -- otherwise allyesconfig would not work.

I think his goal was to get an prefix that describes the module uniquely.
gart_* clearly does not fulfill that criteria.

So basically he's replacing an ambigious-with-other-IOMMU-implementations
prefix with an ambigious-with-AGP prefix. Seems like a rather pointless
change.

-And
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread H. Peter Anvin

Dave Jones wrote:

On Tue, Oct 23, 2007 at 07:47:11PM +0200, Joerg Roedel wrote:
 > On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
 > > On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
 > > > This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
 > > > iommu_aperture_allowed, iommu_aperture_disabled.
 > > > 
 > > > It replaces the iommu_ with gart_ in the symbol name. All these symbols are

 > > > only used for the GART implementation of IOMMUs.
 > > 
 > > That makes it still potentially conflicting with the AGP GART code.
 > 
 > Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config

 > option. So I don't see a problem here.
 
It shouldn't.  It's perfectly feasible to use both IOMMU and GART for AGP at

the same time.



And even if did, it's a big difference between being not able to compile 
in two drivers in the same kernel and not being able to use them at the 
same time.


Now, it looks to me the AGP GART code mostly calls itself agpgart.

-hpa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Dave Jones
On Tue, Oct 23, 2007 at 07:47:11PM +0200, Joerg Roedel wrote:
 > On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
 > > On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
 > > > This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
 > > > iommu_aperture_allowed, iommu_aperture_disabled.
 > > > 
 > > > It replaces the iommu_ with gart_ in the symbol name. All these symbols 
 > > > are
 > > > only used for the GART implementation of IOMMUs.
 > > 
 > > That makes it still potentially conflicting with the AGP GART code.
 > 
 > Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config
 > option. So I don't see a problem here.
 
It shouldn't.  It's perfectly feasible to use both IOMMU and GART for AGP at
the same time.

Dave

-- 
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Joerg Roedel
On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
> On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
> > This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
> > iommu_aperture_allowed, iommu_aperture_disabled.
> > 
> > It replaces the iommu_ with gart_ in the symbol name. All these symbols are
> > only used for the GART implementation of IOMMUs.
> 
> That makes it still potentially conflicting with the AGP GART code.

Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config
option. So I don't see a problem here.

Joerg

-- 
   |   AMD Saxony Limited Liability Company & Co. KG
 Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System|  Register Court Dresden: HRA 4896
 Research  |  General Partner authorized to represent:
 Center| AMD Saxony LLC (Wilmington, Delaware, US)
   | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Andi Kleen
On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
> This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
> iommu_aperture_allowed, iommu_aperture_disabled.
> 
> It replaces the iommu_ with gart_ in the symbol name. All these symbols are
> only used for the GART implementation of IOMMUs.

That makes it still potentially conflicting with the AGP GART code.

-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Joerg Roedel
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
iommu_aperture_allowed, iommu_aperture_disabled.

It replaces the iommu_ with gart_ in the symbol name. All these symbols are
only used for the GART implementation of IOMMUs.

Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]>
---
 arch/x86/kernel/aperture_64.c  |   12 ++--
 arch/x86/kernel/early-quirks.c |4 ++--
 arch/x86/kernel/pci-dma_64.c   |2 +-
 arch/x86/kernel/pci-gart_64.c  |8 
 include/asm-x86/gart.h |   12 ++--
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 70c854f..3423d00 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -25,9 +25,9 @@
 #include 
 #include 
 
-int iommu_aperture;
-int iommu_aperture_disabled __initdata = 0;
-int iommu_aperture_allowed __initdata = 0;
+int gart_aperture;
+int gart_aperture_disabled __initdata = 0;
+int gart_aperture_allowed __initdata = 0;
 
 int fallback_aper_order __initdata = 1; /* 64MB */
 int fallback_aper_force __initdata = 0; 
@@ -204,14 +204,14 @@ static __u32 __init search_agp_bridge(u32 *order, int 
*valid_agp)
return 0;
 }
 
-void __init iommu_hole_init(void)
+void __init gart_hole_init(void)
 { 
int fix, num; 
u32 aper_size, aper_alloc = 0, aper_order = 0, last_aper_order = 0;
u64 aper_base, last_aper_base = 0;
int valid_agp = 0;
 
-   if (iommu_aperture_disabled || !fix_aperture || !early_pci_allowed())
+   if (gart_aperture_disabled || !fix_aperture || !early_pci_allowed())
return;
 
printk(KERN_INFO  "Checking aperture...\n");
@@ -222,7 +222,7 @@ void __init iommu_hole_init(void)
continue;
 
iommu_detected = 1;
-   iommu_aperture = 1; 
+   gart_aperture = 1;
 
aper_order = (read_pci_config(0, num, 3, 0x90) >> 1) & 7; 
aper_size = (32 * 1024 * 1024) << aper_order; 
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 5330745..b0527af 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -25,11 +25,11 @@ static void __init via_bugs(void)
 {
 #ifdef CONFIG_GART_IOMMU
if ((end_pfn > MAX_DMA32_PFN ||  force_iommu) &&
-   !iommu_aperture_allowed) {
+   !gart_aperture_allowed) {
printk(KERN_INFO
   "Looks like a VIA chipset. Disabling IOMMU."
   " Override with iommu=allowed\n");
-   iommu_aperture_disabled = 1;
+   gart_aperture_disabled = 1;
}
 #endif
 }
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c
index 66b3dc5..20389f9 100644
--- a/arch/x86/kernel/pci-dma_64.c
+++ b/arch/x86/kernel/pci-dma_64.c
@@ -299,7 +299,7 @@ void __init pci_iommu_alloc(void)
 * fall-back/fail-over reasons
 */
 #ifdef CONFIG_GART_IOMMU
-   iommu_hole_init();
+   gart_hole_init();
 #endif
 
 #ifdef CONFIG_CALGARY_IOMMU
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 7097ef8..c54c87d 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -628,12 +628,12 @@ void __init gart_iommu_init(void)
return;
 
/* Did we detect a different HW IOMMU? */
-   if (iommu_detected && !iommu_aperture)
+   if (iommu_detected && !gart_aperture)
return;
 
if (no_iommu ||
(!force_iommu && end_pfn <= MAX_DMA32_PFN) ||
-   !iommu_aperture ||
+   !gart_aperture ||
(no_agp && init_k8_gatt() < 0)) {
if (end_pfn > MAX_DMA32_PFN) {
printk(KERN_ERR "WARNING more than 4GB of memory "
@@ -734,9 +734,9 @@ void __init gart_parse_options(char *p)
fix_aperture = 0;
/* duplicated from pci-dma.c */
if (!strncmp(p,"force",5))
-   iommu_aperture_allowed = 1;
+   gart_aperture_allowed = 1;
if (!strncmp(p,"allowed",7))
-   iommu_aperture_allowed = 1;
+   gart_aperture_allowed = 1;
if (!strncmp(p, "memaper", 7)) {
fallback_aper_force = 1;
p += 7;
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h
index cb7e989..70c6889 100644
--- a/include/asm-x86/gart.h
+++ b/include/asm-x86/gart.h
@@ -9,16 +9,16 @@ extern int iommu_detected;
 extern void gart_iommu_init(void);
 extern void gart_iommu_shutdown(void);
 extern void __init gart_parse_options(char *);
-extern void iommu_hole_init(void);
+extern void gart_hole_init(void);
 extern int fallback_aper_order;
 extern int fallback_aper_force;
-extern int iommu_aperture;
-extern int iommu_aperture_allowed;
-extern int iommu_aperture_disabled;
+extern int gart_aperture;
+extern int gart_aperture_allowed;
+extern int gart_aperture_disabled;
 extern 

[PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Joerg Roedel
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
iommu_aperture_allowed, iommu_aperture_disabled.

It replaces the iommu_ with gart_ in the symbol name. All these symbols are
only used for the GART implementation of IOMMUs.

Signed-off-by: Joerg Roedel [EMAIL PROTECTED]
---
 arch/x86/kernel/aperture_64.c  |   12 ++--
 arch/x86/kernel/early-quirks.c |4 ++--
 arch/x86/kernel/pci-dma_64.c   |2 +-
 arch/x86/kernel/pci-gart_64.c  |8 
 include/asm-x86/gart.h |   12 ++--
 5 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c
index 70c854f..3423d00 100644
--- a/arch/x86/kernel/aperture_64.c
+++ b/arch/x86/kernel/aperture_64.c
@@ -25,9 +25,9 @@
 #include asm/dma.h
 #include asm/k8.h
 
-int iommu_aperture;
-int iommu_aperture_disabled __initdata = 0;
-int iommu_aperture_allowed __initdata = 0;
+int gart_aperture;
+int gart_aperture_disabled __initdata = 0;
+int gart_aperture_allowed __initdata = 0;
 
 int fallback_aper_order __initdata = 1; /* 64MB */
 int fallback_aper_force __initdata = 0; 
@@ -204,14 +204,14 @@ static __u32 __init search_agp_bridge(u32 *order, int 
*valid_agp)
return 0;
 }
 
-void __init iommu_hole_init(void)
+void __init gart_hole_init(void)
 { 
int fix, num; 
u32 aper_size, aper_alloc = 0, aper_order = 0, last_aper_order = 0;
u64 aper_base, last_aper_base = 0;
int valid_agp = 0;
 
-   if (iommu_aperture_disabled || !fix_aperture || !early_pci_allowed())
+   if (gart_aperture_disabled || !fix_aperture || !early_pci_allowed())
return;
 
printk(KERN_INFO  Checking aperture...\n);
@@ -222,7 +222,7 @@ void __init iommu_hole_init(void)
continue;
 
iommu_detected = 1;
-   iommu_aperture = 1; 
+   gart_aperture = 1;
 
aper_order = (read_pci_config(0, num, 3, 0x90)  1)  7; 
aper_size = (32 * 1024 * 1024)  aper_order; 
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 5330745..b0527af 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -25,11 +25,11 @@ static void __init via_bugs(void)
 {
 #ifdef CONFIG_GART_IOMMU
if ((end_pfn  MAX_DMA32_PFN ||  force_iommu) 
-   !iommu_aperture_allowed) {
+   !gart_aperture_allowed) {
printk(KERN_INFO
   Looks like a VIA chipset. Disabling IOMMU.
Override with iommu=allowed\n);
-   iommu_aperture_disabled = 1;
+   gart_aperture_disabled = 1;
}
 #endif
 }
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c
index 66b3dc5..20389f9 100644
--- a/arch/x86/kernel/pci-dma_64.c
+++ b/arch/x86/kernel/pci-dma_64.c
@@ -299,7 +299,7 @@ void __init pci_iommu_alloc(void)
 * fall-back/fail-over reasons
 */
 #ifdef CONFIG_GART_IOMMU
-   iommu_hole_init();
+   gart_hole_init();
 #endif
 
 #ifdef CONFIG_CALGARY_IOMMU
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 7097ef8..c54c87d 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -628,12 +628,12 @@ void __init gart_iommu_init(void)
return;
 
/* Did we detect a different HW IOMMU? */
-   if (iommu_detected  !iommu_aperture)
+   if (iommu_detected  !gart_aperture)
return;
 
if (no_iommu ||
(!force_iommu  end_pfn = MAX_DMA32_PFN) ||
-   !iommu_aperture ||
+   !gart_aperture ||
(no_agp  init_k8_gatt(info)  0)) {
if (end_pfn  MAX_DMA32_PFN) {
printk(KERN_ERR WARNING more than 4GB of memory 
@@ -734,9 +734,9 @@ void __init gart_parse_options(char *p)
fix_aperture = 0;
/* duplicated from pci-dma.c */
if (!strncmp(p,force,5))
-   iommu_aperture_allowed = 1;
+   gart_aperture_allowed = 1;
if (!strncmp(p,allowed,7))
-   iommu_aperture_allowed = 1;
+   gart_aperture_allowed = 1;
if (!strncmp(p, memaper, 7)) {
fallback_aper_force = 1;
p += 7;
diff --git a/include/asm-x86/gart.h b/include/asm-x86/gart.h
index cb7e989..70c6889 100644
--- a/include/asm-x86/gart.h
+++ b/include/asm-x86/gart.h
@@ -9,16 +9,16 @@ extern int iommu_detected;
 extern void gart_iommu_init(void);
 extern void gart_iommu_shutdown(void);
 extern void __init gart_parse_options(char *);
-extern void iommu_hole_init(void);
+extern void gart_hole_init(void);
 extern int fallback_aper_order;
 extern int fallback_aper_force;
-extern int iommu_aperture;
-extern int iommu_aperture_allowed;
-extern int iommu_aperture_disabled;
+extern int gart_aperture;
+extern int gart_aperture_allowed;
+extern int gart_aperture_disabled;
 extern int 

Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Andi Kleen
On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
 This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
 iommu_aperture_allowed, iommu_aperture_disabled.
 
 It replaces the iommu_ with gart_ in the symbol name. All these symbols are
 only used for the GART implementation of IOMMUs.

That makes it still potentially conflicting with the AGP GART code.

-Andi
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Joerg Roedel
On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
 On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
  This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
  iommu_aperture_allowed, iommu_aperture_disabled.
  
  It replaces the iommu_ with gart_ in the symbol name. All these symbols are
  only used for the GART implementation of IOMMUs.
 
 That makes it still potentially conflicting with the AGP GART code.

Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config
option. So I don't see a problem here.

Joerg

-- 
   |   AMD Saxony Limited Liability Company  Co. KG
 Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System|  Register Court Dresden: HRA 4896
 Research  |  General Partner authorized to represent:
 Center| AMD Saxony LLC (Wilmington, Delaware, US)
   | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Dave Jones
On Tue, Oct 23, 2007 at 07:47:11PM +0200, Joerg Roedel wrote:
  On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
   On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
iommu_aperture_allowed, iommu_aperture_disabled.

It replaces the iommu_ with gart_ in the symbol name. All these symbols 
are
only used for the GART implementation of IOMMUs.
   
   That makes it still potentially conflicting with the AGP GART code.
  
  Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config
  option. So I don't see a problem here.
 
It shouldn't.  It's perfectly feasible to use both IOMMU and GART for AGP at
the same time.

Dave

-- 
http://www.codemonkey.org.uk
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread H. Peter Anvin

Dave Jones wrote:

On Tue, Oct 23, 2007 at 07:47:11PM +0200, Joerg Roedel wrote:
  On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
   On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
iommu_aperture_allowed, iommu_aperture_disabled.

It replaces the iommu_ with gart_ in the symbol name. All these symbols are

only used for the GART implementation of IOMMUs.
   
   That makes it still potentially conflicting with the AGP GART code.
  
  Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config

  option. So I don't see a problem here.
 
It shouldn't.  It's perfectly feasible to use both IOMMU and GART for AGP at

the same time.



And even if did, it's a big difference between being not able to compile 
in two drivers in the same kernel and not being able to use them at the 
same time.


Now, it looks to me the AGP GART code mostly calls itself agpgart.

-hpa
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Andi Kleen
On Tuesday 23 October 2007 20:04:36 H. Peter Anvin wrote:
 Dave Jones wrote:
  On Tue, Oct 23, 2007 at 07:47:11PM +0200, Joerg Roedel wrote:
On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
 On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
  This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
  iommu_aperture_allowed, iommu_aperture_disabled.
  
  It replaces the iommu_ with gart_ in the symbol name. All these 
  symbols are
  only used for the GART implementation of IOMMUs.
 
 That makes it still potentially conflicting with the AGP GART code.

Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config
option. So I don't see a problem here.
   
  It shouldn't.  It's perfectly feasible to use both IOMMU and GART for AGP at
  the same time.
  
 
 And even if did, it's a big difference between being not able to compile 
 in two drivers in the same kernel and not being able to use them at the 
 same time.

You can already compile them in all. The functions are not really
conflicting -- otherwise allyesconfig would not work.

I think his goal was to get an prefix that describes the module uniquely.
gart_* clearly does not fulfill that criteria.

So basically he's replacing an ambigious-with-other-IOMMU-implementations
prefix with an ambigious-with-AGP prefix. Seems like a rather pointless
change.

-And
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Joerg Roedel
On Tue, Oct 23, 2007 at 08:10:54PM +0200, Andi Kleen wrote:
 On Tuesday 23 October 2007 20:04:36 H. Peter Anvin wrote:
  Dave Jones wrote:
   On Tue, Oct 23, 2007 at 07:47:11PM +0200, Joerg Roedel wrote:
 On Tue, Oct 23, 2007 at 07:43:47PM +0200, Andi Kleen wrote:
  On Tuesday 23 October 2007 19:41:33 Joerg Roedel wrote:
   This patch renames the 4 symbols iommu_hole_init(), iommu_aperture,
   iommu_aperture_allowed, iommu_aperture_disabled.
   
   It replaces the iommu_ with gart_ in the symbol name. All these 
   symbols are
   only used for the GART implementation of IOMMUs.
  
  That makes it still potentially conflicting with the AGP GART code.
 
 Maybe yes. But the AGP GART driver conflicts with the GART IOMMU config
 option. So I don't see a problem here.

   It shouldn't.  It's perfectly feasible to use both IOMMU and GART for AGP 
   at
   the same time.
   
  
  And even if did, it's a big difference between being not able to compile 
  in two drivers in the same kernel and not being able to use them at the 
  same time.
 
 You can already compile them in all. The functions are not really
 conflicting -- otherwise allyesconfig would not work.
 
 I think his goal was to get an prefix that describes the module uniquely.
 gart_* clearly does not fulfill that criteria.
 
 So basically he's replacing an ambigious-with-other-IOMMU-implementations
 prefix with an ambigious-with-AGP prefix. Seems like a rather pointless
 change.

Ok, sorry, right. I misunderstood the Kconfig entry for the AGP GART
driver. I will change the prefix to gart_iommu and resubmit.

Joerg

-- 
   |   AMD Saxony Limited Liability Company  Co. KG
 Operating | Wilschdorfer Landstr. 101, 01109 Dresden, Germany
 System|  Register Court Dresden: HRA 4896
 Research  |  General Partner authorized to represent:
 Center| AMD Saxony LLC (Wilmington, Delaware, US)
   | General Manager of AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 4/4] x86 gart: rename symbols only used for the GART implementation

2007-10-23 Thread Muli Ben-Yehuda
On Tue, Oct 23, 2007 at 08:10:54PM +0200, Andi Kleen wrote:

 I think his goal was to get an prefix that describes the module
 uniquely.  gart_* clearly does not fulfill that criteria.
 
 So basically he's replacing an
 ambigious-with-other-IOMMU-implementations prefix with an
 ambigious-with-AGP prefix. Seems like a rather pointless change.

Not at all - the present situation where GART specific code
masquerades as generic IOMMU code is confusing. I've heard from more
than one person who was confused by how come I can enable an IOMMU
while CONFIG_IOMMU is off? and how come some iommu_xxx options
(which were really gart options...) don't actually affect the
(Calgary) IOMMU?

If the variable names clash the correct solution is to s/gart/agpgart/
in the AGP code and then continue renaming gart specific bits 'gart'
rather than 'iommu'.

Cheers,
Muli
-- 
SYSTOR 2007 --- 1st Annual Haifa Systems and Storage Conference 2007
http://www.haifa.il.ibm.com/Workshops/systor2007/

Virtualization workshop: Oct 29th, 2007 | Storage workshop: Oct 30th, 2007
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/