Bug 3998

Summary: request for removing virt_to_bus from drm_bufs.c
Product: DRI Reporter: o590694
Component: DRM/otherAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: high    
Version: DRI git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description o590694 2005-08-06 07:09:59 UTC
Hi,

I just checked out DRM from CVS and got an unresolved symbol on my ppc64
machine, because virt_to_bus does not exist on this architecture.

This is the part from drm/linux-core/drm_bufs.c which uses this function (DRM CVS):

[...] (line 811)
for (offset = 0;
     offset + size <= total && entry->buf_count < count;
     offset += alignment, ++entry->buf_count) {
        buf = &entry->buflist[entry->buf_count];
        buf->idx = dma->buf_count + entry->buf_count;
        buf->total = alignment;
        buf->order = order;
        buf->used = 0;
        buf->offset = (dma->byte_count + byte_count + offset);
        buf->address = (void *)(page + offset);
        buf->bus_address = virt_to_bus(buf->address);           #### this line
        buf->next = NULL;
        buf->waiting = 0;
        buf->pending = 0;
        init_waitqueue_head(&buf->dma_wait);
        buf->filp = NULL;
[...]


and here is the according part from the linux kernel
(linux-2.6.12/drivers/char/drm/drm_bufs.c):

[...] (line 653)
for ( offset = 0 ;
      offset + size <= total && entry->buf_count < count ;
      offset += alignment, ++entry->buf_count ) {
        buf          = &entry->buflist[entry->buf_count];
        buf->idx     = dma->buf_count + entry->buf_count;
        buf->total   = alignment;
        buf->order   = order;
        buf->used    = 0;
        buf->offset  = (dma->byte_count + byte_count + offset);
        buf->address = (void *)(page + offset);
        buf->next    = NULL;
        buf->waiting = 0;
        buf->pending = 0;
        init_waitqueue_head( &buf->dma_wait );
        buf->filp    = NULL;
[...]

It seems like that line was just ommited. If it is not needed, wouldn't it be
possible to remove it from DRM CVS, too? That would resolve the unresolved symbol.

Regards,

Markus Rothe
Comment 1 Ian Romanick 2005-12-02 11:40:21 UTC
Closing as fixed.  The call to virt_to_bus was removed from drm_bufs.c on August
7th, 2005.

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.