CVS commit: src/sys/dev/acpi/acpica

2010-07-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 24 06:10:43 UTC 2010

Modified Files:
src/sys/dev/acpi/acpica: README

Log Message:
Update and fix a typo.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpica/README

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpica/README
diff -u src/sys/dev/acpi/acpica/README:1.3 src/sys/dev/acpi/acpica/README:1.4
--- src/sys/dev/acpi/acpica/README:1.3	Thu Feb  6 00:27:06 2003
+++ src/sys/dev/acpi/acpica/README	Sat Jul 24 06:10:43 2010
@@ -1,11 +1,11 @@
-#	$NetBSD: README,v 1.3 2003/02/06 00:27:06 perry Exp $
+#	$NetBSD: README,v 1.4 2010/07/24 06:10:43 jruoho Exp $
 
 This is the Intel ACPI Component Architecture, Intel's reference
 implementation of the core operating system ACPI support.  The
-portion in the Osd/ subdirectory is provided by the oprerating
+portion in the acpica/ subdirectory is provided by the operating
 system as the glue between the OS and the ACPICA.
 
-Please, do not import an updated ACPI CA snapshot from Intel unless
+Please, do not import an updated ACPICA snapshot from Intel unless
 you absolutely know what you're doing -- The Intel directory layout
 changes from release to release, and we must munge it (by hand) into
 something sane that we can use.
@@ -13,14 +13,13 @@
 The routines that the operating system must provide are documented
 in the following document:
 
-	ACPI Component Architecture Programmer Reference
-	Intel Corp.
+	Intel Corp., ACPI Component Architecture Programmer Reference
 
 Copies of the document may be retrieved from:
 
-	http://developer.intel.com/technology/iapc/acpi/downloads.htm
+	http://www.acpica.org/download/acpica-reference.pdf
 
-Machine-dependent code must provide the following routines for Osd:
+Machine-dependent code must provide at least the following routines:
 
 ACPI_STATUS	acpi_md_OsInitialize(void);
 ACPI_STATUS	acpi_md_OsTerminate(void);



CVS commit: src/sys/arch/ia64/include

2010-07-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 24 07:31:19 UTC 2010

Removed Files:
src/sys/arch/ia64/include: acpica_machdep.h

Log Message:
Remove empty file.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r0 src/sys/arch/ia64/include/acpica_machdep.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/arch/ia64/include

2010-07-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 24 07:46:53 UTC 2010

Modified Files:
src/sys/arch/ia64/include: Makefile

Log Message:
Remove acpica_machdep.h.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/ia64/include/Makefile
diff -u src/sys/arch/ia64/include/Makefile:1.2 src/sys/arch/ia64/include/Makefile:1.3
--- src/sys/arch/ia64/include/Makefile:1.2	Wed Jul 26 19:54:57 2006
+++ src/sys/arch/ia64/include/Makefile	Sat Jul 24 07:46:52 2010
@@ -1,8 +1,8 @@
-#	$NetBSD: Makefile,v 1.2 2006/07/26 19:54:57 drochner Exp $
+#	$NetBSD: Makefile,v 1.3 2010/07/24 07:46:52 jruoho Exp $
 
 INCSDIR= /usr/include/ia64
 
-INCS=	_regset.h acpi_func.h acpi_machdep.h acpica_machdep.h ansi.h \
+INCS=	_regset.h acpi_func.h acpi_machdep.h ansi.h \
 	aout_machdep.h asm.h atomic.h bootinfo.h bswap.h cdefs.h \
 	cpu.h cpufunc.h dig64.h disklabel.h efi.h \
 	elf_machdep.h endian.h endian_machdep.h float.h fpu.h frame.h \



CVS commit: [uebayasi-xip] src/sys/uvm

2010-07-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Jul 24 08:01:55 UTC 2010

Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_page.c

Log Message:
Remove a useless assertion.


To generate a diff of this commit:
cvs rdiff -u -r1.153.2.47 -r1.153.2.48 src/sys/uvm/uvm_page.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_page.c
diff -u src/sys/uvm/uvm_page.c:1.153.2.47 src/sys/uvm/uvm_page.c:1.153.2.48
--- src/sys/uvm/uvm_page.c:1.153.2.47	Thu Jul 22 07:55:22 2010
+++ src/sys/uvm/uvm_page.c	Sat Jul 24 08:01:55 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.153.2.47 2010/07/22 07:55:22 uebayasi Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.153.2.48 2010/07/24 08:01:55 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.153.2.47 2010/07/22 07:55:22 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.153.2.48 2010/07/24 08:01:55 uebayasi Exp $);
 
 #include opt_ddb.h
 #include opt_uvmhist.h
@@ -865,7 +865,6 @@
 
 		pg-phys_addr = paddr;
 		pg-flags |= PG_FAKE | PG_RDONLY | PG_CLEAN;
-		KASSERT(pg-pqflags == 0);
 		pg-pqflags = PQ_FIXED;
 #ifdef __HAVE_VM_PAGE_MD
 		VM_MDPAGE_INIT(pg-mdpage, paddr);



CVS commit: src/sys/arch/x86/include

