History log of /drivers/char/agp/amd64-agp.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
90ab5ee94171b3e28de6bb42ee30b527014e0be7 13-Jan-2012 Rusty Russell <rusty@rustcorp.com.au> module_param: make bool parameters really bool (drivers & misc)

module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
/drivers/char/agp/amd64-agp.c
49495d44dfa4ba76cf7d1ed8fe84746dd9552255 07-Feb-2011 Florian Mickler <florian@mickler.org> amd64-agp: fix crash at second module load

The module forgot to sometimes unregister some resources.

This fixes Bug #22882.

[Patch updated to 2.6.38-rc3 by Randy Dunlap.]
Tested-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Florian Mickler <florian@mickler.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/amd64-agp.c
9653a5c76c8677b05b45b3b999d3b39988d2a064 29-Oct-2010 Hans Rosenfeld <hans.rosenfeld@amd.com> x86, amd-nb: Cleanup AMD northbridge caching code

Support more than just the "Misc Control" part of the northbridges.
Support more flags by turning "gart_supported" into a single bit flag
that is stored in a flags member. Clean up related code by using a set
of functions (amd_nb_num(), amd_nb_has_feature() and node_to_amd_nb())
instead of accessing the NB data structures directly. Reorder the
initialization code and put the GART flush words caching in a separate
function.

Signed-off-by: Hans Rosenfeld <hans.rosenfeld@amd.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
/drivers/char/agp/amd64-agp.c
eec1d4fa00c6552ae2fdf71d59f1eded7c88dd89 29-Oct-2010 Hans Rosenfeld <hans.rosenfeld@amd.com> x86, amd-nb: Complete the rename of AMD NB and related code

Not only the naming of the files was confusing, it was even more so for
the function and variable names.

Renamed the K8 NB and NUMA stuff that is also used on other AMD
platforms. This also renames the CONFIG_K8_NUMA option to
CONFIG_AMD_NUMA and the related file k8topology_64.c to
amdtopology_64.c. No functional changes intended.

Signed-off-by: Hans Rosenfeld <hans.rosenfeld@amd.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
/drivers/char/agp/amd64-agp.c
2f0384e5fc4766ad909597547d0e2b716c036755 21-Oct-2010 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'x86-amd-nb-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'x86-amd-nb-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
x86, amd_nb: Enable GART support for AMD family 0x15 CPUs
x86, amd: Use compute unit information to determine thread siblings
x86, amd: Extract compute unit information for AMD CPUs
x86, amd: Add support for CPUID topology extension of AMD CPUs
x86, nmi: Support NMI watchdog on newer AMD CPU families
x86, mtrr: Assume SYS_CFG[Tom2ForceMemTypeWB] exists on all future AMD CPUs
x86, k8: Rename k8.[ch] to amd_nb.[ch] and CONFIG_K8_NB to CONFIG_AMD_NB
x86, k8-gart: Decouple handling of garts and northbridges
x86, cacheinfo: Fix dependency of AMD L3 CID
x86, kvm: add new AMD SVM feature bits
x86, cpu: Fix allowed CPUID bits for KVM guests
x86, cpu: Update AMD CPUID feature bits
x86, cpu: Fix renamed, not-yet-shipping AMD CPUID feature bit
x86, AMD: Remove needless CPU family check (for L3 cache info)
x86, tsc: Remove CPU frequency calibration on AMD
23ac4ae827e6264e21b898f2cd3f601450aa02a6 17-Sep-2010 Andreas Herrmann <andreas.herrmann3@amd.com> x86, k8: Rename k8.[ch] to amd_nb.[ch] and CONFIG_K8_NB to CONFIG_AMD_NB

The file names are somehow misleading as the code is not specific to
AMD K8 CPUs anymore. The files accomodate code for other AMD CPU
northbridges as well.

Same is true for the config option which is valid for AMD CPU
northbridges in general and not specific to K8.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20100917160343.GD4958@loge.amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
/drivers/char/agp/amd64-agp.c
900f9ac9f12dc3dd6fc8e33e16df172eafcaead6 17-Sep-2010 Andreas Herrmann <andreas.herrmann3@amd.com> x86, k8-gart: Decouple handling of garts and northbridges

