PERFORCE change 167535 for review

Bjoern A. Zeeb bz at FreeBSD.org
Thu Aug 20 12:32:52 UTC 2009


http://perforce.freebsd.org/chv.cgi?CH=167535

Change 167535 by bz at bz_dumpster on 2009/08/20 12:31:50

	- Use mkdumpheader() rather than doing it on us own.
	- Use rmb().
	- Add dummy cpu_flush_dcache().
	- Add (dummy) definitions for the cooments from vm/pmap.h;
	  still need to figure out if at least one could be moved
	  upwards; lack of doucmentation(9) makes that harder.

Affected files ...

.. //depot/projects/s390/sys/s390/include/atomic.h#4 edit
.. //depot/projects/s390/sys/s390/include/pmap.h#7 edit
.. //depot/projects/s390/sys/s390/s390/dump_machdep.c#5 edit
.. //depot/projects/s390/sys/s390/s390/genassym.c#7 edit
.. //depot/projects/s390/sys/s390/s390/machdep.c#15 edit

Differences ...

==== //depot/projects/s390/sys/s390/include/atomic.h#4 (text+ko) ====

@@ -18,6 +18,7 @@
 #define SERIALIZATION	__asm volatile (SOP ::: "memory")
 
 #define	mb()	SERIALIZATION
+#define	rmb()	SERIALIZATION
 #define	wmb()	SERIALIZATION
 
 /* Not sure if serialization before load is really needed here. */

==== //depot/projects/s390/sys/s390/include/pmap.h#7 (text+ko) ====

@@ -76,8 +76,6 @@
 	struct pmap_statistics	pm_stats;	/* pmap statistics */
 };
 
-#define pmap_page_is_mapped(m)		(!TAILQ_EMPTY(&(m)->md.pv_list))
-
 typedef struct pmap	*pmap_t;
 
 #ifdef _KERNEL
@@ -122,6 +120,10 @@
 void *pmap_kenter_temporary(vm_paddr_t pa, int i);
 void pmap_kremove(vm_offset_t);
 
+boolean_t pmap_page_is_mapped(vm_page_t);
+#define	pmap_page_get_memattr(m)	VM_MEMATTR_DEFAULT
+#define	pmap_page_set_memattr(m, ma)	(void)0
+
 #endif /* !LOCORE */
 
 #endif /* !_MACHINE_PMAP_H_ */

==== //depot/projects/s390/sys/s390/s390/dump_machdep.c#5 (text+ko) ====

@@ -62,18 +62,8 @@
 	printf("Dumping %ld MB\n", Maxmem / (1024*1024 / PAGE_SIZE));
 
 	/* Fill in the kernel dump header */
-	strcpy(kdh.magic, KERNELDUMPMAGIC);
-	strcpy(kdh.architecture, MACHINE_ARCH);
-	kdh.version = htod32(KERNELDUMPVERSION);
-	kdh.architectureversion = htod32(KERNELDUMP_ESA_VERSION);
-	kdh.dumplength = htod64(Maxmem * (off_t)PAGE_SIZE);
-	kdh.dumptime = htod64(time_second);
-	kdh.blocksize = htod32(di->blocksize);
-	strncpy(kdh.hostname, hostname, sizeof(kdh.hostname));
-	strncpy(kdh.versionstring, version, sizeof(kdh.versionstring));
-	if (panicstr != NULL)
-		strncpy(kdh.panicstring, panicstr, sizeof kdh.panicstring);
-	kdh.parity = kerneldump_parity(&kdh);
+	mkdumpheader(&kdh, KERNELDUMPMAGIC, KERNELDUMP_ESA_VERSION,
+	    htod64(Maxmem * (off_t)PAGE_SIZE), di->blocksize);
 
 	dumplo = di->mediaoffset + di->mediasize - Maxmem * (off_t)PAGE_SIZE;
 	dumplo -= sizeof(kdh) * 2;

==== //depot/projects/s390/sys/s390/s390/genassym.c#7 (text+ko) ====

@@ -15,12 +15,16 @@
 #include <sys/user.h>
 #include <sys/mbuf.h>
 #include <sys/pcpu.h>
+#include <sys/types.h>
+
 #include <vm/vm.h>
 #include <vm/vm_param.h>
 #include <vm/pmap.h>
 #include <vm/vm_map.h>
+
 #include <machine/frame.h>
 #include <machine/sysarea.h>
+
 #include <s390/s390/external.h>
 #include <s390/s390/esa.h>
 #include <s390/s390/dat.h>

==== //depot/projects/s390/sys/s390/s390/machdep.c#15 (text+ko) ====

@@ -738,3 +738,12 @@
                 intr_restore(td->td_md.md_savecrit);
 }
 
+/*
+ * Flush the D-cache for non-DMA I/O so that the I-cache can
+ * be made coherent later.
+ */
+void
+cpu_flush_dcache(void *ptr, size_t len)
+{
+	/* Not applicable */
+}


More information about the p4-projects mailing list