AMD's APM Volume 2 says 'All control registers are 64bit in long mode'.

Fix the CR0 prototype to match this (the asm implementation is correct though).
OK ad
This commit is contained in:
cegger 2008-04-30 00:16:30 +00:00
parent 5d794f8931
commit c92d850bb3
4 changed files with 14 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: fpu.c,v 1.23 2008/04/16 21:51:02 cegger Exp $ */
/* $NetBSD: fpu.c,v 1.24 2008/04/30 00:16:30 cegger Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.23 2008/04/16 21:51:02 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: fpu.c,v 1.24 2008/04/30 00:16:30 cegger Exp $");
#include "opt_multiprocessor.h"
@ -220,7 +220,7 @@ fpudna(struct cpu_info *ci)
int s;
if (ci->ci_fpsaving) {
printf("recursive fpu trap; cr0=%x\n", rcr0());
printf("recursive fpu trap; cr0=%lx\n", rcr0());
return;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: npx.c,v 1.128 2008/04/28 18:15:39 ad Exp $ */
/* $NetBSD: npx.c,v 1.129 2008/04/30 00:16:30 cegger Exp $ */
/*-
* Copyright (c) 1991 The Regents of the University of California.
@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.128 2008/04/28 18:15:39 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: npx.c,v 1.129 2008/04/30 00:16:30 cegger Exp $");
#if 0
#define IPRINTF(x) printf x
@ -539,7 +539,7 @@ npxdna_xmm(struct cpu_info *ci)
if (ci->ci_fpsaving) {
#ifndef XEN
printf("recursive npx trap; cr0=%x\n", rcr0());
printf("recursive npx trap; cr0=%lx\n", rcr0());
kpreempt_enable();
return (0);
#else
@ -632,7 +632,7 @@ npxdna_s87(struct cpu_info *ci)
if (ci->ci_fpsaving) {
#ifndef XEN
printf("recursive npx trap; cr0=%x\n", rcr0());
printf("recursive npx trap; cr0=%lx\n", rcr0());
kpreempt_enable();
return (0);
#else

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpufunc.h,v 1.7 2008/04/28 20:23:40 martin Exp $ */
/* $NetBSD: cpufunc.h,v 1.8 2008/04/30 00:16:30 cegger Exp $ */
/*-
* Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@ -54,8 +54,8 @@ void invlpg(vaddr_t);
void lidt(struct region_descriptor *);
void lldt(u_short);
void ltr(u_short);
void lcr0(u_int);
u_int rcr0(void);
void lcr0(u_long);
u_long rcr0(void);
void lcr2(vaddr_t);
vaddr_t rcr2(void);
void lcr3(vaddr_t);

View File

@ -1,4 +1,4 @@
/* $NetBSD: xenfunc.c,v 1.5 2008/04/21 15:15:34 cegger Exp $ */
/* $NetBSD: xenfunc.c,v 1.6 2008/04/30 00:16:30 cegger Exp $ */
/*
*
@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: xenfunc.c,v 1.5 2008/04/21 15:15:34 cegger Exp $");
__KERNEL_RCSID(0, "$NetBSD: xenfunc.c,v 1.6 2008/04/30 00:16:30 cegger Exp $");
#include <sys/param.h>
@ -85,12 +85,12 @@ ltr(u_short sel)
}
void
lcr0(u_int val)
lcr0(u_long val)
{
__PRINTK(("XXX lcr0 not supported\n"));
}
u_int
u_long
rcr0(void)
{
__PRINTK(("XXX rcr0 not supported\n"));