Skip to content

Commit

Permalink
Sync with -current
Browse files Browse the repository at this point in the history
  • Loading branch information
fvdl committed Nov 15, 1999
1 parent 9102b9d commit b1edb47
Show file tree
Hide file tree
Showing 730 changed files with 40,842 additions and 42,994 deletions.
14 changes: 7 additions & 7 deletions sys/arch/amiga/dev/sbic.c
@@ -1,4 +1,4 @@
/* $NetBSD: sbic.c,v 1.36 1999/10/04 20:28:01 is Exp $ */
/* $NetBSD: sbic.c,v 1.36.4.1 1999/11/15 00:36:58 fvdl Exp $ */

/*
* Copyright (c) 1994 Christian E. Hopps
Expand Down Expand Up @@ -524,12 +524,11 @@ sbic_sched(dev)
dev->target = slp->scsipi_scsi.target;
dev->lun = slp->scsipi_scsi.lun;
if ( flags & XS_CTL_POLL || ( !sbic_parallel_operations
&& (/*phase == STATUS_PHASE ||*/
sbicdmaok(dev, xs) == 0) ) )
&& (sbicdmaok(dev, xs) == 0)))
stat = sbicicmd(dev, slp->scsipi_scsi.target,
slp->scsipi_scsi.lun, &acb->cmd,
acb->clen, acb->sc_kv.dc_addr, acb->sc_kv.dc_count);
else if (sbicgo(dev, xs) == 0) {
else if (sbicgo(dev, xs) == 0 && xs->error != XS_SELTIMEOUT) {
SBIC_TRACE(dev);
return;
} else
Expand Down Expand Up @@ -684,7 +683,8 @@ sbicdmaok(dev, xs)
struct sbic_softc *dev;
struct scsipi_xfer *xs;
{
if (sbic_no_dma || xs->datalen & 0x1 || (u_int)xs->data & 0x3)
if (sbic_no_dma || !xs->datalen || xs->datalen & 0x1 ||
(u_int)xs->data & 0x3)
return(0);
/*
* controller supports dma to any addresses?
Expand Down Expand Up @@ -1408,7 +1408,7 @@ sbicicmd(dev, target, lun, cbuf, clen, buf, len)
*/
if (!( dev->sc_flags & SBICF_SELECTED )
&& sbicselectbus(dev, regs, target, lun, dev->sc_scsiaddr)) {
/*printf("sbicicmd trying to select busy bus!\n");*/
/* printf("sbicicmd: trying to select busy bus!\n"); */
dev->sc_flags &= ~SBICF_ICMD;
return(-1);
}
Expand Down Expand Up @@ -1685,7 +1685,7 @@ sbicgo(dev, xs)
*/
if (sbicselectbus(dev, regs, dev->target, dev->lun,
dev->sc_scsiaddr)) {
/* printf("sbicgo: Trying to select busy bus!\n"); */
/* printf("sbicgo: Trying to select busy bus!\n"); */
SBIC_TRACE(dev);
return(0); /* Not done: needs to be rescheduled */
}
Expand Down
7 changes: 1 addition & 6 deletions sys/arch/amiga/include/svr4_machdep.h
@@ -1,8 +1,3 @@
/* $NetBSD: svr4_machdep.h,v 1.2 1999/04/29 14:38:39 kleink Exp $ */

#ifndef _MACHINE_SVR4_MACHDEP_H_
#define _MACHINE_SVR4_MACHDEP_H_
/* $NetBSD: svr4_machdep.h,v 1.2.6.1 1999/11/15 00:37:03 fvdl Exp $ */

#include <m68k/svr4_machdep.h>

#endif
8 changes: 4 additions & 4 deletions sys/arch/arm32/arm32/bcopyinout.S
@@ -1,4 +1,4 @@
/* $NetBSD: bcopyinout.S,v 1.19 1999/05/19 07:50:06 scw Exp $ */
/* $NetBSD: bcopyinout.S,v 1.19.4.1 1999/11/15 00:37:03 fvdl Exp $ */

/*
* Copyright (c) 1995-1998 Mark Brinicombe.
Expand Down Expand Up @@ -47,7 +47,7 @@
.text
.align 0
Lcurpcb:
.word _curpcb
.word _C_LABEL(curpcb)

Lvm_min_address:
.word VM_MIN_ADDRESS
Expand Down Expand Up @@ -156,7 +156,7 @@ do_cowfault:
ldr r3, Lpgbase
sub r0, r6, r3
mov r0, r0, lsl #(PGSHIFT-2) /* calculate VA of page */
bl _cowfault
bl _C_LABEL(cowfault)
mov r3, r0
ldmfd sp!, {r0-r2, lr}
teq r3, #0 /* check for error return */
Expand Down Expand Up @@ -235,7 +235,7 @@ Lcopyinoutpcbfault:
mov r2, r1
mov r1, r0
add r0, pc, #Lcopyinouttext - . - 8
b _panic
b _C_LABEL(panic)

Lcopyinouttext:
.asciz "No valid PCB during copyinout() addr1=%08x addr2=%08x\n"
Expand Down
10 changes: 5 additions & 5 deletions sys/arch/arm32/arm32/blockio.S
@@ -1,4 +1,4 @@
/* $NetBSD: blockio.S,v 1.8 1998/12/12 17:28:05 mycroft Exp $ */
/* $NetBSD: blockio.S,v 1.8.10.1 1999/11/15 00:37:04 fvdl Exp $ */

/*
* Copyright (c) 1994 Mark Brinicombe.
Expand Down Expand Up @@ -175,7 +175,7 @@ ENTRY(insw16)
tst r2, #0x00000007
tsteq r1, #0x00000003

bne _insw
bne _C_LABEL(insw)

/* Word aligned insw */

Expand Down Expand Up @@ -233,7 +233,7 @@ ENTRY(outsw16)
tst r2, #0x00000007
tsteq r1, #0x00000003

bne _outsw
bne _C_LABEL(outsw)

/* Word aligned outsw */

Expand Down Expand Up @@ -301,7 +301,7 @@ ENTRY(inswm8)

tst r1, #0x00000003

bne _insw
bne _C_LABEL(insw)

/* Word aligned insw */

Expand Down Expand Up @@ -397,7 +397,7 @@ ENTRY(outswm8)

tst r1, #0x00000003

bne _outsw
bne _C_LABEL(outsw)

/* Word aligned outsw */

Expand Down
11 changes: 5 additions & 6 deletions sys/arch/arm32/arm32/bus_dma.c
@@ -1,4 +1,4 @@
/* $NetBSD: bus_dma.c,v 1.16 1999/09/10 10:12:09 is Exp $ */
/* $NetBSD: bus_dma.c,v 1.16.4.1 1999/11/15 00:37:04 fvdl Exp $ */

/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
Expand Down Expand Up @@ -376,9 +376,6 @@ _bus_dmamap_sync(t, map, offset, len, ops)
return;
}

/* XXX Is this only for BUS_DMASYNC_PREWRITE ? */
cpu_drain_writebuf();

/* Set the starting address and maximum length */
vaddr = seg->_ds_vaddr + offset;
length = seg->ds_len - offset;
Expand Down Expand Up @@ -406,6 +403,8 @@ _bus_dmamap_sync(t, map, offset, len, ops)
length = seg->ds_len;
}
} while (len > 0);

