<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/include/asm-x86/gart.h, branch v2.6.27.56</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>x86: make only GART code include gart.h</title>
<updated>2008-07-11T09:00:54+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-07-11T01:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=46a7fa270afbe5fddc6042a598cfe22977b0e989'/>
<id>46a7fa270afbe5fddc6042a598cfe22977b0e989</id>
<content type='text'>
gart.h has only GART-specific stuff. Only GART code needs it. Other
IOMMU stuff should include iommu.h instead of gart.h.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Acked-by: Muli Ben-Yehuda &lt;muli@il.ibm.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gart.h has only GART-specific stuff. Only GART code needs it. Other
IOMMU stuff should include iommu.h instead of gart.h.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Acked-by: Muli Ben-Yehuda &lt;muli@il.ibm.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86: clean up iommu.h and gart.h</title>
<updated>2008-07-10T08:43:26+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-07-09T23:27:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e93be88d7ec9d183c1cca51eabe040c051cdb687'/>
<id>e93be88d7ec9d183c1cca51eabe040c051cdb687</id>
<content type='text'>
This remove lots of duplications in iommu.h and gart.h.

The end result of this patch is:

- iommu.h is a header file for everyone related with IOMMUs.

- gart.h is the private header file. Only pci-gart_64.c and its friends
  include it.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: fujita.tomonori@lab.ntt.co.jp
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This remove lots of duplications in iommu.h and gart.h.

The end result of this patch is:

- iommu.h is a header file for everyone related with IOMMUs.

- gart.h is the private header file. Only pci-gart_64.c and its friends
  include it.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: fujita.tomonori@lab.ntt.co.jp
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branches 'x86/mmio', 'x86/delay', 'x86/idle', 'x86/oprofile', 'x86/debug', 'x86/ptrace' and 'x86/amd-iommu' into x86/devel</title>
<updated>2008-07-08T07:46:15+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-07-08T07:46:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=58cf35228fec541418cc3bd781d6c069d904815e'/>
<id>58cf35228fec541418cc3bd781d6c069d904815e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>x86, AMD IOMMU, build fix #2</title>
<updated>2008-06-27T08:52:34+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-06-27T08:48:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=92af4e29020ff096178a00605b3662b3b39d4aa9'/>
<id>92af4e29020ff096178a00605b3662b3b39d4aa9</id>
<content type='text'>
fix:

 arch/x86/kernel/amd_iommu.c: In function ‘amd_iommu_init_dma_ops':
 arch/x86/kernel/amd_iommu.c:940: error: lvalue required as left operand of assignment
 arch/x86/kernel/amd_iommu.c:941: error: lvalue required as left operand of assignment

due to !CONFIG_GART_IOMMU.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix:

 arch/x86/kernel/amd_iommu.c: In function ‘amd_iommu_init_dma_ops':
 arch/x86/kernel/amd_iommu.c:940: error: lvalue required as left operand of assignment
 arch/x86/kernel/amd_iommu.c:941: error: lvalue required as left operand of assignment

due to !CONFIG_GART_IOMMU.

Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86, gart: add resume handling</title>
<updated>2008-06-12T12:11:25+00:00</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rjw@sisk.pl</email>
</author>
<published>2008-06-09T22:10:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6703f6d10dcd3316e03641a5ecaa6c8a04374d98'/>
<id>6703f6d10dcd3316e03641a5ecaa6c8a04374d98</id>
<content type='text'>
If GART IOMMU is used on an AMD64 system, the northbridge registers
related to it should be restored during resume so that memory is not
corrupted.  Make gart_resume() handle that as appropriate.

Ref. http://lkml.org/lkml/2008/5/25/96 and the following thread.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If GART IOMMU is used on an AMD64 system, the northbridge registers
related to it should be restored during resume so that memory is not
corrupted.  Make gart_resume() handle that as appropriate.

Ref. http://lkml.org/lkml/2008/5/25/96 and the following thread.

