[parisc-linux-cvs] cleanups...

Helge Deller deller@gmx.de
Wed, 20 Jun 2001 22:25:49 +0200


- EXTRAVERSION = -pa35
- CONFIG_BLK_DEV_LOOP=y, CONFIG_FB=y, CONFIG_STI_CONSOLE=y, CONFIG_FBCON=y
   CONFIG_SOUND=y, CONFIG_SOUND_HARMONY=y (all for 32bit kernel only)
- cleanups of various printk() warnings and errors
- removed lots of compiler warnings
- reduced kernel boot up messages
- applied Bjorn Helgaas' <bjorn_helgaas@hp.com> patch for wax_eisa and
   added some more code myself (will this driver really be finished once??)
- use direct mem access functions for {read|write}{b|w|l} if
   USE_HPPA_IOREMAP==0 (DO NOT ENABLE IT!)

Index: Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/Makefile,v
retrieving revision 1.66
diff -u -r1.66 Makefile
--- Makefile    2001/06/20 15:57:24     1.66
+++ Makefile    2001/06/20 20:15:55
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 0
-EXTRAVERSION = -pa34
+EXTRAVERSION = -pa35
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)

Index: arch/parisc/defconfig
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/defconfig,v
retrieving revision 1.35
diff -u -r1.35 defconfig
--- defconfig	2001/06/10 16:11:32	1.35
+++ defconfig	2001/06/20 20:02:33
@@ -70,7 +70,7 @@
 # CONFIG_BLK_CPQ_DA is not set
 # CONFIG_BLK_CPQ_CISS_DA is not set
 # CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_LOOP is not set
+CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=4096
@@ -462,14 +462,22 @@
 #
 # Frame-buffer support
 #
-# CONFIG_FB is not set
-# CONFIG_STI_CONSOLE is not set
+CONFIG_FB=y
 CONFIG_DUMMY_CONSOLE=y
+CONFIG_STI_CONSOLE=y
+CONFIG_FB_STI=y
+CONFIG_FBCON=y
+CONFIG_FBCON_STI=y
+CONFIG_FBCON_CFB8=y
+CONFIG_FBCON_FONT=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
 
 #
 # Sound
 #
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+CONFIG_SOUND_HARMONY=y
 
 #
 # Kernel hacking
Index: arch/parisc/kernel/inventory.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/inventory.c,v
retrieving revision 1.28
diff -u -r1.28 inventory.c
--- inventory.c	2001/04/06 05:10:54	1.28
+++ inventory.c	2001/06/20 20:02:34
@@ -385,8 +385,8 @@
 
 #else   /* !__LP64__ */
 
-#define do_pat_inventory() 0
-#define do_pat_memconfig() 0
+#define do_pat_inventory() (0)
+#define do_pat_memconfig() do { } while (0)
 #define do_system_map_memconfig() do_pagezero_memconfig()
 
 /* All of the older legacy box (32 bit only) code goes here */
Index: arch/parisc/kernel/pa7300lc.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/pa7300lc.c,v
retrieving revision 1.3
diff -u -r1.3 pa7300lc.c
--- pa7300lc.c	2001/02/07 07:48:58	1.3
+++ pa7300lc.c	2001/06/20 20:02:34
@@ -20,12 +20,6 @@
 #define DIOERR		0xf0ec
 #define HIDMAMEM	0xf0f4
 
