Bug 17804 - [PATCH] Make hald work on powerpc64
Summary: [PATCH] Make hald work on powerpc64
Status: RESOLVED FIXED
Alias: None
Product: hal
Classification: Unclassified
Component: hald (show other bugs)
Version: unspecified
Hardware: PowerPC Linux (All)
: high normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-27 05:07 UTC by o590694
Modified: 2008-09-30 08:18 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix a 64bit endian issue. (1.47 KB, patch)
2008-09-27 05:07 UTC, o590694
Details | Splinter Review

Description o590694 2008-09-27 05:07:07 UTC
Created attachment 19257 [details] [review]
Fix a 64bit endian issue.

hald does not run on powerpc64 and properbly other big endian 64 architectures. the attached patch solves this issue. it's compile and run tested on amd64/ppc/ppc64 machines.
Comment 1 Christian Schmitt 2008-09-28 04:24:27 UTC
I can confirm this patch as working on PPC64 (a G5 machine) and not having any negative effects on x86.
Please apply it to the HAL tree as this is a long outstanding issue.
Comment 2 Danny Kukawka 2008-09-30 08:18:29 UTC
Commited to git, thanks.

commit c441223df2fe11fa7e94294e66311f765fe2d136
Author: Markus Rothe <markus@unixforces.net>
Date:   Tue Sep 30 16:38:07 2008 +0200

    fix issue on 64bit big endian architectures.

    On 64bit big endian architectures, PowerPC64 in my case, off_t is 64bit. Now
    rule.jump_position is only 32bit. the pad32_write function call in
    set_jump_position only saves 32bit. On little endian architectures this are
    the "correct" bits, but not on 64bit architectures which are big endian. The
    solution is to type cast off_t to a 32bit value and save this one instead of
    the original variable.



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.