Signed-off-by: Rafael J. Wysocki &lt;rjw@sisk.pl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86, aperture_64: use symbolic constants</title>
<updated>2008-05-22T09:35:14+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2008-05-20T14:27:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0abbc78a0137fee60ef092f0b20a3d3d7e7e0cc2'/>
<id>0abbc78a0137fee60ef092f0b20a3d3d7e7e0cc2</id>
<content type='text'>
Factor-out common aperture_valid code.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Factor-out common aperture_valid code.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86 gart: factor out common code</title>
<updated>2008-05-12T19:28:10+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2008-04-15T10:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3bb6fbf9969a8bbe4892968659239273d092e78a'/>
<id>3bb6fbf9969a8bbe4892968659239273d092e78a</id>
<content type='text'>
Cleanup gart handling on amd64 a bit: move common code into
enable_gart_translation , and use symbolic register names where
appropriate.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cleanup gart handling on amd64 a bit: move common code into
enable_gart_translation , and use symbolic register names where
appropriate.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>x86: iommu: use symbolic constants, not hardcoded numbers</title>
<updated>2008-05-12T19:28:10+00:00</updated>
<author>
<name>Pavel Machek</name>
<email>pavel@ucw.cz</email>
</author>
<published>2008-04-08T08:49:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aa134f1b09df6beaa4d031a50d5fda1f3cebce6c'/>
<id>aa134f1b09df6beaa4d031a50d5fda1f3cebce6c</id>
<content type='text'>
Move symbolic constants into gart.h, and use them instead of hardcoded
constant.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move symbolic constants into gart.h, and use them instead of hardcoded
constant.

Signed-off-by: Pavel Machek &lt;pavel@suse.cz&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>x86: disable the GART early, 64-bit</title>
<updated>2008-01-30T12:33:09+00:00</updated>
<author>
<name>Yinghai Lu</name>
<email>Yinghai.Lu@Sun.COM</email>
</author>
<published>2008-01-30T12:33:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=aaf230424204864e2833dcc1da23e2cb0b9f39cd'/>
<id>aaf230424204864e2833dcc1da23e2cb0b9f39cd</id>
<content type='text'>
For K8 system: 4G RAM with memory hole remapping enabled, or more than
4G RAM installed.

when try to use kexec second kernel, and the first doesn't include
gart_shutdown. the second kernel could have different aper position than
the first kernel. and second kernel could use that hole as RAM that is
still used by GART set by the first kernel. esp. when try to kexec
2.6.24 with sparse mem enable from previous kernel (from RHEL 5 or SLES
10). the new kernel will use aper by GART (set by first kernel) for
vmemmap. and after new kernel setting one new GART. the position will be
real RAM. the _mapcount set is lost.

Bad page state in process 'swapper'
page:ffffe2000e600020 flags:0x0000000000000000 mapping:0000000000000000 mapcount:1 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Pid: 0, comm: swapper Not tainted 2.6.24-rc7-smp-gcdf71a10-dirty #13

Call Trace:
 [&lt;ffffffff8026401f&gt;] bad_page+0x63/0x8d
 [&lt;ffffffff80264169&gt;] __free_pages_ok+0x7c/0x2a5
 [&lt;ffffffff80ba75d1&gt;] free_all_bootmem_core+0xd0/0x198
 [&lt;ffffffff80ba3a42&gt;] numa_free_all_bootmem+0x3b/0x76
 [&lt;ffffffff80ba3461&gt;] mem_init+0x3b/0x152
 [&lt;ffffffff80b959d3&gt;] start_kernel+0x236/0x2c2
 [&lt;ffffffff80b9511a&gt;] _sinittext+0x11a/0x121

and
 [ffffe2000e600000-ffffe2000e7fffff] PMD -&gt;ffff81001c200000 on node 0
phys addr is : 0x1c200000

RHEL 5.1 kernel -53 said:
PCI-DMA: aperture base @ 1c000000 size 65536 KB

new kernel said:
Mapping aperture over 65536 KB of RAM @ 3c000000

So could try to disable that GART if possible.

According to Ingo

&gt; hm, i'm wondering, instead of modifying the GART, why dont we simply
&gt; _detect_ whatever GART settings we have inherited, and propagate that
&gt; into our e820 maps? I.e. if there's inconsistency, then punch that out
&gt; from the memory maps and just dont use that memory.
&gt;
&gt; that way it would not matter whether the GART settings came from a [old
&gt; or crashing] Linux kernel that has not called gart_iommu_shutdown(), or
&gt; whether it's a BIOS that has set up an aperture hole inconsistent with
&gt; the memory map it passed. (or the memory map we _think_ i tried to pass
&gt; us)
&gt;
&gt; it would also be more robust to only read and do a memory map quirk
&gt; based on that, than actively trying to change the GART so early in the
&gt; bootup. Later on we have to re-enable the GART _anyway_ and have to
&gt; punch a hole for it.
&gt;
&gt; and as a bonus, we would have shored up our defenses against crappy
&gt; BIOSes as well.

