Bug 123793
Summary: | [PATCH] problem with ffs() on x86_64? | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 3 | Reporter: | Eric Sandeen <sandeen> |
Component: | kernel | Assignee: | Jim Paradis <jparadis> |
Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.0 | CC: | peterm, petrides, riel |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2004-09-02 04:31:37 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Eric Sandeen
2004-05-20 15:56:29 UTC
See also http://www.uwsg.iu.edu/hypermail/linux/kernel/0405.1/0937.html --------- Hi Andi, Andrew, Linus, x86_64 has incorrect include/asm-x86_64/bitops.h::ffs() implementation. It uses "g" instead of "rm" in the insline assembled bsfl instruction. (This was spotted by Yuri Per.) bsfl does not accept constant values but only memory ones. On i386 the correct "rm" is used. This causes NTFS build to fail as gcc optimizes a variable into a constant and ffs() then fails to assemble. Please apply below patch. Thanks! Best regards, Anton -- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/ --- bklinux-2.6/include/asm-x86_64/bitops.h.old 2004-05-12 14:40:32.524022336 +0100 +++ bklinux-2.6/include/asm-x86_64/bitops.h 2004-05-12 14:41:22.595410328 +0100 @@ -458,7 +458,7 @@ static __inline__ int ffs(int x) __asm__("bsfl %1,%0\n\t" "cmovzl %2,%0" - : "=r" (r) : "g" (x), "r" (-1)); + : "=r" (r) : "rm" (x), "r" (-1)); return r+1; } The fix for this problem has just been committed to the RHEL3 U3 patch pool this evening (in kernel version 2.4.21-15.7.EL). An errata has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2004-433.html |