Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Dec 1998 00:25:41 -0600
From:      "Randall D. DuCharme" <randyd@ameritech.net>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: Totally illegal declaration/check in i386/i386/busdma_machdep.c
Message-ID:  <3674AF65.7B6BCFAB@ameritech.net>
References:  <199812140529.VAA26641@apollo.backplane.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon wrote:
> 
>         GCC warning expected?  I'm sorry, but this is *illegal*.  Totally
>         illegal.  nextpaddr can be legally destroyed on each loop by the
>         compiler.  I know what the author was trying to do, but he's wrong.
> 
>         I'm fixing this.
> 
>         (from i386/i386/busdma_machdep.c)
> 
>         do {
>                 bus_size_t      size;
>                 vm_offset_t     nextpaddr;      /* GCC warning expected */
> 
>                 paddr = pmap_kextract(vaddr);
>                 size = PAGE_SIZE - (paddr & PAGE_MASK);
>                 if (size > buflen)
>                         size = buflen;
> 
>                 ...
> 
>                  } else if (paddr == nextpaddr) {
>                          sg->ds_len += size;
>                          ...
>                 nextpaddr = paddr + size;
>                 buflen -= size;
>         } while (buflen > 0);
> 
>     Matthew Dillon  Engineering, HiWay Technologies, Inc. & BEST Internet
>                     Communications & God knows what else.
>     <dillon@backplane.com> (Please include original email in any response)
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-current" in the body of the message

-- 
Randall D DuCharme       
Systems Engineer         Novell, Microsoft, and UNIX Networking Support
Computer Specialists                Free Your Machine....     FreeBSD
414-253-9998   414-253-9919 (fax)      The Power To Serve!


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3674AF65.7B6BCFAB>