add e820 modification for gart inconsistent setting.

gart_fix_e820=off could be used to disable e820 fix.

Signed-off-by: Yinghai Lu &lt;yinghai.lu@sun.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For K8 system: 4G RAM with memory hole remapping enabled, or more than
4G RAM installed.

when try to use kexec second kernel, and the first doesn't include
gart_shutdown. the second kernel could have different aper position than
the first kernel. and second kernel could use that hole as RAM that is
still used by GART set by the first kernel. esp. when try to kexec
2.6.24 with sparse mem enable from previous kernel (from RHEL 5 or SLES
10). the new kernel will use aper by GART (set by first kernel) for
vmemmap. and after new kernel setting one new GART. the position will be
real RAM. the _mapcount set is lost.

Bad page state in process 'swapper'
page:ffffe2000e600020 flags:0x0000000000000000 mapping:0000000000000000 mapcount:1 count:0
Trying to fix it up, but a reboot is needed
Backtrace:
Pid: 0, comm: swapper Not tainted 2.6.24-rc7-smp-gcdf71a10-dirty #13

Call Trace:
 [&lt;ffffffff8026401f&gt;] bad_page+0x63/0x8d
 [&lt;ffffffff80264169&gt;] __free_pages_ok+0x7c/0x2a5
 [&lt;ffffffff80ba75d1&gt;] free_all_bootmem_core+0xd0/0x198
 [&lt;ffffffff80ba3a42&gt;] numa_free_all_bootmem+0x3b/0x76
 [&lt;ffffffff80ba3461&gt;] mem_init+0x3b/0x152
 [&lt;ffffffff80b959d3&gt;] start_kernel+0x236/0x2c2
 [&lt;ffffffff80b9511a&gt;] _sinittext+0x11a/0x121

and
 [ffffe2000e600000-ffffe2000e7fffff] PMD -&gt;ffff81001c200000 on node 0
phys addr is : 0x1c200000

RHEL 5.1 kernel -53 said:
PCI-DMA: aperture base @ 1c000000 size 65536 KB

new kernel said:
Mapping aperture over 65536 KB of RAM @ 3c000000

So could try to disable that GART if possible.

According to Ingo

&gt; hm, i'm wondering, instead of modifying the GART, why dont we simply
&gt; _detect_ whatever GART settings we have inherited, and propagate that
&gt; into our e820 maps? I.e. if there's inconsistency, then punch that out
&gt; from the memory maps and just dont use that memory.
&gt;
&gt; that way it would not matter whether the GART settings came from a [old
&gt; or crashing] Linux kernel that has not called gart_iommu_shutdown(), or
&gt; whether it's a BIOS that has set up an aperture hole inconsistent with
&gt; the memory map it passed. (or the memory map we _think_ i tried to pass
&gt; us)
&gt;
&gt; it would also be more robust to only read and do a memory map quirk
&gt; based on that, than actively trying to change the GART so early in the
&gt; bootup. Later on we have to re-enable the GART _anyway_ and have to
&gt; punch a hole for it.
&gt;
&gt; and as a bonus, we would have shored up our defenses against crappy
&gt; BIOSes as well.

add e820 modification for gart inconsistent setting.

gart_fix_e820=off could be used to disable e820 fix.

Signed-off-by: Yinghai Lu &lt;yinghai.lu@sun.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>x86 gart: rename symbols only used for the GART implementation</title>
<updated>2007-10-29T23:22:22+00:00</updated>
<author>
<name>Joerg Roedel</name>
<email>joerg.roedel@amd.com</email>
</author>
<published>2007-10-24T10:49:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0440d4c00dadf8b97657c0864e4d54a088430de8'/>
<id>0440d4c00dadf8b97657c0864e4d54a088430de8</id>
<content type='text'>
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 &lt;joerg.roedel@amd.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;joerg.roedel@amd.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
</pre>
</div>
</content>
</entry>
</feed>