So far we only provide num_k8_northbridges. This is required in
different areas (e.g. L3 cache index disable, GART). But not all AMD
CPUs provide a GART. Thus it is useful to split off the GART handling
from the generic caching of AMD northbridge misc devices.

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20100917160254.GC4958@loge.amd.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
/drivers/char/agp/amd64-agp.c
260133ab658bd2b80e07832a878e00405e19ff43 03-Sep-2010 Borislav Petkov <borislav.petkov@amd.com> x86, GART: Disable GART table walk probes

Current code tramples over bit F3x90[6] which can be used to
disable GART table walk probes. However, this bit should be set
for performance reasons (speed up GART table walks). We are
allowed to do that since we put GART tables in UC memory later
anyway. Make it so.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
LKML-Reference: <1283531981-7495-3-git-send-email-bp@amd64.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
/drivers/char/agp/amd64-agp.c
57ab43e33122ffdc2eebca5d6de035699f0a8c06 03-Sep-2010 Borislav Petkov <borislav.petkov@amd.com> x86, GART: Remove superfluous AMD64_GARTEN

There is a GARTEN so use that and drop the duplicate.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
LKML-Reference: <1283531981-7495-2-git-send-email-bp@amd64.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
/drivers/char/agp/amd64-agp.c
2101d6f7ac791e87a274371a07a408f74e40ec49 24-May-2010 Jiri Slaby <jirislaby@gmail.com> agp: amd64, fix pci reference leaks

Stanse found pci reference leaks in uli_agp_init and nforce3_agp_init
initialization functions.

The PCI devices are bridges, so it's not critical, but still worth fixing.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/amd64-agp.c
6fd024893911dcb51b4a0aa71971db5ba38f7071 24-Mar-2010 Ben Hutchings <ben@decadent.org.uk> amd64-agp: Probe unknown AGP devices the right way

The current initialisation code probes 'unsupported' AGP devices
simply by calling its own probe function. It does not lock these
devices or even check whether another driver is already bound to
them.

We must use the device core to manage this. So if the specific
device id table didn't match anything and agp_try_unsupported=1,
switch the device id table and call driver_attach() again.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/amd64-agp.c
61cf059325a30995a78c5001db2ed2a8ab1d4c36 20-Apr-2010 Jerome Glisse <jglisse@redhat.com> agp: use scratch page on memory remove and at GATT creation V4

Convert most AGP chipset to use scratch page as default entries.
This help avoiding GPU querying 0 address and trigger computer
fault. With KMS and memory manager we bind/unbind AGP memory
constantly and it seems that some GPU are still doing AGP
traffic even after GPU report being idle with the memory segment.

Tested (radeon GPU KMS + Xorg + compiz + glxgears + quake3) on :
- SIS 1039:0001 & 1039:0003
- Intel 865 8086:2571

Compile tested for other bridges

V2 enable scratch page on uninorth
V3 fix unbound check in uninorth insert memory (Michel Dänzer)
V4 rebase on top of drm-next branch with the lastest intel AGP
changeset (stable should use version V3 of the patch)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/amd64-agp.c
06df6dafb5d9e3cfa3588c6ce79328b91582b6af 04-Feb-2010 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> x86/agp: Fix amd64-agp module initialization regression

This fixes the regression introduced by commit
42590a75019a50012f25a962246498dead428433 ("x86/agp: Fix
agp_amd64_init and agp_amd64_cleanup").

The commit 61684ceaad4f65d1a9832c722f7bd5e7fc714de9 fixed the
above regression but it's not enough. When amd64-agp is built as
a module, AGP isn't initialized, iommu is initialized, all the
aperture is owned by the iommu.

Reported-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Marin Mitov <mitov@issp.bas.bg>
LKML-Reference: <20100204090802S.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
/drivers/char/agp/amd64-agp.c
61684ceaad4f65d1a9832c722f7bd5e7fc714de9 25-Jan-2010 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> x86/agp: Fix agp_amd64_init regression

This fixes the regression introduced by commit
42590a75019a50012f25a962246498dead428433 ("x86/agp: Fix
agp_amd64_init and agp_amd64_cleanup").

The above commit changes agp_amd64_init() not to do anything if
gart_iommu_aperture is not zero.

If GART iommu calls agp_amd64_init(), we need to skip
agp_amd64_init() when it's called later via module_init.

The problem is that gart_iommu_init() calls agp_amd64_init()
with not zero gart_iommu_aperture so agp_amd64_init() is never
initialized.

When gart_iommu_init() calls agp_amd64_init(), agp should be
always initialized.

Reported-by: Marin Mitov <mitov@issp.bas.bg>
Reported-by: Johannes Hirte <johannes.hirte@fem.tu-ilmenau.de>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Marin Mitov <mitov@issp.bas.bg>
Tested-by: Kevin Winchester <kjwinchester@gmail.com>
Cc: davej@redhat.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <20100125141006O.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
/drivers/char/agp/amd64-agp.c
42590a75019a50012f25a962246498dead428433 04-Jan-2010 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> x86/agp: Fix agp_amd64_init and agp_amd64_cleanup

This fixes the regression introduced by the commit
f405d2c02395a74d3883bd03ded36457aa3697ad.

The above commit fixes the following issue:

http://marc.info/?l=linux-kernel&m=126192729110083&w=2

However, it doesn't work properly when you remove and insert the
agp_amd64 module again.

agp_amd64_init() and agp_amd64_cleanup should be called only
when gart_iommu is not called earlier (that is, the GART IOMMU
is not enabled). We need to use 'gart_iommu_aperture' to see if
GART IOMMU is enabled or not.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: mitov@issp.bas.bg
Cc: davej@redhat.com
LKML-Reference: <20100104161603L.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
/drivers/char/agp/amd64-agp.c
f405d2c02395a74d3883bd03ded36457aa3697ad 28-Dec-2009 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> x86/agp: Fix agp_amd64_init() initialization with CONFIG_GART_IOMMU enabled

with CONFIG_GART_IOMMU enabled drivers/char/agp/amd64-agp.c has:

#ifndef CONFIG_GART_IOMMU
module_init(agp_amd64_init);
module_exit(agp_amd64_cleanup);
#endif

agp_amd64_init() was called via gart_iommu_init with
CONFIG_GART_IOMMU=y agp_amd64_init() was called via module_init
with CONFIG_GART_IOMMU=n

The commit 75f1cdf1dda92cae037ec848ae63690d91913eac changes the
x86 dma initialization routine: gart_iommu_init() is called only
when GART IOMMU is detected. So when GART IOMMU isn't detected,
agp_amd64_init isn't called.

Marin Mitov reported this issue:

http://marc.info/?l=linux-kernel&m=126192729110083&w=2

With this patch, agp_amd64_init() is always called via
module_init (the above ifndef is removed). If agp_amd64_init()
is called via gart_iommu_init() earlier, agp_amd64_init()
finishes without doing anything (when it is called via
module_init).

Reported-by: Marin Mitov <mitov@issp.bas.bg>
Tested-by: Marin Mitov <mitov@issp.bas.bg>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: davej@redhat.com
LKML-Reference: <20091228181118C.fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
/drivers/char/agp/amd64-agp.c
6a12235c7d2d75c7d94b9afcaaecd422ff845ce0 29-Jul-2009 David Woodhouse <David.Woodhouse@intel.com> agp: kill phys_to_gart() and gart_to_phys()

There seems to be no reason for these -- they're a 1:1 mapping on all
platforms.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/char/agp/amd64-agp.c
2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7 27-Jul-2009 David Woodhouse <David.Woodhouse@intel.com> agp: Switch mask_memory() method to take address argument again, not page

In commit 07613ba2 ("agp: switch AGP to use page array instead of
unsigned long array") we switched the mask_memory() method to take a
'struct page *' instead of an address. This is painful, because in some
cases it has to be an IOMMU-mapped virtual bus address (in fact,
shouldn't it _always_ be a dma_addr_t returned from pci_map_xxx(), and
we just happen to get lucky most of the time?)

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/char/agp/amd64-agp.c
07613ba2f464f59949266f4337b75b91eb610795 12-Jun-2009 Dave Airlie <airlied@redhat.com> agp: switch AGP to use page array instead of unsigned long array

This switches AGP to use an array of pages for tracking the
pages allocated to the GART. This should enable GEM on PAE to work
a lot better as we can pass highmem pages to the PAT code and it will
do the right thing with them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/amd64-agp.c
2f68891314b14e7e0ef07b4e77a8ea6e917fc74b 10-Mar-2009 Yinghai Lu <yinghai@kernel.org> x86/agp: tighten check to update amd nb aperture

Impact: fix bug to make agp work with dri

Jeffrey reported that dri does work with 64bit, but doesn't work with
32bit it turns out NB aperture is 32M, aperture on agp is 128M

64bit is using 64M for vaidation for 64 iommu/gart 32bit is only using
32M..., and will not update the nb aperture.

So try to compare nb apterture and agp apterture before leaving not
touch nb aperture.

Reported-by: Jeffrey Trull <jetrull@sbcglobal.net>
Tested-by: Jeffrey Trull <jetrull@sbcglobal.net>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: Dave Airlie <airlied@linux.ie>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/char/agp/amd64-agp.c
f4432c5caec5fa95ea7eefd00f8e6cee17e2e023 20-Oct-2008 Dave Jones <davej@redhat.com> Update email addresses.

Update assorted email addresses and related info to point
to a single current, valid address.

additionally
- trivial CREDITS entry updates. (Not that this file means much any more)
- remove arjans dead redhat.com address from powernow driver

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/char/agp/amd64-agp.c
5f310b63781f6777bf4e812570560ec0f8ea42d8 21-Aug-2008 Rene Herman <rene.herman@keyaccess.nl> agp: enable optimized agp_alloc_pages methods

The pageattr-array patch that you currently have in tip/master only
enables it for intel-agp, not the others. The attached enables it for
all drivers currently directly using agp_generic_alloc_page() and
agp_generic_destroy_page() (ocal driver is amd-k7-agp).

The new agp_generic_alloc_pages() interface uses the also new
pageattr array interface API. This makes all AGP drivers that
up to now used generic_{alloc,destroy}_page() use it.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
/drivers/char/agp/amd64-agp.c
e3cf69511a2c5369c58f6fd6a065de152c3d4b22 30-Jul-2008 Bjorn Helgaas <bjorn.helgaas@hp.com> agp: use dev_printk when possible

Convert printks to use dev_printk().

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/amd64-agp.c
55814b74c95a73dae6795e167294e6edc733aae9 30-Jul-2008 Bjorn Helgaas <bjorn.helgaas@hp.com> amd64-agp: run fallback when no bridges found, not when driver registration fails

I think the intent was that if no bridges matched agp_amd64_pci_table[],
we would fall back to checking for any bridge with the AGP capability.
But in the current code, we execute the fallback path only when
pci_register_driver() itself fails, which is unrelated to whether any
matching devices were found.

This patch counts the AGP bridges found in the probe() method and executes
the fallback path when none is found.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/amd64-agp.c
037a6079eb925f7653bddf1501f777abcd4fc91e 25-Jun-2008 Ingo Molnar <mingo@elte.hu> Merge branch 'linus' into x86/gart
c72580129209aaa509ace81c1f2ee1caa9c9774b 26-Mar-2008 Joe Perches <joe@perches.com> drivers/char/agp - use bool

Use boolean in AGP instead of having own TRUE/FALSE

--
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/amd64-agp.c
0abbc78a0137fee60ef092f0b20a3d3d7e7e0cc2 20-May-2008 Pavel Machek <pavel@ucw.cz> x86, aperture_64: use symbolic constants

Factor-out common aperture_valid code.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/drivers/char/agp/amd64-agp.c
3bb6fbf9969a8bbe4892968659239273d092e78a 15-Apr-2008 Pavel Machek <pavel@ucw.cz> x86 gart: factor out common code

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 <pavel@suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/drivers/char/agp/amd64-agp.c
8c9fd91a0dc503f085169d44f4360be025f75224 14-Apr-2008 Yinghai Lu <yhlu.kernel@gmail.com> x86: checking aperture size order

some systems are using 32M for gart and agp when memory is less than 4G.
Kernel will reject and try to allcate another 64M that is not needed,
and we will waste 64M of perfectly good RAM.

this patch adds a workaround by checking aper_base/order between NB and
agp bridge. If they are the same, and memory size is less than 4G, it
will allow it.

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/drivers/char/agp/amd64-agp.c
1edc1ab3f68168ec6815e6d630f38948a6da005a 13-Apr-2008 Yinghai Lu <yhlu.kernel.send@gmail.com> x86: agp_gart size checking for buggy device

while looking at Rafael J. Wysocki's system boot log,

I found a funny printout:

Node 0: aperture @ de000000 size 32 MB
Aperture too small (32 MB)
AGP bridge at 00:04:00
Aperture from AGP @ de000000 size 4096 MB (APSIZE 0)
Aperture too small (0 MB)
Your BIOS doesn't leave a aperture memory hole
Please enable the IOMMU option in the BIOS setup
This costs you 64 MB of RAM
Mapping aperture over 65536 KB of RAM @ 4000000

...

agpgart: Detected AGP bridge 20
agpgart: Aperture pointing to RAM
agpgart: Aperture from AGP @ de000000 size 4096 MB
agpgart: Aperture too small (0 MB)
agpgart: No usable aperture found.
agpgart: Consider rebooting with iommu=memaper=2 to get a good aperture.

it means BIOS allocated the correct gart on the NB and AGP bridge, but
because a bug in the silicon (the agp bridge reports the wrong order,
it wants 4G instead) the kernel will reject that allocation.

Also, because the size is only 32MB, and we try to get another 64M for gart,
late fix_northbridge can not revert that change because it still reads
the wrong size from agp bridge.

So try to double check the order value from the agp bridge, before calling
aperture_valid().

[ mingo@elte.hu: 32-bit fix. ]

Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/drivers/char/agp/amd64-agp.c
aa134f1b09df6beaa4d031a50d5fda1f3cebce6c 08-Apr-2008 Pavel Machek <pavel@ucw.cz> x86: iommu: use symbolic constants, not hardcoded numbers

Move symbolic constants into gart.h, and use them instead of hardcoded
constant.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/drivers/char/agp/amd64-agp.c
966396d3a05c8049fce5c81c49138e5ee1b05443 24-Oct-2007 Joerg Roedel <joerg.roedel@amd.com> x86 gart: rename CONFIG_IOMMU to CONFIG_GART_IOMMU

This patch renames the IOMMU config option to GART_IOMMU because in fact it
means the GART and not general support for an IOMMU on x86.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Acked-by: Muli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
/drivers/char/agp/amd64-agp.c
44c10138fd4bbc4b6d6bff0873c24902f2a9da65 09-Jun-2007 Auke Kok <auke-jan.h.kok@intel.com> PCI: Change all drivers to use pci_device->revision

Instead of all drivers reading pci config space to get the revision
ID, they can now use the pci_device->revision member.

This exposes some issues where drivers where reading a word or a dword
for the revision number, and adding useless error-handling around the
read. Some drivers even just read it for no purpose of all.

In devices where the revision ID is being copied over and used in what
appears to be the equivalent of hotpath, I have left the copy code
and the cached copy as not to influence the driver's performance.

Compile tested with make all{yes,mod}config on x86_64 and i386.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/char/agp/amd64-agp.c
547c5355d1b1167af39e315c82aa9ff1398596f4 11-May-2007 Andrew Hastings <abh@cray.com> x86_64: off-by-two error in aperture.c

I'm using a custom BIOS to configure the northbridge GART at address
0x80000000, size 2G. Linux complains:

"Aperture from northbridge cpu 0 beyond 4GB. Ignoring."

I think there's an off-by-two error in arch/x86_64/kernel/aperture.c:

AK: use correct types for i386

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/char/agp/amd64-agp.c
b92e9fac400d4ae5bc7a75c568e9844ec53ea329 02-May-2007 Jan Beulich <jbeulich@novell.com> [PATCH] x86: fix amd64-agp aperture validation

Under CONFIG_DISCONTIGMEM, assuming that a !pfn_valid() implies all
subsequent pfn-s are also invalid is wrong. Thus replace this by
explicitly checking against the E820 map.

AK: make e820 on x86-64 not initdata

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
/drivers/char/agp/amd64-agp.c
e5524f355a0d272ba5233537a896a668db1f3008 23-Feb-2007 Dave Jones <davej@redhat.com> [AGPGART] Further constification.

Make agp_bridge_driver->aperture_sizes and ->masks const.
Also agp_bridge_data->driver

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
a030ce4477baa06dd9c037ccd3c8d171aac9ed44 23-Jan-2007 Thomas Hellstrom <thomas@tungstengraphics.com> [AGPGART] Allow drm-populated agp memory types

This patch allows drm to populate an agpgart structure with pages of its own.
It's needed for the new drm memory manager which dynamically flips pages in and out of AGP.

The patch modifies the generic functions as well as the intel agp driver. The intel drm driver is
currently the only one supporting the new memory manager.

Other agp drivers may need some minor fixing up once they have a corresponding memory manager enabled drm driver.

AGP memory types >= AGP_USER_TYPES are not populated by the agpgart driver, but the drm is expected
to do that, as well as taking care of cache- and tlb flushing when needed.

It's not possible to request these types from user space using agpgart ioctls.

The Intel driver also gets a new memory type for pages that can be bound cached to the intel GTT.

Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
43ed41f648554c9fecaf7597d25e05da63ec7290 28-Jan-2007 Dave Jones <davej@redhat.com> [AGPGART] Add new IDs to VIA AGP.

Culled from the VIA codedrop.
Also fixes up one ID used in amd64-agp to use the
VIA part number instead of the board name in its ID.

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
d5cb8d38cd0029b3573e1c8d5d99d99c86dbdbd6 17-Dec-2006 Gabriel Mansi <gabriel.mansi@gmail.com> [AGPGART] K8M890 support for amd-k8.

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
da015a6744f3648d34b83d1c4e015e6a798b8c56 07-Dec-2006 Randy Dunlap <randy.dunlap@oracle.com> [PATCH] agp-amd64: section mismatches with HOTPLUG=n

When CONFIG_HOTPLUG=n, agp_amd64_resume() calls nforce3_agp_init(), which is
__devinit == __init, so has been discarded and is not usable for resume.

WARNING: drivers/char/agp/amd64-agp.o - Section mismatch: reference to .init.text: from .text between 'agp_amd64_resume' (at offset 0x249) and 'amd64_tlbflush'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
7357db1209f27210f97b2a9dd22177f1886a1198 26-Sep-2006 Alan Cox <alan@lxorguk.ukuu.org.uk> [AGPGART] Use pci_get_slot not pci_find_slot

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
6ab3d5624e172c553004ecc862bfeac16d9d68b7 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de> Remove obsolete #include <linux/config.h>

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
/drivers/char/agp/amd64-agp.c
55b4d6a52195a8f277ffddf755ddaff359878f41 29-Jun-2006 Dave Jones <davej@redhat.com> Merge ../linus

Conflicts:

drivers/char/agp/Kconfig
a813ce432f27c4f5011c7b5ac9d2bbbfeb41d9a7 26-Jun-2006 Andi Kleen <ak@suse.de> [PATCH] x86_64: Rename IOMMU option, fix help and mark option embedded.

- Rename the GART_IOMMU option to IOMMU to make clear it's not
just for AMD
- Rewrite the help text to better emphatise this fact
- Make it an embedded option because too many people get it wrong.

To my astonishment I discovered the aacraid driver tests this
symbol directly. This looks quite broken to me - it's an internal
implementation detail of the PCI DMA API. Can the maintainer
please clarify what this test was intended to do?

Cc: linux-scsi@vger.kernel.org
Cc: alan@redhat.com
Cc: markh@osdl.org
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
a32073bffc656ca4bde6002b6cf7c1a8e0e22712 26-Jun-2006 Andi Kleen <ak@suse.de> [PATCH] x86_64: Clean and enhance up K8 northbridge access code

- Factor out the duplicated access/cache code into a single file
* Shared between i386/x86-64.
- Share flush code between AGP and IOMMU
* Fix a bug: AGP didn't wait for end of flush before
- Drop 8 northbridges limit and allocate dynamically
- Add lock to serialize AGP and IOMMU GART flushes
- Add PCI ID for next AMD northbridge
- Random related cleanups

The old K8 NUMA discovery code is unchanged. New systems
should all use SRAT for this.

Cc: "Navin Boppuri" <navin.boppuri@newisys.com>
Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
4092e256ca35e62b431ebad4e0c42c6360acee08 21-Jun-2006 Dave Jones <davej@redhat.com> [AGPGART] Fix pci_register_driver checking in amd64-agp

pci_register_driver() never returns a positive number.

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
ca2797ffaabc1f73cf8a73a30f709f0c1a6bef34 21-May-2006 Dave Jones <davej@redhat.com> [AGPGART] Fix Nforce3 suspend on amd64.

kernel.org bugzilla #6206

Based on patch from Serge Belyshev <belyshev@depni.sinp.msu.ru>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
5c48b0e3599ff7559b39093219e8a428776f7932 23-Mar-2006 Henrik Kretzschmar <henrik@nachtwindheim.de> [AGPGART] x86_64: Fix wrong PCI ID for ALI M1695 AGP bridge

[description by AK]
Made a cut'n'paste error when adding the entry for the ALI M1695
AGP bridge and added a second entry for the 1689

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
6a92a4e0d201aea6d7c83f100d77310676b2e049 28-Feb-2006 Dave Jones <davej@redhat.com> [AGPGART] Lots of CodingStyle/whitespace cleanups.

Eliminate trailing whitespace.
s/if(/if (/
s/for(/for (/

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
b41c82eb5fb49912ce26c51ec221ba35e06c7d9b 21-Feb-2006 Dave Jones <davej@redhat.com> [AGPGART] Add some informational printk to nforce GART failure path.

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
90be4b49b8b54505772a6a766ac0891ec92b4c2d 04-Jan-2006 akpm@osdl.org <akpm@osdl.org> [AGPGART] Suspend/Resume support for AMD64 GART.

This adds support for suspend/resume to the amd64-agp driver. Without
it, X displays garbage after resume from swsusp.

Signed-off-by: Michal Schmidt <xschmi00@stud.feec.vutbr.cz>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
a42ab7f2349a72ecf5c3b1b7c836dc4249a71c0c 17-Nov-2005 Dave Jones <davej@redhat.com> [AGPGART] Mark AMD64 aperture size structs as const

Neither of them are ever written to.

Noted by Arjan van de Ven
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
4060994c3e337b40e0f6fa8ce2cc178e021baf3d 15-Nov-2005 Linus Torvalds <torvalds@g5.osdl.org> Merge x86-64 update from Andi
1d2e6bd86152ab86fb866555281869df340e6c6a 05-Nov-2005 Andi Kleen <ak@suse.de> [PATCH] AGP: Make gart iterator in K8 AGP driver SMP safe

Ugh!

Cc: davej@redhat.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
172efbb40333d0ca10ebaab11a98f9be687bee39 05-Nov-2005 Andi Kleen <ak@suse.de> [PATCH] AGP: Try unsupported AGP chipsets on x86-64 by default

So far all new ones have worked and there isn't much variation because
the CPU does all the interesting bits.

So enable try unsupported by default.

Can be still disabled with try_unsupported=0 (module) or
amd64.try_unsupported=0 (boot option)

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
870b7681cd3f867c1ffc8d7fbe9b22216e73a536 05-Nov-2005 Andi Kleen <ak@suse.de> [PATCH] AGP: Support ULI/ALI 1689 bridge on AMD64

(no name because I'm not sure of the correct name)

Cc: davej@redhat.com
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
249bb070f5e821503c1118e1e87c0ccb1432d191 05-Nov-2005 Greg Kroah-Hartman <gregkh@suse.de> [PATCH] PCI: removed unneeded .owner field from struct pci_driver

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/char/agp/amd64-agp.c
7079060f3e86ea4c1d4e9c1e356592ef9dcaaa1f 07-Nov-2005 Linus Torvalds <torvalds@g5.osdl.org> Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
8c65b4a60450590e79a28e9717ceffa9e4debb3f 07-Nov-2005 Tim Schmielau <tim@physik3.uni-rostock.de> [PATCH] fix remaining missing includes

Fix more include file problems that surfaced since I submitted the previous
fix-missing-includes.patch. This should now allow not to include sched.h
from module.h, which is done by a followup patch.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
4e57b6817880946a3a78d5d8cad1ace363f7e449 31-Oct-2005 Tim Schmielau <tim@physik3.uni-rostock.de> [PATCH] fix missing includes

I recently picked up my older work to remove unnecessary #includes of
sched.h, starting from a patch by Dave Jones to not include sched.h
from module.h. This reduces the number of indirect includes of sched.h
by ~300. Another ~400 pointless direct includes can be removed after
this disentangling (patch to follow later).
However, quite a few indirect includes need to be fixed up for this.

In order to feed the patches through -mm with as little disturbance as
possible, I've split out the fixes I accumulated up to now (complete for
i386 and x86_64, more archs to follow later) and post them before the real
patch. This way this large part of the patch is kept simple with only
adding #includes, and all hunks are independent of each other. So if any
hunk rejects or gets in the way of other patches, just drop it. My scripts
will pick it up again in the next round.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
ea248bcaadd5bafe4217357e1e511ac55639bcf3 25-Oct-2005 Dave Jones <davej@redhat.com> [AGPGART] Set .owner field of struct pci_driver.

From: Laurent Riffard <laurent.riffard@free.fr>

This updates .owner field of struct pci_driver.

This allows SYSFS to create the symlink from the driver to the module which
provides it.

$ tree /sys/bus/pci/drivers/agpgart-via/
/sys/bus/pci/drivers/agpgart-via/
|-- 0000:00:00.0 -> ../../../../devices/pci0000:00/0000:00:00.0
|-- bind
|-- module -> ../../../../module/via_agp
|-- new_id
`-- unbind

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
/drivers/char/agp/amd64-agp.c
29db35edb2548c3b0299c53d62d5f26d77a8e58f 01-Sep-2005 Dave Jones <davej@redhat.com> [AGPGART] Remove trailing space before \n

From: Denis Vlasenko <vda@ilport.com.ua>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
2fa938b8a3964c21b23d9d095091e7abc88249c5 29-Jun-2005 Dave Jones <davej@redhat.com> [PATCH] sis 760 support.

This patch adds the SiS 760 ID to the amd64-agp driver, so that agpgart can be
used on Athlon64 boards based on this chip.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
07eee78ea8ba2d0b7b20551c35a3e7dd158d50bb 30-Mar-2005 Keir Fraser <Keir.Fraser@cl.cam.ac.uk> [PATCH] AGP fix for Xen VMM

When Linux is running on the Xen virtual machine monitor, physical
addresses are virtualised and cannot be directly referenced by the AGP
GART. This patch fixes the GART driver for Xen by adding a layer of
abstraction between physical addresses and 'GART addresses'.

Architecture-specific functions are also defined for allocating and freeing
the GATT. Xen requires this to ensure that table really is contiguous from
the point of view of the GART.

These extra interface functions are defined as 'no-ops' for all existing
architectures that use the GART driver.

Signed-off-by: Keir Fraser <keir@xensource.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/amd64-agp.c
408b664a7d394a5e4315fbd14aca49b042cb2b08 01-May-2005 Adrian Bunk <bunk@stusta.de> [PATCH] make lots of things static

Another large rollup of various patches from Adrian which make things static
where they were needlessly exported.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/amd64-agp.c
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!
/drivers/char/agp/amd64-agp.c