Bug 5942

Summary: drm_mtrr_add and drm_mtrr_del need stub implementations when __OS_HAS_MTRR is false
Product: DRI Reporter: Felix Kühling <fxkuehl>
Component: DRM/otherAssignee: Felix Kühling <fxkuehl>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: XOrg git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Guard use of mtrr_add/mtrr_del with #if __OS_HAS_MTRR
none
drmP.h fix for !__OS_HAS_MTRR none

Description Felix Kühling 2006-02-19 05:26:48 UTC
The Savage kernel drivers uses mtrr_add and mtrr_del unconditionally. This fails
at compile-time if OS_HAS_MTRR is false, for example because the use has
configured the Linux kernel without CONFIG_MTRR.
Comment 1 Felix Kühling 2006-02-19 05:29:49 UTC
Created attachment 4665 [details] [review]
Guard use of mtrr_add/mtrr_del with #if __OS_HAS_MTRR

Not tested, but should be trivial enough to not break anything.
Comment 2 Felix Kühling 2006-02-19 05:38:56 UTC
I don't understand how this could lead to an error on the user's system.
drm_os_linux defines mtrr_add and mtrr_del as empty stubs of __OS_HAS_MTRR is
false. Aha! Now I see it. The number of parameters of those stubs is wrong.
Comment 3 Felix Kühling 2006-02-19 05:51:38 UTC
Created attachment 4666 [details] [review]
drmP.h fix for !__OS_HAS_MTRR

Adds drm_mtrr_add and drm_mtrr_del stub functions to linux-core/drmP.h for the
case that __OS_HAS_MTRR is false.
Comment 4 Dave Airlie 2006-09-21 20:47:50 UTC
checked in.

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.