Bug 13216 - mesa/drm/linux-core/drm_ttm.c fails on systems without CONFIG_AGP
Summary: mesa/drm/linux-core/drm_ttm.c fails on systems without CONFIG_AGP
Status: RESOLVED INVALID
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/other (show other bugs)
Version: DRI git
Hardware: PowerPC Linux (All)
: medium normal
Assignee: Thomas Hellström
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-13 03:34 UTC by Robin Johnson
Modified: 2019-10-14 13:20 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Robin Johnson 2007-11-13 03:34:07 UTC
I have a quad-core G5, running Gentoo, 64-bit kernel, 32-bit userland.
The machine is pure PCI-Express, so I did not have CONFIG_AGP set in the kernel. (loading the AGP modules does nothing for the machine).

The asm/agp.h file that provides these does not need CONFIG_AGP at all.
(On PPC, they actually define away to nothingness, or just an "mb()").

I think it should not have tried to compile the files that need use AGP functions blindly. (A warning to tell users to enable the setting regardless of them having AGP hardware might be suitable as well).

  CC [M]  mesa/drm/linux-core/drm_bo_lock.o
mesa/drm/linux-core/drm_ttm.c: In function 'drm_ttm_ipi_handler':
mesa/drm/linux-core/drm_ttm.c:35: error: implicit declaration of function 'flush_agp_cache'
mesa/drm/linux-core/drm_ttm.c: In function 'drm_set_caching':
mesa/drm/linux-core/drm_ttm.c:125: error: implicit declaration of function 'map_page_into_agp'
mesa/drm/linux-core/drm_ttm.c:127: error: implicit declaration of function 'unmap_page_from_agp'
mesa/drm/linux-core/drm_ttm.c:134: error: implicit declaration of function 'flush_agp_mappings'
make[2]: *** [mesa/drm/linux-core/drm_ttm.o] Error 1
Comment 1 Thomas Hellström 2007-11-14 06:27:35 UTC
Actually, the functions called are a set of cache- and tlb flushing functions.

These differ from architecture to architecture and the problem is really that sometimes the implementation of these functions end up in the AGP module rather in the core kernel itself. This is the case for X86. 

This currently means we will have to make a separate copy for TTM in the case CONFIG_AGP is not set, which is a bit ugly.

For powerpc it should be sufficient to unconditionally include the asm/agp.h file. The fact that these functions are very simple and in some cases are defined away on that architecture reflects that these processors probably can deal with physical aliasing with different caching attributes, or that it's very difficult to implement caching attribute changes in the kernel map.


Comment 2 Robin Johnson 2010-12-02 22:33:50 UTC
I no longer have the PowerPC hardware to test if the problem still exists.
Feel free to close with whatever resolution you feel is suitable.
Comment 3 Martin Peres 2019-10-14 13:20:27 UTC
Hi,

Freedesktop's Bugzilla instance is EOLed and open bugs are about to be migrated to http://gitlab.freedesktop.org.

To avoid migrating out of date bugs, I am now closing all the bugs that did not see any activity in the past year. If the issue is still happening, please create a new bug in the relevant project at https://gitlab.freedesktop.org/drm (use misc by default).

Sorry about the noise!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.