public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* iommu: it could use some documentation
@ 2008-03-19 14:58 Pavel Machek
  2008-03-19 15:06 ` Ingo Molnar
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Pavel Machek @ 2008-03-19 14:58 UTC (permalink / raw)
  To: Ingo Molnar, kernel list, andi


Fix coding style in pci-dma_64.c and add stubs for documentation. I
hope someone fills the rest, I understand maybe off and soft...

Signed-off-by: Pavel Machek <pavel@suse.cz>

---
commit 3ab83390752b5e71c6f04230dcd25c7789bb5099
tree 295a3567278a216785cd4e32dc3bcae2c5aad572
parent d5ac3c822e1036165b92d62e464be1e61c12d757
author Pavel <pavel@amd.ucw.cz> Wed, 19 Mar 2008 15:57:03 +0100
committer Pavel <pavel@amd.ucw.cz> Wed, 19 Mar 2008 15:57:03 +0100

 Documentation/kernel-parameters.txt |   13 +++++++++++++
 arch/x86/kernel/pci-dma_64.c        |   20 ++++++++++----------
 2 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 467034c..d803f70 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -811,6 +811,19 @@ and is between 256 and 4096 characters. 
 
 	inttest=	[IA64]
 
+	iommu=		[x86]
+		off
+		force
+		noforce
+		biomerge
+		panic
+		nopanic
+		merge
+		nomerge
+		forcesac
+		soft
+
+
 	intel_iommu=	[DMAR] Intel IOMMU driver (DMAR) option
 		off
 			Disable intel iommu driver.
diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c
index a82473d..a9d3f54 100644
--- a/arch/x86/kernel/pci-dma_64.c
+++ b/arch/x86/kernel/pci-dma_64.c
@@ -237,32 +237,32 @@ static __init int iommu_setup(char *p)
 		return -EINVAL;
 
 	while (*p) {
-		if (!strncmp(p,"off",3))
+		if (!strncmp(p, "off", 3))
 			no_iommu = 1;
 		/* gart_parse_options has more force support */
-		if (!strncmp(p,"force",5))
+		if (!strncmp(p, "force", 5))
 			force_iommu = 1;
-		if (!strncmp(p,"noforce",7)) {
+		if (!strncmp(p, "noforce", 7)) {
 			iommu_merge = 0;
 			force_iommu = 0;
 		}
 
-		if (!strncmp(p, "biomerge",8)) {
+		if (!strncmp(p, "biomerge", 8)) {
 			iommu_bio_merge = 4096;
 			iommu_merge = 1;
 			force_iommu = 1;
 		}
-		if (!strncmp(p, "panic",5))
+		if (!strncmp(p, "panic", 5))
 			panic_on_overflow = 1;
-		if (!strncmp(p, "nopanic",7))
+		if (!strncmp(p, "nopanic", 7))
 			panic_on_overflow = 0;
-		if (!strncmp(p, "merge",5)) {
+		if (!strncmp(p, "merge", 5)) {
 			iommu_merge = 1;
 			force_iommu = 1;
 		}
-		if (!strncmp(p, "nomerge",7))
+		if (!strncmp(p, "nomerge", 7))
 			iommu_merge = 0;
-		if (!strncmp(p, "forcesac",8))
+		if (!strncmp(p, "forcesac", 8))
 			iommu_sac_force = 1;
 		if (!strncmp(p, "allowdac", 8))
 			forbid_dac = 0;
@@ -270,7 +270,7 @@ static __init int iommu_setup(char *p)
 			forbid_dac = -1;
 
 #ifdef CONFIG_SWIOTLB
-		if (!strncmp(p, "soft",4))
+		if (!strncmp(p, "soft", 4))
 			swiotlb = 1;
 #endif
 

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
pomozte zachranit klanovicky les:  http://www.ujezdskystrom.info/

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: iommu: it could use some documentation
  2008-03-19 14:58 iommu: it could use some documentation Pavel Machek
@ 2008-03-19 15:06 ` Ingo Molnar
  2008-03-19 15:13 ` Ingo Molnar
  2008-03-21 15:53 ` Andi Kleen
  2 siblings, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2008-03-19 15:06 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, andi


* Pavel Machek <pavel@ucw.cz> wrote:

> Fix coding style in pci-dma_64.c and add stubs for documentation. I 
> hope someone fills the rest, I understand maybe off and soft...

thanks Pavel, i've applied your bits. This file could need a ton more 
cleanups.

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iommu: it could use some documentation
  2008-03-19 14:58 iommu: it could use some documentation Pavel Machek
  2008-03-19 15:06 ` Ingo Molnar
@ 2008-03-19 15:13 ` Ingo Molnar
  2008-03-21 15:55   ` Andi Kleen
  2008-03-21 15:53 ` Andi Kleen
  2 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2008-03-19 15:13 UTC (permalink / raw)
  To: Pavel Machek; +Cc: kernel list, andi, Thomas Gleixner, H. Peter Anvin


* Pavel Machek <pavel@ucw.cz> wrote:

> Fix coding style in pci-dma_64.c and add stubs for documentation. I 
> hope someone fills the rest, I understand maybe off and soft...

> +	iommu=		[x86]
> +		off
> +		force
> +		noforce
> +		biomerge
> +		panic
> +		nopanic
> +		merge
> +		nomerge
> +		forcesac
> +		soft

these are mostly quirks to get boards booting - few people use these for 
performance tuning. SAC has an address space limit (40 bits) but is 
faster, DAC can cover the physical address range but is slower. The 
softiotlb we better forget about ;-)

if you are interested in fixing this, the descriptions from 
Documentation/x86_64/boot-options.txt should/could be merged into 
Documentation/kernel-parameters.txt.

	Ingo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iommu: it could use some documentation
  2008-03-19 14:58 iommu: it could use some documentation Pavel Machek
  2008-03-19 15:06 ` Ingo Molnar
  2008-03-19 15:13 ` Ingo Molnar
@ 2008-03-21 15:53 ` Andi Kleen
  2 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2008-03-21 15:53 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Ingo Molnar, kernel list

Pavel Machek <pavel@ucw.cz> writes:

> Fix coding style in pci-dma_64.c and add stubs for documentation. I
> hope someone fills the rest, I understand maybe off and soft...

The boot options are all documented in
Documentation/x86_64/boot-options.txt, like all other x86-64 specific
boot options.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: iommu: it could use some documentation
  2008-03-19 15:13 ` Ingo Molnar
@ 2008-03-21 15:55   ` Andi Kleen
  0 siblings, 0 replies; 5+ messages in thread
From: Andi Kleen @ 2008-03-21 15:55 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Pavel Machek, kernel list, Thomas Gleixner, H. Peter Anvin

Ingo Molnar <mingo@elte.hu> writes:
> 
> > +	iommu=		[x86]
> > +		off
> > +		force
> > +		noforce
> > +		biomerge
> > +		panic
> > +		nopanic
> > +		merge
> > +		nomerge
> > +		forcesac
> > +		soft
> 
> these are mostly quirks to get boards booting

Actually no. Except perhaps for iommu=soft none of them is related
to any  hardware issues. They all tune various performance trade offs
and were supplied for performance tuning originally.

-Andi

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-21 15:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 14:58 iommu: it could use some documentation Pavel Machek
2008-03-19 15:06 ` Ingo Molnar
2008-03-19 15:13 ` Ingo Molnar
2008-03-21 15:55   ` Andi Kleen
2008-03-21 15:53 ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox