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: *** [mesa/drm/linux-core/drm_ttm.o] Error 1
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.
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.
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!