diff options
author | se <se@FreeBSD.org> | 1995-03-02 21:51:53 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1995-03-02 21:51:53 +0000 |
commit | e9892e48b9e68f90eb6a798332dbc92ed6ef1a39 (patch) | |
tree | 587b561e7e4695efed14624d6590cb4201d77fe4 /sys/pci | |
parent | 802729299882e607627a5425d01dfbf4937cdc9b (diff) | |
download | FreeBSD-src-e9892e48b9e68f90eb6a798332dbc92ed6ef1a39.zip FreeBSD-src-e9892e48b9e68f90eb6a798332dbc92ed6ef1a39.tar.gz |
Speed up PCI attach code by ommiting test if its result is ignored anyway.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/pci.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c index 2b2debf..377aaa7 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pci.c,v 1.16 1995/02/25 17:26:22 se Exp $ +** $Id: pci.c,v 1.17 1995/02/27 17:17:13 se Exp $ ** ** General subroutines for the PCI bus on 80*86 systems. ** pci_configure () @@ -715,19 +715,21 @@ domap: ** only ones (0xffffffff) from all offsets. */ - for (i=0; i<vsize; i+=4) { - u_long* addr = (u_long*) (vaddr+i); - data = *addr; - if (data != 0xffffffff) - break; - }; + if (!oldmap) { + for (i=0; i<vsize; i+=4) { + u_long* addr = (u_long*) (vaddr+i); + data = *addr; + if (data != 0xffffffff) + break; + }; - if ((data==0xffffffff) && !oldmap) { - printf ("\t(possible mapping problem: " - "at 0x%x read 0xffffffff)\n", - (unsigned) paddr); - pci_paddr = 0; - goto next_try; + if (data==0xffffffff) { + printf ("\t(possible mapping problem: " + "at 0x%x read 0xffffffff)\n", + (unsigned) paddr); + pci_paddr = 0; + goto next_try; + }; }; /* |