summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornate <nate@FreeBSD.org>1996-03-23 21:32:39 +0000
committernate <nate@FreeBSD.org>1996-03-23 21:32:39 +0000
commitf497240d42e5d084c66babe39784b4af6c910461 (patch)
tree574af7421606f244b853069f3fbefa4725b490e6
parent78a7a152d0202d6f1151e96d289ea70df5bdaf6f (diff)
downloadFreeBSD-src-f497240d42e5d084c66babe39784b4af6c910461.zip
FreeBSD-src-f497240d42e5d084c66babe39784b4af6c910461.tar.gz
Now that ac->ac_ipaddr and arpwhohas() no longer exist, remove the
ifdef'd out code that used it.
-rw-r--r--sys/amd64/amd64/tsc.c19
-rw-r--r--sys/amd64/isa/clock.c19
-rw-r--r--sys/i386/i386/tsc.c19
-rw-r--r--sys/i386/isa/clock.c19
-rw-r--r--sys/i386/isa/if_zp.c7
-rw-r--r--sys/isa/atrtc.c19
6 files changed, 86 insertions, 16 deletions
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index 6454b70..c7d7c72 100644
--- a/sys/amd64/amd64/tsc.c
+++ b/sys/amd64/amd64/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.50 1996/01/16 06:35:40 ache Exp $
+ * $Id: clock.c,v 1.51 1996/01/30 18:56:47 wollman Exp $
*/
/*
@@ -101,8 +101,11 @@ long long i586_ctr_bias;
long long i586_last_tick;
unsigned long i586_avg_tick;
#endif
+#ifdef PROFILE
u_int stat_imask = SWI_CLOCK_MASK;
+#else
int timer0_max_count;
+#endif
u_int timer0_overflow_threshold;
u_int timer0_prescaler_count;
@@ -235,6 +238,7 @@ release_timer2()
return 0;
}
+#ifdef PROFILE
/*
* This routine receives statistical clock interrupts from the RTC.
* As explained above, these occur at 128 interrupts per second.
@@ -267,7 +271,8 @@ DDB_printrtc(void)
rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC),
rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR));
}
-#endif
+#endif /* DDB */
+#endif /* PROFILE */
static int
getit(void)
@@ -506,8 +511,10 @@ resettodr()
tm = time.tv_sec;
splx(s);
+#ifdef PROFILE
/* Disable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR);
+#endif
/* Calculate local time to put in RTC */
@@ -543,8 +550,10 @@ resettodr()
writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */
writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */
+#ifdef PROFILE
/* Reenable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
/*
@@ -555,8 +564,10 @@ cpu_initclocks()
{
int diag;
+#ifdef PROFILE
stathz = RTC_NOPROFRATE;
profhz = RTC_PROFRATE;
+#endif
/* Finish initializing 8253 timer 0. */
register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0,
@@ -579,19 +590,23 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+#ifdef PROFILE
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
void
setstatclockrate(int newhz)
{
+#ifdef PROFILE
if (newhz == RTC_PROFRATE)
rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF;
else
rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
writertc(RTC_STATUSA, rtc_statusa);
+#endif
}
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 6454b70..c7d7c72 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.50 1996/01/16 06:35:40 ache Exp $
+ * $Id: clock.c,v 1.51 1996/01/30 18:56:47 wollman Exp $
*/
/*
@@ -101,8 +101,11 @@ long long i586_ctr_bias;
long long i586_last_tick;
unsigned long i586_avg_tick;
#endif
+#ifdef PROFILE
u_int stat_imask = SWI_CLOCK_MASK;
+#else
int timer0_max_count;
+#endif
u_int timer0_overflow_threshold;
u_int timer0_prescaler_count;
@@ -235,6 +238,7 @@ release_timer2()
return 0;
}
+#ifdef PROFILE
/*
* This routine receives statistical clock interrupts from the RTC.
* As explained above, these occur at 128 interrupts per second.
@@ -267,7 +271,8 @@ DDB_printrtc(void)
rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC),
rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR));
}
-#endif
+#endif /* DDB */
+#endif /* PROFILE */
static int
getit(void)
@@ -506,8 +511,10 @@ resettodr()
tm = time.tv_sec;
splx(s);
+#ifdef PROFILE
/* Disable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR);
+#endif
/* Calculate local time to put in RTC */
@@ -543,8 +550,10 @@ resettodr()
writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */
writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */
+#ifdef PROFILE
/* Reenable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
/*
@@ -555,8 +564,10 @@ cpu_initclocks()
{
int diag;
+#ifdef PROFILE
stathz = RTC_NOPROFRATE;
profhz = RTC_PROFRATE;
+#endif
/* Finish initializing 8253 timer 0. */
register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0,
@@ -579,19 +590,23 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+#ifdef PROFILE
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
void
setstatclockrate(int newhz)
{
+#ifdef PROFILE
if (newhz == RTC_PROFRATE)
rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF;
else
rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
writertc(RTC_STATUSA, rtc_statusa);
+#endif
}
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c
index 6454b70..c7d7c72 100644
--- a/sys/i386/i386/tsc.c
+++ b/sys/i386/i386/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.50 1996/01/16 06:35:40 ache Exp $
+ * $Id: clock.c,v 1.51 1996/01/30 18:56:47 wollman Exp $
*/
/*
@@ -101,8 +101,11 @@ long long i586_ctr_bias;
long long i586_last_tick;
unsigned long i586_avg_tick;
#endif
+#ifdef PROFILE
u_int stat_imask = SWI_CLOCK_MASK;
+#else
int timer0_max_count;
+#endif
u_int timer0_overflow_threshold;
u_int timer0_prescaler_count;
@@ -235,6 +238,7 @@ release_timer2()
return 0;
}
+#ifdef PROFILE
/*
* This routine receives statistical clock interrupts from the RTC.
* As explained above, these occur at 128 interrupts per second.
@@ -267,7 +271,8 @@ DDB_printrtc(void)
rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC),
rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR));
}
-#endif
+#endif /* DDB */
+#endif /* PROFILE */
static int
getit(void)
@@ -506,8 +511,10 @@ resettodr()
tm = time.tv_sec;
splx(s);
+#ifdef PROFILE
/* Disable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR);
+#endif
/* Calculate local time to put in RTC */
@@ -543,8 +550,10 @@ resettodr()
writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */
writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */
+#ifdef PROFILE
/* Reenable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
/*
@@ -555,8 +564,10 @@ cpu_initclocks()
{
int diag;
+#ifdef PROFILE
stathz = RTC_NOPROFRATE;
profhz = RTC_PROFRATE;
+#endif
/* Finish initializing 8253 timer 0. */
register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0,
@@ -579,19 +590,23 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+#ifdef PROFILE
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
void
setstatclockrate(int newhz)
{
+#ifdef PROFILE
if (newhz == RTC_PROFRATE)
rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF;
else
rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
writertc(RTC_STATUSA, rtc_statusa);
+#endif
}
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 6454b70..c7d7c72 100644
--- a/sys/i386/isa/clock.c
+++ b/sys/i386/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.50 1996/01/16 06:35:40 ache Exp $
+ * $Id: clock.c,v 1.51 1996/01/30 18:56:47 wollman Exp $
*/
/*
@@ -101,8 +101,11 @@ long long i586_ctr_bias;
long long i586_last_tick;
unsigned long i586_avg_tick;
#endif
+#ifdef PROFILE
u_int stat_imask = SWI_CLOCK_MASK;
+#else
int timer0_max_count;
+#endif
u_int timer0_overflow_threshold;
u_int timer0_prescaler_count;
@@ -235,6 +238,7 @@ release_timer2()
return 0;
}
+#ifdef PROFILE
/*
* This routine receives statistical clock interrupts from the RTC.
* As explained above, these occur at 128 interrupts per second.
@@ -267,7 +271,8 @@ DDB_printrtc(void)
rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC),
rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR));
}
-#endif
+#endif /* DDB */
+#endif /* PROFILE */
static int
getit(void)
@@ -506,8 +511,10 @@ resettodr()
tm = time.tv_sec;
splx(s);
+#ifdef PROFILE
/* Disable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR);
+#endif
/* Calculate local time to put in RTC */
@@ -543,8 +550,10 @@ resettodr()
writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */
writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */
+#ifdef PROFILE
/* Reenable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
/*
@@ -555,8 +564,10 @@ cpu_initclocks()
{
int diag;
+#ifdef PROFILE
stathz = RTC_NOPROFRATE;
profhz = RTC_PROFRATE;
+#endif
/* Finish initializing 8253 timer 0. */
register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0,
@@ -579,19 +590,23 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+#ifdef PROFILE
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
void
setstatclockrate(int newhz)
{
+#ifdef PROFILE
if (newhz == RTC_PROFRATE)
rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF;
else
rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
writertc(RTC_STATUSA, rtc_statusa);
+#endif
}
diff --git a/sys/i386/isa/if_zp.c b/sys/i386/isa/if_zp.c
index d9d5a9b..9597f64 100644
--- a/sys/i386/isa/if_zp.c
+++ b/sys/i386/isa/if_zp.c
@@ -34,7 +34,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* From: if_ep.c,v 1.9 1994/01/25 10:46:29 deraadt Exp $
- * $Id: if_zp.c,v 1.16 1996/02/06 18:50:51 wollman Exp $
+ * $Id: if_zp.c,v 1.17 1996/02/28 16:23:36 nate Exp $
*/
/*-
* TODO:
@@ -1011,12 +1011,7 @@ zpioctl(ifp, cmd, data)
#ifdef INET
case AF_INET:
zpinit(ifp->if_unit); /* before arpwhohas */
-#if 1
arp_ifinit((struct arpcom *) ifp, ifa);
-#else
- ((struct arpcom *) ifp)->ac_ipaddr = IA_SIN(ifa)->sin_addr;
- arpwhohas((struct arpcom *) ifp, &IA_SIN(ifa)->sin_addr);
-#endif
break;
#endif
#ifdef IPX
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index 6454b70..c7d7c72 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.50 1996/01/16 06:35:40 ache Exp $
+ * $Id: clock.c,v 1.51 1996/01/30 18:56:47 wollman Exp $
*/
/*
@@ -101,8 +101,11 @@ long long i586_ctr_bias;
long long i586_last_tick;
unsigned long i586_avg_tick;
#endif
+#ifdef PROFILE
u_int stat_imask = SWI_CLOCK_MASK;
+#else
int timer0_max_count;
+#endif
u_int timer0_overflow_threshold;
u_int timer0_prescaler_count;
@@ -235,6 +238,7 @@ release_timer2()
return 0;
}
+#ifdef PROFILE
/*
* This routine receives statistical clock interrupts from the RTC.
* As explained above, these occur at 128 interrupts per second.
@@ -267,7 +271,8 @@ DDB_printrtc(void)
rtcin(RTC_HRS), rtcin(RTC_MIN), rtcin(RTC_SEC),
rtcin(RTC_STATUSA), rtcin(RTC_STATUSB), rtcin(RTC_INTR));
}
-#endif
+#endif /* DDB */
+#endif /* PROFILE */
static int
getit(void)
@@ -506,8 +511,10 @@ resettodr()
tm = time.tv_sec;
splx(s);
+#ifdef PROFILE
/* Disable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR);
+#endif
/* Calculate local time to put in RTC */
@@ -543,8 +550,10 @@ resettodr()
writertc(RTC_MONTH, bin2bcd(m + 1)); /* Write back Month */
writertc(RTC_DAY, bin2bcd(tm + 1)); /* Write back Month Day */
+#ifdef PROFILE
/* Reenable RTC updates and interrupts. */
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
/*
@@ -555,8 +564,10 @@ cpu_initclocks()
{
int diag;
+#ifdef PROFILE
stathz = RTC_NOPROFRATE;
profhz = RTC_PROFRATE;
+#endif
/* Finish initializing 8253 timer 0. */
register_intr(/* irq */ 0, /* XXX id */ 0, /* flags */ 0,
@@ -579,19 +590,23 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+#ifdef PROFILE
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
writertc(RTC_STATUSB, RTCSB_24HR | RTCSB_PINTR);
+#endif
}
void
setstatclockrate(int newhz)
{
+#ifdef PROFILE
if (newhz == RTC_PROFRATE)
rtc_statusa = RTCSA_DIVIDER | RTCSA_PROF;
else
rtc_statusa = RTCSA_DIVIDER | RTCSA_NOPROF;
writertc(RTC_STATUSA, rtc_statusa);
+#endif
}
OpenPOWER on IntegriCloud