2010-07-24 Thread Christoph Egger
Module Name:src
Committed By:   cegger
Date:   Sat Jul 24 08:02:46 UTC 2010

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
add AMD OSVW MSRs


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/x86/include/specialreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.42 src/sys/arch/x86/include/specialreg.h:1.43
--- src/sys/arch/x86/include/specialreg.h:1.42	Tue Jul  6 20:50:35 2010
+++ src/sys/arch/x86/include/specialreg.h	Sat Jul 24 08:02:46 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.42 2010/07/06 20:50:35 cegger Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.43 2010/07/24 08:02:46 cegger Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -450,6 +450,10 @@
 #define		BU_CFG_WBPFSMCCHKDIS	0x2000ULL
 #define		BU_CFG_WBENHWSBDIS	0x0001ULL
 
+/* AMD Family10h MSRs */
+#define	MSR_OSVW_ID_LENGTH		0xc0010140
+#define	MSR_OSVW_STATUS			0xc0010141
+
 /*
  * Constants related to MTRRs
  */



CVS commit: [uebayasi-xip] src/sys/uvm

2010-07-24 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Sat Jul 24 08:22:14 UTC 2010

Modified Files:
src/sys/uvm [uebayasi-xip]: uvm_page.c

Log Message:
Give physseg related functions better names.


To generate a diff of this commit:
cvs rdiff -u -r1.153.2.48 -r1.153.2.49 src/sys/uvm/uvm_page.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/uvm/uvm_page.c
diff -u src/sys/uvm/uvm_page.c:1.153.2.48 src/sys/uvm/uvm_page.c:1.153.2.49
--- src/sys/uvm/uvm_page.c:1.153.2.48	Sat Jul 24 08:01:55 2010
+++ src/sys/uvm/uvm_page.c	Sat Jul 24 08:22:14 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_page.c,v 1.153.2.48 2010/07/24 08:01:55 uebayasi Exp $	*/
+/*	$NetBSD: uvm_page.c,v 1.153.2.49 2010/07/24 08:22:14 uebayasi Exp $	*/
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.153.2.48 2010/07/24 08:01:55 uebayasi Exp $);
+__KERNEL_RCSID(0, $NetBSD: uvm_page.c,v 1.153.2.49 2010/07/24 08:22:14 uebayasi Exp $);
 
 #include opt_ddb.h
 #include opt_uvmhist.h
@@ -194,16 +194,15 @@
 
 static void uvm_pageinsert(struct uvm_object *, struct vm_page *);
 static void uvm_pageremove(struct uvm_object *, struct vm_page *);