-/* read CPU Diagnose register index */
-static u32 diag_read(int index)
-{
-	return 0;
-}
-
 /* this returns the HPA of the CPU it was called on */
 static u32 cpu_hpa(void)
 {
Index: arch/parisc/kernel/setup.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/setup.c,v
retrieving revision 1.83
diff -u -r1.83 setup.c
--- setup.c	2001/06/18 14:28:36	1.83
+++ setup.c	2001/06/20 20:02:35
@@ -329,7 +329,7 @@
 	extern unsigned int boot_args[];
 
 	/* Collect stuff passed in from the boot loader */
-#if 1
+#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
@@ -340,7 +340,7 @@
 		saved_command_line[0] = '\0';
 	} else {
 		strcpy(saved_command_line, (char *)__va(boot_args[1]));
-#if 1
+#if 0
 		printk("PALO command line: '%s'\nPALO initrd %x-%x\n",
 		    saved_command_line, boot_args[2], boot_args[3]);
 #endif
Index: arch/parisc/mm/fault.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/mm/fault.c,v
retrieving revision 1.29
diff -u -r1.29 fault.c
--- fault.c	2001/05/28 18:11:19	1.29
+++ fault.c	2001/06/20 20:02:35
@@ -215,7 +215,7 @@
 #ifdef PRINT_USER_FAULTS
 		printk(KERN_DEBUG "\n");
 		printk(KERN_DEBUG "do_page_fault() pid=%d command='%s' type=%d 
address=0x%08lx\n",
-		    tsk->pid, tsk->comm, code, address);
+		    tsk->pid, tsk->comm, code, (unsigned long) address);
 		if (vma) {
 			printk(KERN_DEBUG "vm_start = 0x%08lx, vm_end = 0x%08lx\n",
 					vma->vm_start, vma->vm_end);
Index: arch/parisc/mm/init.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/mm/init.c,v
retrieving revision 1.32
diff -u -r1.32 init.c
--- init.c	2001/03/22 16:24:18	1.32
+++ init.c	2001/06/20 20:02:37
@@ -194,7 +194,7 @@
 
 		/* Print the memory ranges */
 
-		printk("Memory Ranges:\n");
+		printk(KERN_INFO "Memory Ranges:\n");
 
 		for (i = 0; i < npmem_ranges; i++) {
 			unsigned long start;
@@ -202,7 +202,7 @@
 
 			size = (pmem_ranges[i].pages << PAGE_SHIFT);
 			start = (pmem_ranges[i].start_pfn << PAGE_SHIFT);
-			printk("%2d) Start 0x%016lx End 0x%016lx Size %6ld Mb\n",
+			printk(KERN_INFO "%2d) Start 0x%016lx End 0x%016lx Size %6ld Mb\n",
 				i,start, start + (size - 1), size >> 20);
 		}
 	}
@@ -226,7 +226,7 @@
 
 		rsize = pmem_ranges[i].pages << PAGE_SHIFT;
 		if ((mem_max + rsize) > mem_limit) {
-			printk("Memory truncated to %ld Mb\n", mem_limit >> 20);
+			printk(KERN_WARNING "Memory truncated to %ld Mb\n", mem_limit >> 20);
 			if (mem_max == mem_limit)
 				npmem_ranges = i;
 			else {
@@ -240,7 +240,7 @@
 		mem_max += rsize;
 	}
 
-	printk("Total Memory: %ld Mb\n",mem_max >> 20);
+	printk(KERN_INFO "Total Memory: %ld Mb\n",mem_max >> 20);
 
 #ifndef CONFIG_DISCONTIGMEM
 
@@ -307,7 +307,7 @@
 	}
 
 	if ((bootmap_pfn - bootmap_start_pfn) != bootmap_pages) {
-		printk("WARNING! bootmap sizing is messed up!\n");
+		printk(KERN_WARNING "WARNING! bootmap sizing is messed up!\n");
 		BUG();
 	}
 
@@ -334,9 +334,8 @@
 #endif
 
 #ifdef CONFIG_BLK_DEV_INITRD
-	printk("initrd: %08x-%08x\n", (int) initrd_start, (int) initrd_end);
-
 	if (initrd_end != 0) {
+		printk(KERN_INFO "initrd: %08x-%08x\n", (int) initrd_start, (int) 
initrd_end);
 		initrd_below_start_ok = 1;
 		reserve_bootmem_node(NODE_DATA(0),__pa(initrd_start), initrd_end - 
initrd_start);
 	}
@@ -385,7 +384,7 @@
 	for (i = 0; i < npmem_ranges; i++)
 		num_physpages += free_all_bootmem_node(NODE_DATA(i));
 
-	printk("Memory: %luk available\n", num_physpages << (PAGE_SHIFT-10));
+	printk(KERN_INFO "Memory: %luk available\n", num_physpages << 
(PAGE_SHIFT-10));
 
 	if (hppa_dma_ops == &pcxl_dma_ops) {
 	    pcxl_dma_start = (unsigned long)SET_MAP_OFFSET(MAP_START);
@@ -399,13 +398,13 @@
 
 void __bad_pgd(pgd_t *pgd)
 {
-	printk("Bad pgd in pmd_alloc: %08lx\n", pgd_val(*pgd));
+	printk(KERN_ERR "Bad pgd in pmd_alloc: %08lx\n", pgd_val(*pgd));
 	pgd_val(*pgd) = _PAGE_TABLE + __pa(BAD_PAGETABLE);
 }
 
 void __bad_pmd(pmd_t *pmd)
 {
-	printk("Bad pmd in pte_alloc: %08lx\n", pmd_val(*pmd));
+	printk(KERN_ERR "Bad pmd in pte_alloc: %08lx\n", pmd_val(*pmd));
 	pmd_val(*pmd) = _PAGE_TABLE + __pa(BAD_PAGETABLE);
 }
 
@@ -471,9 +470,9 @@
 	int i,free = 0,total = 0,reserved = 0;
 	int shared = 0, cached = 0;
 
-	printk("Mem-info:\n");
+	printk(KERN_INFO "Mem-info:\n");
 	show_free_areas();
-	printk("Free swap:	 %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
+	printk(KERN_INFO "Free swap:	 %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
 	i = max_mapnr;
 	while (i-- > 0) {
 		total++;
@@ -486,10 +485,10 @@
 		else
 			shared += atomic_read(&mem_map[i].count) - 1;
 	}
-	printk("%d pages of RAM\n",total);
-	printk("%d reserved pages\n",reserved);
-	printk("%d pages shared\n",shared);
-	printk("%d pages swap cached\n",cached);
+	printk(KERN_INFO "%d pages of RAM\n", total);
+	printk(KERN_INFO "%d reserved pages\n", reserved);
+	printk(KERN_INFO "%d pages shared\n", shared);
+	printk(KERN_INFO "%d pages swap cached\n", cached);
 	show_buffers();
 }
 
@@ -526,8 +525,6 @@
 	ro_end   = __pa((unsigned long)&data_start);
 	fv_addr  = __pa((unsigned long)&fault_vector_20) & PAGE_MASK;
 
-	printk("pagetable_init\n");
-
 	/* Map each physical memory range to its kernel vaddr */
 
 	for (range = 0; range < npmem_ranges; range++) {
@@ -627,7 +624,6 @@
 {
 	unsigned long linux_gateway_page_addr;
 	pgd_t *pg_dir;
-	pmd_t *pmd_base;
 	pmd_t *pmd;
 	pte_t *pg_table_base;
 	pte_t *pg_table;
@@ -649,6 +645,7 @@
 
 #if (PTRS_PER_PMD != 1)
 	if (pgd_none(*pg_dir)) {
+		pmd_t *pmd_base;
 		pmd_base = (pmd_t *) alloc_bootmem_pages(PAGE_SIZE);
 		pgd_val(*pg_dir) = _PAGE_TABLE | __pa(pmd_base);
 	}
Index: arch/parisc/mm/ioremap.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/mm/ioremap.c,v
retrieving revision 1.2
diff -u -r1.2 ioremap.c
--- ioremap.c	2001/06/17 22:27:00	1.2
+++ ioremap.c	2001/06/20 20:02:37
@@ -60,6 +60,7 @@
 	return 0;
 }
 
+#if (USE_HPPA_IOREMAP)
 static int remap_area_pages(unsigned long address, unsigned long phys_addr,
 				 unsigned long size, unsigned long flags)
 {
@@ -90,6 +91,7 @@
 	flush_tlb_all();
 	return error;
 }
+#endif /* USE_HPPA_IOREMAP */
 
 /*
  * Generic mapping function (not visible outside):
@@ -108,7 +110,7 @@
 {
 #if !(USE_HPPA_IOREMAP)
 
-	return phys_addr;
+	return (void *)phys_addr;
 
 #else
 	void * addr;
Index: drivers/gsc/dino.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/dino.c,v
retrieving revision 1.28
diff -u -r1.28 dino.c
--- dino.c	2001/06/14 09:50:22	1.28
+++ dino.c	2001/06/20 20:02:41
@@ -827,7 +827,7 @@
 	struct busdevice *dino_busdevice;
 	int ret;
 
-	pcibios_register_hba((struct pci_hba_data *) dino_dev);
+	pcibios_register_hba(&dino_dev->hba);
 
 	pci_bios = &dino_bios_ops;   /* used by pci_scan_bus() */
 	pci_port = &dino_port_ops;
Index: drivers/gsc/wax_eisa.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/gsc/wax_eisa.c,v
retrieving revision 1.3
diff -u -r1.3 wax_eisa.c
--- wax_eisa.c	2001/05/01 13:32:09	1.3
+++ wax_eisa.c	2001/06/20 20:02:41
@@ -9,6 +9,9 @@
  *      (at your option) any later version.
  *
  *	by Alex deVries <alex@linuxcare.com>
+ *
+ * 
+ * 	FIXME: will this driver ever be finished ?
  */
 
 #include <linux/errno.h>
@@ -27,21 +30,28 @@
 
 #include "busdevice.h"
 
+
+/* The following need to be created still:
+	- isa_memcpy_toio(a,b,c)
+	- isa_memset_io
+	- isa_memcpy_from_io
+*/
+
+
 static int wax_eisa_driver_init(struct hp_device *d, struct pa_iodc_driver 
*dri);
 
 static struct pa_iodc_driver wax_eisa_drivers_for[] = {
-	{HPHW_BA, 0x01B, 0, 0x0008e, 0x0, 0x0,
+	{HPHW_BA, 0x01B, 0, 0x0008e, 0x0, 0x0,  /* 0x8e is WAX, not WAX EISA! Maybe 
0x90 ?? */
 		DRIVER_CHECK_HWTYPE + DRIVER_CHECK_SVERSION,
-		"Wax EISA BA", "Wax EISA BA", (void *) wax_eisa_driver_init},
+		"Wax EISA BA", "generic", (void *) wax_eisa_driver_init},
 	{HPHW_BA, 0x01B, 0, 0x00076, 0x0, 0x0,
 		DRIVER_CHECK_HWTYPE + DRIVER_CHECK_SVERSION,
-		"Wax EISA BA", "Wax EISA BA", (void *) wax_eisa_driver_init},
-	{0,0,0,0,0,0,0,
-	(char *) NULL,(char *) NULL,(void *) NULL}
+		"Wax EISA BA", "generic", (void *) wax_eisa_driver_init},
+	{ 0, }
 };
 
 #define WAX_EISA_OUT(type, size) \
-static void wax_out##type (u##size d, int addr) \
+static void wax_out##type (struct pci_hba_data *hba, u16 addr, u##size d) \
 { \
 	u32 out_addr; \
 	if (((addr >= 0x00080000) && (addr < 0x00100000)) || \
@@ -50,7 +60,7 @@
 			((addr & 0x03f8) << 9) + (addr & 0x0007) ; \
 		gsc_write##type(d,out_addr); \
 	} else { \
-		printk("Wax EISA: Ack, cannot write to 0x%x\n",addr); \
+		printk(KERN_ERR "Wax EISA: Ack, cannot write to 0x%x\n",addr); \
 	} \
 } 
 
@@ -59,7 +69,7 @@
 WAX_EISA_OUT(l,32)
 
 #define WAX_EISA_IN(type, size) \
-static u##size wax_in##type (int addr) \
+static u##size wax_in##type (struct pci_hba_data *hba, u16 addr) \
 { \
 	u32 out_addr; \
 	if (((addr >= 0x00080000) && (addr < 0x00100000)) || \
@@ -68,7 +78,7 @@
 			((addr & 0x03f8) << 9) + (addr & 0x0007) ; \
 		return gsc_read##type(out_addr); \
 	} else { \
-		printk("WAX EISA Ack, cannot read from 0x%x\n",addr); \
+		printk(KERN_ERR "Wax EISA: Ack, cannot read from 0x%x\n",addr); \
 		return -1; \
 	} \
 }
@@ -85,24 +95,19 @@
 	outw: wax_outw,
 	outl: wax_outl
 };
-
-struct pci_hba_data wax_eisa_hba;
-
-#define outsl(x) outl((x))
-#define insl(x) inl((x))
-
-/*
-The following need to be created still.
-memset_io
-isa_memcpy_toio(a,b,c) memcpy_toio
-isa_memset_io
-memcpy_frioio
-isa_memcpy_from_io
 
-*/
-#define isa_readl(x)	inl((x))
-
+struct wax_eisa_device
+{
+	struct pci_hba_data	hba;	/* 'C' inheritance - must be first */
+        spinlock_t		dinosaur_pen;
+	int			version;
+	unsigned long		txn_addr; /* EIR addr to generate interrupt */
+	u32			txn_data; /* EIR data assign to each */
+	int			irq;	  /* Virtual IRQ this EISA bus uses */
+	struct irq_region	*region;  /* region for this Dino */
+};
 
+static struct wax_eisa_device *eisa_dev;
 
 void __init
 register_wax_eisa_driver(void)
@@ -110,20 +115,35 @@
         register_driver(wax_eisa_drivers_for);
 }
 
-static int
+static int __init
 wax_eisa_driver_init(struct hp_device *d, struct pa_iodc_driver *dri) {
 
-	int version;
-
+	/* we will only support one EISA bus */
+	if (eisa_dev)
+		return -ENODEV;
+	
 	/* It sounds unusual, but because the parisc-linux PCI infrastructure
 	   has been done so well, I'm just going to register the WAX EISA
 	   bus adapter as a PCI device.  This is to handle the in{w|l|b}
 	   and out{w|l|b} routines. */
+
+	eisa_dev = kmalloc(sizeof(*eisa_dev), GFP_KERNEL);
+	if (!eisa_dev)
+		return -ENOMEM;
+	
+	memset(eisa_dev, 0, sizeof(*eisa_dev));
+	
+	eisa_dev->version = gsc_readw(d->hpa+0x7000);
+
+	eisa_dev->hba.iodc_info = d;
+	eisa_dev->hba.base_addr = d->hpa;  /* faster access */
+	eisa_dev->dinosaur_pen = SPIN_LOCK_UNLOCKED;
 
-	version = gsc_readw(d->hpa+0x7000);
-	printk(KERN_INFO "Wax EISA bus adapter version 0x%x at 
0x%p\n",version,d->hpa);
+	printk(KERN_INFO "Wax EISA bus adapter version 0x%x at 0x%p\n",
+			eisa_dev->version, d->hpa);
 
-	pcibios_register_hba((struct pci_hba_data *) &wax_port_ops);
+	pcibios_register_hba(&eisa_dev->hba);
+	pci_port = &wax_port_ops;
 
 #if 0
 	/* Turn off lock control */
@@ -140,6 +160,5 @@
 	EISA_bus = 1;
 
 	return 0;
-
 }
 
Index: drivers/scsi/zalon7xx.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/scsi/zalon7xx.c,v
retrieving revision 1.6
diff -u -r1.6 zalon7xx.c
--- zalon7xx.c	2001/04/06 05:10:57	1.6
+++ zalon7xx.c	2001/06/20 20:02:47
@@ -40,9 +40,6 @@
 static int hosts_used=0;
 static int zalon_id = 0;
 
-static u8 iodc_data[32] __attribute__ ((aligned (64)));
-static unsigned long pdc_result[32] __attribute__ ((aligned (16))) 
={0,0,0,0};
-
 static int zalon_scsi_callback(struct hp_device *d, struct pa_iodc_driver 
*dri);
 
 
@@ -88,6 +85,10 @@
  * - RB
  */
 /* poke SCSI clock out of iodc data */
+
+static u8 iodc_data[32] __attribute__ ((aligned (64)));
+static unsigned long pdc_result[32] __attribute__ ((aligned (16))) 
={0,0,0,0};
+
 static int 
 lasi_scsi_clock(void * hpa, int defaultclock)
 {
Index: drivers/video/sti/sticon.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticon.c,v
retrieving revision 1.12
diff -u -r1.12 sticon.c
--- sticon.c	2001/06/17 21:21:15	1.12
+++ sticon.c	2001/06/20 20:02:48
@@ -59,7 +59,7 @@
 int sticon_softback_size = 32768;
 static unsigned long softback_buf, softback_curr;
 static unsigned long softback_in;
-static unsigned long softback_top, softback_end;
+static unsigned long /* softback_top, */ softback_end;
 static int softback_lines;
 
 
@@ -70,8 +70,6 @@
 #define DEFAULT_CURSOR_BLINK_RATE	(20)
 
 static int vbl_cursor_cnt;
-static int cursor_on;
-static int cursor_blink_rate;
 
 static inline void cursor_undrawn(void)
 {
@@ -251,6 +249,11 @@
     return 1;	/* needs refreshing */
 }
 
+static int sticon_set_origin(struct vc_data *conp)
+{
+    return 0;
+}
+
 static int sticon_blank(struct vc_data *c, int blank)
 {
     switch (blank) {
@@ -276,11 +279,6 @@
     return 0;
 }
 
-static int sticon_set_origin(struct vc_data *conp)
-{
-    return 0;
-}
-
 static u16 *sticon_screen_pos(struct vc_data *conp, int offset)
 {
     int line;
@@ -412,7 +410,8 @@
 
 int __init sticonsole_init(void)
 {
-    printk(KERN_INFO "\nsticon: searching for STI ROMs\n");
+    printk(KERN_INFO "\n");
+    printk(KERN_INFO "sticonsole_init: searching for STI ROMs\n");
     if (sti_init_roms()) {
 	take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 1);
 	return 0;
Index: drivers/video/sti/sticore.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticore.c,v
retrieving revision 1.14
diff -u -r1.14 sticore.c
--- sticore.c	2001/06/17 21:21:15	1.14
+++ sticore.c	2001/06/20 20:02:49
@@ -304,7 +304,8 @@
 {
 	struct sti_glob_cfg_ext *cfg;
 	
-	printk(	"%d text planes\n"
+	DPRINTK((KERN_INFO
+		"%d text planes\n"
 		"%4d x %4d screen resolution\n"
 		"%4d x %4d offscreen\n"
 		"%4d x %4d layout\n"
@@ -321,11 +322,12 @@
 		glob_cfg->region_ptrs[4], glob_cfg->region_ptrs[5],
 		glob_cfg->region_ptrs[6], glob_cfg->region_ptrs[7],
 		glob_cfg->reent_lvl,
-		glob_cfg->save_addr);
+		glob_cfg->save_addr));
 
 	/* dump extended cfg */ 
 	cfg = PTR_STI(glob_cfg->ext_ptr);
-	printk(	"monitor %d\n"
+	DPRINTK(( KERN_INFO
+		"monitor %d\n"
 		"in friendly mode: %d\n"
 		"power consumption %d watts\n"
 		"freq ref %d\n"
@@ -334,7 +336,7 @@
 		cfg->friendly_boot,
 		cfg->power,
 		cfg->freq_ref,
-		cfg->sti_mem_addr, sti_mem_request);
+		cfg->sti_mem_addr, sti_mem_request));
 }
 
 
@@ -402,8 +404,8 @@
 	if (!fbfont)
 	    return NULL;
 
-	printk("selected %dx%d fb-font %s\n",
-			fbfont->width, fbfont->height, fbfont->name);
+	DPRINTK((KERN_DEBUG "selected %dx%d fb-font %s\n",
+			fbfont->width, fbfont->height, fbfont->name));
 			
 	bpc = ((fbfont->width+7)/8) * fbfont->height; 
 	size = bpc * 256;
@@ -473,19 +475,17 @@
 void __init 
 sti_dump_rom(struct sti_rom *rom)
 {
-        printk("STI %s mode ROM type %d\n",
-	       rom->type[3] == 1 ? "byte" : "word",
-	       rom->type[3]);
-	printk(" supports %d monitors\n", rom->num_mons);
-	printk(" conforms to STI ROM spec revision %d.%02x\n",
-		rom->revno[0] >> 4, rom->revno[0] & 0x0f);
-	printk(" graphics id %04x%04x\n",
+        printk(KERN_INFO "STI %s mode ROM, id %04x-%04x, conforms to spec 
rev. %d.%02x\n",
+	        (rom->type[3] == 1) ? "byte" : "word",
 		rom->graphics_id[0], 
-		rom->graphics_id[1]);
-	printk(" font start %08x\n", rom->font_start);
-	printk(" region list %08x\n", rom->region_list);
-	printk(" init_graph %08x\n", rom->init_graph);
-	printk(" alternate code type %d\n", rom->alt_code_type);
+		rom->graphics_id[1],
+		rom->revno[0] >> 4, 
+		rom->revno[0] & 0x0f);
+	DPRINTK((" supports %d monitors\n", rom->num_mons));
+	DPRINTK((" font start %08x\n", rom->font_start));
+	DPRINTK((" region list %08x\n", rom->region_list));
+	DPRINTK((" init_graph %08x\n", rom->init_graph));
+	DPRINTK((" alternate code type %d\n", rom->alt_code_type));
 }
 
 
@@ -625,7 +625,7 @@
 	        goto out_err;
     
 	if (!sti_cook_fonts(cooked, raw)) {
-		printk("No font found for STI at %08lx\n", address);
+		printk(KERN_ERR "No font found for STI at %08lx\n", address);
 		goto out_err;
 	}
 
@@ -703,13 +703,13 @@
 	ok = 0;
 	
 	if ((sig & 0xff) == 0x01) {
-		printk("STI byte mode ROM at %08lx, hpa=%08lx\n",
+		printk(KERN_INFO "STI byte mode ROM at %08lx, hpa=%08lx\n",
 		       address, hpa);
 		ok = sti_read_rom(0, sti, address);
 	}
 
 	if ((sig & 0xffff) == 0x0303) {
-		printk("STI word mode ROM at %08lx, hpa=%08lx\n",
+		printk(KERN_INFO "STI word mode ROM at %08lx, hpa=%08lx\n",
 		       address, hpa);
 		ok = sti_read_rom(1, sti, address);
 	}
@@ -730,11 +730,7 @@
 	sti_inq_conf(sti);
 	sti_dump_globcfg(PTR_STI(sti->glob_cfg), sti->sti_mem_request);
 	
-	printk( "STI device: %s\n"
-		"STI device-ID: %04x-%04x\n", 
-			sti->outptr.dev_name,
-			sti->graphics_id[0], 
-			sti->graphics_id[1]);
+	printk(KERN_INFO "STI device: %s\n", sti->outptr.dev_name );
 
 	sti_rom[num_sti_roms] = sti;
 	num_sti_roms++;
@@ -769,8 +765,8 @@
 	    if (!rom)
 		rom = hpa; /* XXX */	
 	    if (rom) {
-		printk(KERN_INFO "Trying STI ROM at %08lx, hpa at %08lx\n",
-		    rom, hpa);
+		DPRINTK((KERN_DEBUG "Trying STI ROM at %08lx, hpa at %08lx\n",
+		    rom, hpa));
 		sti = sti_try_rom_generic(rom, hpa);
 		if (sti)
 		    return sti;
Index: drivers/video/sti/sticore.h
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/sticore.h,v
retrieving revision 1.13
diff -u -r1.13 sticore.h
--- sticore.h	2001/06/17 21:21:15	1.13
+++ sticore.h	2001/06/20 20:02:49
@@ -3,7 +3,7 @@
 
 /* generic STI structures & functions */
 
-#if 1
+#if 0
 #define DPRINTK(x)	printk x
 #else
 #define DPRINTK(x) 
Index: drivers/video/sti/stifb.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/video/sti/stifb.c,v
retrieving revision 1.15
diff -u -r1.15 stifb.c
--- stifb.c	2001/06/17 22:27:02	1.15
+++ stifb.c	2001/06/20 20:02:50
@@ -751,7 +751,7 @@
 		struct fb_info_gen *info)
 {
 	const struct stifb_par *par = _par;
-	struct stifb_info *fb_info = info;
+	struct stifb_info *fb_info = (struct stifb_info *) info;
 
 	memset(fix, 0, sizeof(*fix));
 	
@@ -1097,7 +1097,7 @@
 		return -EINVAL;
 
 	printk(KERN_INFO 
-	    "fb%d: %s %dx%d-%d frame buffer device, id: %04X, iobase: 0x%04lx\n",
+	    "fb%d: %s %dx%d-%d frame buffer device, id: %04x, iobase: 0x%04lx\n",
 		GET_FB_IDX(fb_info.gen.info.node), 
 		fb_info.gen.info.modename,
 		disp.var.xres, 
Index: fs/binfmt_som.c
===================================================================
RCS file: /home/cvs/parisc/linux/fs/binfmt_som.c,v
retrieving revision 1.15
diff -u -r1.15 binfmt_som.c
--- binfmt_som.c	2001/02/23 04:43:29	1.15
+++ binfmt_som.c	2001/06/20 20:02:50
@@ -71,7 +71,7 @@
 	unsigned long *sp;
 
 	/* Word-align the stack pointer */
-	sp = (unsigned long *)(bprm->p + 3 &~ 3);
+	sp = (unsigned long *)((bprm->p + 3) & ~3);
 
 	envp = (char **) sp;
 	sp += envc + 1;
Index: include/asm-parisc/io.h
===================================================================
RCS file: /home/cvs/parisc/linux/include/asm-parisc/io.h,v
retrieving revision 1.18
diff -u -r1.18 io.h
--- io.h	2001/06/17 22:27:03	1.18
+++ io.h	2001/06/20 20:02:53
@@ -26,13 +26,21 @@
 #define outw_p outw
 #define outl_p outl
 
-#define readb gsc_readb
-#define readw gsc_readw
-#define readl gsc_readl
-#define writeb gsc_writeb
-#define writew gsc_writew
-#define writel gsc_writel
-
+#if USE_HPPA_IOREMAP
+#define readb(addr) (*(volatile u8 *) (addr))
+#define readw(addr) (*(volatile u16 *) (addr))
+#define readl(addr) (*(volatile u32 *) (addr))
+#define writeb(b,addr) (*(volatile u8 *) (addr) = (b))
+#define writew(b,addr) (*(volatile u16 *) (addr) = (b))
+#define writel(b,addr) (*(volatile u32 *) (addr) = (b))
+#else /* USE_HPPA_IOREMAP */
+#define readb(addr) gsc_readb(addr)
+#define readw(addr) gsc_readw(addr)
+#define readl(addr) gsc_readl(addr)
+#define writeb(b,addr) gsc_writeb(b,addr)
+#define writew(b,addr) gsc_writew(b,addr)
+#define writel(b,addr) gsc_writel(b,addr)
+#endif /* USE_HPPA_IOREMAP */
 
 #if defined(CONFIG_PCI) || defined(CONFIG_ISA)
 /*
Index: include/asm-parisc/pgtable.h
===================================================================
RCS file: /home/cvs/parisc/linux/include/asm-parisc/pgtable.h,v
retrieving revision 1.37
diff -u -r1.37 pgtable.h
--- pgtable.h	2001/06/17 22:27:03	1.37
+++ pgtable.h	2001/06/20 20:02:53
@@ -292,6 +292,7 @@
 
 #define PG_dcache_dirty         PG_arch_1
 
+struct vm_area_struct; /* forward declaration (include/linux/mm.h) */
 extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
 
 /* Encode and de-code a swap entry */