changelog shortlog tags branches files raw gz bz2 help

Mercurial > hg > plan9front / changeset: pc, pc64: remove PCICONS debug buffer from pci.c

changeset 4413: 7ec63d7bcad7
parent 4412: de32ddc1b04b
child 4414: 68c3ed8bb168
author: cinap_lenrek@felloff.net
date: Thu, 09 Apr 2015 14:55:01 +0200
files: sys/src/9/pc/pci.c
description: pc, pc64: remove PCICONS debug buffer from pci.c
     1.1--- a/sys/src/9/pc/pci.c
     1.2+++ b/sys/src/9/pc/pci.c
     1.3@@ -10,29 +10,7 @@
     1.4 #include "io.h"
     1.5 #include "../port/error.h"
     1.6 
     1.7-#define DBG	if(0) pcilog
     1.8-
     1.9-struct
    1.10-{
    1.11-	char	output[16384];
    1.12-	int	ptr;
    1.13-}PCICONS;
    1.14-
    1.15-int
    1.16-pcilog(char *fmt, ...)
    1.17-{
    1.18-	int n;
    1.19-	va_list arg;
    1.20-	char buf[PRINTSIZE];
    1.21-
    1.22-	va_start(arg, fmt);
    1.23-	n = vseprint(buf, buf+sizeof(buf), fmt, arg) - buf;
    1.24-	va_end(arg);
    1.25-
    1.26-	memmove(PCICONS.output+PCICONS.ptr, buf, n);
    1.27-	PCICONS.ptr += n;
    1.28-	return n;
    1.29-}
    1.30+#define DBG	if(0) print
    1.31 
    1.32 enum
    1.33 {					/* configuration mechanism #1 */
    1.34@@ -211,7 +189,7 @@ pcibusmap(Pcidev *root, ulong *pmema, ul
    1.35 	for(p = root; p != nil; p = p->link) {
    1.36 		if(p->ccrb == 0x06) {
    1.37 			if(p->ccru != 0x04 || p->bridge == nil) {
    1.38-//				DBG("pci: ignored bridge %T\n", p->tbdf);
    1.39+				DBG("pci: ignored bridge %T\n", p->tbdf);
    1.40 				continue;
    1.41 			}
    1.42 
    1.43@@ -1068,7 +1046,7 @@ pcicfginit(void)
    1.44 		ioa = 0x1000;
    1.45 		mema = 0x90000000;
    1.46 
    1.47-		pcilog("Mask sizes: mem=%lux io=%lux\n", mema, ioa);
    1.48+		DBG("Mask sizes: mem=%lux io=%lux\n", mema, ioa);
    1.49 
    1.50 		pcibusmap(pciroot, &mema, &ioa, 1);
    1.51 		DBG("Sizes2: mem=%lux io=%lux\n", mema, ioa);
    1.52@@ -1335,7 +1313,6 @@ pcilhinv(Pcidev* p)
    1.53 	Pcidev *t;
    1.54 
    1.55 	if(p == nil) {
    1.56-		putstrn(PCICONS.output, PCICONS.ptr);
    1.57 		p = pciroot;
    1.58 		print("bus dev type vid  did intl memory\n");
    1.59 	}