[parisc-linux-cvs] pa18, added KERN_XXX to printk()s, no functional changes
Helge Deller
deller@gmx.de
Sat, 14 Jul 2001 23:18:49 +0200
Index: Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/Makefile,v
retrieving revision 1.102
diff -u -r1.102 Makefile
--- Makefile 2001/07/14 10:01:38 1.102
+++ Makefile 2001/07/14 21:13:23
@@ -1,7 +1,7 @@
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 6
-EXTRAVERSION = -pa17
+EXTRAVERSION = -pa18
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
Index: arch/parisc/kernel/cache.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/cache.c,v
retrieving revision 1.15
diff -u -r1.15 cache.c
--- cache.c 2001/05/11 15:39:04 1.15
+++ cache.c 2001/07/14 21:13:26
@@ -106,7 +106,7 @@
panic("cache_init: pdc_cache_info failed");
#if 0
- printk("ic_size %lx dc_size %lx it_size %lx pdc_cache_info %d*long pdc_cache_cf %d\n",
+ printk(KERN_DEBUG "ic_size %lx dc_size %lx it_size %lx pdc_cache_info %d*long pdc_cache_cf %d\n",
cache_info.ic_size,
cache_info.dc_size,
cache_info.it_size,
@@ -114,13 +114,13 @@
sizeof (struct pdc_cache_cf)
);
- printk("dc base %x dc stride %x dc count %x dc loop %d\n",
+ printk(KERN_DEBUG "dc base %x dc stride %x dc count %x dc loop %d\n",
cache_info.dc_base,
cache_info.dc_stride,
cache_info.dc_count,
cache_info.dc_loop);
- printk("dc conf: alias %d block %d line %d wt %d sh %d cst %d assoc %d\n",
+ printk(KERN_DEBUG "dc conf: alias %d block %d line %d wt %d sh %d cst %d assoc %d\n",
cache_info.dc_conf.cc_alias,
cache_info.dc_conf.cc_block,
cache_info.dc_conf.cc_line,
@@ -129,7 +129,7 @@
cache_info.dc_conf.cc_cst,
cache_info.dc_conf.cc_assoc);
- printk("ic conf: alias %d block %d line %d wt %d sh %d cst %d assoc %d\n",
+ printk(KERN_DEBUG "ic conf: alias %d block %d line %d wt %d sh %d cst %d assoc %d\n",
cache_info.ic_conf.cc_alias,
cache_info.ic_conf.cc_block,
cache_info.ic_conf.cc_line,
@@ -138,14 +138,14 @@
cache_info.ic_conf.cc_cst,
cache_info.ic_conf.cc_assoc);
- printk("dt conf: sh %d page %d cst %d aid %d pad1 %d \n",
+ printk(KERN_DEBUG "dt conf: sh %d page %d cst %d aid %d pad1 %d \n",
cache_info.dt_conf.tc_sh,
cache_info.dt_conf.tc_page,
cache_info.dt_conf.tc_cst,
cache_info.dt_conf.tc_aid,
cache_info.dt_conf.tc_pad1);
- printk("it conf: sh %d page %d cst %d aid %d pad1 %d \n",
+ printk(KERN_DEBUG "it conf: sh %d page %d cst %d aid %d pad1 %d \n",
cache_info.it_conf.tc_sh,
cache_info.it_conf.tc_page,
cache_info.it_conf.tc_cst,
@@ -157,7 +157,8 @@
if (cache_info.dt_conf.tc_sh == 0 || cache_info.dt_conf.tc_sh == 2) {
if (cache_info.dt_conf.tc_sh == 2)
- printk("Unexpected TLB configuration. Will flush I/D separately (could be optimized).\n");
+ printk(KERN_WARNING "Unexpected TLB configuration. "
+ "Will flush I/D separately (could be optimized).\n");
split_tlb = 1;
}
@@ -174,7 +175,7 @@
if (pdc_model_capabilities(&capabilities) == 0) {
if ((capabilities & PDC_MODEL_NVA_MASK) == PDC_MODEL_NVA_UNSUPPORTED) {
- printk("Only equivalent aliasing supported\n");
+ printk(KERN_WARNING "Only equivalent aliasing supported\n");
}
}
}
Index: arch/parisc/kernel/ccio-dma.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ccio-dma.c,v
retrieving revision 1.32
diff -u -r1.32 ccio-dma.c
--- ccio-dma.c 2001/07/13 04:22:25 1.32
+++ ccio-dma.c 2001/07/14 21:13:28
@@ -251,19 +251,19 @@
unsigned long *rptr = (unsigned long *) &(ioc->res_map[(pide >>3) & ~(sizeof(unsigned long) - 1)]);
uint rcnt;
- printk("ccio: %s rp %p bit %d rval 0x%lx\n", msg,
- rptr, pide & (BITS_PER_LONG - 1), *rptr);
+ printk(KERN_DEBUG "ccio: %s rp %p bit %d rval 0x%lx\n",
+ msg, rptr, pide & (BITS_PER_LONG - 1), *rptr);
rcnt = 0;
while(rcnt < BITS_PER_LONG) {
- printk("%s %2d %p %016Lx\n",
+ printk(KERN_DEBUG "%s %2d %p %016Lx\n",
(rcnt == (pide & (BITS_PER_LONG - 1)))
? " -->" : " ",
rcnt, ptr, *ptr );
rcnt++;
ptr++;
}
- printk(msg);
+ printk(KERN_DEBUG "%s", msg);
}
static int
@@ -278,14 +278,14 @@
++pptr;
- printk(msg);
+ printk(KERN_DEBUG "%s", msg);
for(i = 0; i < (ioc->res_size / sizeof(u32)); ++i, ++res_ptr) {
if((i & 15) == 0) {
- printk("%s\n", buf1);
+ printk(KERN_DEBUG "%s\n", buf1);
buf1[0] = '\0';
- printk("%s\n", buf2);
+ printk(KERN_DEBUG "%s\n", buf2);
buf2[0] = '\0';
- printk("\n");
+ printk(KERN_DEBUG "\n");
}
for(j = 0, pmap = 0; j < 32; ++j, ++pptr, ++pptr) {
pmap |= (*pptr & 0x1) << (31 - j);
@@ -293,9 +293,9 @@
sprintf(buf1, "%s %08x", buf1, *res_ptr);
sprintf(buf2, "%s %08x", buf2, pmap);
}
- printk("%s\n", buf1);
- printk("%s\n", buf2);
- printk("\n");
+ printk(KERN_DEBUG "%s\n", buf1);
+ printk(KERN_DEBUG "%s\n", buf2);
+ printk(KERN_DEBUG "\n");
return 0;
}
@@ -303,7 +303,7 @@
ccio_dump_sg(struct ioc *ioc, struct scatterlist *startsg, int nents)
{
while(nents-- > 0) {
- printk(" %d : %08lx/%05x %p/%05x\n", nents,
+ printk(KERN_DEBUG " %d : %08lx/%05x %p/%05x\n", nents,
(unsigned long)sg_dma_address(startsg),
sg_dma_len(startsg),
startsg->address, startsg->length);
@@ -687,7 +687,7 @@
ccio_dma_supported(struct pci_dev *dev, dma_addr_t mask)
{
if(dev == NULL) {
- printk(MODULE_NAME ": EISA/ISA/et al not supported\n");
+ printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n");
BUG();
return 0;
}
@@ -733,7 +733,8 @@
pdir_start = &(ioc->pdir_base[idx]);
- DBG_RUN("%s() 0x%p -> 0x%lx", __FUNCTION__, addr, (long)iovp | offset);
+ DBG_RUN("%s() 0x%p -> 0x%lx",
+ __FUNCTION__, addr, (long)iovp | offset);
/* If not cacheline aligned, force SAFE_DMA on the whole mess */
if((size % L1_CACHE_BYTES) || ((unsigned long)addr % L1_CACHE_BYTES))
@@ -778,7 +779,8 @@
unsigned long flags;
dma_addr_t offset = iova & ~IOVP_MASK;
- DBG_RUN("%s() iovp 0x%lx/%x\n", __FUNCTION__, (long)iova, size);
+ DBG_RUN("%s() iovp 0x%lx/%x\n",
+ __FUNCTION__, (long)iova, size);
iova ^= offset; /* clear offset bits */
size += offset;
@@ -1300,7 +1302,7 @@
}
}
- printk(MODULE_NAME ": Cujo 2.0 bug needs a work around\n");
+ printk(KERN_WARNING MODULE_NAME ": Cujo 2.0 bug needs a work around\n");
#ifdef CONFIG_PROC_FS
ioc->cujo20_bug = 1;
#endif
@@ -1484,7 +1486,7 @@
unsigned long io_io_low, io_io_high;
struct ccio_device *ioa = ccio_list;
- printk("%s found %s at 0x%p\n", dri->name, dri->version, d->hpa);
+ printk(KERN_INFO "%s found %s at 0x%p\n", dri->name, dri->version, d->hpa);
if(NULL == ccio_list) {
create_proc_info_entry(MODULE_NAME, 0, proc_runway_root, ccio_proc_info);
@@ -1493,7 +1495,7 @@
ccio_list = kmalloc(sizeof(struct ccio_device), GFP_KERNEL);
if(NULL == ccio_list) {
- printk(MODULE_NAME " - couldn't alloc ccio_device\n");
+ printk(KERN_ERR MODULE_NAME " - couldn't alloc ccio_device\n");
return 1;
}
memset(ccio_list, 0, sizeof(struct ccio_device));
@@ -1514,7 +1516,7 @@
ioa->next = kmalloc(sizeof(struct ccio_device), GFP_KERNEL);
ioa = ioa->next;
if(NULL == ioa) {
- printk(MODULE_NAME " - couldn't alloc ccio_device\n");
+ printk(KERN_ERR MODULE_NAME " - couldn't alloc ccio_device\n");
return 1;
}
memset(ioa, 0, sizeof(struct ccio_device));
@@ -1531,7 +1533,7 @@
io_io_low = READ_U32(&ioa->ioc[i].ioc_hpa->io_io_low) << 16;
io_io_high = READ_U32(&ioa->ioc[i].ioc_hpa->io_io_high) << 16;
- printk("io_io_high: 0x%08lx io_io_low: 0x%08lx\n", io_io_low, io_io_high);
+ printk(KERN_INFO "io_io_high: 0x%08lx io_io_low: 0x%08lx\n", io_io_low, io_io_high);
start_index = get_num_pa_dev();
num_devices = do_native_bus_walk(io_io_low);
print_pa_devices(start_index, num_devices);
Index: arch/parisc/kernel/ccio-rm-dma.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ccio-rm-dma.c,v
retrieving revision 1.2
diff -u -r1.2 ccio-rm-dma.c
--- ccio-rm-dma.c 2001/07/09 02:33:55 1.2
+++ ccio-rm-dma.c 2001/07/14 21:13:28
@@ -96,7 +96,7 @@
static int ccio_dma_supported( struct pci_dev *dev, dma_addr_t mask)
{
if (dev == NULL) {
- printk(MODULE_NAME ": EISA/ISA/et al not supported\n");
+ printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n");
BUG();
return(0);
}
@@ -195,7 +195,7 @@
static int
ccio_driver_callback(struct hp_device *d, struct pa_iodc_driver *dri)
{
- printk("%s found %s at 0x%p\n", dri->name, dri->version, d->hpa);
+ printk(KERN_INFO "%s found %s at 0x%p\n", dri->name, dri->version, d->hpa);
/*
** FIXME - should check U2 registers to verify it's really running
Index: arch/parisc/kernel/drivers.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/drivers.c,v
retrieving revision 1.17
diff -u -r1.17 drivers.c
--- drivers.c 2001/07/13 04:22:25 1.17
+++ drivers.c 2001/07/14 21:13:28
@@ -80,7 +80,7 @@
if ( (*driver->callback)(device,driver) == 0) {
device->driver=driver;
} else {
- printk("Warning : device (%d, 0x%x, 0x%x, 0x%x, 0x%x) NOT claimed by %s %s\n",
+ printk(KERN_WARNING "Warning : device (%d, 0x%x, 0x%x, 0x%x, 0x%x) NOT claimed by %s %s\n",
device->hw_type,
device->hversion, device->hversion_rev,
device->sversion, device->sversion_rev,
Index: arch/parisc/kernel/inventory.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/inventory.c,v
retrieving revision 1.30
diff -u -r1.30 inventory.c
--- inventory.c 2001/07/13 04:22:25 1.30
+++ inventory.c 2001/07/14 21:13:30
@@ -31,7 +31,7 @@
/* Determine the pdc "type" used on this machine */
- printk("Determining PDC firmware type: ");
+ printk(KERN_INFO "Determining PDC firmware type: ");
status = pdc_system_map_find_mods(&module_result, &module_path, 0);
if (status == PDC_RET_OK) {
@@ -88,12 +88,10 @@
return;
default: /* Everything else */
- break;
-
+
+ printk("Ancient Box (bus_id = 0x%x)\n",bus_id);
+ panic("This system will probably never run Linux.\n");
}
-
- printk("Ancient Box (bus_id = 0x%x)\n",bus_id);
- panic("This system will probably never run Linux.\n");
}
#define PDC_PAGE_ADJ_SHIFT (PAGE_SHIFT - 12) /* pdc pages are always 4k */
@@ -200,38 +198,41 @@
ulong i;
case PAT_ENTITY_PROC:
- printk("PAT_ENTITY_PROC: id_eid 0x%lx\n",
- pa_pdc_cell.mod[0]);
+ printk(KERN_DEBUG "PAT_ENTITY_PROC: id_eid 0x%lx\n",
+ pa_pdc_cell.mod[0]);
break;
case PAT_ENTITY_MEM:
- printk("PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n",
- pa_pdc_cell.mod[0], pa_pdc_cell.mod[1],
- pa_pdc_cell.mod[2]);
+ printk(KERN_DEBUG
+ "PAT_ENTITY_MEM: amount 0x%lx min_gni_base 0x%lx min_gni_len 0x%lx\n",
+ pa_pdc_cell.mod[0], pa_pdc_cell.mod[1],
+ pa_pdc_cell.mod[2]);
break;
case PAT_ENTITY_CA:
- printk("PAT_ENTITY_CA: %ld\n", pcell_loc);
+ printk(KERN_DEBUG "PAT_ENTITY_CA: %ld\n", pcell_loc);
break;
case PAT_ENTITY_PBC:
- printk("PAT_ENTITY_PBC: ");
+ printk(KERN_DEBUG "PAT_ENTITY_PBC: ");
goto print_ranges;
case PAT_ENTITY_SBA:
- printk("PAT_ENTITY_SBA: ");
+ printk(KERN_DEBUG "PAT_ENTITY_SBA: ");
goto print_ranges;
case PAT_ENTITY_LBA:
- printk("PAT_ENTITY_LBA: ");
+ printk(KERN_DEBUG "PAT_ENTITY_LBA: ");
print_ranges:
- printk("ranges %ld\n", pa_pdc_cell.mod[1]);
+ printk(KERN_DEBUG "ranges %ld\n", pa_pdc_cell.mod[1]);
for (i = 0; i < pa_pdc_cell.mod[1]; i++) {
- printk(" %ld: 0x%016lx 0x%016lx 0x%016lx\n", i, pa_pdc_cell.mod[2 + i * 3], /* type */
- pa_pdc_cell.mod[3 + i * 3], /* start */
- pa_pdc_cell.mod[4 + i * 3]); /* finish (ie end) */
+ printk(KERN_DEBUG
+ " %ld: 0x%016lx 0x%016lx 0x%016lx\n",
+ i, pa_pdc_cell.mod[2 + i * 3], /* type */
+ pa_pdc_cell.mod[3 + i * 3], /* start */
+ pa_pdc_cell.mod[4 + i * 3]); /* finish (ie end) */
}
- printk("\n");
+ printk(KERN_DEBUG "\n");
break;
}
#endif /* DEBUG_PAT */
@@ -271,7 +272,9 @@
* case, just use the PAGE0 info.
*/
- printk("\n\n\nWARNING! Could not get full memory configuration. All memory may not be used!\n\n\n");
+ printk("\n\n\n");
+ printk(KERN_WARNING "WARNING! Could not get full memory configuration. "
+ "All memory may not be used!\n\n\n");
do_pagezero_memconfig();
return;
}
@@ -279,8 +282,8 @@
entries = actual_len / sizeof(struct pdc_pat_pd_addr_map_entry);
if (entries > PAT_MAX_RANGES) {
- printk("This Machine has more memory ranges than we support!\n");
- printk("Some memory may not be used!\n");
+ printk(KERN_WARNING "This Machine has more memory ranges than we support!\n");
+ printk(KERN_WARNING "Some memory may not be used!\n");
}
/* Copy information into the firmware independent pmem_ranges
@@ -303,8 +306,8 @@
}
if (npmem_ranges == MAX_PHYSMEM_RANGES) {
- printk("This Machine has more memory ranges than we support!\n");
- printk("Some memory will not be used!\n");
+ printk(KERN_WARNING "This Machine has more memory ranges than we support!\n");
+ printk(KERN_WARNING "Some memory will not be used!\n");
break;
}
@@ -329,7 +332,7 @@
}
#ifdef DEBUG_PAT
- printk("CELL_GET_NUMBER: 0x%lx 0x%lx\n", cell_info.cell_num,
+ printk(KERN_DEBUG "CELL_GET_NUMBER: 0x%lx 0x%lx\n", cell_info.cell_num,
cell_info.cell_loc);
#endif
@@ -368,8 +371,8 @@
}
if (r_addr.entries_total > MAX_PHYSMEM_RANGES) {
- printk("This Machine has more memory ranges than we support!\n");
- printk("Some memory will not be used!\n");
+ printk(KERN_WARNING "This Machine has more memory ranges than we support!\n");
+ printk(KERN_WARNING "Some memory will not be used!\n");
}
entries = (int)r_addr.entries_returned;
@@ -464,7 +467,8 @@
** In any case, this is where the hook is.
*/
if (r_addr.hpa == 0xf8000000 && check_if_715old()) {
- printk("Using Alex's odd 715/old exception, onboard graphics won't be inventoried!\n");
+ printk(KERN_WARNING "Using Alex's odd 715/old exception, "
+ "onboard graphics won't be inventoried!\n");
continue;
}
@@ -516,7 +520,7 @@
break; /* 31 */
case HPHW_OTHER: /* 42 */
default:
- printk("Don't know this hw_type: %d\n", hw_type);
+ printk(KERN_WARNING "Don't know this hw_type: %d\n", hw_type);
break;
} /* switch() */
@@ -649,8 +653,9 @@
add_pa_dev_addr(hp_device, (unsigned long)
addr_result.mod_addr);
} else {
- printk("Bad PDC_FIND_ADDRESS status return (%ld) for index %d\n",
- status, j);
+ printk(KERN_WARNING
+ "Bad PDC_FIND_ADDRESS status return (%ld) for index %d\n",
+ status, j);
status = PDC_RET_OK; /* reset status for outer loop */
}
}
@@ -682,8 +687,8 @@
}
if (npmem_ranges == 0 || pmem_ranges[0].start_pfn != 0) {
- printk("Bad memory configuration returned!\n");
- printk("Some memory may not be used!\n");
+ printk(KERN_WARNING "Bad memory configuration returned!\n");
+ printk(KERN_WARNING "Some memory may not be used!\n");
do_pagezero_memconfig();
}
}
@@ -692,7 +697,7 @@
{
int num;
- printk("Searching for devices...\n");
+ printk(KERN_INFO "Searching for devices...\n");
switch (pdc_type) {
Index: arch/parisc/kernel/ioctl32.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ioctl32.c,v
retrieving revision 1.5
diff -u -r1.5 ioctl32.c
--- ioctl32.c 2001/07/06 03:44:50 1.5
+++ ioctl32.c 2001/07/14 21:13:34
@@ -128,8 +128,9 @@
{
int err = sys_ioctl(fd, cmd, arg);
if ((unsigned) err > -4095)
- printk("ioctl(%d, 0x%x, %p) -- SIOCDEVPRIVATE-based ioctls aren't really\n"
- "supported, though some will work by accident.\n",
+ printk(KERN_WARNING
+ "ioctl(%d, 0x%x, %p) -- SIOCDEVPRIVATE-based ioctls aren't really\n"
+ "supported, though some will work by accident.\n",
fd, cmd, (void *)arg);
return err;
}
@@ -640,9 +641,10 @@
do {
static int count = 0;
if (++count <= 20)
- printk("%s: Unknown fb ioctl cmd fd(%d) "
- "cmd(%08x) arg(%08lx)\n",
- __FUNCTION__, fd, cmd, arg);
+ printk(KERN_WARNING
+ "%s: Unknown fb ioctl cmd fd(%d) "
+ "cmd(%08x) arg(%08lx)\n",
+ __FUNCTION__, fd, cmd, arg);
} while(0);
return -ENOSYS;
}
@@ -1066,9 +1068,10 @@
do {
static int count = 0;
if (++count <= 20)
- printk("ppp_ioctl: Unknown cmd fd(%d) "
- "cmd(%08x) arg(%08x)\n",
- (int)fd, (unsigned int)cmd, (unsigned int)arg);
+ printk(KERN_WARNING
+ "ppp_ioctl: Unknown cmd fd(%d) "
+ "cmd(%08x) arg(%08x)\n",
+ (int)fd, (unsigned int)cmd, (unsigned int)arg);
} while(0);
return -EINVAL;
}
@@ -1176,9 +1179,10 @@
do {
static int count = 0;
if (++count <= 20)
- printk("mt_ioctl: Unknown cmd fd(%d) "
- "cmd(%08x) arg(%08x)\n",
- (int)fd, (unsigned int)cmd, (unsigned int)arg);
+ printk(KERN_WARNING
+ "mt_ioctl: Unknown cmd fd(%d) "
+ "cmd(%08x) arg(%08x)\n",
+ (int)fd, (unsigned int)cmd, (unsigned int)arg);
} while(0);
return -EINVAL;
}
@@ -1294,9 +1298,10 @@
do {
static int count = 0;
if (++count <= 20)
- printk("cdrom_ioctl: Unknown cmd fd(%d) "
- "cmd(%08x) arg(%08x)\n",
- (int)fd, (unsigned int)cmd, (unsigned int)arg);
+ printk(KERN_WARNING
+ "cdrom_ioctl: Unknown cmd fd(%d) "
+ "cmd(%08x) arg(%08x)\n",
+ (int)fd, (unsigned int)cmd, (unsigned int)arg);
} while(0);
return -EINVAL;
}
@@ -1381,9 +1386,10 @@
default: {
static int count = 0;
if (++count <= 20)
- printk("%s: Unknown loop ioctl cmd, fd(%d) "
- "cmd(%08x) arg(%08lx)\n",
- __FUNCTION__, fd, cmd, arg);
+ printk(KERN_WARNING
+ "%s: Unknown loop ioctl cmd, fd(%d) "
+ "cmd(%08x) arg(%08lx)\n",
+ __FUNCTION__, fd, cmd, arg);
}
}
return err;
@@ -3591,9 +3597,10 @@
} else {
static int count = 0;
if (++count <= 20)
- printk("sys32_ioctl: Unknown cmd fd(%d) "
- "cmd(%08x) arg(%08x)\n",
- (int)fd, (unsigned int)cmd, (unsigned int)arg);
+ printk(KERN_WARNING
+ "sys32_ioctl: Unknown cmd fd(%d) "
+ "cmd(%08x) arg(%08x)\n",
+ (int)fd, (unsigned int)cmd, (unsigned int)arg);
error = -EINVAL;
}
out:
Index: arch/parisc/kernel/iosapic.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/iosapic.c,v
retrieving revision 1.26
diff -u -r1.26 iosapic.c
--- iosapic.c 2001/07/08 12:41:52 1.26
+++ iosapic.c 2001/07/14 21:13:35
@@ -338,9 +338,9 @@
if (is_pdc_pat()) {
/* Use pat pdc routine to get interrupt routing table size */
- DBG(KERN_DEBUG "calling get_irt_size\n");
+ DBG("calling get_irt_size\n");
status = pdc_pat_get_irt_size(&num_entries, cell_num);
- DBG(KERN_DEBUG "get_irt_size: %ld\n", status);
+ DBG("get_irt_size: %ld\n", status);
ASSERT(status == PDC_RET_OK);
@@ -361,7 +361,7 @@
/* get PCI INT routing table */
status = pdc_pat_get_irt( (void *) table, cell_num);
- DBG(KERN_DEBUG "pdc_pat_get_irt: %ld\n", status);
+ DBG("pdc_pat_get_irt: %ld\n", status);
ASSERT(status == PDC_RET_OK);
goto got_irt;
@@ -378,7 +378,7 @@
status = pdc_pci_irt_size(&num_entries,
/* elroy HPA (really a NOP) */ 0);
- DBG(KERN_WARNING "pdc_pci_irt_size: %ld\n", status);
+ DBG("pdc_pci_irt_size: %ld\n", status);
if (PDC_RET_OK != status) {
/* Not a "legacy" system with I/O SAPIC either */
@@ -409,15 +409,15 @@
struct irt_entry *p = table;
int i;
- printk(MODULE_NAME " Interrupt Routing Table (cell %ld)\n", cell_num);
- printk(MODULE_NAME " start = 0x%p num_entries %ld entry_size %d\n",
+ printk(KERN_DEBUG MODULE_NAME " Interrupt Routing Table (cell %ld)\n", cell_num);
+ printk(KERN_DEBUG MODULE_NAME " start = 0x%p num_entries %ld entry_size %d\n",
table,
num_entries,
(int) sizeof(struct irt_entry));
for (i = 0 ; i < num_entries ; i++, p++)
{
- printk(MODULE_NAME " %02x %02x %02x %02x %02x %02x %02x %02x %08x%08x\n",
+ printk(KERN_DEBUG MODULE_NAME " %02x %02x %02x %02x %02x %02x %02x %02x %08x%08x\n",
p->entry_type, p->entry_length, p->interrupt_type,
p->polarity_trigger, p->src_bus_irq_devno, p->src_bus_id,
p->src_seg_id, p->dest_iosapic_intin,
@@ -535,7 +535,8 @@
(void) pci_read_config_byte(pcidev, PCI_INTERRUPT_PIN, &intr_pin);
- DBG_IRT("iosapic_xlate_pin() SLOT %d pin %d\n", PCI_SLOT(pcidev->devfn), intr_pin);
+ DBG_IRT("iosapic_xlate_pin() SLOT %d pin %d\n",
+ PCI_SLOT(pcidev->devfn), intr_pin);
if (0 == intr_pin)
{
@@ -608,8 +609,8 @@
extern void do_irq(struct irqaction *a, int i, struct pt_regs *p);
int irq_num = vi->vi_ios->isi_region->data.irqbase + vi->vi_irqline;
- DBG("iosapic_interrupt(): irq %d line %d eoi %p\n", irq, vi->vi_irqline,
- vi->vi_eoi_addr);
+ DBG("iosapic_interrupt(): irq %d line %d eoi %p\n",
+ irq, vi->vi_irqline, vi->vi_eoi_addr);
/* FIXME: Need to mask/unmask? processor IRQ is already masked... */
do_irq(&vi->vi_ios->isi_region->action[vi->vi_irqline], irq_num, regs);
@@ -727,7 +728,8 @@
#endif
pcidev->irq = return_irq;
- DBG_IRT("iosapic_fixup_irq() %d:%d %x %x line %d irq %d\n", PCI_SLOT(pcidev->devfn),
+ DBG_IRT("iosapic_fixup_irq() %d:%d %x %x line %d irq %d\n",
+ PCI_SLOT(pcidev->devfn),
PCI_FUNC(pcidev->devfn), pcidev->vendor, pcidev->device, isi_line, return_irq);
return(return_irq);
Index: arch/parisc/kernel/irq.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/irq.c,v
retrieving revision 1.43
diff -u -r1.43 irq.c
--- irq.c 2001/07/14 10:01:39 1.43
+++ irq.c 2001/07/14 21:13:36
@@ -394,7 +394,7 @@
#ifdef DEBUG_IRQ
if (mask != (1L << MAX_CPU_IRQ))
- printk("do_irq_mask %08lx %p %p\n", mask, region, regs);
+ printk(KERN_DEBUG "do_irq_mask %08lx %p %p\n", mask, region, regs);
#endif
for(bit=(1L<<MAX_CPU_IRQ), irq = 0; mask && bit; bit>>=1, irq++) {
@@ -420,7 +420,7 @@
#ifdef DEBUG_IRQ
if (mask != (1L << MAX_CPU_IRQ))
- printk("do_irq_mask %08lx %p %p\n", mask, region, regs);
+ printk(KERN_DEBUG "do_irq_mask %08lx %p %p\n", mask, region, regs);
#endif
for(bit=(1L<<MAX_CPU_IRQ), irq = 0; mask && bit; bit>>=1, irq++) {
Index: arch/parisc/kernel/lba_pci.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/lba_pci.c,v
retrieving revision 1.28
diff -u -r1.28 lba_pci.c
--- lba_pci.c 2001/07/09 02:33:55 1.28
+++ lba_pci.c 2001/07/14 21:13:37
@@ -295,9 +295,9 @@
if (NULL == r)
return;
- printk("(%p)", r->parent);
+ printk(KERN_DEBUG "(%p)", r->parent);
for (i = d; i ; --i) printk(" ");
- printk("%p [%lx,%lx]/%x\n", r, r->start, r->end, (int) r->flags);
+ printk(KERN_DEBUG "%p [%lx,%lx]/%x\n", r, r->start, r->end, (int) r->flags);
lba_dump_res(r->child, d+2);
lba_dump_res(r->sibling, d);
}
@@ -550,13 +550,13 @@
/* original - Generate config cycle on broken elroy \
with risk we will miss PCI bus errors. */ \
*data = (u##size) lba_rd_cfg(d, tok, pos, sizeof(u##size)); \
- DBG_CFG(KERN_DEBUG "%s(%s+%2x) -> 0x%x (a)\n", __FUNCTION__, dev->slot_name, pos, *data); \
+ DBG_CFG("%s(%s+%2x) -> 0x%x (a)\n", __FUNCTION__, dev->slot_name, pos, *data); \
return(*data == (u##size) -1); \
} \
\
if (LBA_SKIP_PROBE(d) && (!lba_device_present(dev->bus->secondary, dev->devfn, d))) \
{ \
- DBG_CFG(KERN_DEBUG "%s(%s+%2x) -> -1 (b)\n", __FUNCTION__, dev->slot_name, pos, *data); \
+ DBG_CFG("%s(%s+%2x) -> -1 (b)\n", __FUNCTION__, dev->slot_name, pos, *data); \
/* either don't want to look or know device isn't present. */ \
*data = (u##size) -1; \
return(0); \
@@ -568,7 +568,7 @@
*/ \
LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); \
*data = READ_REG##size(d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & mask));\
- DBG_CFG(KERN_DEBUG "%s(%s+%2x) -> 0x%x (c)\n", __FUNCTION__, dev->slot_name, pos, *data);\
+ DBG_CFG("%s(%s+%2x) -> 0x%x (c)\n", __FUNCTION__, dev->slot_name, pos, *data);\
return(*data == (u##size) -1); \
}
@@ -634,16 +634,16 @@
if ((!LBA_TR4PLUS(d)) && (!LBA_SKIP_PROBE(d))) { \
/* Original Workaround */ \
lba_wr_cfg(d, tok, pos, (u32) data, sizeof(u##size)); \
- DBG_CFG(KERN_DEBUG "%s(%s+%2x) = 0x%x (a)\n", __FUNCTION__, dev->slot_name, pos, data); \
+ DBG_CFG("%s(%s+%2x) = 0x%x (a)\n", __FUNCTION__, dev->slot_name, pos, data); \
return 0; \
} \
\
if (LBA_SKIP_PROBE(d) && (!lba_device_present(dev->bus->secondary, dev->devfn, d))) { \
- DBG_CFG(KERN_DEBUG "%s(%s+%2x) = 0x%x (b)\n", __FUNCTION__, dev->slot_name, pos, data); \
+ DBG_CFG("%s(%s+%2x) = 0x%x (b)\n", __FUNCTION__, dev->slot_name, pos, data); \
return 1; /* New Workaround */ \
} \
\
- DBG_CFG(KERN_DEBUG "%s(%s+%2x) = 0x%x (c)\n", __FUNCTION__, dev->slot_name, pos, data); \
+ DBG_CFG("%s(%s+%2x) = 0x%x (c)\n", __FUNCTION__, dev->slot_name, pos, data); \
/* Basic Algorithm */ \
LBA_CFG_TR4_ADDR_SETUP(d, tok | pos); \
WRITE_REG##size(data, d->hba.base_addr + LBA_PCI_CFG_DATA + (pos & mask)); \
@@ -667,7 +667,7 @@
static void
lba_bios_init(void)
{
- DBG(KERN_DEBUG MODULE_NAME ": lba_bios_init\n");
+ DBG(MODULE_NAME ": lba_bios_init\n");
}
@@ -734,7 +734,7 @@
int i;
#endif
DBG("lba_fixup_bus(0x%p) bus %d sysdata 0x%p\n",
- bus, bus->secondary, bus->sysdata);
+ bus, bus->secondary, bus->sysdata);
/*
** Properly Setup MMIO resources for this bus.
@@ -909,7 +909,7 @@
{ \
u##size t; \
ASSERT(bus != NULL); \
- DBG_PORT(KERN_DEBUG "%s(0x%p, 0x%x) ->", __FUNCTION__, bus, addr); \
+ DBG_PORT("%s(0x%p, 0x%x) ->", __FUNCTION__, bus, addr); \
t = READ_REG##size(LBA_ASTRO_PORT_BASE + addr); \
DBG_PORT(" 0x%x\n", t); \
return (t); \
@@ -951,7 +951,7 @@
static void lba_astro_out##size (struct pci_hba_data *d, u16 addr, u##size val) \
{ \
ASSERT(bus != NULL); \
- DBG_PORT(KERN_DEBUG "%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, d, addr, val); \
+ DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, d, addr, val); \
WRITE_REG##size(val, LBA_ASTRO_PORT_BASE + addr); \
if (LBA_DEV(d)->hw_rev < 3) \
lba_t32 = READ_U32(d->base_addr + LBA_FUNC_ID); \
@@ -990,7 +990,7 @@
{ \
u##size t; \
ASSERT(bus != NULL); \
- DBG_PORT(KERN_DEBUG "%s(0x%p, 0x%x) ->", __FUNCTION__, l, addr); \
+ DBG_PORT("%s(0x%p, 0x%x) ->", __FUNCTION__, l, addr); \
t = READ_REG##size(PIOP_TO_GMMIO(LBA_DEV(l), addr)); \
DBG_PORT(" 0x%x\n", t); \
return (t); \
@@ -1007,7 +1007,7 @@
{ \
void *where = (void *) PIOP_TO_GMMIO(LBA_DEV(l), addr); \
ASSERT(bus != NULL); \
- DBG_PORT(KERN_DEBUG "%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, l, addr, val); \
+ DBG_PORT("%s(0x%p, 0x%x, 0x%x)\n", __FUNCTION__, l, addr, val); \
WRITE_REG##size(val, where); \
/* flush the I/O down to the elroy at least */ \
lba_t32 = READ_U32(l->base_addr + LBA_FUNC_ID); \
@@ -1231,19 +1231,17 @@
#endif
#ifdef DEBUG_LBA_PAT
-printk("LBA %p STAT_CTL %Lx ERROR_CFG %Lx STATUS %Lx DMA_CTL %Lx\n",
- d->hba.base_addr,
- READ_REG64(d->hba.base_addr + LBA_STAT_CTL),
- READ_REG64(d->hba.base_addr + LBA_ERROR_CONFIG),
- READ_REG64(d->hba.base_addr + LBA_ERROR_STATUS),
- READ_REG64(d->hba.base_addr + LBA_DMA_CTL)
- );
-printk(" ARB mask %Lx pri %Lx mode %Lx mtlt %Lx\n",
- READ_REG64(d->hba.base_addr + LBA_ARB_MASK),
- READ_REG64(d->hba.base_addr + LBA_ARB_PRI),
- READ_REG64(d->hba.base_addr + LBA_ARB_MODE),
- READ_REG64(d->hba.base_addr + LBA_ARB_MTLT)
- );
+ printk(KERN_DEBUG "LBA %p STAT_CTL %Lx ERROR_CFG %Lx STATUS %Lx DMA_CTL %Lx\n",
+ d->hba.base_addr,
+ READ_REG64(d->hba.base_addr + LBA_STAT_CTL),
+ READ_REG64(d->hba.base_addr + LBA_ERROR_CONFIG),
+ READ_REG64(d->hba.base_addr + LBA_ERROR_STATUS),
+ READ_REG64(d->hba.base_addr + LBA_DMA_CTL) );
+ printk(KERN_DEBUG " ARB mask %Lx pri %Lx mode %Lx mtlt %Lx\n",
+ READ_REG64(d->hba.base_addr + LBA_ARB_MASK),
+ READ_REG64(d->hba.base_addr + LBA_ARB_PRI),
+ READ_REG64(d->hba.base_addr + LBA_ARB_MODE),
+ READ_REG64(d->hba.base_addr + LBA_ARB_MTLT) );
#endif /* DEBUG_LBA_PAT */
#ifdef __LP64__
@@ -1344,7 +1342,8 @@
default: dri->version = "TR4+";
}
- printk("%s version %s (0x%x) found at 0x%p\n", dri->name, dri->version, func_class & 0xf, d->hpa);
+ printk(KERN_INFO "%s version %s (0x%x) found at 0x%p\n",
+ dri->name, dri->version, func_class & 0xf, d->hpa);
/* Just in case we find some prototypes... */
if (func_class < 2) {
@@ -1372,7 +1371,7 @@
lba_dev = kmalloc(sizeof(struct lba_device), GFP_KERNEL);
if (NULL == lba_dev)
{
- printk("lba_init_chip - couldn't alloc lba_device\n");
+ printk(KERN_ERR "lba_init_chip - couldn't alloc lba_device\n");
return(1);
}
@@ -1471,13 +1470,13 @@
** IS_ASTRO: just assume only one SBA for now.
*/
ASSERT(NULL != hba_list);
- DBG(KERN_DEBUG "%s() ibase 0x%x imask 0x%x\n", __FUNCTION__, ibase, imask);
+ DBG("%s() ibase 0x%x imask 0x%x\n", __FUNCTION__, ibase, imask);
for (lba = hba_list; NULL != lba; lba = lba->next) {
- DBG(KERN_DEBUG "%s() base_addr %p\n", __FUNCTION__, lba->base_addr);
+ DBG("%s() base_addr %p\n", __FUNCTION__, lba->base_addr);
WRITE_REG32( imask, lba->base_addr + LBA_IMASK);
WRITE_REG32( ibase, lba->base_addr + LBA_IBASE);
}
- DBG(KERN_DEBUG "%s() done\n", __FUNCTION__);
+ DBG("%s() done\n", __FUNCTION__);
}
Index: arch/parisc/kernel/pci.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/pci.c,v
retrieving revision 1.21
diff -u -r1.21 pci.c
--- pci.c 2001/05/16 21:00:13 1.21
+++ pci.c 2001/07/14 21:13:38
@@ -279,7 +279,7 @@
/*
** HP generally has fewer devices on the bus than other architectures.
*/
- printk("PCIBIOS: Setting latency timer of %s to 128\n", dev->slot_name);
+ printk(KERN_INFO "PCIBIOS: Setting latency timer of %s to 128\n", dev->slot_name);
pci_write_config_byte(dev, PCI_LATENCY_TIMER, 0x80);
}
@@ -422,7 +422,7 @@
cmd |= (PCI_COMMAND_SERR | PCI_COMMAND_PARITY);
if (cmd != old_cmd) {
- printk("PCIBIOS: Enabling device %s (%04x -> %04x)\n",
+ printk(KERN_INFO "PCIBIOS: Enabling device %s (%04x -> %04x)\n",
dev->slot_name, old_cmd, cmd);
pci_write_config_word(dev, PCI_COMMAND, cmd);
}
Index: arch/parisc/kernel/ptrace.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/ptrace.c,v
retrieving revision 1.11
diff -u -r1.11 ptrace.c
--- ptrace.c 2001/02/15 17:50:25 1.11
+++ ptrace.c 2001/07/14 21:13:38
@@ -34,6 +34,14 @@
/* PSW bits we allow the debugger to modify */
#define USER_PSW_BITS (PSW_N | PSW_V | PSW_CB)
+#undef DEBUG_PTRACE
+
+#ifdef DEBUG_PTRACE
+#define DBG(x) printk x
+#else
+#define DBG(x)
+#endif
+
#ifdef __LP64__
#define CHILD_IS_32BIT (child->personality == PER_LINUX_32BIT)
@@ -70,7 +78,7 @@
struct task_struct *child;
long ret;
#ifdef DEBUG_PTRACE
-long oaddr=addr, odata=data;
+ long oaddr=addr, odata=data;
#endif
lock_kernel();
@@ -98,9 +106,7 @@
goto out_tsk;
if (request == PTRACE_ATTACH) {
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(ATTACH)\n");
-#endif
+ DBG(("sys_ptrace(ATTACH)\n"));
if (child == current)
goto out_tsk;
if ((!child->dumpable ||
@@ -154,9 +160,9 @@
if (copied != sizeof(tmp))
goto out_tsk;
ret = put_user(tmp,(unsigned int *) data);
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(PEEK%s, %d, %lx, %lx) returning %ld, data %x\n", request == PTRACE_PEEKTEXT ? "TEXT" : "DATA" , pid, oaddr, odata, ret, tmp);
-#endif
+ DBG(("sys_ptrace(PEEK%s, %d, %lx, %lx) returning %ld, data %x\n",
+ request == PTRACE_PEEKTEXT ? "TEXT" : "DATA",
+ pid, oaddr, odata, ret, tmp));
}
else
#endif
@@ -179,10 +185,9 @@
#ifdef __LP64__
if (CHILD_IS_32BIT) {
unsigned int tmp = (unsigned int)data;
-
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(POKE%s, %d, %lx, %lx)\n", request == PTRACE_POKETEXT ? "TEXT" : "DATA" , pid, oaddr, odata);
-#endif
+ DBG(("sys_ptrace(POKE%s, %d, %lx, %lx)\n",
+ request == PTRACE_POKETEXT ? "TEXT" : "DATA",
+ pid, oaddr, odata));
addr &= 0xffffffffL;
if (access_process_vm(child, addr, &tmp, sizeof(tmp), 1) == sizeof(tmp))
goto out_tsk;
@@ -211,9 +216,8 @@
tmp = *(unsigned int *) ((char *) task_regs(child) + addr);
ret = put_user(tmp, (unsigned int *) data);
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(PEEKUSR, %d, %lx, %lx) returning %ld, addr %lx, data %x\n", pid, oaddr, odata, ret, addr, tmp);
-#endif
+ DBG(("sys_ptrace(PEEKUSR, %d, %lx, %lx) returning %ld, addr %lx, data %x\n",
+ pid, oaddr, odata, ret, addr, tmp));
}
else
#endif
@@ -252,9 +256,8 @@
* BEWARE, if you set N, and then single step, it wont
* stop on the nullified instruction.
*/
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(POKEUSR, %d, %lx, %lx)\n", pid, oaddr, odata);
-#endif
+ DBG(("sys_ptrace(POKEUSR, %d, %lx, %lx)\n",
+ pid, oaddr, odata));
data &= USER_PSW_BITS;
task_regs(child)->gr[0] &= ~USER_PSW_BITS;
task_regs(child)->gr[0] |= data;
@@ -267,9 +270,8 @@
goto out_tsk;
if ((addr = translate_usr_offset(addr)) < 0)
goto out_tsk;
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(POKEUSR, %d, %lx, %lx) addr %lx\n", pid, oaddr, odata, addr);
-#endif
+ DBG(("sys_ptrace(POKEUSR, %d, %lx, %lx) addr %lx\n",
+ pid, oaddr, odata, addr));
if (addr >= PT_FR0 && addr <= PT_FR31) {
/* Special case, fp regs are 64 bits anyway */
*(unsigned int *) ((char *) task_regs(child) + addr) = data;
@@ -303,9 +305,8 @@
case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */
case PTRACE_CONT:
ret = -EIO;
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(%s)\n", request == PTRACE_SYSCALL ? "SYSCALL" : "CONT");
-#endif
+ DBG(("sys_ptrace(%s)\n",
+ request == PTRACE_SYSCALL ? "SYSCALL" : "CONT"));
if ((unsigned long) data > _NSIG)
goto out_tsk;
child->ptrace &= ~(PT_SINGLESTEP|PT_BLOCKSTEP);
@@ -322,18 +323,14 @@
* sigkill. perhaps it should be put in the status
* that it wants to exit.
*/
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(KILL)\n");
-#endif
+ DBG(("sys_ptrace(KILL)\n"));
if (child->state == TASK_ZOMBIE) /* already dead */
goto out_tsk;
child->exit_code = SIGKILL;
goto out_wake_notrap;
case PTRACE_SINGLEBLOCK:
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(SINGLEBLOCK)\n");
-#endif
+ DBG(("sys_ptrace(SINGLEBLOCK)\n"));
ret = -EIO;
if ((unsigned long) data > _NSIG)
goto out_tsk;
@@ -349,9 +346,7 @@
goto out_wake;
case PTRACE_SINGLESTEP:
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(SINGLESTEP)\n");
-#endif
+ DBG(("sys_ptrace(SINGLESTEP)\n"));
ret = -EIO;
if ((unsigned long) data > _NSIG)
goto out_tsk;
@@ -403,9 +398,7 @@
goto out_wake;
case PTRACE_DETACH:
-#ifdef DEBUG_PTRACE
-printk("sys_ptrace(DETACH)\n");
-#endif
+ DBG(("sys_ptrace(DETACH)\n"));
ret = -EIO;
if ((unsigned long) data > _NSIG)
goto out_tsk;
@@ -436,9 +429,8 @@
free_task_struct(child);
out:
unlock_kernel();
-#ifdef DEBUG_PTRACE
-if (ret) printk("sys_ptrace(%ld, %d, %lx, %lx) returning %ld\n", request, pid, oaddr, odata, ret);
-#endif
+ DBG(("sys_ptrace(%ld, %d, %lx, %lx) returning %ld\n",
+ request, pid, oaddr, odata, ret));
return ret;
}
Index: arch/parisc/kernel/sba_iommu.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/sba_iommu.c,v
retrieving revision 1.47
diff -u -r1.47 sba_iommu.c
--- sba_iommu.c 2001/07/09 02:33:55 1.47
+++ sba_iommu.c 2001/07/14 21:13:41
@@ -322,24 +322,24 @@
static void
sba_dump_ranges(char *hpa)
{
- printk("SBA at 0x%p\n", hpa);
- printk("IOS_DIST_BASE : %08x %08x\n",
+ printk(KERN_DEBUG "SBA at 0x%p\n", hpa);
+ printk(KERN_DEBUG "IOS_DIST_BASE : %08x %08x\n",
READ_REG32(hpa+IOS_DIST_BASE+4),
READ_REG32(hpa+IOS_DIST_BASE));
- printk("IOS_DIST_MASK : %08x %08x\n",
+ printk(KERN_DEBUG "IOS_DIST_MASK : %08x %08x\n",
READ_REG32(hpa+IOS_DIST_MASK+4),
READ_REG32(hpa+IOS_DIST_MASK));
- printk("IOS_DIST_ROUTE : %08x %08x\n",
+ printk(KERN_DEBUG "IOS_DIST_ROUTE : %08x %08x\n",
READ_REG32(hpa+IOS_DIST_ROUTE+4),
READ_REG32(hpa+IOS_DIST_ROUTE));
- printk("\n");
- printk("IOS_DIRECT_BASE : %08x %08x\n",
+ printk(KERN_DEBUG "\n");
+ printk(KERN_DEBUG "IOS_DIRECT_BASE : %08x %08x\n",
READ_REG32(hpa+IOS_DIRECT_BASE+4),
READ_REG32(hpa+IOS_DIRECT_BASE));
- printk("IOS_DIRECT_MASK : %08x %08x\n",
+ printk(KERN_DEBUG "IOS_DIRECT_MASK : %08x %08x\n",
READ_REG32(hpa+IOS_DIRECT_MASK+4),
READ_REG32(hpa+IOS_DIRECT_MASK));
- printk("IOS_DIRECT_ROUTE: %08x %08x\n",
+ printk(KERN_DEBUG "IOS_DIRECT_ROUTE: %08x %08x\n",
READ_REG32(hpa+IOS_DIRECT_ROUTE+4),
READ_REG32(hpa+IOS_DIRECT_ROUTE));
}
@@ -347,20 +347,20 @@
static void
sba_dump_tlb(char *hpa)
{
- printk("IO TLB at 0x%p\n", hpa);
- printk("IOC_IBASE : %08x %08x\n",
+ printk(KERN_DEBUG "IO TLB at 0x%p\n", hpa);
+ printk(KERN_DEBUG "IOC_IBASE : %08x %08x\n",
READ_REG32(hpa+IOC_IBASE+4),
READ_REG32(hpa+IOC_IBASE));
- printk("IOC_IMASK : %08x %08x\n",
+ printk(KERN_DEBUG "IOC_IMASK : %08x %08x\n",
READ_REG32(hpa+IOC_IMASK+4),
READ_REG32(hpa+IOC_IMASK));
- printk("IOC_TCNFG : %08x %08x\n",
+ printk(KERN_DEBUG "IOC_TCNFG : %08x %08x\n",
READ_REG32(hpa+IOC_TCNFG+4),
READ_REG32(hpa+IOC_TCNFG));
- printk("IOC_PDIR_BASE: %08x %08x\n",
+ printk(KERN_DEBUG "IOC_PDIR_BASE: %08x %08x\n",
READ_REG32(hpa+IOC_PDIR_BASE+4),
READ_REG32(hpa+IOC_PDIR_BASE));
- printk("\n");
+ printk(KERN_DEBUG "\n");
}
#endif
@@ -375,20 +375,20 @@
unsigned long *rptr = (unsigned long *) &(ioc->res_map[(pide >>3) & ~(sizeof(unsigned long) - 1)]);
uint rcnt;
- printk("SBA: %s rp %p bit %d rval 0x%lx\n",
+ printk(KERN_DEBUG "SBA: %s rp %p bit %d rval 0x%lx\n",
msg,
rptr, pide & (BITS_PER_LONG - 1), *rptr);
rcnt = 0;
while (rcnt < BITS_PER_LONG) {
- printk("%s %2d %p %016Lx\n",
+ printk(KERN_DEBUG "%s %2d %p %016Lx\n",
(rcnt == (pide & (BITS_PER_LONG - 1)))
? " -->" : " ",
rcnt, ptr, *ptr );
rcnt++;
ptr++;
}
- printk(msg);
+ printk(KERN_DEBUG "%s", msg);
}
@@ -433,7 +433,7 @@
sba_dump_sg( struct ioc *ioc, struct scatterlist *startsg, int nents)
{
while (nents-- > 0) {
- printk(" %d : %08lx/%05x %p/%05x\n",
+ printk(KERN_DEBUG " %d : %08lx/%05x %p/%05x\n",
nents,
(unsigned long) sg_dma_address(startsg),
sg_dma_len(startsg),
@@ -536,7 +536,7 @@
}
mask = RESMAP_MASK(bits_wanted) >> bitshiftcnt;
- DBG_RES("sba_search_bitmap() o %ld %p", o, res_ptr);
+ DBG_RES("%s() o %ld %p", __FUNCTION__, o, res_ptr);
while(res_ptr < res_end)
{
DBG_RES(" %p %lx %lx\n", res_ptr, mask, *res_ptr);
@@ -604,8 +604,8 @@
}
#endif
- DBG_RES("sba_alloc_range(%x) %d -> %lx hint %x/%x\n",
- size, pages_needed, pide,
+ DBG_RES("%s(%x) %d -> %lx hint %x/%x\n",
+ __FUNCTION__, size, pages_needed, pide,
(uint) ((unsigned long) ioc->res_hint - (unsigned long) ioc->res_map),
ioc->res_bitshift );
@@ -642,8 +642,8 @@
/* 3-bits "bit" address plus 2 (or 3) bits for "byte" == bit in word */
unsigned long m = RESMAP_MASK(bits_not_wanted) >> (pide & (BITS_PER_LONG - 1));
- DBG_RES("sba_free_range( ,%x,%x) %x/%lx %x %p %lx\n",
- (uint) iova, size,
+ DBG_RES("%s( ,%x,%x) %x/%lx %x %p %lx\n",
+ __FUNCTION__, (uint) iova, size,
bits_not_wanted, m, pide, res_ptr, *res_ptr);
#ifdef CONFIG_PROC_FS
@@ -785,7 +785,7 @@
sba_dma_supported( struct pci_dev *dev, dma_addr_t mask)
{
if (dev == NULL) {
- printk(MODULE_NAME ": EISA/ISA/et al not supported\n");
+ printk(KERN_ERR MODULE_NAME ": EISA/ISA/et al not supported\n");
BUG();
return(0);
}
@@ -830,7 +830,8 @@
pide = sba_alloc_range(ioc, size);
iovp = (dma_addr_t) pide << IOVP_SHIFT;
- DBG_RUN("sba_map_single() 0x%p -> 0x%lx", addr, (long) iovp | offset);
+ DBG_RUN("%s() 0x%p -> 0x%lx",
+ __FUNCTION__, addr, (long) iovp | offset);
pdir_start = &(ioc->pdir_base[pide]);
@@ -891,7 +892,8 @@
dma_addr_t offset;
offset = iova & ~IOVP_MASK;
- DBG_RUN("%s() iovp 0x%lx/%x\n", __FUNCTION__, (long) iova, size);
+ DBG_RUN("%s() iovp 0x%lx/%x\n",
+ __FUNCTION__, (long) iova, size);
iova ^= offset; /* clear offset bits */
size += offset;
@@ -996,7 +998,7 @@
#ifdef DEBUG_LARGE_SG_ENTRIES
if (dump_run_sg)
- printk(" %2d : %08lx/%05x %p/%05x\n",
+ printk(KERN_DEBUG " %2d : %08lx/%05x %p/%05x\n",
nents,
(unsigned long) sg_dma_address(startsg), cnt,
startsg->address, startsg->length
@@ -1418,8 +1420,8 @@
}
memset(pdir_base, 0, pdir_size);
- DBG_INIT("sba_ioc_init() pdir %p size %x hint_shift_pdir %x hint_mask_pdir %lx\n",
- pdir_base, pdir_size,
+ DBG_INIT("%s() pdir %p size %x hint_shift_pdir %x hint_mask_pdir %lx\n",
+ __FUNCTION__, pdir_base, pdir_size,
ioc->hint_shift_pdir, ioc->hint_mask_pdir);
ASSERT((((unsigned long) pdir_base) & PAGE_MASK) == (unsigned long) pdir_base);
@@ -1438,8 +1440,8 @@
ioc->ibase = IOC_IOVA_SPACE_BASE | 1; /* bit 0 == enable bit */
ioc->imask = iova_space_mask; /* save it */
- DBG_INIT("%s() IOV base 0x%lx mask 0x%0lx\n", __FUNCTION__,
- ioc->ibase, ioc->imask);
+ DBG_INIT("%s() IOV base 0x%lx mask 0x%0lx\n",
+ __FUNCTION__, ioc->ibase, ioc->imask);
/*
** FIXME: Hint registers are programmed with default hint
@@ -1491,7 +1493,8 @@
u32 ioc_ctl;
ioc_ctl = READ_REG32(sba_dev->sba_hpa+IOC_CTRL);
- DBG_INIT("%s() hpa 0x%p ioc_ctl 0x%x ->", __FUNCTION__, sba_dev->sba_hpa, ioc_ctl );
+ DBG_INIT("%s() hpa 0x%p ioc_ctl 0x%x ->",
+ __FUNCTION__, sba_dev->sba_hpa, ioc_ctl );
ioc_ctl &= ~(IOC_CTRL_RM | IOC_CTRL_NC);
ASSERT(ioc_ctl & IOC_CTRL_TE); /* astro: firmware enables this */
@@ -1558,7 +1561,8 @@
/* resource map size dictated by pdir_size */
res_size = sba_dev->ioc[i].pdir_size/sizeof(u64); /* entries */
res_size >>= 3; /* convert bit count to byte count */
- DBG_INIT("%s() res_size 0x%x\n", __FUNCTION__, res_size);
+ DBG_INIT("%s() res_size 0x%x\n",
+ __FUNCTION__, res_size);
sba_dev->ioc[i].res_size = res_size;
sba_dev->ioc[i].res_map = (char *) __get_free_pages(GFP_KERNEL, get_order(res_size));
@@ -1591,8 +1595,8 @@
set_data_memory_break, 0);
#endif
- DBG_INIT("sba_common_init() %d res_map %x %p\n",
- i, res_size, sba_dev->ioc[i].res_map);
+ DBG_INIT("%s() %d res_map %x %p\n",
+ __FUNCTION__, i, res_size, sba_dev->ioc[i].res_map);
}
sba_dev->sba_lock = SPIN_LOCK_UNLOCKED;
@@ -1708,12 +1712,13 @@
dri->version = ike_rev;
}
- printk("%s found %s at 0x%p\n", dri->name, dri->version, d->hpa);
+ printk(KERN_INFO "%s found %s at 0x%p\n",
+ dri->name, dri->version, d->hpa);
sba_dev = kmalloc(sizeof(struct sba_device), GFP_KERNEL);
if (NULL == sba_dev)
{
- printk(MODULE_NAME " - couldn't alloc sba_device\n");
+ printk(KERN_ERR MODULE_NAME " - couldn't alloc sba_device\n");
return(1);
}
memset(sba_dev, 0, sizeof(struct sba_device));
Index: arch/parisc/kernel/setup.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/setup.c,v
retrieving revision 1.85
diff -u -r1.85 setup.c
--- setup.c 2001/07/09 02:33:55 1.85
+++ setup.c 2001/07/14 21:13:42
@@ -76,9 +76,7 @@
{HPHW_NPROC, 0x0, 0x0, 0x0, 0, 0,
DRIVER_CHECK_HWTYPE,
"CPU", "PARISC", (void *) cpu_driver_callback},
- {0,0,0,0,0,0,
- 0,
- (char *) NULL, (char *) NULL, (void *) NULL }
+ {0,}
};
static long fallback_cpu_hpa[] = { 0xfffa0000L, 0xfffbe000L, 0x0 };
@@ -207,14 +205,14 @@
struct hp_device *d = NULL;
int i = 0;
- printk ("No CPUs reported by firmware - probing...\n");
+ printk(KERN_INFO "No CPUs reported by firmware - probing...\n");
while (fallback_cpu_hpa[i]) {
d = alloc_pa_dev(fallback_cpu_hpa[i]);
if (d && (HPHW_NPROC == d->hw_type)) {
- printk ("Found CPU at %lx\n", fallback_cpu_hpa[i]);
+ printk(KERN_INFO "Found CPU at %lx\n", fallback_cpu_hpa[i]);
(void) register_pa_dev(d);
return;
}
@@ -238,22 +236,26 @@
/* get CPU-Model Information... */
#define p ((unsigned long *)&boot_cpu_data.pdc.model)
if(pdc_model_info(&boot_cpu_data.pdc.model)==0)
- printk("model %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
+ printk(KERN_INFO
+ "model %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7], p[8]);
#undef p
if(pdc_model_versions(&boot_cpu_data.pdc.versions, 0)==0)
- printk("vers %08lx\n", boot_cpu_data.pdc.versions);
+ printk(KERN_INFO "vers\t%08lx\n",
+ boot_cpu_data.pdc.versions);
if(pdc_model_cpuid(&boot_cpu_data.pdc.cpuid)==0)
- printk("cpuid %08lx\n", boot_cpu_data.pdc.cpuid);
+ printk(KERN_INFO "cpuid\t%08lx\n",
+ boot_cpu_data.pdc.cpuid);
- printk("CPUID vers %ld rev %ld\n",
+ printk(KERN_INFO "CPUID\tvers %ld rev %ld\n",
(boot_cpu_data.pdc.cpuid >> 5) & 127,
boot_cpu_data.pdc.cpuid & 31);
if (pdc_model_sysmodel(boot_cpu_data.pdc.sys_model_name)==0)
- printk("model %s\n",boot_cpu_data.pdc.sys_model_name);
+ printk(KERN_INFO "model\t%s\n",
+ boot_cpu_data.pdc.sys_model_name);
boot_cpu_data.model_name = parisc_getHWdescription(HPHW_NPROC,
boot_cpu_data.pdc.model.hversion>>4,
@@ -329,10 +331,6 @@
extern unsigned int boot_args[];
/* Collect stuff passed in from the boot loader */
-#if 0
- printk(KERN_WARNING "%s(0x%x,0x%x,0x%x,0x%x)\n",
- __FUNCTION__, boot_args[0], boot_args[1], boot_args[2], boot_args[3]);
-#endif
/* boot_args[0] is free-mem start, boot_args[1] is ptr to command line */
if (boot_args[0] < 64) {
@@ -340,10 +338,6 @@
saved_command_line[0] = '\0';
} else {
strcpy(saved_command_line, (char *)__va(boot_args[1]));
-#if 0
- printk("PALO command line: '%s'\nPALO initrd %x-%x\n",
- saved_command_line, boot_args[2], boot_args[3]);
-#endif
#ifdef CONFIG_BLK_DEV_INITRD
if (boot_args[2] != 0) /* did palo pass us a ramdisk? */
@@ -366,11 +360,8 @@
* We've got way too many dependencies on 1.1 semantics
* to support 1.0 boxes at this point.
*/
- printk("PA-RISC Linux currently only supports machines that conform to\n");
- printk("the PA-RISC 1.1 or 2.0 architecture specification.\n");
- for (;;)
- ;
- break; /* not reached */
+ panic( "PA-RISC Linux currently only supports machines that conform to\n"
+ "the PA-RISC 1.1 or 2.0 architecture specification.\n");
case pcxs:
case pcxt:
@@ -390,18 +381,16 @@
{
init_per_cpu(smp_processor_id()); /* Set Modes & Enable FP */
- printk("The "
#ifdef __LP64__
- "64"
+ printk(KERN_INFO "The 64-bit Kernel has started...\n");
#else
- "32"
+ printk(KERN_INFO "The 32-bit Kernel has started...\n");
#endif
- "-bit Kernel has started...\n");
pdc_console_init();
#ifdef CONFIG_PDC_NARROW
- printk("Kernel is using PDC in 32-bit mode.\n");
+ printk(KERN_INFO "Kernel is using PDC in 32-bit mode.\n");
#endif
setup_pdc();
setup_cmdline(cmdline_p);
@@ -421,7 +410,7 @@
if (boot_cpu_data.cpu_count == 0)
register_fallback_cpu();
- printk("CPU(s): %d x %s at %d.%06d MHz\n",
+ printk(KERN_INFO "CPU(s): %d x %s at %d.%06d MHz\n",
boot_cpu_data.cpu_count,
boot_cpu_data.cpu_name,
boot_cpu_data.cpu_hz / 1000000,
Index: arch/parisc/kernel/signal.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/signal.c,v
retrieving revision 1.41
diff -u -r1.41 signal.c
--- signal.c 2001/07/06 01:51:29 1.41
+++ signal.c 2001/07/14 21:13:42
@@ -32,6 +32,12 @@
#define DEBUG_SIG 0
+#if DEBUG_SIG
+#define DBG(x) printk x
+#else
+#define DBG(x)
+#endif
+
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
int do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall);
@@ -145,10 +151,7 @@
err |= __copy_from_user(regs->iaoq, sc->sc_iaoq, sizeof(regs->iaoq));
err |= __copy_from_user(regs->iasq, sc->sc_iasq, sizeof(regs->iasq));
err |= __get_user(regs->sar, &sc->sc_sar);
-
-#if DEBUG_SIG
- printk("restore_sigcontext: r28 is %ld\n", regs->gr[28]);
-#endif
+ DBG(("restore_sigcontext: r28 is %ld\n", regs->gr[28]));
return err;
}
@@ -163,9 +166,7 @@
/* Unwind the user stack to get the rt_sigframe structure. */
frame = (struct rt_sigframe *)
(usp - PARISC_RT_SIGFRAME_SIZE);
-#if DEBUG_SIG
- printk("in sys_rt_sigreturn, frame is %p\n", frame);
-#endif
+ DBG(("in sys_rt_sigreturn, frame is %p\n", frame));
if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
goto give_sigsegv;
@@ -180,10 +181,7 @@
if (restore_sigcontext(&frame->uc.uc_mcontext, regs))
goto give_sigsegv;
-#if DEBUG_SIG
- printk("usp: %#08lx stack %p",
- usp, &frame->uc.uc_stack);
-#endif
+ DBG(("usp: %#08lx stack %p", usp, &frame->uc.uc_stack));
/* I don't know why everyone else assumes they can call this
with a pointer to a stack_t on the kernel stack. That
@@ -198,16 +196,14 @@
if (in_syscall)
regs->gr[31] = regs->iaoq[0];
#if DEBUG_SIG
- printk("returning to %#lx\n", regs->iaoq[0]);
- printk("in sys_rt_sigreturn:\n");
+ DBG(("returning to %#lx\n", regs->iaoq[0]));
+ DBG(("in sys_rt_sigreturn:\n"));
show_regs(regs);
#endif
return;
give_sigsegv:
-#if DEBUG_SIG
- printk("sys_rt_sigreturn sending SIGSEGV\n");
-#endif
+ DBG(("sys_rt_sigreturn sending SIGSEGV\n"));
si.si_signo = SIGSEGV;
si.si_errno = 0;
si.si_code = SI_KERNEL;
@@ -247,24 +243,20 @@
err |= __put_user(regs->gr[31]+4, &sc->sc_iaoq[1]);
err |= __put_user(regs->sr[3], &sc->sc_iasq[0]);
err |= __put_user(regs->sr[3], &sc->sc_iasq[1]);
-#if DEBUG_SIG
- printk("setup_sigcontext: iaoq %#lx/%#lx\n", regs->gr[31], regs->gr[31]);
-#endif
+ DBG(("setup_sigcontext: iaoq %#lx/%#lx\n",
+ regs->gr[31], regs->gr[31]));
} else {
err |= __copy_to_user(sc->sc_iaoq, regs->iaoq, sizeof(regs->iaoq));
err |= __copy_to_user(sc->sc_iasq, regs->iasq, sizeof(regs->iasq));
-#if DEBUG_SIG
- printk("setup_sigcontext: iaoq %#lx/%#lx\n", regs->iaoq[0], regs->iaoq[1]);
-#endif
+ DBG(("setup_sigcontext: iaoq %#lx/%#lx\n",
+ regs->iaoq[0], regs->iaoq[1]));
}
err |= __put_user(flags, &sc->sc_flags);
err |= __copy_to_user(sc->sc_gr, regs->gr, sizeof(regs->gr));
err |= __copy_to_user(sc->sc_fr, regs->fr, sizeof(regs->fr));
err |= __put_user(regs->sar, &sc->sc_sar);
-#if DEBUG_SIG
- printk("setup_sigcontext: r28 is %ld\n", regs->gr[28]);
-#endif
+ DBG(("setup_sigcontext: r28 is %ld\n", regs->gr[28]));
return err;
}
@@ -281,9 +273,7 @@
usp = regs->gr[30];
frame = get_sigframe(ka, usp, sizeof(*frame));
-#if DEBUG_SIG
- printk("setup_rt_frame 1: frame %p info %p\n", frame, info);
-#endif
+ DBG(("setup_rt_frame 1: frame %p info %p\n", frame, info));
err |= __copy_to_user(&frame->info, info, sizeof(siginfo_t));
err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
@@ -308,8 +298,8 @@
{
int sid;
asm ("mfsp %%sr3,%0" : "=r" (sid));
- printk("flushing 64 bytes at space %#x offset %p\n",
- sid, frame->tramp);
+ DBG(("flushing 64 bytes at space %#x offset %p\n",
+ sid, frame->tramp));
}
#endif
@@ -367,25 +357,20 @@
regs->gr[26] = sig; /* signal number */
regs->gr[25] = (HACK) &frame->info; /* siginfo pointer */
regs->gr[24] = (HACK) &frame->uc; /* ucontext pointer */
-#if DEBUG_SIG
- printk("making sigreturn frame: %#lx + %#lx = %#lx\n",
+ DBG(("making sigreturn frame: %#lx + %#x = %#lx\n",
regs->gr[30], PARISC_RT_SIGFRAME_SIZE,
- regs->gr[30] + PARISC_RT_SIGFRAME_SIZE);
-#endif
+ regs->gr[30] + PARISC_RT_SIGFRAME_SIZE));
/* Raise the user stack pointer to make a proper call frame. */
regs->gr[30] = ((HACK) frame + PARISC_RT_SIGFRAME_SIZE);
-#if DEBUG_SIG
- printk("SIG deliver (%s:%d): frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n",
+ DBG(("SIG deliver (%s:%d): frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n",
current->comm, current->pid, frame, regs->gr[30],
- regs->iaoq[0], regs->iaoq[1], rp);
-#endif
+ regs->iaoq[0], regs->iaoq[1], rp));
+
return 1;
give_sigsegv:
-#if DEBUG_SIG
- printk("setup_rt_frame sending SIGSEGV\n");
-#endif
+ DBG(("setup_rt_frame sending SIGSEGV\n"));
if (sig == SIGSEGV)
ka->sa.sa_handler = SIG_DFL;
si.si_signo = SIGSEGV;
@@ -407,10 +392,9 @@
siginfo_t *info, sigset_t *oldset,
struct pt_regs *regs, int in_syscall)
{
-#if DEBUG_SIG
- printk("handle_signal(sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p)\n",
- sig, ka, info, oldset, regs);
-#endif
+ DBG(("handle_signal(sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p)\n",
+ sig, ka, info, oldset, regs));
+
/* Set up the stack frame */
if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall))
return 0;
@@ -446,10 +430,9 @@
siginfo_t info;
struct k_sigaction *ka;
-#if DEBUG_SIG
- printk("do_signal(oldset=0x%p, regs=0x%p, sr7 %#lx, pending %d, in_syscall=%d\n",
- oldset, regs, regs->sr[7], current->sigpending, in_syscall);
-#endif
+ DBG(("do_signal(oldset=0x%p, regs=0x%p, sr7 %#lx, pending %d, in_syscall=%d\n",
+ oldset, regs, regs->sr[7], current->sigpending, in_syscall));
+
/* Everyone else checks to see if they are in kernel mode at
this point and exits if that's the case. I'm not sure why
we would be called in that case, but for some reason we
@@ -458,9 +441,8 @@
if (!oldset)
oldset = ¤t->blocked;
-#if DEBUG_SIG
- printk("do_signal: oldset %08lx:%08lx\n", oldset->sig[0], oldset->sig[1]);
-#endif
+ DBG(("do_signal: oldset %08lx:%08lx\n",
+ oldset->sig[0], oldset->sig[1]));
for (;;) {
unsigned long signr;
@@ -468,10 +450,7 @@
spin_lock_irq(¤t->sigmask_lock);
signr = dequeue_signal(¤t->blocked, &info);
spin_unlock_irq(¤t->sigmask_lock);
-#if DEBUG_SIG
- printk("do_signal: signr=%ld, pid=%d\n", signr, current->pid);
-#endif
-
+ DBG(("do_signal: signr=%ld, pid=%d\n", signr, current->pid));
if (!signr)
break;
@@ -508,9 +487,8 @@
}
ka = ¤t->sig->action[signr-1];
-#if DEBUG_SIG
- printk("sa_handler is %lx\n", ka->sa.sa_handler);
-#endif
+ DBG(("sa_handler is %x\n",
+ (unsigned int) ka->sa.sa_handler));
if (ka->sa.sa_handler == SIG_IGN) {
if (signr != SIGCHLD)
continue;
@@ -567,17 +545,13 @@
/* Check the return code */
switch (regs->gr[28]) {
case -ERESTARTNOHAND:
-#if DEBUG_SIG
- printk("ERESTARTNOHAND: returning -EINTR\n");
-#endif
+ DBG(("ERESTARTNOHAND: returning -EINTR\n"));
regs->gr[28] = -EINTR;
break;
case -ERESTARTSYS:
if (!(ka->sa.sa_flags & SA_RESTART)) {
-#if DEBUG_SIG
- printk("ERESTARTSYS: putting -EINTR\n");
-#endif
+ DBG(("ERESTARTSYS: putting -EINTR\n"));
regs->gr[28] = -EINTR;
break;
}
@@ -596,9 +570,9 @@
delivery failed, we need to continue to iterate in
this loop so we can deliver the SIGSEGV... */
if (handle_signal(signr, ka, &info, oldset, regs, in_syscall)) {
-#if DEBUG_SIG
- printk("Exiting do_signal (success), regs->gr[28] = %ld\n", regs->gr[28]);
-#endif
+ DBG((KERN_DEBUG
+ "Exiting do_signal (success), regs->gr[28] = %ld\n",
+ regs->gr[28]));
return 1;
}
}
@@ -618,8 +592,9 @@
regs->gr[28] = regs->orig_r28;
}
}
-#if DEBUG_SIG
- printk("Exiting do_signal (not delivered), regs->gr[28] = %ld\n", regs->gr[28]);
-#endif
+
+ DBG(("Exiting do_signal (not delivered), regs->gr[28] = %ld\n",
+ regs->gr[28]));
+
return 0;
}
Index: arch/parisc/kernel/sys_parisc32.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/sys_parisc32.c,v
retrieving revision 1.22
diff -u -r1.22 sys_parisc32.c
--- sys_parisc32.c 2001/07/14 07:22:00 1.22
+++ sys_parisc32.c 2001/07/14 21:13:45
@@ -59,6 +59,16 @@
#define A(__x) ((unsigned long)(__x))
+
+#undef DEBUG
+
+#ifdef DEBUG
+#define DBG(x) printk x
+#else
+#define DBG(x)
+#endif
+
+
/*
* count32() counts the number of arguments/envelopes. It is basically
* a copy of count() from fs/exec.c, except that it works
@@ -176,8 +186,9 @@
bprm.p = PAGE_SIZE*MAX_ARG_PAGES-sizeof(void *);
memset(bprm.page, 0, MAX_ARG_PAGES*sizeof(bprm.page[0]));
-if (0) printk("do_execve32(%s, %p, %p, %p)\n", filename, argv, envp, regs);
+ DBG(("do_execve32(%s, %p, %p, %p)\n", filename, argv, envp, regs));
+
bprm.file = file;
bprm.filename = filename;
bprm.sh_bang = 0;
@@ -240,7 +251,7 @@
int error;
char *filename;
-if (0) printk("sys32_execve(%p) r26 = 0x%lx\n", regs, regs->gr[26]);
+ DBG(("sys32_execve(%p) r26 = 0x%lx\n", regs, regs->gr[26]));
filename = getname((char *) regs->gr[26]);
error = PTR_ERR(filename);
if (IS_ERR(filename))
@@ -258,7 +269,7 @@
asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
int r22, int r21, int r20)
{
- printk("%s(%d): Unimplemented 32 on 64 syscall #%d!\n",
+ printk(KERN_ERR "%s(%d): Unimplemented 32 on 64 syscall #%d!\n",
current->comm, current->pid, r20);
return -ENOSYS;
}
@@ -481,7 +492,7 @@
extern int do_sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
void *newval, size_t newlen);
- if (0) printk("sysctl32(%p)\n", args);
+ DBG(("sysctl32(%p)\n", args));
if (copy_from_user(&tmp, args, sizeof(tmp)))
return -EFAULT;
@@ -558,8 +569,9 @@
return -EFAULT;
t.tv_sec = t32.tv_sec;
t.tv_nsec = t32.tv_nsec;
+
+ DBG(("sys32_nanosleep({%d, %d})\n", t32.tv_sec, t32.tv_nsec));
-if (0) printk("sys32_nanosleep({%d, %d})\n", t32.tv_sec, t32.tv_nsec);
KERNEL_SYSCALL(ret, sys_nanosleep, &t, rmtp ? &t : NULL);
if (rmtp && ret == -EINTR) {
if (put_timespec32(rmtp, &t))
@@ -839,8 +851,6 @@
{
struct nameidata nd;
int error;
-if (0) printk("%d: sys32_newstat(%p, %p)\n", current->pid, filename, statbuf);
-if (0) if ((unsigned long)filename < 4000) *(int *)0x77 = 1;
error = user_path_walk(filename, &nd);
if (!error) {
@@ -1077,10 +1087,7 @@
}
new_rlim.rlim_max = PAGE_ALIGN(new_rlim.rlim_max);
}
-#if 0
- printk("setrlimit %d to %lx %lx by %s\n", resource, new_rlim.rlim_cur,
- new_rlim.rlim_max, current->comm);
-#endif
+
*old_rlim = new_rlim;
return 0;
}
@@ -2693,7 +2700,7 @@
case IPC_SET:
/* Don't support the older stuff */
if (ipc_parse_version(&cmd) != IPC_64) {
- printk("msgctl() does not support libc5 IPC_SET\n");
+ printk(KERN_WARNING "msgctl() does not support libc5 IPC_SET\n");
return -ENOSYS;
}
/* padded values (time_t's) aren't used, so this is safe */
@@ -2704,7 +2711,7 @@
case MSG_STAT:
/* Don't support the older stuff */
if (ipc_parse_version(&cmd) != IPC_64) {
- printk("msgctl() does not support libc5 IPC_STAT\n");
+ printk(KERN_WARNING "msgctl() does not support libc5 IPC_STAT\n");
return -ENOSYS;
}
err = sys_msgctl(msqid, cmd, buf);
@@ -2764,7 +2771,9 @@
case IPC_SET:
if (version != IPC_64) {
- printk("semctl(IPC_STAT(cmd=0x%x)) does not support libc5-style cmds\n", cmd);
+ printk(KERN_WARNING
+ "semctl(IPC_STAT(cmd=0x%x)) does not support libc5-style cmds\n",
+ cmd);
return -ENOSYS;
}
/* FALL THROUGH */
@@ -2783,7 +2792,9 @@
case IPC_STAT:
case SEM_STAT:
if (version != IPC_64) {
- printk("semctl(IPC_STAT(cmd=0x%x)) does not support libc5-style cmds\n", cmd);
+ printk(KERN_WARNING
+ "semctl(IPC_STAT(cmd=0x%x)) does not support libc5-style cmds\n",
+ cmd);
return -ENOSYS;
}
u.buf = (struct semid_ds *)&s64;
@@ -2794,7 +2805,7 @@
break;
default:
- printk("semctl(cmd=%d) undefined cmd\n", cmd);
+ printk(KERN_WARNING "semctl(cmd=%d) undefined cmd\n", cmd);
err = -ENOSYS;
break;
}
@@ -2811,7 +2822,9 @@
switch (cmd) {
case IPC_INFO:
if (version != IPC_64) {
- printk("shmctl(IPC_INFO(cmd=0x%x)) does not support libc5 cmds\n", cmd);
+ printk(KERN_WARNING
+ "shmctl(IPC_INFO(cmd=0x%x)) does not support libc5 cmds\n",
+ cmd);
break;
}
/* WARNING: struct shminfo64 looks like it needs to contain
@@ -2826,7 +2839,9 @@
case SHM_STAT:
case IPC_STAT:
if (version != IPC_64) {
- printk("shmctl(IPC_STAT(cmd=0x%x)) does not support libc5 cmds\n", cmd);
+ printk(KERN_WARNING
+ "shmctl(IPC_STAT(cmd=0x%x)) does not support libc5 cmds\n",
+ cmd);
break;
}
KERNEL_SYSCALL(err, sys_shmctl, shmid, cmd, (struct shmid_ds *)&s64);
@@ -2836,7 +2851,9 @@
break;
case IPC_SET:
if (version != IPC_64) {
- printk("shmctl(IPC_SET(cmd=0x%x)) does not support libc5 cmds\n", cmd);
+ printk(KERN_WARNING
+ "shmctl(IPC_SET(cmd=0x%x)) does not support libc5 cmds\n",
+ cmd);
break;
}
/* FALL THROUGH */
Index: arch/parisc/kernel/traps.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/traps.c,v
retrieving revision 1.50
diff -u -r1.50 traps.c
--- traps.c 2001/06/23 06:51:16 1.50
+++ traps.c 2001/07/14 21:13:45
@@ -123,7 +123,7 @@
return; /* STFU */
/* XXX for debugging only */
- printk (KERN_DEBUG "!!die_if_kernel: %s(%d): %s %ld\n",
+ printk(KERN_DEBUG "!!die_if_kernel: %s(%d): %s %ld\n",
current->comm, current->pid, str, err);
show_regs(regs);
#endif
@@ -278,11 +278,6 @@
pdc_console_restart(); /* switch back to pdc if HPMC */
else
sti();
-
-#if 0
- printk(KERN_DEBUG "interrupted with code %d, regs %p\n", code, regs);
- show_regs(regs);
-#endif
switch(code) {
case 1:
Index: arch/parisc/kernel/unaligned.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/unaligned.c,v
retrieving revision 1.6
diff -u -r1.6 unaligned.c
--- unaligned.c 2001/07/04 22:47:10 1.6
+++ unaligned.c 2001/07/14 21:13:47
@@ -270,8 +270,9 @@
if (++unaligned_count < 5)
{
char buf[256];
- sprintf(buf, KERN_WARNING "%s(%d): unaligned access to 0x" RFMT " at ip=0x" RFMT "\n", current->comm, current->pid, regs->ior, regs->iaoq[0]);
- printk("%s", buf);
+ sprintf(buf, "%s(%d): unaligned access to 0x" RFMT " at ip=0x" RFMT "\n",
+ current->comm, current->pid, regs->ior, regs->iaoq[0]);
+ printk(KERN_WARNING "%s", buf);
#ifdef DEBUG_UNALIGNED
show_regs(regs);
#endif
Index: arch/parisc/math-emu/driver.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/math-emu/driver.c,v
retrieving revision 1.2
diff -u -r1.2 driver.c
--- driver.c 2001/04/12 22:08:22 1.2
+++ driver.c 2001/07/14 21:13:47
@@ -95,9 +95,9 @@
memcpy(&orig_sw, frcopy, sizeof(orig_sw));
if (FPUDEBUG) {
- printk("FP VZOUICxxxxCQCQCQCQCQCRMxxTDVZOUI ->\n ");
+ printk(KERN_DEBUG "FP VZOUICxxxxCQCQCQCQCQCRMxxTDVZOUI ->\n ");
printbinary(orig_sw, 32);
- printk("\n");
+ printk(KERN_DEBUG "\n");
}
signalcode = decode_fpu(frcopy, 0x666);
@@ -105,10 +105,10 @@
/* Status word = FR0L. */
memcpy(&sw, frcopy, sizeof(sw));
if (FPUDEBUG) {
- printk("VZOUICxxxxCQCQCQCQCQCRMxxTDVZOUI decode_fpu returns %d|0x%x\n",
- signalcode >> 24, signalcode & 0xffffff);
+ printk(KERN_DEBUG "VZOUICxxxxCQCQCQCQCQCRMxxTDVZOUI decode_fpu returns %d|0x%x\n",
+ signalcode >> 24, signalcode & 0xffffff);
printbinary(sw, 32);
- printk("\n");
+ printk(KERN_DEBUG "\n");
}
memcpy(regs->fr, frcopy, sizeof regs->fr);
Index: arch/parisc/math-emu/types.h
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/math-emu/types.h,v
retrieving revision 1.1
diff -u -r1.1 types.h
--- types.h 2001/04/12 22:08:22 1.1
+++ types.h 2001/07/14 21:13:47
@@ -20,6 +20,7 @@
*/
typedef unsigned int u_int;
+#include <linux/kernel.h>
#define BUG() do { \
- printk("floating-pt emulation BUG at %s:%d!\n", __FILE__, __LINE__); \
+ printk(KERN_ERR "floating-pt emulation BUG at %s:%d!\n", __FILE__, __LINE__); \
} while (0)
Index: arch/parisc/mm/fault.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/mm/fault.c,v
retrieving revision 1.31
diff -u -r1.31 fault.c
--- fault.c 2001/07/05 22:17:39 1.31
+++ fault.c 2001/07/14 21:13:47
@@ -265,7 +265,7 @@
out_of_memory:
up_read(&mm->mmap_sem);
- printk("VM: killing process %s\n", current->comm);
+ printk(KERN_CRIT "VM: killing process %s\n", current->comm);
if (user_mode(regs))
do_exit(SIGKILL);
goto no_context;
Index: arch/parisc/mm/init.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/mm/init.c,v
retrieving revision 1.34
diff -u -r1.34 init.c
--- init.c 2001/07/06 14:40:52 1.34
+++ init.c 2001/07/14 21:13:48
@@ -139,9 +139,10 @@
* we can remove this warning!
*/
- printk("\n\nCONFIG_DISCONTIGMEM is enabled, which is probably a mistake. This\n");
- printk("option can lead to heavy swapping, even when there are gigabytes\n");
- printk("of free memory.\n\n");
+ printk(KERN_WARNING "\n\n");
+ printk(KERN_WARNING "CONFIG_DISCONTIGMEM is enabled, which is probably a mistake. This\n");
+ printk(KERN_WARNING "option can lead to heavy swapping, even when there are gigabytes\n");
+ printk(KERN_WARNING "of free memory.\n\n");
#endif
#ifdef __LP64__
@@ -779,7 +780,7 @@
free_page(start);
nu_mphyspages++;
}
- printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
+ printk(KERN_INFO "Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
#endif
}
#endif
Index: arch/parisc/mm/ioremap.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/mm/ioremap.c,v
retrieving revision 1.4
diff -u -r1.4 ioremap.c
--- ioremap.c 2001/07/06 01:51:29 1.4
+++ ioremap.c 2001/07/14 21:13:48
@@ -26,7 +26,7 @@
BUG();
do {
if (!pte_none(*pte)) {
- printk("remap_area_pte: page already exists\n");
+ printk(KERN_ERR "remap_area_pte: page already exists\n");
BUG();
}
set_pte(pte, mk_pte_phys(phys_addr, __pgprot(_PAGE_PRESENT | _PAGE_RW |