Bug 1261 - prefer iopl() to ioperm() on linux
Summary: prefer iopl() to ioperm() on linux
Status: RESOLVED NOTABUG
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium trivial
Assignee: Xorg Project Team
QA Contact:
URL: http://marc.theaimsgroup.com/?l=linux...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-31 17:34 UTC by Adam Jackson
Modified: 2005-07-02 19:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
iopl-before-ioperm.patch (682 bytes, patch)
2004-08-31 17:37 UTC, Adam Jackson
no flags Details | Splinter Review

Description Adam Jackson 2004-08-31 17:34:36 UTC
according to various kernel people, iopl is faster than ioperm on modern
kernels.  see the thread in the URL.
Comment 1 Adam Jackson 2004-08-31 17:37:21 UTC
Created attachment 797 [details] [review]
iopl-before-ioperm.patch

credit to Ingo Molnar for catching the original issue and and Alan Cox for this
fix.
Comment 2 Adam Jackson 2004-09-28 15:36:47 UTC
no longer sure about this one.  the danger is that iopl(3) gives us all 65536
ports and allows the program to disable interrupts, where ioperm doesn't.  from
a reliability standpoint ioperm is safer, and not appreciably slower (assuming
the kernel handles it correctly).

REMIND.
Comment 3 Mike A. Harris 2004-10-06 22:55:59 UTC
Reminding....
Comment 4 Adam Jackson 2005-07-03 12:36:54 UTC
ioperm is only slower when the kernel's ioperm implementation is broken.  in
non-broken kernels they are equivalently fast, and ioperm is safer because it
doesn't expose the complete io port range.


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.