cpu_drain_writebuf();
}
}

Expand Down Expand Up @@ -515,8 +514,8 @@ _bus_dmamem_map(t, segs, nsegs, size, kvap, flags)
if (size == 0)
panic("_bus_dmamem_map: size botch");
pmap_enter(pmap_kernel(), va, addr,
VM_PROT_READ | VM_PROT_WRITE, TRUE,
VM_PROT_READ | VM_PROT_WRITE);
VM_PROT_READ | VM_PROT_WRITE,
VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED);
/*
* If the memory must remain coherent with the
* cache then we must make the memory uncacheable
Expand Down
36 changes: 17 additions & 19 deletions sys/arch/arm32/arm32/copystr.S
@@ -1,4 +1,4 @@
/* $NetBSD: copystr.S,v 1.9 1998/06/17 20:10:39 mark Exp $ */
/* $NetBSD: copystr.S,v 1.9.16.1 1999/11/15 00:37:06 fvdl Exp $ */

/*
* Copyright (c) 1995 Mark Brinicombe.
Expand Down Expand Up @@ -45,7 +45,7 @@
.text
.align 0
Lcurpcb:
.word _curpcb
.word _C_LABEL(curpcb)

Lvm_min_address:
.word VM_MIN_ADDRESS
Expand All @@ -66,12 +66,10 @@ Lvm_maxkern_address:
ENTRY(copystr)
stmfd sp!, {r4-r5}
teq r2, #0x00000000
moveq r4, #0x00000000
moveq r5, #0x00000000
mov r5, #0x00000000
moveq r0, #ENAMETOOLONG
beq Lcopystrexit

mov r5, #0x00000000

Lcopystr_loop:
ldrb r4, [r0], #0x0001
strb r4, [r1], #0x0001
Expand All @@ -80,14 +78,14 @@ Lcopystr_loop:
teqne r5, r2
bne Lcopystr_loop

Lcopystrexit:
teq r3, #0x00000000
strne r5, [r3]

teq r4, #0x00000000
moveq r0, #0x00000000
movne r0, #ENAMETOOLONG

Lcopystrexit:
teq r3, #0x00000000
strne r5, [r3]

ldmfd sp!, {r4-r5}
mov pc, lr

Expand Down Expand Up @@ -148,8 +146,8 @@ ENTRY(copyoutstr)
/* Do the actual copy */
do_copyinoutstr:
teq r2, #0x00000000
moveq r5, #0x00000000
moveq r6, #0x00000000
mov r6, #0x00000000
moveq r0, #ENAMETOOLONG
beq Lcopyinoutstrexit

ldr r4, Lcurpcb
Expand All @@ -162,7 +160,6 @@ do_copyinoutstr:

