summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1998-05-28 13:50:13 +0000
committerkato <kato@FreeBSD.org>1998-05-28 13:50:13 +0000
commitd9f07ec28ff7e936f8f9ecf80f3ec6594d496d45 (patch)
tree4c1cd88a04a1286a96a47f230d4921ba38e254f5
parent4d5a415e508ecc819f6a9a70fc67868e40913d79 (diff)
downloadFreeBSD-src-d9f07ec28ff7e936f8f9ecf80f3ec6594d496d45.zip
FreeBSD-src-d9f07ec28ff7e936f8f9ecf80f3ec6594d496d45.tar.gz
Sync with sys/i386/i386/machdep.c revision 1.297.
-rw-r--r--sys/pc98/i386/machdep.c13
-rw-r--r--sys/pc98/pc98/machdep.c13
2 files changed, 4 insertions, 22 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 1ed2733..d5f9e6f 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.82 1998/04/07 09:07:53 kato Exp $
+ * $Id: machdep.c,v 1.83 1998/05/19 12:58:05 kato Exp $
*/
#include "apm.h"
@@ -156,7 +156,6 @@ int bouncepages = 0;
#endif
#endif /* BOUNCE_BUFFERS */
-int msgbufmapped = 0; /* set when safe to use msgbuf */
int _udatasel, _ucodesel;
u_int atdevbase;
@@ -1583,15 +1582,7 @@ init386(first)
pmap_enter(kernel_pmap, (vm_offset_t)msgbufp + off,
avail_end + off, VM_PROT_ALL, TRUE);
- cp = (char *)msgbufp;
- msgbufp = (struct msgbuf *) (cp + MSGBUF_SIZE - sizeof(*msgbufp));
- if (msgbufp->msg_magic != MSG_MAGIC || msgbufp->msg_ptr != cp) {
- bzero(cp, MSGBUF_SIZE);
- msgbufp->msg_magic = MSG_MAGIC;
- msgbufp->msg_size = (char *)msgbufp - cp;
- msgbufp->msg_ptr = cp;
- }
- msgbufmapped = 1;
+ msgbufinit(msgbufp, MSGBUF_SIZE);
/* make a call gate to reenter kernel with */
gdp = &ldt[LSYS5CALLS_SEL].gd;
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 1ed2733..d5f9e6f 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.82 1998/04/07 09:07:53 kato Exp $
+ * $Id: machdep.c,v 1.83 1998/05/19 12:58:05 kato Exp $
*/
#include "apm.h"
@@ -156,7 +156,6 @@ int bouncepages = 0;
#endif
#endif /* BOUNCE_BUFFERS */
-int msgbufmapped = 0; /* set when safe to use msgbuf */
int _udatasel, _ucodesel;
u_int atdevbase;
@@ -1583,15 +1582,7 @@ init386(first)
pmap_enter(kernel_pmap, (vm_offset_t)msgbufp + off,
avail_end + off, VM_PROT_ALL, TRUE);
- cp = (char *)msgbufp;
- msgbufp = (struct msgbuf *) (cp + MSGBUF_SIZE - sizeof(*msgbufp));
- if (msgbufp->msg_magic != MSG_MAGIC || msgbufp->msg_ptr != cp) {
- bzero(cp, MSGBUF_SIZE);
- msgbufp->msg_magic = MSG_MAGIC;
- msgbufp->msg_size = (char *)msgbufp - cp;
- msgbufp->msg_ptr = cp;
- }
- msgbufmapped = 1;
+ msgbufinit(msgbufp, MSGBUF_SIZE);
/* make a call gate to reenter kernel with */
gdp = &ldt[LSYS5CALLS_SEL].gd;
OpenPOWER on IntegriCloud