Speed up PCI attach code by ommiting test if its result is ignored anyway.

This commit is contained in:
Stefan Eßer 1995-03-02 21:51:53 +00:00
parent c529ee1973
commit 79a6470e10
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6842
2 changed files with 30 additions and 26 deletions

View file

@ -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 @@ int pci_map_mem (pcici_t tag, u_long reg, vm_offset_t* va, vm_offset_t* pa)
** 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;
};
};
/*

View file

@ -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 @@ int pci_map_mem (pcici_t tag, u_long reg, vm_offset_t* va, vm_offset_t* pa)
** 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;
};
};
/*