Subject: Should PR 18434 be closed?
To: None <port-hpcmips@netbsd.org, tech-kern@netbsd.org>
From: Naoto Shimazaki <igy@arhc.org>
List: tech-kern
Date: 04/07/2003 19:19:32
Should this PR be closed?
>Number: 18434
>Category: kern
>Synopsis: wi.c can't compile on hpcmips (maybe all mips ports)
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Sep 27 02:15:00 PDT 2002
>Closed-Date:
>Last-Modified: Fri Sep 27 20:07:01 PDT 2002
>Originator: FUKAUMI Naoki
>Release: NetBSD 1.6I (2002/9/26 source)
Current wi.c can compile on hpcmips and working fine.
(I verified on my hpcmips machine)
Though it seems okay, I think it still has one problem.
The reason why wi.c couldn't compile is that DELAY() macro
on hpcmips was defined as a block like below and wi.c used
DELAY() as a expression.
from sys/arch/hpcmips/include/param.h
#define DELAY(n) { register int N = cpuspeed * (n); while (--N > 0); }
from sys/dev/ic/wi.c
for (i = WI_TIMEOUT; i--; DELAY(10)) {
Now, wi.c was modified and it can compile but DELAY() is still defined
as a block.
Jason already commented this point.
"DELAY() on the MIPS ports should be changed to be function-like."
What is the better way?
- just close this PR.
- close this PR and create new PR about DELAY() definition.
- leave this PR open until DELAY() redefined properly.
It is easy to modify DELAY() to:
#define DELAY(n) do { \
register int N = cpuspeed * (n); while (--N > 0); \
} while (/*CONSTCONT*/ 0)
I suggest to modify DELAY() like above in all MIPS ports and close this PR.
--
Naoto Shimazaki