add r5, pc, #Lcopystrfault - . - 8
str r5, [r4, #PCB_ONFAULT]
mov r6, #0x00000000

Lcopyinoutstr_loop:
ldrb r5, [r0], #0x0001
Expand All @@ -172,16 +169,17 @@ Lcopyinoutstr_loop:
teqne r6, r2
bne Lcopyinoutstr_loop

Lcopyinoutstrexit:
teq r3, #0x00000000
strne r6, [r3]
mov r0, #0x00000000
str r0, [r4, #PCB_ONFAULT]

teq r5, #0x00000000
moveq r0, #0x00000000
movne r0, #ENAMETOOLONG

mov r6, #0x00000000
str r6, [r4, #PCB_ONFAULT]
Lcopyinoutstrexit:
teq r3, #0x00000000
strne r6, [r3]

ldmfd sp!, {r4-r6}
mov pc, lr

Expand All @@ -203,7 +201,7 @@ Lcopystrpcbfault:
mov r2, r1
mov r1, r0
add r0, pc, #Lcopystrpcbfaulttext - . - 8
b _panic
b _C_LABEL(panic)

Lcopystrpcbfaulttext:
.asciz "No valid PCB during copyinoutstr() addr1=%08x addr2=%08x\n"
Expand Down
28 changes: 14 additions & 14 deletions sys/arch/arm32/arm32/cpufunc_asm.S
@@ -1,4 +1,4 @@
/* $NetBSD: cpufunc_asm.S,v 1.9 1998/12/12 17:28:05 mycroft Exp $ */
/* $NetBSD: cpufunc_asm.S,v 1.9.10.1 1999/11/15 00:37:07 fvdl Exp $ */

/*
* arm8 support code Copyright (c) 1997 ARM Limited
Expand Down Expand Up @@ -183,7 +183,7 @@ ENTRY(arm8_setttb)
msr cpsr_all , r1

stmfd sp!, {r0-r3, lr}
bl _arm8_cache_cleanID
bl _C_LABEL(arm8_cache_cleanID)
ldmfd sp!, {r0-r3, lr}
mcr 15, 0, r0, c7, c7, 0 /* flush I+D cache */

Expand All @@ -207,7 +207,7 @@ ENTRY(arm8_setttb)

#ifdef CPU_SA110
Lblock_userspace_access:
.word _block_userspace_access
.word _C_LABEL(block_userspace_access)

ENTRY(sa110_setttb)
/* We need to flush the cache as it uses virtual addresses that are about to change */
Expand All @@ -222,7 +222,7 @@ ENTRY(sa110_setttb)
str r1, [r3]
#endif
stmfd sp!, {r0-r3, lr}
bl _sa110_cache_cleanID
bl _C_LABEL(sa110_cache_cleanID)
ldmfd sp!, {r0-r3, lr}
mcr 15, 0, r0, c7, c5, 0
mcr 15, 0, r0, c7, c10, 4
Expand Down Expand Up @@ -486,18 +486,18 @@ ENTRY(sa110_cache_cleanD_E)
*/

.data
.global _sa110_cache_clean_addr
_sa110_cache_clean_addr:
.global _C_LABEL(sa110_cache_clean_addr)
_C_LABEL(sa110_cache_clean_addr):
.word 0xf0000000
.global _sa110_cache_clean_size
_sa110_cache_clean_size:
.global _C_LABEL(sa110_cache_clean_size)
_C_LABEL(sa110_cache_clean_size):
.word 0x00008000

.text
Lsa110_cache_clean_addr:
.word _sa110_cache_clean_addr
.word _C_LABEL(sa110_cache_clean_addr)
Lsa110_cache_clean_size:
.word _sa110_cache_clean_size
.word _C_LABEL(sa110_cache_clean_size)

ENTRY(sa110_cache_cleanID)
ENTRY(sa110_cache_cleanD)
Expand Down Expand Up @@ -645,7 +645,7 @@ Lsa110_cache_syncI_loop:
ENTRY(sa110_cache_cleanID_rng)
ENTRY(sa110_cache_cleanD_rng)
cmp r1, #0x4000
bcs _sa110_cache_cleanID
bcs _C_LABEL(sa110_cache_cleanID)

and r2, r0, #0x1f
add r1, r1, r2
Expand All @@ -661,7 +661,7 @@ sa110_cache_cleanD_rng_loop:

ENTRY(sa110_cache_purgeID_rng)
cmp r1, #0x2000
bcs _sa110_cache_purgeID
bcs _C_LABEL(sa110_cache_purgeID)

and r2, r0, #0x1f
add r1, r1, r2
Expand All @@ -680,7 +680,7 @@ sa110_cache_purgeID_rng_loop:

ENTRY(sa110_cache_purgeD_rng)
cmp r1, #0x2000
bcs _sa110_cache_purgeD
bcs _C_LABEL(sa110_cache_purgeD)

and r2, r0, #0x1f
add r1, r1, r2
Expand All @@ -697,7 +697,7 @@ sa110_cache_purgeD_rng_loop:

ENTRY(sa110_cache_syncI_rng)
cmp r1, #0x4000
bcs _sa110_cache_syncI
bcs _C_LABEL(sa110_cache_syncI)

and r2, r0, #0x1f
add r1, r1, r2
Expand Down

0 comments on commit b1edb47

Please sign in to comment.