-static struct vm_physseg *uvm_page_physload_common(
+static struct vm_physseg *uvm_physseg_alloc(
 struct vm_physseg_freelist * const, struct vm_physseg **, int,
 const paddr_t, const paddr_t);
-static void uvm_page_physunload_common(struct vm_physseg_freelist *,
-struct vm_physseg **, struct vm_physseg *);
-static void uvm_page_physseg_init(void);
-static struct vm_physseg * uvm_physseg_insert(struct vm_physseg_freelist *,
-struct vm_physseg **, int, const paddr_t, const paddr_t);
-static void uvm_physseg_remove(struct vm_physseg_freelist *,
+static void uvm_physseg_free(struct vm_physseg_freelist *,
 struct vm_physseg **, struct vm_physseg *);
+static void uvm_physseg_init(void);
+static void uvm_physseg_insert(struct vm_physseg *,
+struct vm_physseg **, int);
+static void uvm_physseg_remove(struct vm_physseg **, struct vm_physseg *);
 
 /*
  * per-object tree of pages
@@ -792,7 +791,7 @@
 	if (free_list = VM_NFREELIST || free_list  VM_FREELIST_DEFAULT)
 		panic(uvm_page_physload: bad free list %d, free_list);
 
-	seg = uvm_page_physload_common(vm_physmem_freelist, vm_physmem_ptrs,
+	seg = uvm_physseg_alloc(vm_physmem_freelist, vm_physmem_ptrs,
 	vm_nphysmem, start, end);
 	KASSERT(seg != NULL);
 
@@ -827,7 +826,7 @@
 
 	/* XXX */
 
-	uvm_page_physunload_common(vm_physmem_freelist, vm_physmem_ptrs, seg);
+	uvm_physseg_free(vm_physmem_freelist, vm_physmem_ptrs, seg);
 	vm_nphysmem--;
 }
 
@@ -839,7 +838,7 @@
 	struct vm_physseg *seg;
 	int i;
 
-	seg = uvm_page_physload_common(vm_physdev_freelist, vm_physdev_ptrs,
+	seg = uvm_physseg_alloc(vm_physdev_freelist, vm_physdev_ptrs,
 	vm_nphysdev, start, end);
 	KASSERT(seg != NULL);
 
@@ -881,18 +880,18 @@
 	struct vm_physseg *seg = cookie;
 
 	kmem_free(seg-pgs, sizeof(struct vm_page) * (seg-end - seg-start));
-	uvm_page_physunload_common(vm_physdev_freelist, vm_physdev_ptrs, seg);
+	uvm_physseg_free(vm_physdev_freelist, vm_physdev_ptrs, seg);
 	vm_nphysdev--;
 }
 #endif
 
 static struct vm_physseg *
-uvm_page_physload_common(struct vm_physseg_freelist *freelist,
+uvm_physseg_alloc(struct vm_physseg_freelist *freelist,
 struct vm_physseg **segs, int nsegs,
 const paddr_t start, const paddr_t end)
 {
 	struct vm_physseg *ps;
-	static int uvm_page_physseg_inited;
+	static int uvm_physseg_inited;
 
 	if (uvmexp.pagesize == 0)
 		panic(uvm_page_physload: page size not set!);
@@ -906,29 +905,33 @@
 		VM_PHYSSEG_MAX, (long long)start, (long long)end);
 
 	/* XXXUEBS too early to use RUN_ONCE(9)? */
-	if (uvm_page_physseg_inited == 0) {
-		uvm_page_physseg_inited = 1;
-		uvm_page_physseg_init();
+	if (uvm_physseg_inited == 0) {
+		uvm_physseg_inited = 1;
+		uvm_physseg_init();
 	}
 
-	ps = uvm_physseg_insert(freelist, segs, nsegs, start, end);
+	ps = SIMPLEQ_FIRST(freelist);
 	KASSERT(ps != NULL);
+	SIMPLEQ_REMOVE_HEAD(freelist, list);
+
 	ps-start = start;
 	ps-end = end;
+	uvm_physseg_insert(ps, segs, nsegs);
 
 	return ps;
 }
 
 void
-uvm_page_physunload_common(struct vm_physseg_freelist *freelist,
+uvm_physseg_free(struct vm_physseg_freelist *freelist,
 struct vm_physseg **segs, struct vm_physseg *seg)
 {
 
-	uvm_physseg_remove(freelist, segs, seg);
+	uvm_physseg_remove(segs, seg);
+	SIMPLEQ_INSERT_TAIL(freelist, seg, list);
 }
 
 static void
-uvm_page_physseg_init(void)
+uvm_physseg_init(void)
 {
 	int lcv;
 
@@ -944,15 +947,10 @@
 #endif
 }
 
-static struct vm_physseg *
-uvm_physseg_insert(struct vm_physseg_freelist *freelist,
-struct vm_physseg **segs, int nsegs, const paddr_t start, const paddr_t end)
+static void
+uvm_physseg_insert(struct vm_physseg *ps,
+struct vm_physseg **segs, int nsegs)
 {
-	struct 

CVS commit: src/sys

2010-07-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 24 09:35:36 UTC 2010

Modified Files:
src/sys/arch/ia64/acpi: acpi_machdep.c
src/sys/arch/ia64/include: acpi_func.h cpufunc.h
src/sys/arch/x86/include: acpi_machdep.h
src/sys/dev/acpi/acpica: acpi_func.h

Log Message:
Move ACPI_FLUSH_CPU_CACHE() (a.k.a. WBINVD on x86) to MD headers where it
belongs to. Let IA-64 define its own function/instruction instead of
requiring a dummy wbinvd() to satisfy the definition in a MI header.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/ia64/acpi/acpi_machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/ia64/include/acpi_func.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/cpufunc.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/include/acpi_machdep.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/acpi/acpica/acpi_func.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/ia64/acpi/acpi_machdep.c
diff -u src/sys/arch/ia64/acpi/acpi_machdep.c:1.1 src/sys/arch/ia64/acpi/acpi_machdep.c:1.2
--- src/sys/arch/ia64/acpi/acpi_machdep.c:1.1	Mon Jul 20 04:41:36 2009
+++ src/sys/arch/ia64/acpi/acpi_machdep.c	Sat Jul 24 09:35:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_machdep.c,v 1.1 2009/07/20 04:41:36 kiyohara Exp $	*/
+/*	$NetBSD: acpi_machdep.c,v 1.2 2010/07/24 09:35:36 jruoho Exp $	*/
 /*
  * Copyright (c) 2009 KIYOHARA Takashi
  * All rights reserved.
@@ -28,7 +28,7 @@
  * Machine-dependent routines for ACPICA.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_machdep.c,v 1.1 2009/07/20 04:41:36 kiyohara Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_machdep.c,v 1.2 2010/07/24 09:35:36 jruoho Exp $);
 
 #include sys/param.h
 
@@ -199,9 +199,3 @@
 printf(%s: not yet...\n, __func__);
 	return 0;
 }
-
-void
-wbinvd(void)
-{
-printf(%s: not yet...\n, __func__);
-}

Index: src/sys/arch/ia64/include/acpi_func.h
diff -u src/sys/arch/ia64/include/acpi_func.h:1.2 src/sys/arch/ia64/include/acpi_func.h:1.3
--- src/sys/arch/ia64/include/acpi_func.h:1.2	Sun May 14 21:55:38 2006
+++ src/sys/arch/ia64/include/acpi_func.h	Sat Jul 24 09:35:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_func.h,v 1.2 2006/05/14 21:55:38 elad Exp $	*/
+/*	$NetBSD: acpi_func.h,v 1.3 2010/07/24 09:35:36 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2002 Mitsuru IWASAKI
@@ -31,7 +31,7 @@
 /**
  *
  * Name: acpica_machdep.h - arch-specific defines, etc.
- *   $Revision: 1.2 $
+ *   $Revision: 1.3 $
  *
  */
 
@@ -48,8 +48,11 @@
 #define ACPI_DISABLE_IRQS() disable_intr()
 #define ACPI_ENABLE_IRQS()  enable_intr()
 
-#define ACPI_FLUSH_CPU_CACHE()	/* XXX ia64_fc()? */
+#ifdef ACPI_FLUSH_CPU_CACHE
+#undef ACPI_FLUSH_CPU_CACHE
+#endif
 
+#define ACPI_FLUSH_CPU_CACHE()	/* XXX ia64_fc()? */
 
 /* Section 5.2.9.1:  global lock acquire/release functions */
 extern int	acpi_acquire_global_lock(uint32_t *lock);

Index: src/sys/arch/ia64/include/cpufunc.h
diff -u src/sys/arch/ia64/include/cpufunc.h:1.3 src/sys/arch/ia64/include/cpufunc.h:1.4
--- src/sys/arch/ia64/include/cpufunc.h:1.3	Mon Jul 20 04:41:37 2009
+++ src/sys/arch/ia64/include/cpufunc.h	Sat Jul 24 09:35:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.h,v 1.3 2009/07/20 04:41:37 kiyohara Exp $	*/
+/*	$NetBSD: cpufunc.h,v 1.4 2010/07/24 09:35:36 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -226,8 +226,6 @@
 		enable_intr();
 }
 
-void wbinvd(void);
-
 #endif /* _KERNEL */
 
 #endif /* !_MACHINE_CPUFUNC_H_ */

Index: src/sys/arch/x86/include/acpi_machdep.h
diff -u src/sys/arch/x86/include/acpi_machdep.h:1.5 src/sys/arch/x86/include/acpi_machdep.h:1.6
--- src/sys/arch/x86/include/acpi_machdep.h:1.5	Sat Mar 14 13:54:28 2009
+++ src/sys/arch/x86/include/acpi_machdep.h	Sat Jul 24 09:35:36 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_machdep.h,v 1.5 2009/03/14 13:54:28 jmcneill Exp $	*/
+/*	$NetBSD: acpi_machdep.h,v 1.6 2010/07/24 09:35:36 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -35,19 +35,26 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef _X86_ACPI_MACHDEP_H_
+#define _X86_ACPI_MACHDEP_H_
+
 /*
- * Machine-dependent code for ACPI.  This is provided to the Osd
- * portion of the ACPICA.
+ * Machine-dependent code for ACPI.
  */
-
 #include machine/pio.h
 #include machine/i82489var.h
 #include machine/i82489reg.h
 
-ACPI_STATUS	acpi_md_OsInitialize(void);
-ACPI_STATUS	acpi_md_OsTerminate(void);
+ACPI_STATUS		acpi_md_OsInitialize(void);
+ACPI_STATUS		acpi_md_OsTerminate(void);
 ACPI_PHYSICAL_ADDRESS	acpi_md_OsGetRootPointer(void);
 
+#ifdef ACPI_FLUSH_CPU_CACHE
+#undef ACPI_FLUSH_CPU_CACHE
+#endif
+
+#define	ACPI_FLUSH_CPU_CACHE()	wbinvd()
+
 #define	acpi_md_OsIn8(x)	inb((x))
 #define	acpi_md_OsIn16(x)	inw((x))
 #define	acpi_md_OsIn32(x)	inl((x))
@@ -73,3 +80,5 @@
 int		

CVS commit: src/sys/arch/x68k/dev

2010-07-24 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sat Jul 24 13:15:13 UTC 2010

Modified Files:
src/sys/arch/x68k/dev: slhci_intio.c

Log Message:
Probe not only Nereid Ctrl port but also SL811HS/T port.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x68k/dev/slhci_intio.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/x68k/dev/slhci_intio.c
diff -u src/sys/arch/x68k/dev/slhci_intio.c:1.13 src/sys/arch/x68k/dev/slhci_intio.c:1.14
--- src/sys/arch/x68k/dev/slhci_intio.c:1.13	Sat May  8 02:48:31 2010
+++ src/sys/arch/x68k/dev/slhci_intio.c	Sat Jul 24 13:15:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: slhci_intio.c,v 1.13 2010/05/08 02:48:31 isaki Exp $	*/
+/*	$NetBSD: slhci_intio.c,v 1.14 2010/07/24 13:15:13 isaki Exp $	*/
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: slhci_intio.c,v 1.13 2010/05/08 02:48:31 isaki Exp $);
+__KERNEL_RCSID(0, $NetBSD: slhci_intio.c,v 1.14 2010/07/24 13:15:13 isaki Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -87,6 +87,10 @@
 	   ia-ia_intr == SLHCI_INTIO_INTR2   ) )
 		return 0;
 
+	/* Whether the SL811 port is accessible or not */
+	if (badaddr((void *)IIOV(ia-ia_addr)))
+		return 0;
+
 	/* Whether the control port is accessible or not */
 	nc_addr = ia-ia_addr + NEREID_ADDR_OFFSET;
 	nc_size = 0x02;



CVS commit: src/sys/arch/hpcsh/dev

2010-07-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul 24 15:33:12 UTC 2010

Modified Files:
src/sys/arch/hpcsh/dev: psh3tp.c

Log Message:
Rename some void * arg variables.
self implies device_t so it shouldn't be used for void pointers
passed as wsmouse cookie or callout function args.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hpcsh/dev/psh3tp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/hpcsh/dev/psh3tp.c
diff -u src/sys/arch/hpcsh/dev/psh3tp.c:1.13 src/sys/arch/hpcsh/dev/psh3tp.c:1.14
--- src/sys/arch/hpcsh/dev/psh3tp.c:1.13	Sat Dec 19 07:08:23 2009
+++ src/sys/arch/hpcsh/dev/psh3tp.c	Sat Jul 24 15:33:12 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: psh3tp.c,v 1.13 2009/12/19 07:08:23 kiyohara Exp $	*/
+/*	$NetBSD: psh3tp.c,v 1.14 2010/07/24 15:33:12 tsutsui Exp $	*/
 /*
  * Copyright (c) 2005 KIYOHARA Takashi
  * All rights reserved.
@@ -253,9 +253,9 @@
 
 
 static int
-psh3tp_wsmouse_enable(void *self)
+psh3tp_wsmouse_enable(void *cookie)
 {
-	struct psh3tp_softc *sc = (struct psh3tp_softc *)self;
+	struct psh3tp_softc *sc = (struct psh3tp_softc *)cookie;
 
 	DPRINTFN(1, (%s: wsmouse enable\n, sc-sc_dev.dv_xname));
 	return psh3tp_set_enable(sc, 1, PSH3TP_WSMOUSE_ENABLED);
@@ -263,9 +263,9 @@
 
 
 static void
-psh3tp_wsmouse_disable(void *self)
+psh3tp_wsmouse_disable(void *cookie)
 {
-	struct psh3tp_softc *sc = (struct psh3tp_softc *)self;
+	struct psh3tp_softc *sc = (struct psh3tp_softc *)cookie;
 
 	DPRINTFN(1, (%s: wsmouse disable\n, sc-sc_dev.dv_xname));
 	psh3tp_set_enable(sc, 0, PSH3TP_WSMOUSE_ENABLED);
@@ -273,9 +273,9 @@
 
 
 static int
-psh3tp_intr(void *self)
+psh3tp_intr(void *arg)
 {
-	struct psh3tp_softc *sc = (struct psh3tp_softc *)self;
+	struct psh3tp_softc *sc = (struct psh3tp_softc *)arg;
 
 	uint8_t irr0;
 	uint8_t phdr, touched;
@@ -348,9 +348,9 @@
  * Decide if we are going to report this touch as a mouse click/drag.
  */
 static void
-psh3tp_start_polling(void *self)
+psh3tp_start_polling(void *arg)
 {
-	struct psh3tp_softc *sc = (struct psh3tp_softc *)self;
+	struct psh3tp_softc *sc = (struct psh3tp_softc *)arg;
 	uint8_t phdr;
 	int rawx, rawy;
 
@@ -403,9 +403,9 @@
  * We are reporting this touch as a mouse click/drag.
  */
 static void
-psh3tp_callout_wsmouse(void *self)
+psh3tp_callout_wsmouse(void *arg)
 {
-	struct psh3tp_softc *sc = (struct psh3tp_softc *)self;
+	struct psh3tp_softc *sc = (struct psh3tp_softc *)arg;
 	uint8_t phdr;
 	int rawx, rawy;
 	int s;
@@ -488,10 +488,10 @@
 
 
 static int
-psh3tp_wsmouse_ioctl(void *self, u_long cmd, void *data, int flag,
+psh3tp_wsmouse_ioctl(void *cookie, u_long cmd, void *data, int flag,
 		 struct lwp *l)
 {
-	struct psh3tp_softc *sc = (struct psh3tp_softc *)self;
+	struct psh3tp_softc *sc = (struct psh3tp_softc *)cookie;
 
 	return hpc_tpanel_ioctl(sc-sc_tpcalib, cmd, data, flag, l);
 }



CVS commit: src/sys/arch/amd64/include

2010-07-24 Thread Nicolas Joly
Module Name:src
Committed By:   njoly
Date:   Sat Jul 24 17:43:47 UTC 2010

Modified Files:
src/sys/arch/amd64/include: pte.h

Log Message:
Pull i386 pte.h on amd64 for 32bit compat.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amd64/include/pte.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/include/pte.h
diff -u src/sys/arch/amd64/include/pte.h:1.7 src/sys/arch/amd64/include/pte.h:1.8
--- src/sys/arch/amd64/include/pte.h:1.7	Tue Jul  6 20:50:34 2010
+++ src/sys/arch/amd64/include/pte.h	Sat Jul 24 17:43:47 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: pte.h,v 1.7 2010/07/06 20:50:34 cegger Exp $	*/
+/*	$NetBSD: pte.h,v 1.8 2010/07/24 17:43:47 njoly Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -38,6 +38,8 @@
 #ifndef _AMD64_PTE_H_
 #define _AMD64_PTE_H_
 
+#ifdef __x86_64__
+
 /*
  * amd64 MMU hardware structure:
  *
@@ -132,4 +134,10 @@
 
 #include x86/pte.h
 
+#else   /*  !__x86_64__  */
+
+#include i386/pte.h
+
+#endif  /*  !__x86_64__  */
+
 #endif /* _AMD64_PTE_H_ */



CVS commit: src/sys/dev/pci

2010-07-24 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Sat Jul 24 17:55:54 UTC 2010

Modified Files:
src/sys/dev/pci: jmide_reg.h

Log Message:
correct transposition in comment


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/pci/jmide_reg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/jmide_reg.h
diff -u src/sys/dev/pci/jmide_reg.h:1.2 src/sys/dev/pci/jmide_reg.h:1.3
--- src/sys/dev/pci/jmide_reg.h:1.2	Mon Oct 19 18:41:15 2009
+++ src/sys/dev/pci/jmide_reg.h	Sat Jul 24 17:55:54 2010
@@ -1,4 +1,4 @@
-/*  $NetBSD: jmide_reg.h,v 1.2 2009/10/19 18:41:15 bouyer Exp $*/
+/*  $NetBSD: jmide_reg.h,v 1.3 2010/07/24 17:55:54 jakllsch Exp $*/
 
 /*
  * Copyright (c) 2007 Manuel Bouyer.
@@ -44,7 +44,7 @@
 #define JM_CONTROL0_SATA0_AHCI	0x2000 /* SATA port 0 AHCI enable */
 #define JM_CONTROL0_SATA0_IDE	0x1000 /* SATA port 0 PCIIDE enable */
 #define JM_CONTROL0_AHCI_F1	0x0200 /* AHCI on function 1 */
-#define JM_CONTROL0_AHCI_EN	0x0100 /* ACHI enable */
+#define JM_CONTROL0_AHCI_EN	0x0100 /* AHCI enable */
 #define JM_CONTROL0_PATA0_RST	0x0040 /* PATA port 0 reset */
 #define JM_CONTROL0_PATA0_EN	0x0020 /* PATA port 0 enable */
 #define JM_CONTROL0_PATA0_SEC	0x0010 /* PATA 0 enable on secondary chan */



CVS commit: src/sys

2010-07-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 24 21:53:54 UTC 2010

Modified Files:
src/sys/arch/ia64/include: acpi_func.h
src/sys/arch/x86/include: acpi_machdep.h
src/sys/dev/acpi/acpica: acpi_func.h

Log Message:
Revert the previous partially for the time being.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ia64/include/acpi_func.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x86/include/acpi_machdep.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/acpi/acpica/acpi_func.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/ia64/include/acpi_func.h
diff -u src/sys/arch/ia64/include/acpi_func.h:1.3 src/sys/arch/ia64/include/acpi_func.h:1.4
--- src/sys/arch/ia64/include/acpi_func.h:1.3	Sat Jul 24 09:35:36 2010
+++ src/sys/arch/ia64/include/acpi_func.h	Sat Jul 24 21:53:53 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_func.h,v 1.3 2010/07/24 09:35:36 jruoho Exp $	*/
+/*	$NetBSD: acpi_func.h,v 1.4 2010/07/24 21:53:53 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2002 Mitsuru IWASAKI
@@ -31,7 +31,7 @@
 /**
  *
  * Name: acpica_machdep.h - arch-specific defines, etc.
- *   $Revision: 1.3 $
+ *   $Revision: 1.4 $
  *
  */
 
@@ -48,12 +48,6 @@
 #define ACPI_DISABLE_IRQS() disable_intr()
 #define ACPI_ENABLE_IRQS()  enable_intr()
 
-#ifdef ACPI_FLUSH_CPU_CACHE
-#undef ACPI_FLUSH_CPU_CACHE
-#endif
-
-#define ACPI_FLUSH_CPU_CACHE()	/* XXX ia64_fc()? */
-
 /* Section 5.2.9.1:  global lock acquire/release functions */
 extern int	acpi_acquire_global_lock(uint32_t *lock);
 extern int	acpi_release_global_lock(uint32_t *lock);

Index: src/sys/arch/x86/include/acpi_machdep.h
diff -u src/sys/arch/x86/include/acpi_machdep.h:1.6 src/sys/arch/x86/include/acpi_machdep.h:1.7
--- src/sys/arch/x86/include/acpi_machdep.h:1.6	Sat Jul 24 09:35:36 2010
+++ src/sys/arch/x86/include/acpi_machdep.h	Sat Jul 24 21:53:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_machdep.h,v 1.6 2010/07/24 09:35:36 jruoho Exp $	*/
+/*	$NetBSD: acpi_machdep.h,v 1.7 2010/07/24 21:53:54 jruoho Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -49,12 +49,6 @@
 ACPI_STATUS		acpi_md_OsTerminate(void);
 ACPI_PHYSICAL_ADDRESS	acpi_md_OsGetRootPointer(void);
 
-#ifdef ACPI_FLUSH_CPU_CACHE
-#undef ACPI_FLUSH_CPU_CACHE
-#endif
-
-#define	ACPI_FLUSH_CPU_CACHE()	wbinvd()
-
 #define	acpi_md_OsIn8(x)	inb((x))
 #define	acpi_md_OsIn16(x)	inw((x))
 #define	acpi_md_OsIn32(x)	inl((x))

Index: src/sys/dev/acpi/acpica/acpi_func.h
diff -u src/sys/dev/acpi/acpica/acpi_func.h:1.3 src/sys/dev/acpi/acpica/acpi_func.h:1.4
--- src/sys/dev/acpi/acpica/acpi_func.h:1.3	Sat Jul 24 09:35:36 2010
+++ src/sys/dev/acpi/acpica/acpi_func.h	Sat Jul 24 21:53:54 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_func.h,v 1.3 2010/07/24 09:35:36 jruoho Exp $	*/
+/*	$NetBSD: acpi_func.h,v 1.4 2010/07/24 21:53:54 jruoho Exp $	*/
 
 /*-
  * Copyright (c) 2000 Michael Smith
@@ -28,6 +28,9 @@
  * SUCH DAMAGE.
  */
 
+#ifndef _SYS_DEV_ACPI_ACPICA_ACPI_FUNC_H
+#define _SYS_DEV_ACPI_ACPICA_ACPI_FUNC_H
+
 #include machine/cpufunc.h
 
 #include sys/atomic.h
@@ -77,3 +80,13 @@
 	return old  GL_BIT_PENDING;
 }
 
+/*
+ * XXX: Should be in a MD header.
+ */
+#ifndef __ia64__
+#define	ACPI_FLUSH_CPU_CACHE()	wbinvd()
+#else
+#define ACPI_FLUSH_CPU_CACHE()	/* XXX: ia64_fc()? */
+#endif
+
+#endif /* !_SYS_DEV_ACPI_ACPICA_ACPI_FUNC_H */



CVS commit: src/sys/dev/acpi

2010-07-24 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 24 22:44:00 UTC 2010

Modified Files:
src/sys/dev/acpi: acpi_cpu.c acpi_cpu_cstate.c

Log Message:
Remove the currently unnecessary mutex.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/acpi/acpi_cpu.c
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/acpi/acpi_cpu_cstate.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/acpi/acpi_cpu.c
diff -u src/sys/dev/acpi/acpi_cpu.c:1.5 src/sys/dev/acpi/acpi_cpu.c:1.6
--- src/sys/dev/acpi/acpi_cpu.c:1.5	Fri Jul 23 05:32:02 2010
+++ src/sys/dev/acpi/acpi_cpu.c	Sat Jul 24 22:44:00 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu.c,v 1.5 2010/07/23 05:32:02 jruoho Exp $ */
+/* $NetBSD: acpi_cpu.c,v 1.6 2010/07/24 22:44:00 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_cpu.c,v 1.5 2010/07/23 05:32:02 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_cpu.c,v 1.6 2010/07/24 22:44:00 jruoho Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -62,7 +62,6 @@
 static bool		  acpicpu_suspend(device_t, const pmf_qual_t *);
 static bool		  acpicpu_resume(device_t, const pmf_qual_t *);
 
-kmutex_t		  acpicpu_mtx;
 struct acpicpu_softc	**acpicpu_sc = NULL;
 
 static const char * const acpicpu_hid[] = {
@@ -114,27 +113,22 @@
 
 	KASSERT(acpicpu_sc != NULL);
 
-	mutex_enter(acpicpu_mtx);
-
 	sc-sc_dev = self;
 	sc-sc_iot = aa-aa_iot;
 	sc-sc_node = aa-aa_node;
 	sc-sc_cpuid = acpicpu_id(sc-sc_object.ao_procid);
 
 	if (sc-sc_cpuid == 0xFF) {
-		mutex_exit(acpicpu_mtx);
 		aprint_error(: invalid CPU ID\n);
 		return;
 	}
 
 	if (acpicpu_sc[sc-sc_cpuid] != NULL) {
-		mutex_exit(acpicpu_mtx);
-		aprint_error(: already probed\n);
+		aprint_error(: already attached\n);
 		return;
 	}
 
 	acpicpu_sc[sc-sc_cpuid] = sc;
-	mutex_exit(acpicpu_mtx);
 
 	sc-sc_cap = acpicpu_cap(sc);
 	sc-sc_flags |= acpicpu_md_quirks();
@@ -210,8 +204,6 @@
 	for (i = 0; i  maxcpus; i++)
 		acpicpu_sc[i] = NULL;
 
-	mutex_init(acpicpu_mtx, MUTEX_DEFAULT, IPL_VM);
-
 	return 0;
 }
 
@@ -222,7 +214,6 @@
 
 	KASSERT(acpicpu_sc != NULL);
 
-	mutex_destroy(acpicpu_mtx);
 	kmem_free(acpicpu_sc, maxcpus * sizeof(*sc));
 	acpicpu_sc = NULL;
 

Index: src/sys/dev/acpi/acpi_cpu_cstate.c
diff -u src/sys/dev/acpi/acpi_cpu_cstate.c:1.8 src/sys/dev/acpi/acpi_cpu_cstate.c:1.9
--- src/sys/dev/acpi/acpi_cpu_cstate.c:1.8	Fri Jul 23 13:54:21 2010
+++ src/sys/dev/acpi/acpi_cpu_cstate.c	Sat Jul 24 22:44:00 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_cpu_cstate.c,v 1.8 2010/07/23 13:54:21 jruoho Exp $ */
+/* $NetBSD: acpi_cpu_cstate.c,v 1.9 2010/07/24 22:44:00 jruoho Exp $ */
 
 /*-
  * Copyright (c) 2010 Jukka Ruohonen jruoho...@iki.fi
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.8 2010/07/23 13:54:21 jruoho Exp $);
+__KERNEL_RCSID(0, $NetBSD: acpi_cpu_cstate.c,v 1.9 2010/07/24 22:44:00 jruoho Exp $);
 
 #include sys/param.h
 #include sys/cpu.h
@@ -76,7 +76,6 @@
 static bool		 acpicpu_cstate_bm_check(void);
 static void		 acpicpu_cstate_idle_enter(struct acpicpu_softc *,int);
 
-extern kmutex_t		  acpicpu_mtx;
 extern struct acpicpu_softc **acpicpu_sc;
 extern int		  acpi_suspended;
 



CVS commit: src/share/man/man4

2010-07-24 Thread Jean-Yves Migeon
Module Name:src
Committed By:   jym
Date:   Sat Jul 24 23:09:32 UTC 2010

Modified Files:
src/share/man/man4: options.4

Log Message:
Document PAE.


To generate a diff of this commit:
cvs rdiff -u -r1.393 -r1.394 src/share/man/man4/options.4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/options.4
diff -u src/share/man/man4/options.4:1.393 src/share/man/man4/options.4:1.394
--- src/share/man/man4/options.4:1.393	Wed Jul 21 11:08:10 2010
+++ src/share/man/man4/options.4	Sat Jul 24 23:09:32 2010
@@ -1,4 +1,4 @@
-.\	$NetBSD: options.4,v 1.393 2010/07/21 11:08:10 wiz Exp $
+.\	$NetBSD: options.4,v 1.394 2010/07/24 23:09:32 jym Exp $
 .\
 .\ Copyright (c) 1996
 .\ 	Perry E. Metzger.  All rights reserved.
@@ -2491,6 +2491,19 @@
 .It Cd options USER_LDT
 Include i386-specific system calls for modifying the local descriptor table,
 used by Windows emulators.
+.It Cd options PAE
+Enable
+.Tn PAE (Physical Address Extension)
+mode.
+.Tn PAE
+permits up to 36 bits physical addressing (64GB of physical memory), and
+turns physical addresses to 64 bits entities in the memory management
+subsystem. Userland virtual address space remains at 32 bits (4GB).
+.Tn PAE
+mode is required to enable the
+.Tn NX/XD (No-eXecute/eXecute Disable)
+bit for pages, which allows marking certain ones as not being executable.
+Any attempt to execute code from such a page will raise an exception.
 .It Cd options REALBASEMEM=integer
 Overrides the base memory size passed in from the boot block.
 (Value given in kilobytes.)



CVS commit: src/external/mit/xorg/lib/freetype

2010-07-24 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Sun Jul 25 02:25:30 UTC 2010

Modified Files:
src/external/mit/xorg/lib/freetype: Makefile

Log Message:
default the subpixel renderer and tt interpreter to enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/mit/xorg/lib/freetype/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/mit/xorg/lib/freetype/Makefile
diff -u src/external/mit/xorg/lib/freetype/Makefile:1.5 src/external/mit/xorg/lib/freetype/Makefile:1.6
--- src/external/mit/xorg/lib/freetype/Makefile:1.5	Fri May  1 19:42:18 2009
+++ src/external/mit/xorg/lib/freetype/Makefile	Sun Jul 25 02:25:29 2010
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2009/05/01 19:42:18 snj Exp $
+#	$NetBSD: Makefile,v 1.6 2010/07/25 02:25:29 mrg Exp $
 
 .include bsd.own.mk
 
@@ -83,11 +83,11 @@
 		-I${DESTDIR}${X11INCDIR}/freetype2/freetype/config \
 		-I${X11SRCDIR.${LIB}}/include
 
-.if defined(MKSUBPIXEL)  ${MKSUBPIXEL} != no
+.if !defined(MKSUBPIXEL) || ${MKSUBPIXEL} != no
 CPPFLAGS+=	-DFT_CONFIG_OPTION_SUBPIXEL_RENDERING
 .endif
 
-.if defined(MKTTINTERP)  ${MKTTINTERP} != no
+.if !defined(MKTTINTERP) || ${MKTTINTERP} != no
 CPPFLAGS+=	-DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
 .endif