Bug 5942 - drm_mtrr_add and drm_mtrr_del need stub implementations when __OS_HAS_MTRR is false
Summary: drm_mtrr_add and drm_mtrr_del need stub implementations when __OS_HAS_MTRR is...
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/other (show other bugs)
Version: XOrg git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Felix Kühling
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-19 05:26 UTC by Felix Kühling
Modified: 2006-09-21 20:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Guard use of mtrr_add/mtrr_del with #if __OS_HAS_MTRR (1.63 KB, patch)
2006-02-19 05:29 UTC, Felix Kühling
no flags Details | Splinter Review
drmP.h fix for !__OS_HAS_MTRR (704 bytes, patch)
2006-02-19 05:51 UTC, Felix Kühling
no flags Details | Splinter Review

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.