[Bug 13555] 64-bit warning fixes

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 12 12:03:31 PST 2007


http://bugs.freedesktop.org/show_bug.cgi?id=13555


berk.akinci at sun.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |berk.akinci at sun.com
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |




------- Comment #5 from berk.akinci at sun.com  2007-12-12 12:03 PST -------
Well, I believe this bug isn't fixed yet.  I know this is just a log message,
but it still cost me some time to figure out what was at fault when debugging
driver/VBIOS issues.  What good is a log message if it can't be trusted?

I think this statement is (unfortunately) going to need to be #ifdef'ed between
AMD64 and i386 compiles.  This is because CARD32 is defined differently in
AMD64 and i386...


########## Take a look at X11/Xmd.h
#ifdef LONG64
typedef unsigned long CARD64;
typedef unsigned int CARD32;
#else
typedef unsigned long CARD32;
#endif
########## Also in X11/Xmd.h
typedef unsigned short CARD16;
########## Oddly, this would mean that CARD16 is really 32 bits...
########## Why bother change CARD32 between platforms and keep CARD16?
########## I don't know, but I'm not going to attempt to open that can of
worms...


########## Then take a look at radeon.h
typedef struct {
    CARD16            reference_freq;
    CARD16            reference_div;
    CARD32            min_pll_freq;
    CARD32            max_pll_freq;
    CARD16            xclk;
} RADEONPLLRec, *RADEONPLLPtr;


Looking at the above, I would guess that the code for the debug message should
look like this:

#ifdef LONG64
    xf86DrvMsg (pScrn->scrnIndex, X_INFO,
                "PLL parameters: rf=%u rd=%u min=%u max=%u; xclk=%u\n",
                pll->reference_freq,
                pll->reference_div,
                pll->min_pll_freq, pll->max_pll_freq, pll->xclk);
#else
    xf86DrvMsg (pScrn->scrnIndex, X_INFO,
                "PLL parameters: rf=%u rd=%u min=%lu max=%lu; xclk=%u\n",
                pll->reference_freq,
                pll->reference_div,
                pll->min_pll_freq, pll->max_pll_freq, pll->xclk);
#endif


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the xorg-driver-ati mailing list