CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sat Jan 23 10:36:42 UTC 2010 Modified Files: src/share/man/man9: xcall.9 Log Message: Fix Dt, remove trailing whitespace, sort SEE ALSO. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man9/xcall.9 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/man9/xcall.9 diff -u src/share/man/man9/xcall.9:1.3 src/share/man/man9/xcall.9:1.4 --- src/share/man/man9/xcall.9:1.3 Sat Jan 23 00:47:03 2010 +++ src/share/man/man9/xcall.9 Sat Jan 23 10:36:42 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: xcall.9,v 1.3 2010/01/23 00:47:03 rmind Exp $ +.\" $NetBSD: xcall.9,v 1.4 2010/01/23 10:36:42 wiz Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -28,7 +28,7 @@ .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd January 23, 2010 -.Dt xcall 9 +.Dt XCALL 9 .Os .Sh NAME .Nm xcall , @@ -108,7 +108,7 @@ Like .Fn xc_broadcast , but call -.Fn "(*func)" +.Fn "(*func)" on only the CPU indicated by .Fa ci . .Fn xc_unicast @@ -139,8 +139,8 @@ .Pa sys/kern/subr_xcall.c . .\" .Sh EXAMPLES .Sh SEE ALSO -.Xr percpu 9 , -.Xr kpreempt 9 +.Xr kpreempt 9 , +.Xr percpu 9 .Sh HISTORY The .Nm
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sat Jan 23 10:37:02 UTC 2010 Modified Files: src/share/man/man9: pool_cache.9 Log Message: Whitespace fix. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/share/man/man9/pool_cache.9 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/man9/pool_cache.9 diff -u src/share/man/man9/pool_cache.9:1.15 src/share/man/man9/pool_cache.9:1.16 --- src/share/man/man9/pool_cache.9:1.15 Sat Jan 23 00:54:43 2010 +++ src/share/man/man9/pool_cache.9 Sat Jan 23 10:37:01 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: pool_cache.9,v 1.15 2010/01/23 00:54:43 rmind Exp $ +.\" $NetBSD: pool_cache.9,v 1.16 2010/01/23 10:37:01 wiz Exp $ .\" .\" Copyright (c)2003 YAMAMOTO Takashi, .\" All rights reserved. @@ -329,5 +329,5 @@ .Xr intro 9 , .Xr kmem 9 , .Xr memoryallocators 9 , -.Xr percpu 9, +.Xr percpu 9 , .Xr pool 9
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sat Jan 23 10:37:21 UTC 2010 Modified Files: src/share/man/man9: percpu.9 Log Message: Remove trailing whitespace, fix xref to xcall. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man9/percpu.9 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/man9/percpu.9 diff -u src/share/man/man9/percpu.9:1.7 src/share/man/man9/percpu.9:1.8 --- src/share/man/man9/percpu.9:1.7 Sat Jan 23 00:54:43 2010 +++ src/share/man/man9/percpu.9 Sat Jan 23 10:37:21 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: percpu.9,v 1.7 2010/01/23 00:54:43 rmind Exp $ +.\" $NetBSD: percpu.9,v 1.8 2010/01/23 10:37:21 wiz Exp $ .\" .\" Copyright (c) 2010 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -57,7 +57,7 @@ interface provides per-CPU, CPU-local memory reservations to kernel subsystems. .Fo percpu_alloc -.Fa size +.Fa size .Fc reserves on each CPU an independent memory region of .Fa size @@ -161,7 +161,7 @@ .Xr kmem 9 , .Xr pcq 9 , .Xr pool_cache 9 , -.Xr xc 9 +.Xr xcall 9 .Sh HISTORY The .Nm
CVS commit: src/share/man/man9
Module Name:src Committed By: wiz Date: Sat Jan 23 10:38:17 UTC 2010 Modified Files: src/share/man/man9: edid.9 Log Message: Remove xref to itself from SEE ALSO. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man9/edid.9 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/man9/edid.9 diff -u src/share/man/man9/edid.9:1.2 src/share/man/man9/edid.9:1.3 --- src/share/man/man9/edid.9:1.2 Sat Dec 23 06:36:19 2006 +++ src/share/man/man9/edid.9 Sat Jan 23 10:38:17 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: edid.9,v 1.2 2006/12/23 06:36:19 wiz Exp $ +.\" $NetBSD: edid.9,v 1.3 2010/01/23 10:38:17 wiz Exp $ .\" .\" Copyright 2006 Itronix Inc. .\" All rights reserved. @@ -129,7 +129,6 @@ .Ed .Sh SEE ALSO .Xr ddc 9 , -.Xr edid 9 , .Xr iic 9 .Sh HISTORY These routines were added in
CVS commit: src/distrib/sets/lists/comp
Module Name:src Committed By: wiz Date: Sat Jan 23 10:40:58 UTC 2010 Modified Files: src/distrib/sets/lists/comp: mi Log Message: Add obsolete entries for percpu_init{,_cpu}(9). As the comment on top says, entries shouldn't be removed, but marked as obsolete instead. Hi rmind! To generate a diff of this commit: cvs rdiff -u -r1.1371 -r1.1372 src/distrib/sets/lists/comp/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/comp/mi diff -u src/distrib/sets/lists/comp/mi:1.1371 src/distrib/sets/lists/comp/mi:1.1372 --- src/distrib/sets/lists/comp/mi:1.1371 Sat Jan 23 00:17:07 2010 +++ src/distrib/sets/lists/comp/mi Sat Jan 23 10:40:58 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1371 2010/01/23 00:17:07 rmind Exp $ +# $NetBSD: mi,v 1.1372 2010/01/23 10:40:58 wiz Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -9104,6 +9104,8 @@ ./usr/share/man/cat9/percpu_alloc.0 comp-sys-catman .cat ./usr/share/man/cat9/percpu_free.0 comp-sys-catman .cat ./usr/share/man/cat9/percpu_getref.0 comp-sys-catman .cat +./usr/share/man/cat9/percpu_init.0 comp-obsolete obsolete +./usr/share/man/cat9/percpu_init_cpu.0 comp-obsolete obsolete ./usr/share/man/cat9/percpu_putref.0 comp-sys-catman .cat ./usr/share/man/cat9/percpu_foreach.0 comp-sys-catman .cat ./usr/share/man/cat9/pfil.0 comp-sys-catman .cat @@ -14632,6 +14634,8 @@ ./usr/share/man/html9/percpu_alloc.html comp-sys-htmlman html ./usr/share/man/html9/percpu_free.html comp-sys-htmlman html ./usr/share/man/html9/percpu_getref.html comp-sys-htmlman html +./usr/share/man/html9/percpu_init.html comp-obsolete obsolete +./usr/share/man/html9/percpu_init_cpu.html comp-obsolete obsolete ./usr/share/man/html9/percpu_putref.html comp-sys-htmlman html ./usr/share/man/html9/percpu_foreach.html comp-sys-htmlman html ./usr/share/man/html9/pfil.html comp-sys-htmlman html @@ -20327,6 +20331,8 @@ ./usr/share/man/man9/percpu_alloc.9 comp-sys-man .man ./usr/share/man/man9/percpu_free.9 comp-sys-man .man ./usr/share/man/man9/percpu_getref.9 comp-sys-man .man +./usr/share/man/man9/percpu_init.9 comp-obsolete obsolete +./usr/share/man/man9/percpu_init_cpu.9 comp-obsolete obsolete ./usr/share/man/man9/percpu_putref.9 comp-sys-man .man ./usr/share/man/man9/percpu_foreach.9 comp-sys-man .man ./usr/share/man/man9/pfil.9 comp-sys-man .man
CVS commit: src/share/man/man4
Module Name:src Committed By: wiz Date: Sat Jan 23 10:41:42 UTC 2010 Modified Files: src/share/man/man4: ddb.4 Log Message: Bump date for PowerPC descriptions. Make HTML-ready. To generate a diff of this commit: cvs rdiff -u -r1.130 -r1.131 src/share/man/man4/ddb.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/ddb.4 diff -u src/share/man/man4/ddb.4:1.130 src/share/man/man4/ddb.4:1.131 --- src/share/man/man4/ddb.4:1.130 Sat Jan 23 01:32:06 2010 +++ src/share/man/man4/ddb.4 Sat Jan 23 10:41:42 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: ddb.4,v 1.130 2010/01/23 01:32:06 mrg Exp $ +.\" $NetBSD: ddb.4,v 1.131 2010/01/23 10:41:42 wiz Exp $ .\" .\" Copyright (c) 1997 - 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -56,7 +56,7 @@ .\" any improvements or extensions that they make and grant Carnegie Mellon .\" the rights to redistribute these changes. .\" -.Dd January 10, 2010 +.Dd January 23, 2010 .Dt DDB 4 .Os .Sh NAME @@ -943,7 +943,7 @@ .It Ic ctx Print process MMU context information. .It Ic pv -Print PA->VA mapping information. +Print PA-\*[Gt]VA mapping information. .It Ic reset Reset the system. .It Ic tf
CVS commit: src/usr.sbin/wpa/wpa_supplicant
Module Name:src Committed By: wiz Date: Sat Jan 23 10:47:04 UTC 2010 Modified Files: src/usr.sbin/wpa/wpa_supplicant: wpa_supplicant.8 Log Message: -f is not mandatory. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 diff -u src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8:1.6 src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8:1.7 --- src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8:1.6 Fri Jan 22 16:41:57 2010 +++ src/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Sat Jan 23 10:47:04 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: wpa_supplicant.8,v 1.6 2010/01/22 16:41:57 sborrill Exp $ +.\" $NetBSD: wpa_supplicant.8,v 1.7 2010/01/23 10:47:04 wiz Exp $ .\" .\" Copyright (c) 2005 Sam Leffler .\" All rights reserved. @@ -36,8 +36,8 @@ .Sh SYNOPSIS .Nm .Op Fl BdehLqvw +.Op Fl f Ar debug-file .Fl i Ar ifname -.Fl f Ar debug-file .Fl c Ar config-file .Op Fl N i Ar ifname Fl c Ar config-file ... .Sh DESCRIPTION
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sat Jan 23 12:48:19 UTC 2010 Modified Files: src/sys/dev/acpi: wmi_acpi.c Log Message: * Fix the type of the input buffer in the WMI method call. * Do not error out if the flags field is is 0x00. Observed by ceg...@. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/acpi/wmi_acpi.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/wmi_acpi.c diff -u src/sys/dev/acpi/wmi_acpi.c:1.9 src/sys/dev/acpi/wmi_acpi.c:1.10 --- src/sys/dev/acpi/wmi_acpi.c:1.9 Sat Jan 9 15:34:59 2010 +++ src/sys/dev/acpi/wmi_acpi.c Sat Jan 23 12:48:19 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wmi_acpi.c,v 1.9 2010/01/09 15:34:59 jruoho Exp $ */ +/* $NetBSD: wmi_acpi.c,v 1.10 2010/01/23 12:48:19 jruoho Exp $ */ /*- * Copyright (c) 2009, 2010 Jukka Ruohonen @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.9 2010/01/09 15:34:59 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.10 2010/01/23 12:48:19 jruoho Exp $"); #include #include @@ -581,7 +581,7 @@ if (!(wmi->guid.flags & flag)) return false; - if (wmi->guid.count == 0x00 || wmi->guid.flags == 0x00) + if (wmi->guid.count == 0x00) return false; if (wmi->guid.count < idx) @@ -740,7 +740,7 @@ obj[2].Buffer.Pointer = ibuf->Pointer; obj[2].Type = (wmi->guid.flags & ACPI_WMI_FLAG_STRING) ? - ACPI_TYPE_STRING : ACPI_TYPE_INTEGER; + ACPI_TYPE_STRING : ACPI_TYPE_BUFFER; arg.Count = 0x03; arg.Pointer = obj;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sat Jan 23 13:32:45 UTC 2010 Modified Files: src/sys/dev/acpi: wmi_acpi.c Log Message: Correct the type also in the WMI write method. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/dev/acpi/wmi_acpi.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/wmi_acpi.c diff -u src/sys/dev/acpi/wmi_acpi.c:1.10 src/sys/dev/acpi/wmi_acpi.c:1.11 --- src/sys/dev/acpi/wmi_acpi.c:1.10 Sat Jan 23 12:48:19 2010 +++ src/sys/dev/acpi/wmi_acpi.c Sat Jan 23 13:32:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wmi_acpi.c,v 1.10 2010/01/23 12:48:19 jruoho Exp $ */ +/* $NetBSD: wmi_acpi.c,v 1.11 2010/01/23 13:32:45 jruoho Exp $ */ /*- * Copyright (c) 2009, 2010 Jukka Ruohonen @@ -27,7 +27,7 @@ * SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.10 2010/01/23 12:48:19 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wmi_acpi.c,v 1.11 2010/01/23 13:32:45 jruoho Exp $"); #include #include @@ -697,7 +697,7 @@ obj[1].Buffer.Pointer = ibuf->Pointer; obj[1].Type = (wmi->guid.flags & ACPI_WMI_FLAG_STRING) ? - ACPI_TYPE_STRING : ACPI_TYPE_INTEGER; + ACPI_TYPE_STRING : ACPI_TYPE_BUFFER; arg.Count = 0x02; arg.Pointer = obj;
CVS commit: src/sys/dev/acpi
Module Name:src Committed By: jruoho Date: Sat Jan 23 15:06:47 UTC 2010 Modified Files: src/sys/dev/acpi: acpi_bat.c Log Message: Cleanup: * Remove ACPI_BAT_DEBUG. * Reduce the amount of error reporting. * Remove the internal bookkeeping flags. * Remove the debugging functions used to print status and information changes. This information is fully conveyed in the output of envstat(8). * Always evaluate _STA. If it fails or the battery is not present, mark all remaining sensors as invalid. This will eliminate the convoluted update routine. * Semantics. Over 200 LOC was eliminated, but functional change should again be minimal. ok jmcneill@, pgoyette@ To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/acpi/acpi_bat.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_bat.c diff -u src/sys/dev/acpi/acpi_bat.c:1.76 src/sys/dev/acpi/acpi_bat.c:1.77 --- src/sys/dev/acpi/acpi_bat.c:1.76 Thu Jan 21 08:57:17 2010 +++ src/sys/dev/acpi/acpi_bat.c Sat Jan 23 15:06:47 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_bat.c,v 1.76 2010/01/21 08:57:17 jruoho Exp $ */ +/* $NetBSD: acpi_bat.c,v 1.77 2010/01/23 15:06:47 jruoho Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -62,10 +62,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#if 0 -#define ACPI_BAT_DEBUG -#endif - /* * ACPI Battery Driver. * @@ -79,21 +75,22 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.76 2010/01/21 08:57:17 jruoho Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_bat.c,v 1.77 2010/01/23 15:06:47 jruoho Exp $"); #include #include #include /* for hz */ #include #include + #include #include #include #include -#define _COMPONENT ACPI_BAT_COMPONENT -ACPI_MODULE_NAME("acpi_bat") +#define _COMPONENT ACPI_BAT_COMPONENT +ACPI_MODULE_NAME ("acpi_bat") /* * Sensor indexes. @@ -149,16 +146,12 @@ }; struct acpibat_softc { - struct acpi_devnode *sc_node; /* our ACPI devnode */ - int sc_flags; /* see below */ - int sc_available; /* available information level */ - - struct sysmon_envsys *sc_sme; - envsys_data_t sc_sensor[ACPIBAT_COUNT]; - struct timeval sc_lastupdate; - - kmutex_t sc_mutex; - kcondvar_t sc_condvar; + struct acpi_devnode *sc_node; + struct sysmon_envsys *sc_sme; + struct timeval sc_lastupdate; + envsys_data_t sc_sensor[ACPIBAT_COUNT]; + kmutex_t sc_mutex; + kcondvar_t sc_condvar; }; static const char * const bat_hid[] = { @@ -166,16 +159,7 @@ NULL }; -/* - * These flags are used to examine the battery device data returned from - * the ACPI interface, specifically the "battery status" - */ #define ACPIBAT_PWRUNIT_MA 0x0001 /* mA not mW */ - -/* - * These flags are used to examine the battery charge/discharge/critical - * state returned from a get-status command. - */ #define ACPIBAT_ST_DISCHARGING 0x0001 /* battery is discharging */ #define ACPIBAT_ST_CHARGING 0x0002 /* battery is charging */ #define ACPIBAT_ST_CRITICAL 0x0004 /* battery is critical */ @@ -201,50 +185,22 @@ #define ACPIBAT_VAL_ISVALID(x) \ (((x) != ACPIBAT_VAL_UNKNOWN) ? ENVSYS_SVALID : ENVSYS_SINVALID) -/* - * These flags are used to set internal state in our softc. - */ -#define ABAT_F_VERBOSE 0x01 /* verbose events */ -#define ABAT_F_PWRUNIT_MA 0x02 /* mA instead of mW */ -#define ABAT_F_PRESENT 0x04 /* is the battery present? */ - -#define ABAT_SET(sc, f) (void)((sc)->sc_flags |= (f)) -#define ABAT_CLEAR(sc, f) (void)((sc)->sc_flags &= ~(f)) -#define ABAT_ISSET(sc, f) ((sc)->sc_flags & (f)) - -/* - * Available info level - */ - -#define ABAT_ALV_NONE 0 /* none is available */ -#define ABAT_ALV_PRESENCE 1 /* presence info is available */ -#define ABAT_ALV_INFO 2 /* battery info is available */ -#define ABAT_ALV_STAT 3 /* battery status is available */ - -static int acpibat_match(device_t, cfdata_t, void *); -static void acpibat_attach(device_t, device_t, void *); -static bool acpibat_resume(device_t, pmf_qual_t); +static int acpibat_match(device_t, cfdata_t, void *); +static void acpibat_attach(device_t, device_t, void *); +static int acpibat_get_sta(device_t); +static ACPI_OBJECT *acpibat_get_object(ACPI_HANDLE, const char *, int); +static void acpibat_get_info(device_t); +static void acpibat_get_status(device_t); +static void acpibat_update_info(void *); +static void acpibat_update_status(void *); +static void acpibat_init_envsys(device_t); +static void acpibat_notify_handler(ACPI_HANDLE, UINT32, void *); +static void acpibat_refresh(struct sysmon_envsys *, envsys_data_t *); +static bool acpibat_resume(device_t, pmf_qual_t); CFATTACH_DECL_NEW(acpibat, sizeof(struct acpibat_softc), acpibat_match, acpibat_attach, NULL, NULL); -static void acpibat_clear_presence(s
CVS commit: src/sys/arch/i386/conf
Module Name:src Committed By: jruoho Date: Sat Jan 23 15:40:14 UTC 2010 Modified Files: src/sys/arch/i386/conf: ALL Log Message: ACPI_BAT_DEBUG is no more. To generate a diff of this commit: cvs rdiff -u -r1.228 -r1.229 src/sys/arch/i386/conf/ALL 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/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.228 src/sys/arch/i386/conf/ALL:1.229 --- src/sys/arch/i386/conf/ALL:1.228 Mon Jan 18 16:43:15 2010 +++ src/sys/arch/i386/conf/ALL Sat Jan 23 15:40:14 2010 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.228 2010/01/18 16:43:15 pooka Exp $ +# $NetBSD: ALL,v 1.229 2010/01/23 15:40:14 jruoho Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.228 $" +#ident "ALL-$Revision: 1.229 $" maxusers 64 # estimated number of users @@ -1741,7 +1741,6 @@ options AC97_IO_DEBUG options ACPI_ACAD_DEBUG options ACPI_APM_DEBUG -options ACPI_BAT_DEBUG options ACPI_BUT_DEBUG #options ACPI_DEBUG options ACPI_EXTRA_DEBUG
CVS commit: src/sys/arch/mips
Module Name:src Committed By: mrg Date: Sat Jan 23 15:55:54 UTC 2010 Modified Files: src/sys/arch/mips/include: cpu.h src/sys/arch/mips/mips: mips_machdep.c Log Message: rename pridtab{}::cpu_name to cpu_displayname. should fix a build error reported by h...@. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/arch/mips/include/cpu.h cvs rdiff -u -r1.224 -r1.225 src/sys/arch/mips/mips/mips_machdep.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/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.94 src/sys/arch/mips/include/cpu.h:1.95 --- src/sys/arch/mips/include/cpu.h:1.94 Mon Dec 14 00:46:04 2009 +++ src/sys/arch/mips/include/cpu.h Sat Jan 23 15:55:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.94 2009/12/14 00:46:04 matt Exp $ */ +/* $NetBSD: cpu.h,v 1.95 2010/01/23 15:55:54 mrg Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -61,7 +61,7 @@ int cpu_flags; u_int cpu_cp0flags; /* presence of some cp0 regs */ u_int cpu_cidflags; /* company-specific flags */ - const char *cpu_name; + const char *cpu_displayname; }; extern const struct pridtab *mycpu; Index: src/sys/arch/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.224 src/sys/arch/mips/mips/mips_machdep.c:1.225 --- src/sys/arch/mips/mips/mips_machdep.c:1.224 Tue Dec 15 18:24:47 2009 +++ src/sys/arch/mips/mips/mips_machdep.c Sat Jan 23 15:55:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mips_machdep.c,v 1.224 2009/12/15 18:24:47 matt Exp $ */ +/* $NetBSD: mips_machdep.c,v 1.225 2010/01/23 15:55:54 mrg Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -112,7 +112,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.224 2009/12/15 18:24:47 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.225 2010/01/23 15:55:54 mrg Exp $"); #include "opt_cputype.h" #include "opt_compat_netbsd32.h" @@ -860,7 +860,7 @@ curlwp = &lwp0; mycpu = NULL; - for (ct = cputab; ct->cpu_name != NULL; ct++) { + for (ct = cputab; ct->cpu_displayname != NULL; ct++) { if (MIPS_PRID_CID(cpu_id) != ct->cpu_cid || MIPS_PRID_IMPL(cpu_id) != ct->cpu_pid) continue; @@ -1095,13 +1095,13 @@ const char *cpuname, *fpuname; int i; - cpuname = mycpu->cpu_name; + cpuname = mycpu->cpu_displayname; fpuname = NULL; for (i = 0; i < sizeof(fputab)/sizeof(fputab[0]); i++) { if (MIPS_PRID_CID(fpu_id) == fputab[i].cpu_cid && MIPS_PRID_IMPL(fpu_id) == fputab[i].cpu_pid) { - fpuname = fputab[i].cpu_name; + fpuname = fputab[i].cpu_displayname; break; } }
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: mrg Date: Sat Jan 23 15:58:13 UTC 2010 Modified Files: src/sys/arch/arm/arm32: cpu.c Log Message: rename a local cpu_name structure member to avoid potential conflict with 's. To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/arch/arm/arm32/cpu.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/arm/arm32/cpu.c diff -u src/sys/arch/arm/arm32/cpu.c:1.71 src/sys/arch/arm/arm32/cpu.c:1.72 --- src/sys/arch/arm/arm32/cpu.c:1.71 Sat Oct 25 18:15:19 2008 +++ src/sys/arch/arm/arm32/cpu.c Sat Jan 23 15:58:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.71 2008/10/25 18:15:19 matt Exp $ */ +/* $NetBSD: cpu.c,v 1.72 2010/01/23 15:58:13 mrg Exp $ */ /* * Copyright (c) 1995 Mark Brinicombe. @@ -46,7 +46,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.71 2008/10/25 18:15:19 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.72 2010/01/23 15:58:13 mrg Exp $"); #include #include @@ -285,7 +285,7 @@ struct cpuidtab { u_int32_t cpuid; enum cpu_class cpu_class; - const char *cpu_name; + const char *cpu_classname; const char * const *cpu_steppings; }; @@ -488,7 +488,7 @@ steppingstr = cpuids[i].cpu_steppings[cpuid & CPU_ID_REVISION_MASK], sprintf(cpu_model, "%s%s%s (%s core)", - cpuids[i].cpu_name, + cpuids[i].cpu_classname, steppingstr[0] == '*' ? "" : " ", &steppingstr[steppingstr[0] == '*'], cpu_classes[cpu_class].class_name);
CVS commit: src/sys/arch/sparc/sparc
Module Name:src Committed By: mrg Date: Sat Jan 23 16:06:57 UTC 2010 Modified Files: src/sys/arch/sparc/sparc: cpu.c cpuvar.h Log Message: rename cpu_info{}::cpu_name member to cpu_longname, to avoid a potential conflict with . To generate a diff of this commit: cvs rdiff -u -r1.220 -r1.221 src/sys/arch/sparc/sparc/cpu.c cvs rdiff -u -r1.82 -r1.83 src/sys/arch/sparc/sparc/cpuvar.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/sparc/sparc/cpu.c diff -u src/sys/arch/sparc/sparc/cpu.c:1.220 src/sys/arch/sparc/sparc/cpu.c:1.221 --- src/sys/arch/sparc/sparc/cpu.c:1.220 Sun Dec 20 03:42:29 2009 +++ src/sys/arch/sparc/sparc/cpu.c Sat Jan 23 16:06:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.220 2009/12/20 03:42:29 mrg Exp $ */ +/* $NetBSD: cpu.c,v 1.221 2010/01/23 16:06:57 mrg Exp $ */ /* * Copyright (c) 1996 @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.220 2009/12/20 03:42:29 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.221 2010/01/23 16:06:57 mrg Exp $"); #include "opt_multiprocessor.h" #include "opt_lockdebug.h" @@ -348,7 +348,7 @@ /* Stuff to only run on the boot CPU */ cpu_setup(); snprintf(buf, sizeof buf, "%s @ %s MHz, %s FPU", - cpi->cpu_name, clockfreq(cpi->hz), cpi->fpu_name); + cpi->cpu_longname, clockfreq(cpi->hz), cpi->fpu_name); snprintf(cpu_model, sizeof cpu_model, "%s (%s)", machine_model, buf); printf(": %s\n", buf); @@ -437,7 +437,7 @@ /* Now start this CPU */ cpu_spinup(cpi); - printf(": %s @ %s MHz, %s FPU\n", cpi->cpu_name, + printf(": %s @ %s MHz, %s FPU\n", cpi->cpu_longname, clockfreq(cpi->hz), cpi->fpu_name); cache_print(sc); @@ -1498,7 +1498,7 @@ * A cloaked Turbosparc: clear any items in cpuinfo that * might have been set to uS2 versions during bootstrap. */ - sc->cpu_name = 0; + sc->cpu_longname = 0; sc->mmu_ncontext = 0; sc->cpu_type = 0; sc->cacheinfo.c_vactype = 0; @@ -1879,8 +1879,8 @@ /* Additional fixups */ mp->minfo->cpu_match(sc, mp->minfo, node); } - if (sc->cpu_name == 0) - sc->cpu_name = mp->name; + if (sc->cpu_longname == 0) + sc->cpu_longname = mp->name; if (sc->mmu_ncontext == 0) sc->mmu_ncontext = mp->minfo->ncontext; Index: src/sys/arch/sparc/sparc/cpuvar.h diff -u src/sys/arch/sparc/sparc/cpuvar.h:1.82 src/sys/arch/sparc/sparc/cpuvar.h:1.83 --- src/sys/arch/sparc/sparc/cpuvar.h:1.82 Wed Jan 13 02:17:12 2010 +++ src/sys/arch/sparc/sparc/cpuvar.h Sat Jan 23 16:06:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuvar.h,v 1.82 2010/01/13 02:17:12 mrg Exp $ */ +/* $NetBSD: cpuvar.h,v 1.83 2010/01/23 16:06:57 mrg Exp $ */ /* * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -261,7 +261,7 @@ int mid; /* Module ID for MP systems */ int mbus; /* 1 if CPU is on MBus */ int mxcc; /* 1 if a MBus-level MXCC is present */ - const char *cpu_name; /* CPU model */ + const char *cpu_longname; /* CPU model */ int cpu_impl; /* CPU implementation code */ int cpu_vers; /* CPU version code */ int mmu_impl; /* MMU implementation code */
CVS commit: src/sys/dev/isa
Module Name:src Committed By: cegger Date: Sat Jan 23 17:22:05 UTC 2010 Modified Files: src/sys/dev/isa: ess.c Log Message: essattach: printf -> aprint_* To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/dev/isa/ess.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/isa/ess.c diff -u src/sys/dev/isa/ess.c:1.76 src/sys/dev/isa/ess.c:1.77 --- src/sys/dev/isa/ess.c:1.76 Tue Apr 8 20:08:49 2008 +++ src/sys/dev/isa/ess.c Sat Jan 23 17:22:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ess.c,v 1.76 2008/04/08 20:08:49 cegger Exp $ */ +/* $NetBSD: ess.c,v 1.77 2010/01/23 17:22:04 cegger Exp $ */ /* * Copyright 1997 @@ -66,7 +66,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.76 2008/04/08 20:08:49 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ess.c,v 1.77 2010/01/23 17:22:04 cegger Exp $"); #include #include @@ -922,7 +922,7 @@ return; } - printf(": ESS Technology ES%s [version 0x%04x]\n", + aprint_normal(": ESS Technology ES%s [version 0x%04x]\n", essmodel[sc->sc_model], sc->sc_version); sc->sc_audio1.polled = sc->sc_audio1.irq == -1; @@ -930,10 +930,10 @@ sc->sc_audio1.ih = isa_intr_establish(sc->sc_ic, sc->sc_audio1.irq, sc->sc_audio1.ist, IPL_AUDIO, ess_audio1_intr, sc); - printf("%s: audio1 interrupting at irq %d\n", - device_xname(&sc->sc_dev), sc->sc_audio1.irq); + aprint_normal_dev(&sc->sc_dev, + "audio1 interrupting at irq %d\n", sc->sc_audio1.irq); } else - printf("%s: audio1 polled\n", device_xname(&sc->sc_dev)); + aprint_normal_dev(&sc->sc_dev, "audio1 polled\n"); sc->sc_audio1.maxsize = isa_dmamaxsize(sc->sc_ic, sc->sc_audio1.drq); if (isa_drq_alloc(sc->sc_ic, sc->sc_audio1.drq) != 0) { @@ -955,10 +955,11 @@ sc->sc_audio2.ih = isa_intr_establish(sc->sc_ic, sc->sc_audio2.irq, sc->sc_audio2.ist, IPL_AUDIO, ess_audio2_intr, sc); - printf("%s: audio2 interrupting at irq %d\n", - device_xname(&sc->sc_dev), sc->sc_audio2.irq); + aprint_normal_dev(&sc->sc_dev, + "audio2 interrupting at irq %d\n", + sc->sc_audio2.irq); } else - printf("%s: audio2 polled\n", device_xname(&sc->sc_dev)); + aprint_normal_dev(&sc->sc_dev, "audio2 polled\n"); sc->sc_audio2.maxsize = isa_dmamaxsize(sc->sc_ic, sc->sc_audio2.drq);
CVS commit: [netbsd-5-0] src/libexec/ld.elf_so
Module Name:src Committed By: bouyer Date: Sat Jan 23 17:34:12 UTC 2010 Modified Files: src/libexec/ld.elf_so [netbsd-5-0]: rtld.h Log Message: Pull up following revision(s) (requested by skrll in ticket #1249): libexec/ld.elf_so/rtld.h: revisions 1.87, 1.88 libexec/ld.elf_so/reloc.c: revision 1.101 Restore backwards compatibility for binaries referencing the main Obj_Entry. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.79.8.1 src/libexec/ld.elf_so/rtld.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.79 src/libexec/ld.elf_so/rtld.h:1.79.8.1 --- src/libexec/ld.elf_so/rtld.h:1.79 Sat Oct 4 09:37:12 2008 +++ src/libexec/ld.elf_so/rtld.h Sat Jan 23 17:34:12 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.79 2008/10/04 09:37:12 skrll Exp $ */ +/* $NetBSD: rtld.h,v 1.79.8.1 2010/01/23 17:34:12 bouyer Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -130,7 +130,6 @@ caddr_t entry; /* Entry point */ const Elf_Phdr *__junk001; size_t pathlen; /* Pathname length */ - void *ehdr; /* Items from the dynamic section. */ Elf_Addr *pltgot; /* PLTGOT table */ @@ -195,6 +194,8 @@ Objlist dagmembers; /* DAG has these members (%) */ dev_t dev; /* Object's filesystem's device */ ino_t ino; /* Object's inode number */ + + void *ehdr; } Obj_Entry; #if defined(_RTLD_SOURCE)
CVS commit: [netbsd-5] src/libexec/ld.elf_so
Module Name:src Committed By: bouyer Date: Sat Jan 23 17:34:16 UTC 2010 Modified Files: src/libexec/ld.elf_so [netbsd-5]: reloc.c rtld.h Log Message: Pull up following revision(s) (requested by skrll in ticket #1249): libexec/ld.elf_so/rtld.h: revisions 1.87, 1.88 libexec/ld.elf_so/reloc.c: revision 1.101 Restore backwards compatibility for binaries referencing the main Obj_Entry. To generate a diff of this commit: cvs rdiff -u -r1.96.4.1 -r1.96.4.2 src/libexec/ld.elf_so/reloc.c cvs rdiff -u -r1.79.4.1 -r1.79.4.2 src/libexec/ld.elf_so/rtld.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/reloc.c diff -u src/libexec/ld.elf_so/reloc.c:1.96.4.1 src/libexec/ld.elf_so/reloc.c:1.96.4.2 --- src/libexec/ld.elf_so/reloc.c:1.96.4.1 Wed Oct 14 09:31:27 2009 +++ src/libexec/ld.elf_so/reloc.c Sat Jan 23 17:34:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: reloc.c,v 1.96.4.1 2009/10/14 09:31:27 sborrill Exp $ */ +/* $NetBSD: reloc.c,v 1.96.4.2 2010/01/23 17:34:16 bouyer Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: reloc.c,v 1.96.4.1 2009/10/14 09:31:27 sborrill Exp $"); +__RCSID("$NetBSD: reloc.c,v 1.96.4.2 2010/01/23 17:34:16 bouyer Exp $"); #endif /* not lint */ #include @@ -210,7 +210,6 @@ obj->dlerror = dlerror; obj->dlclose = dlclose; obj->dladdr = dladdr; - obj->dlinfo = dlinfo; dbg(("fixing up PLTGOT")); /* Set the special PLTGOT entries. */ Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.79.4.1 src/libexec/ld.elf_so/rtld.h:1.79.4.2 --- src/libexec/ld.elf_so/rtld.h:1.79.4.1 Wed Oct 14 09:31:27 2009 +++ src/libexec/ld.elf_so/rtld.h Sat Jan 23 17:34:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.79.4.1 2009/10/14 09:31:27 sborrill Exp $ */ +/* $NetBSD: rtld.h,v 1.79.4.2 2010/01/23 17:34:16 bouyer Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -130,7 +130,6 @@ caddr_t entry; /* Entry point */ const Elf_Phdr *__junk001; size_t pathlen; /* Pathname length */ - void *ehdr; /* Items from the dynamic section. */ Elf_Addr *pltgot; /* PLTGOT table */ @@ -168,7 +167,6 @@ char *(*dlerror)(void); int (*dlclose)(void *); int (*dladdr)(const void *, Dl_info *); - int (*dlinfo)(void *, int, void *); u_int32_t mainprog:1, /* True if this is the main program */ rtld:1, /* True if this is the dynamic linker */ @@ -196,6 +194,8 @@ Objlist dagmembers; /* DAG has these members (%) */ dev_t dev; /* Object's filesystem's device */ ino_t ino; /* Object's inode number */ + + void *ehdr; } Obj_Entry; #if defined(_RTLD_SOURCE)
CVS commit: [netbsd-5-0] src/libexec/ld.elf_so
Module Name:src Committed By: bouyer Date: Sat Jan 23 17:39:11 UTC 2010 Modified Files: src/libexec/ld.elf_so [netbsd-5-0]: rtld.h Log Message: Back out ticket 1249 for now, it may not be needed on netbsd-5-0. To generate a diff of this commit: cvs rdiff -u -r1.79.8.1 -r1.79.8.2 src/libexec/ld.elf_so/rtld.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.79.8.1 src/libexec/ld.elf_so/rtld.h:1.79.8.2 --- src/libexec/ld.elf_so/rtld.h:1.79.8.1 Sat Jan 23 17:34:12 2010 +++ src/libexec/ld.elf_so/rtld.h Sat Jan 23 17:39:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.79.8.1 2010/01/23 17:34:12 bouyer Exp $ */ +/* $NetBSD: rtld.h,v 1.79.8.2 2010/01/23 17:39:11 bouyer Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -130,6 +130,7 @@ caddr_t entry; /* Entry point */ const Elf_Phdr *__junk001; size_t pathlen; /* Pathname length */ + void *ehdr; /* Items from the dynamic section. */ Elf_Addr *pltgot; /* PLTGOT table */ @@ -194,8 +195,6 @@ Objlist dagmembers; /* DAG has these members (%) */ dev_t dev; /* Object's filesystem's device */ ino_t ino; /* Object's inode number */ - - void *ehdr; } Obj_Entry; #if defined(_RTLD_SOURCE)
CVS commit: [netbsd-5] src/games/fortune/strfile
Module Name:src Committed By: bouyer Date: Sat Jan 23 17:43:04 UTC 2010 Modified Files: src/games/fortune/strfile [netbsd-5]: strfile.8 Log Message: Pull up following revision(s) (requested by mbalmer in ticket #1250): games/fortune/strfile/strfile.8: revision 1.13 The default output file extension is '.dat', not '.out'. >From Lars Nooden via OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.12.32.1 src/games/fortune/strfile/strfile.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/games/fortune/strfile/strfile.8 diff -u src/games/fortune/strfile/strfile.8:1.12 src/games/fortune/strfile/strfile.8:1.12.32.1 --- src/games/fortune/strfile/strfile.8:1.12 Thu Sep 9 22:03:21 2004 +++ src/games/fortune/strfile/strfile.8 Sat Jan 23 17:43:04 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: strfile.8,v 1.12 2004/09/09 22:03:21 wiz Exp $ +.\" $NetBSD: strfile.8,v 1.12.32.1 2010/01/23 17:43:04 bouyer Exp $ .\" .\" Copyright (c) 1989, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -32,7 +32,7 @@ .\" .\" @(#)strfile.8 8.1 (Berkeley) 6/9/93 .\" -.Dd June 9, 1993 +.Dd January 17, 2010 .Dt STRFILE 8 .Os .Sh NAME @@ -57,7 +57,7 @@ This allows random access of the strings. .Pp The output file, if not specified on the command line, is named -.Ar source_file Ns Sy .out . +.Ar source_file Ns Sy .dat . .Pp The options are as follows: .Bl -tag -width "-c char" @@ -130,7 +130,7 @@ to dump them out in the table order. .Sh FILES .Bl -tag -width strfile.out -compact -.It Pa strfile.out +.It Pa strfile.dat default output file. .El .Sh SEE ALSO
CVS commit: src/etc/rc.d
Module Name:src Committed By: drochner Date: Sat Jan 23 17:44:44 UTC 2010 Modified Files: src/etc/rc.d: mdnsd Log Message: fix an obvious typo in directory check To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/etc/rc.d/mdnsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/mdnsd diff -u src/etc/rc.d/mdnsd:1.1 src/etc/rc.d/mdnsd:1.2 --- src/etc/rc.d/mdnsd:1.1 Tue Sep 29 23:56:27 2009 +++ src/etc/rc.d/mdnsd Sat Jan 23 17:44:44 2010 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: mdnsd,v 1.1 2009/09/29 23:56:27 tsarna Exp $ +# $NetBSD: mdnsd,v 1.2 2010/01/23 17:44:44 drochner Exp $ # # PROVIDE: mdnsd @@ -16,7 +16,7 @@ mdnsd_precmd() { -if [ ! -d /var/run/mdns ]; then +if [ ! -d /var/run/mdnsd ]; then mkdir -p -m 755 /var/run/mdnsd fi chown _mdnsd:_mdnsd /var/run/mdnsd
CVS commit: [netbsd-5] src
Module Name:src Committed By: bouyer Date: Sat Jan 23 17:47:37 UTC 2010 Modified Files: src/distrib/sparc/miniroot [netbsd-5]: Makefile.inc src/distrib/sparc/ramdisk [netbsd-5]: dot.profile src/sys/arch/sparc/dev [netbsd-5]: audioamd.c fd.c src/sys/arch/sparc/sparc [netbsd-5]: auxreg.h src/sys/arch/sparc/stand/common [netbsd-5]: promdev.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1251): sys/arch/sparc/sparc/auxreg.h: revision 1.13 distrib/sparc/ramdisk/dot.profile: revision 1.20 sys/arch/sparc/dev/audioamd.c: revision 1.25 sys/arch/sparc/dev/fd.c: revision 1.147 sys/arch/sparc/stand/common/promdev.c: revision 1.23 distrib/sparc/miniroot/Makefile.inc: revision 1.16 Build miniroot binaries for sparc with -Os to shrink instfs.tgz for the second boot floppy which use miniroot objects. This is workaround for PR install/42146, and ok'ed by m...@. Don't try to read disklabel to check FS_RAID on floppy boot since reopening floppy could cause Data Access Exception later. Fixes PR port-sparc/42186, ok'ed by m...@. Disable "fast trap" handlers which invoke software interrupts in sparc/amd7930intr.s and sparc/bsd_fdintr.s until they are rewritten to adapt new MI softint(9) API. No particular comments on PR port-sparc/42192, but this fixes timeout problem on floppy access on my SPARCstation 1+. XXX: floppy support on sun4m seems to have another problem (data overrun). Use /dev/fd0a rather than /dev/rfd0a to read instfs.tgz image from floppy. It looks newer (appearred after 1.6) gzip tries to read less than DEV_BSIZE (to check header?) so we can't use raw device directly. (note sparc bootfs ramdisk doesn't have dd(1)) Workaround for PR port-sparc/42193, and would also fix PR install/28734. Explicitly clear AUXIO4M_FTC bit in FTC_FLIP macro used on pseudo-dma for floppy, as well as AUXIO4C_FTC bit for sun4c. A comment in the macro says AUXIO4M_FTC bit is auto-clear, but my two SS20s (including compatible) with 150MHz hyperSPARCs get data_overrun without it, and no bad side effect on SS5 (works with and without this change). Closes PR port-sparc/42516, which is the last one of a bunch of floppy issue on NetBSD/sparc since NetBSD 2.0 days. See http://mail-index.NetBSD.org/port-sparc/2009/12/20/msg000484.html for details. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.12.34.1 src/distrib/sparc/miniroot/Makefile.inc cvs rdiff -u -r1.19 -r1.19.4.1 src/distrib/sparc/ramdisk/dot.profile cvs rdiff -u -r1.23 -r1.23.28.1 src/sys/arch/sparc/dev/audioamd.c cvs rdiff -u -r1.141 -r1.141.6.1 src/sys/arch/sparc/dev/fd.c cvs rdiff -u -r1.12 -r1.12.88.1 src/sys/arch/sparc/sparc/auxreg.h cvs rdiff -u -r1.21 -r1.21.14.1 src/sys/arch/sparc/stand/common/promdev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sparc/miniroot/Makefile.inc diff -u src/distrib/sparc/miniroot/Makefile.inc:1.12 src/distrib/sparc/miniroot/Makefile.inc:1.12.34.1 --- src/distrib/sparc/miniroot/Makefile.inc:1.12 Sun Jun 13 05:27:18 2004 +++ src/distrib/sparc/miniroot/Makefile.inc Sat Jan 23 17:47:37 2010 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.inc,v 1.12 2004/06/13 05:27:18 sjg Exp $ +# $NetBSD: Makefile.inc,v 1.12.34.1 2010/01/23 17:47:37 bouyer Exp $ IMAGESIZE= 8192k +DBG= -Os MAKEFS_FLAGS= -o density=4k IMAGEENDIAN= be MAKEDEVTARGETS= all Index: src/distrib/sparc/ramdisk/dot.profile diff -u src/distrib/sparc/ramdisk/dot.profile:1.19 src/distrib/sparc/ramdisk/dot.profile:1.19.4.1 --- src/distrib/sparc/ramdisk/dot.profile:1.19 Wed Apr 30 13:10:49 2008 +++ src/distrib/sparc/ramdisk/dot.profile Sat Jan 23 17:47:36 2010 @@ -1,4 +1,4 @@ -# $NetBSD: dot.profile,v 1.19 2008/04/30 13:10:49 martin Exp $ +# $NetBSD: dot.profile,v 1.19.4.1 2010/01/23 17:47:36 bouyer Exp $ # # Copyright (c) 2000 The NetBSD Foundation, Inc. # All rights reserved. @@ -76,7 +76,7 @@ local dev rval rval=0 - dev="/dev/rfd0a" + dev="/dev/fd0a" echo "Ejecting floppy disk" eject $dev Index: src/sys/arch/sparc/dev/audioamd.c diff -u src/sys/arch/sparc/dev/audioamd.c:1.23 src/sys/arch/sparc/dev/audioamd.c:1.23.28.1 --- src/sys/arch/sparc/dev/audioamd.c:1.23 Mon Dec 3 15:34:20 2007 +++ src/sys/arch/sparc/dev/audioamd.c Sat Jan 23 17:47:36 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: audioamd.c,v 1.23 2007/12/03 15:34:20 ad Exp $ */ +/* $NetBSD: audioamd.c,v 1.23.28.1 2010/01/23 17:47:36 bouyer Exp $ */ /* NetBSD: am7930_sparc.c,v 1.44 1999/03/14 22:29:00 jonathan Exp */ /* @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: audioamd.c,v 1.23 2007/12/03 15:34:20 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: audioamd.c,v 1.23.28.1 2010/01/23 17:47:36 bouyer Exp $"); #include "audio.h" #if NAUDIO > 0 @@ -306,7 +306,13 @@ sc->sc_au.au_bt = sc->sc_bt; sc->sc_au.au_bh = sc->sc_bh; (void)bus_intr_establish2(sc->sc_bt, pri, IPL
CVS commit: [netbsd-5] src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Sat Jan 23 17:50:43 UTC 2010 Modified Files: src/sys/dev/pci [netbsd-5]: pcidevs Log Message: Pull up following revision(s) (requested by mbalmer in ticket #1254): sys/dev/pci/pcidevs: revision 1.1015 sys/dev/pci/pcidevs.h: regen sys/dev/pci/pcidevs_data.h: regen Add two IBM RSS devices. To generate a diff of this commit: cvs rdiff -u -r1.962.4.7 -r1.962.4.8 src/sys/dev/pci/pcidevs 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/pcidevs diff -u src/sys/dev/pci/pcidevs:1.962.4.7 src/sys/dev/pci/pcidevs:1.962.4.8 --- src/sys/dev/pci/pcidevs:1.962.4.7 Fri Dec 18 05:45:29 2009 +++ src/sys/dev/pci/pcidevs Sat Jan 23 17:50:42 2010 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.962.4.7 2009/12/18 05:45:29 snj Exp $ +$NetBSD: pcidevs,v 1.962.4.8 2010/01/23 17:50:42 bouyer Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -2063,6 +2063,8 @@ product IBM GXT6500P 0x021b GXT-6500P Graphics Adapter product IBM GXT4500P 0x021c GXT-4500P Graphics Adapter product IBM GXT135P 0x0233 GXT-135P Graphics Adapter +product IBM 4810_BSP 0x0295 4810 BSP +product IBM 4810_SCC 0x0297 4810 SCC product IBM SERVERAID8K 0x9580 ServeRAID 8k product IBM MPIC2 0x MPIC-II
CVS commit: [netbsd-5] src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Sat Jan 23 17:54:44 UTC 2010 Modified Files: src/sys/dev/pci [netbsd-5]: pcidevs.h pcidevs_data.h Log Message: Regen for ticket 1254 To generate a diff of this commit: cvs rdiff -u -r1.963.4.7 -r1.963.4.8 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.962.4.7 -r1.962.4.8 src/sys/dev/pci/pcidevs_data.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/pcidevs.h diff -u src/sys/dev/pci/pcidevs.h:1.963.4.7 src/sys/dev/pci/pcidevs.h:1.963.4.8 --- src/sys/dev/pci/pcidevs.h:1.963.4.7 Fri Dec 18 05:46:41 2009 +++ src/sys/dev/pci/pcidevs.h Sat Jan 23 17:54:38 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs.h,v 1.963.4.7 2009/12/18 05:46:41 snj Exp $ */ +/* $NetBSD: pcidevs.h,v 1.963.4.8 2010/01/23 17:54:38 bouyer Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.962.4.7 2009/12/18 05:45:29 snj Exp + * NetBSD: pcidevs,v 1.962.4.8 2010/01/23 17:50:42 bouyer Exp */ /* @@ -2070,6 +2070,8 @@ #define PCI_PRODUCT_IBM_GXT6500P 0x021b /* GXT-6500P Graphics Adapter */ #define PCI_PRODUCT_IBM_GXT4500P 0x021c /* GXT-4500P Graphics Adapter */ #define PCI_PRODUCT_IBM_GXT135P 0x0233 /* GXT-135P Graphics Adapter */ +#define PCI_PRODUCT_IBM_4810_BSP 0x0295 /* 4810 BSP */ +#define PCI_PRODUCT_IBM_4810_SCC 0x0297 /* 4810 SCC */ #define PCI_PRODUCT_IBM_SERVERAID8K 0x9580 /* ServeRAID 8k */ #define PCI_PRODUCT_IBM_MPIC2 0x /* MPIC-II */ Index: src/sys/dev/pci/pcidevs_data.h diff -u src/sys/dev/pci/pcidevs_data.h:1.962.4.7 src/sys/dev/pci/pcidevs_data.h:1.962.4.8 --- src/sys/dev/pci/pcidevs_data.h:1.962.4.7 Fri Dec 18 05:46:41 2009 +++ src/sys/dev/pci/pcidevs_data.h Sat Jan 23 17:54:38 2010 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs_data.h,v 1.962.4.7 2009/12/18 05:46:41 snj Exp $ */ +/* $NetBSD: pcidevs_data.h,v 1.962.4.8 2010/01/23 17:54:38 bouyer Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.962.4.7 2009/12/18 05:45:29 snj Exp + * NetBSD: pcidevs,v 1.962.4.8 2010/01/23 17:50:42 bouyer Exp */ /* @@ -7172,6 +7172,14 @@ "GXT-135P Graphics Adapter", }, { + PCI_VENDOR_IBM, PCI_PRODUCT_IBM_4810_BSP, + "4810 BSP", + }, + { + PCI_VENDOR_IBM, PCI_PRODUCT_IBM_4810_SCC, + "4810 SCC", + }, + { PCI_VENDOR_IBM, PCI_PRODUCT_IBM_SERVERAID8K, "ServeRAID 8k", }, @@ -14740,4 +14748,4 @@ "Video Controller", }, }; -const int pci_nproducts = 3084; +const int pci_nproducts = 3086;
CVS commit: [netbsd-5] src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Sat Jan 23 17:56:17 UTC 2010 Modified Files: src/sys/dev/pci [netbsd-5]: pucdata.c Log Message: Pull up following revision(s) (requested by mbalmer in ticket #1255): sys/dev/pci/pucdata.c: revision 1.59 Add the IBM 481033H SCC To generate a diff of this commit: cvs rdiff -u -r1.55.4.1 -r1.55.4.2 src/sys/dev/pci/pucdata.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/pci/pucdata.c diff -u src/sys/dev/pci/pucdata.c:1.55.4.1 src/sys/dev/pci/pucdata.c:1.55.4.2 --- src/sys/dev/pci/pucdata.c:1.55.4.1 Fri Oct 16 06:32:37 2009 +++ src/sys/dev/pci/pucdata.c Sat Jan 23 17:56:17 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pucdata.c,v 1.55.4.1 2009/10/16 06:32:37 snj Exp $ */ +/* $NetBSD: pucdata.c,v 1.55.4.2 2010/01/23 17:56:17 bouyer Exp $ */ /* * Copyright (c) 1998, 1999 Christopher G. Demetriou. All rights reserved. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.55.4.1 2009/10/16 06:32:37 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pucdata.c,v 1.55.4.2 2010/01/23 17:56:17 bouyer Exp $"); #include #include @@ -205,6 +205,17 @@ * XXX Dolphin Peripherals 4078 (dual serial and single parallel) */ + /* IBM SurePOS 300 Series (481033H) serial ports */ + { "IBM SurePOS 300 Series (481033H)", + { PCI_VENDOR_IBM, PCI_PRODUCT_IBM_4810_SCC, 0, 0 }, + { 0x, 0xfff,0, 0 }, + { + { PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ }, /* Port C */ + { PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ }, /* Port D */ + { PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ }, /* Port E */ + { PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ }, /* Port F */ + }, + }, /* * SIIG Boards.
CVS commit: [netbsd-5] src/lib/libevent
Module Name:src Committed By: bouyer Date: Sat Jan 23 17:59:31 UTC 2010 Modified Files: src/lib/libevent [netbsd-5]: Makefile Log Message: Apply patch, requested by tron in ticket 1259: lib/libevent/Makefile: patch Make sure that the automatically generated file "event-config.h" gets removed by the "cleandir" target. To generate a diff of this commit: cvs rdiff -u -r1.4.4.3 -r1.4.4.4 src/lib/libevent/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libevent/Makefile diff -u src/lib/libevent/Makefile:1.4.4.3 src/lib/libevent/Makefile:1.4.4.4 --- src/lib/libevent/Makefile:1.4.4.3 Sat Sep 5 12:55:11 2009 +++ src/lib/libevent/Makefile Sat Jan 23 17:59:31 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4.4.3 2009/09/05 12:55:11 bouyer Exp $ +# $NetBSD: Makefile,v 1.4.4.4 2010/01/23 17:59:31 bouyer Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 NOLINT= # Until someone explains to me how to avoid lint stupidity @@ -92,4 +92,6 @@ event-config.h: config.h sed -e 's/#define /#define _EVENT_/' ${.ALLSRC} > ${.OBJDIR}/${.TARGET} +CLEANFILES+=3D event-config.h + .include
CVS commit: [netbsd-5] src/lib/libm/src
Module Name:src Committed By: bouyer Date: Sat Jan 23 18:02:33 UTC 2010 Modified Files: src/lib/libm/src [netbsd-5]: k_standard.c Log Message: Pull up following revision(s) (requested by tnozaki in ticket #1261): lib/libm/src/k_standard.c: revision 1.13, 1.14 PR/42630 asin(2.0) and acos(2.0) doesn't return NaN. reported by NARUSE, Yui -san, Thanks! let the previous fix apply to acos rather than atan2, and get rid of #ifdef vax To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.12.26.1 src/lib/libm/src/k_standard.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libm/src/k_standard.c diff -u src/lib/libm/src/k_standard.c:1.12 src/lib/libm/src/k_standard.c:1.12.26.1 --- src/lib/libm/src/k_standard.c:1.12 Thu Jul 21 16:58:39 2005 +++ src/lib/libm/src/k_standard.c Sat Jan 23 18:02:33 2010 @@ -12,7 +12,7 @@ #include #if defined(LIBM_SCCS) && !defined(lint) -__RCSID("$NetBSD: k_standard.c,v 1.12 2005/07/21 16:58:39 christos Exp $"); +__RCSID("$NetBSD: k_standard.c,v 1.12.26.1 2010/01/23 18:02:33 bouyer Exp $"); #endif #include "math.h" @@ -103,9 +103,10 @@ exc.type = DOMAIN; exc.name = type < 100 ? "acos" : "acosf"; exc.retval = zero; - if (_LIB_VERSION == _POSIX_) + if (_LIB_VERSION == _POSIX_) { + exc.retval = zero/zero; errno = EDOM; - else if (!matherr(&exc)) { + } else if (!matherr(&exc)) { if(_LIB_VERSION == _SVID_) { (void) WRITE2("acos: DOMAIN error\n", 19); } @@ -118,9 +119,10 @@ exc.type = DOMAIN; exc.name = type < 100 ? "asin" : "asinf"; exc.retval = zero; - if(_LIB_VERSION == _POSIX_) + if(_LIB_VERSION == _POSIX_) { + exc.retval = zero/zero; errno = EDOM; - else if (!matherr(&exc)) { + } else if (!matherr(&exc)) { if(_LIB_VERSION == _SVID_) { (void) WRITE2("asin: DOMAIN error\n", 19); }
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sat Jan 23 18:03:37 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Tickets 1249-1251, 1254, 1255, 1259, 1261 To generate a diff of this commit: cvs rdiff -u -r1.1.2.178 -r1.1.2.179 src/doc/CHANGES-5.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1 diff -u src/doc/CHANGES-5.1:1.1.2.178 src/doc/CHANGES-5.1:1.1.2.179 --- src/doc/CHANGES-5.1:1.1.2.178 Fri Jan 22 22:21:16 2010 +++ src/doc/CHANGES-5.1 Sat Jan 23 18:03:37 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.178 2010/01/22 22:21:16 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.179 2010/01/23 18:03:37 bouyer Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -16237,3 +16237,80 @@ Fix CVE-2009-4355. [taca, ticket #1265] +libexec/ld.elf_so/reloc.c 1.101 +libexec/ld.elf_so/rtld.h 1.87, 1.88 + + Restore backwards compatibility for binaries referencing the main + Obj_Entry. + [skrll, ticket #1249] + +games/fortune/strfile/strfile.8 1.13 + + The default output file extension is '.dat', not '.out'. + From Lars Nooden via OpenBSD. + [mbalmer, ticket #1250] + +distrib/sparc/miniroot/Makefile.inc 1.16 +distrib/sparc/ramdisk/dot.profile 1.20 +sys/arch/sparc/dev/audioamd.c 1.25 +sys/arch/sparc/dev/fd.c1.147 +sys/arch/sparc/sparc/auxreg.h 1.13 +sys/arch/sparc/stand/common/promdev.c 1.23 + + Build miniroot binaries for sparc with -Os to shrink instfs.tgz + for the second boot floppy which use miniroot objects. + This is workaround for PR install/42146, and ok'ed by m...@. + + Don't try to read disklabel to check FS_RAID on floppy boot since + reopening floppy could cause Data Access Exception later. + Fixes PR port-sparc/42186, ok'ed by m...@. + + Disable "fast trap" handlers which invoke software interrupts + in sparc/amd7930intr.s and sparc/bsd_fdintr.s until they are + rewritten to adapt new MI softint(9) API. + No particular comments on PR port-sparc/42192, but + this fixes timeout problem on floppy access on my SPARCstation 1+. + + Use /dev/fd0a rather than /dev/rfd0a to read instfs.tgz image from + floppy. It looks newer (appearred after 1.6) gzip tries to read + less than DEV_BSIZE (to check header?) so we can't use raw device + directly. (note sparc bootfs ramdisk doesn't have dd(1)) + Workaround for PR port-sparc/42193, and would also fix PR install/28734. + + Explicitly clear AUXIO4M_FTC bit in FTC_FLIP macro used on + pseudo-dma for floppy, as well as AUXIO4C_FTC bit for sun4c. + A comment in the macro says AUXIO4M_FTC bit is auto-clear, + but my two SS20s (including compatible) with 150MHz hyperSPARCs + get data_overrun without it, and no bad side effect on SS5 + (works with and without this change). + Closes PR port-sparc/42516, which is the last one of a bunch of + floppy issue on NetBSD/sparc since NetBSD 2.0 days. See + http://mail-index.NetBSD.org/port-sparc/2009/12/20/msg000484.html + for details. + [tsutsui, ticket #1251] + +sys/dev/pci/pcidevs1.1015 +sys/dev/pci/pcidevs.hreleng +sys/dev/pci/pcidevs_data.h releng + + Add two IBM RSS devices. + [mbalmer, ticket #1254] + +sys/dev/pci/pucdata.c1.59 + + Add the IBM 481033H SCC + [mbalmer, ticket #1255] + +lib/libevent/Makefilepatch + Make sure that the automatically generated file "event-config.h" + gets removed by the "cleandir" target. + [tron, ticket #1259] + +lib/libm/src/k_standard.c 1.13, 1.14 + + PR/42630 asin(2.0) and acos(2.0) doesn't return NaN. + reported by NARUSE, Yui -san, Thanks! + let the previous fix apply to acos rather than atan2, + and get rid of #ifdef vax + [tnozaki, ticket #1261] +
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: bouyer Date: Sat Jan 23 18:20:31 UTC 2010 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1260 To generate a diff of this commit: cvs rdiff -u -r1.1.2.179 -r1.1.2.180 src/doc/CHANGES-5.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1 diff -u src/doc/CHANGES-5.1:1.1.2.179 src/doc/CHANGES-5.1:1.1.2.180 --- src/doc/CHANGES-5.1:1.1.2.179 Sat Jan 23 18:03:37 2010 +++ src/doc/CHANGES-5.1 Sat Jan 23 18:20:30 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.179 2010/01/23 18:03:37 bouyer Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.180 2010/01/23 18:20:30 bouyer Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -16314,3 +16314,8 @@ and get rid of #ifdef vax [tnozaki, ticket #1261] +xsrc/dist/* remove + + Remove obsolete and never used sources. + [tron, ticket #1260] +
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: bouyer Date: Sat Jan 23 18:26:37 UTC 2010 Modified Files: src/sys/arch/xen/xen: privcmd.c Log Message: Use paddr_t to store physical address and cast mfn values to paddr_t before shift. Fix overflow issue preventing xend from working as reported by Mark Davies on port-xen@ To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/xen/xen/privcmd.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/xen/xen/privcmd.c diff -u src/sys/arch/xen/xen/privcmd.c:1.39 src/sys/arch/xen/xen/privcmd.c:1.40 --- src/sys/arch/xen/xen/privcmd.c:1.39 Fri Oct 23 02:32:34 2009 +++ src/sys/arch/xen/xen/privcmd.c Sat Jan 23 18:26:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: privcmd.c,v 1.39 2009/10/23 02:32:34 snj Exp $ */ +/* $NetBSD: privcmd.c,v 1.40 2010/01/23 18:26:37 bouyer Exp $ */ /*- * Copyright (c) 2004 Christian Limpach. @@ -27,7 +27,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: privcmd.c,v 1.39 2009/10/23 02:32:34 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: privcmd.c,v 1.40 2010/01/23 18:26:37 bouyer Exp $"); #include #include @@ -336,7 +336,7 @@ privcmd_mmap_t *mcmd = ap->a_data; privcmd_mmap_entry_t mentry; vaddr_t va; - u_long ma; + paddr_t ma; struct vm_map *vmm = &curlwp->l_proc->p_vmspace->vm_map; for (i = 0; i < mcmd->num; i++) { @@ -357,7 +357,7 @@ if (maddr == NULL) return ENOMEM; va = mentry.va & ~PAGE_MASK; - ma = mentry.mfn << PGSHIFT; /* XXX ??? */ + ma = ((paddr_t)mentry.mfn) << PGSHIFT; /* XXX ??? */ for (j = 0; j < mentry.npages; j++) { maddr[j] = ma; ma += PAGE_SIZE; @@ -374,7 +374,8 @@ int i; privcmd_mmapbatch_t* pmb = ap->a_data; vaddr_t va0, va; - u_long mfn, ma; + u_long mfn; + paddr_t ma; struct vm_map *vmm; struct vm_map_entry *entry; vm_prot_t prot; @@ -420,7 +421,7 @@ UVM_KMF_VAONLY); return error; } - ma = mfn << PGSHIFT; + ma = ((paddr_t)mfn) << PGSHIFT; if (pmap_enter_ma(pmap_kernel(), trymap, ma, 0, prot, PMAP_CANFAIL, pmb->dom)) { mfn |= 0xF000;
CVS commit: src/sys/dev
Module Name:src Committed By: bouyer Date: Sat Jan 23 18:31:04 UTC 2010 Modified Files: src/sys/dev: cgd.c vnd.c src/sys/dev/dkwedge: dk.c Log Message: struct buf::b_iodone is not called at splbio() any more. Make sure non-MPsafe iodone callbacks raise the SPL as appropriate. Fix buffer corruption issue I noticed in dk(4), and probable similar issues in vnd(4) and cgd(4). To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/dev/cgd.c cvs rdiff -u -r1.205 -r1.206 src/sys/dev/vnd.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/dkwedge/dk.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/cgd.c diff -u src/sys/dev/cgd.c:1.68 src/sys/dev/cgd.c:1.69 --- src/sys/dev/cgd.c:1.68 Wed Jan 20 19:00:47 2010 +++ src/sys/dev/cgd.c Sat Jan 23 18:31:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cgd.c,v 1.68 2010/01/20 19:00:47 dyoung Exp $ */ +/* $NetBSD: cgd.c,v 1.69 2010/01/23 18:31:04 bouyer Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.68 2010/01/20 19:00:47 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.69 2010/01/23 18:31:04 bouyer Exp $"); #include #include @@ -411,13 +411,13 @@ return 0; } -/* expected to be called at splbio() */ static void cgdiodone(struct buf *nbp) { struct buf *obp = nbp->b_private; struct cgd_softc *cs = getcgd_softc(obp->b_dev); struct dk_softc *dksc = &cs->sc_dksc; + int s; KDASSERT(cs); @@ -453,10 +453,12 @@ obp->b_resid = 0; if (obp->b_error != 0) obp->b_resid = obp->b_bcount; + s = splbio(); disk_unbusy(&dksc->sc_dkdev, obp->b_bcount - obp->b_resid, (obp->b_flags & B_READ)); biodone(obp); dk_iodone(di, dksc); + splx(s); } /* XXX: we should probably put these into dksubr.c, mostly */ Index: src/sys/dev/vnd.c diff -u src/sys/dev/vnd.c:1.205 src/sys/dev/vnd.c:1.206 --- src/sys/dev/vnd.c:1.205 Sun Dec 6 16:33:18 2009 +++ src/sys/dev/vnd.c Sat Jan 23 18:31:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.205 2009/12/06 16:33:18 dsl Exp $ */ +/* $NetBSD: vnd.c,v 1.206 2010/01/23 18:31:04 bouyer Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -130,7 +130,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.205 2009/12/06 16:33:18 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.206 2010/01/23 18:31:04 bouyer Exp $"); #if defined(_KERNEL_OPT) #include "fs_nfs.h" @@ -874,6 +874,7 @@ struct vndxfer *vnx = VND_BUFTOXFER(bp); struct vnd_softc *vnd = vnx->vx_vnd; struct buf *obp = bp->b_private; + int s = splbio(); KASSERT(&vnx->vx_buf == bp); KASSERT(vnd->sc_active > 0); @@ -889,6 +890,7 @@ if (vnd->sc_active == 0) { wakeup(&vnd->sc_tab); } + splx(s); obp->b_error = bp->b_error; obp->b_resid = bp->b_resid; buf_destroy(bp); Index: src/sys/dev/dkwedge/dk.c diff -u src/sys/dev/dkwedge/dk.c:1.52 src/sys/dev/dkwedge/dk.c:1.53 --- src/sys/dev/dkwedge/dk.c:1.52 Sun Dec 27 01:37:17 2009 +++ src/sys/dev/dkwedge/dk.c Sat Jan 23 18:31:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.52 2009/12/27 01:37:17 jakllsch Exp $ */ +/* $NetBSD: dk.c,v 1.53 2010/01/23 18:31:04 bouyer Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.52 2009/12/27 01:37:17 jakllsch Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.53 2010/01/23 18:31:04 bouyer Exp $"); #ifdef _KERNEL_OPT #include "opt_dkwedge.h" @@ -1198,7 +1198,6 @@ * dkiodone: * * I/O to a wedge has completed; alert the top half. - * NOTE: Must be called at splbio()! */ static void dkiodone(struct buf *bp) @@ -1206,6 +1205,8 @@ struct buf *obp = bp->b_private; struct dkwedge_softc *sc = dkwedge_lookup(obp->b_dev); + int s = splbio(); + if (bp->b_error != 0) obp->b_error = bp->b_error; obp->b_resid = bp->b_resid; @@ -1223,6 +1224,7 @@ /* Kick the queue in case there is more work we can do. */ dkstart(sc); + splx(s); } /*
CVS commit: src/sys/dev/ata
Module Name:src Committed By: bouyer Date: Sat Jan 23 18:54:53 UTC 2010 Modified Files: src/sys/dev/ata: wd.c Log Message: struct buf::b_iodone is not called at splbio() any more. Make sure non-MPsafe iodone callbacks raise the SPL as appropriate. To generate a diff of this commit: cvs rdiff -u -r1.382 -r1.383 src/sys/dev/ata/wd.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/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.382 src/sys/dev/ata/wd.c:1.383 --- src/sys/dev/ata/wd.c:1.382 Tue Jan 19 22:28:31 2010 +++ src/sys/dev/ata/wd.c Sat Jan 23 18:54:53 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.382 2010/01/19 22:28:31 pooka Exp $ */ +/* $NetBSD: wd.c,v 1.383 2010/01/23 18:54:53 bouyer Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.382 2010/01/19 22:28:31 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wd.c,v 1.383 2010/01/23 18:54:53 bouyer Exp $"); #include "opt_ata.h" @@ -595,6 +595,7 @@ struct buf *obp = bp->b_private; struct wd_softc *sc = device_lookup_private(&wd_cd, DISKUNIT(obp->b_dev)); + int s; if (__predict_false(bp->b_error != 0)) { /* @@ -623,15 +624,19 @@ bp->b_data = (char *)bp->b_data + bp->b_bcount; bp->b_blkno += (bp->b_bcount / 512); bp->b_rawblkno += (bp->b_bcount / 512); + s = splbio(); wdstart1(sc, bp); + splx(s); return; done: obp->b_error = bp->b_error; obp->b_resid = bp->b_resid; + s = splbio(); putiobuf(bp); biodone(obp); sc->openings++; + splx(s); /* wddone() will call wdstart() */ }
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Sat Jan 23 19:54:04 UTC 2010 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_page.h uvm_pglist.c Log Message: Add a start_hint to vm_physseg so when allocating pages, we can skip forward over pages that are probably still allocated. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.55.14.1 src/sys/uvm/uvm_page.h cvs rdiff -u -r1.42.16.3 -r1.42.16.4 src/sys/uvm/uvm_pglist.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.h diff -u src/sys/uvm/uvm_page.h:1.55 src/sys/uvm/uvm_page.h:1.55.14.1 --- src/sys/uvm/uvm_page.h:1.55 Wed Jun 4 15:06:04 2008 +++ src/sys/uvm/uvm_page.h Sat Jan 23 19:54:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.h,v 1.55 2008/06/04 15:06:04 ad Exp $ */ +/* $NetBSD: uvm_page.h,v 1.55.14.1 2010/01/23 19:54:04 matt Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -234,9 +234,11 @@ paddr_t end; /* (PF# of last page in segment) + 1 */ paddr_t avail_start; /* PF# of first free page in segment */ paddr_t avail_end; /* (PF# of last free page in segment) +1 */ - int free_list; /* which free list they belong on */ struct vm_page *pgs; /* vm_page structures (from start) */ struct vm_page *lastpg; /* vm_page structure for end */ + int free_list; /* which free list they belong on */ + u_int start_hint; /* start looking for free pages here */ + /* protected by uvm_fpageqlock */ #ifdef __HAVE_PMAP_PHYSSEG struct pmap_physseg pmseg; /* pmap specific (MD) data */ #endif Index: src/sys/uvm/uvm_pglist.c diff -u src/sys/uvm/uvm_pglist.c:1.42.16.3 src/sys/uvm/uvm_pglist.c:1.42.16.4 --- src/sys/uvm/uvm_pglist.c:1.42.16.3 Fri Jan 22 08:54:41 2010 +++ src/sys/uvm/uvm_pglist.c Sat Jan 23 19:54:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pglist.c,v 1.42.16.3 2010/01/22 08:54:41 matt Exp $ */ +/* $NetBSD: uvm_pglist.c,v 1.42.16.4 2010/01/23 19:54:04 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.42.16.3 2010/01/22 08:54:41 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.42.16.4 2010/01/23 19:54:04 matt Exp $"); #include #include @@ -122,9 +122,9 @@ paddr_t alignment, paddr_t boundary, struct pglist *rlist) { signed int try, limit, tryidx, end, idx, skip; - const signed int align = atop(alignment); struct vm_page *pgs; int pagemask; + bool second_pass; #ifdef DEBUG paddr_t idxpa, lastidxpa; int cidx = 0; /* XXX: GCC */ @@ -136,20 +136,42 @@ KASSERT(mutex_owned(&uvm_fpageqlock)); - try = roundup(max(atop(low), ps->avail_start), align); - limit = min(atop(high), ps->avail_end); + low = atop(low); + high = atop(high); + alignment = atop(alignment); + + /* + * We start our search at the just after where the last allocation + * succeeded. + */ + try = roundup(max(low, ps->avail_start + ps->start_hint), alignment); + limit = min(high, ps->avail_end); pagemask = ~((boundary >> PAGE_SHIFT) - 1); skip = 0; + second_pass = true; + pgs = ps->pgs; for (;;) { bool ok = true; - int cnt; + signed int cnt; if (try + num > limit) { + if (ps->start_hint == 0 || second_pass) { +/* + * We've run past the allowable range. + */ +return 0; /* FAIL = 0 pages*/ + } /* - * We've run past the allowable range. + * We've wrapped around the end of this segment + * so restart at the beginning but now our limit + * is were we started. */ - return (0); /* FAIL */ + second_pass = true; + try = roundup(max(low, ps->avail_start), alignment); + limit = min(high, ps->avail_start + ps->start_hint); + skip = 0; + continue; } if (boundary != 0 && ((try ^ (try + num - 1)) & pagemask) != 0) { @@ -158,7 +180,8 @@ * just crossed and ensure alignment. */ try = (try + num - 1) & pagemask; - try = roundup(try, align); + try = roundup(try, alignment); + skip = 0; continue; } #ifdef DEBUG @@ -177,14 +200,13 @@ #endif tryidx = try - ps->start; end = tryidx + num; - pgs = ps->pgs; /* * Found a suitable starting page. See if the range is free. */ #ifdef PGALLOC_VERBOSE printf("%s: ps=%p try=%#x end=%#x skip=%#x, align=%#x", - __func__, ps, tryidx, end, skip, align); + __func__, ps, tryidx, end, skip, alignment); #endif /* * We start at the end and work backwards since if we find a @@ -243,7 +265,7 @@ /* * now round up that to the needed alignment. */ - cnt = roundup(cnt, align); + cnt = roundup(cnt, alignment); /* * The number of pages we can skip checking * (might be 0 if cnt > num). @@ -258,10 +280,16 @@ for (idx = tryidx, pgs += idx; idx < end; idx++, pgs++) uvm_pglist_add(pgs, rlist); + /* + * the next time we need to search this segment, start after this + * chunk of pages we
CVS commit: [matt-nb5-mips64] src/sys/uvm
Module Name:src Committed By: matt Date: Sat Jan 23 20:03:28 UTC 2010 Modified Files: src/sys/uvm [matt-nb5-mips64]: uvm_pglist.c Log Message: Use roundup2 instead of roundup when doing alignment rounding since all alignments must be a power of 2. (thanks to rmind for suggesting it). To generate a diff of this commit: cvs rdiff -u -r1.42.16.4 -r1.42.16.5 src/sys/uvm/uvm_pglist.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_pglist.c diff -u src/sys/uvm/uvm_pglist.c:1.42.16.4 src/sys/uvm/uvm_pglist.c:1.42.16.5 --- src/sys/uvm/uvm_pglist.c:1.42.16.4 Sat Jan 23 19:54:04 2010 +++ src/sys/uvm/uvm_pglist.c Sat Jan 23 20:03:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_pglist.c,v 1.42.16.4 2010/01/23 19:54:04 matt Exp $ */ +/* $NetBSD: uvm_pglist.c,v 1.42.16.5 2010/01/23 20:03:28 matt Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.42.16.4 2010/01/23 19:54:04 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_pglist.c,v 1.42.16.5 2010/01/23 20:03:28 matt Exp $"); #include #include @@ -144,7 +144,7 @@ * We start our search at the just after where the last allocation * succeeded. */ - try = roundup(max(low, ps->avail_start + ps->start_hint), alignment); + try = roundup2(max(low, ps->avail_start + ps->start_hint), alignment); limit = min(high, ps->avail_end); pagemask = ~((boundary >> PAGE_SHIFT) - 1); skip = 0; @@ -168,7 +168,7 @@ * is were we started. */ second_pass = true; - try = roundup(max(low, ps->avail_start), alignment); + try = roundup2(max(low, ps->avail_start), alignment); limit = min(high, ps->avail_start + ps->start_hint); skip = 0; continue; @@ -180,7 +180,7 @@ * just crossed and ensure alignment. */ try = (try + num - 1) & pagemask; - try = roundup(try, alignment); + try = roundup2(try, alignment); skip = 0; continue; } @@ -265,7 +265,7 @@ /* * now round up that to the needed alignment. */ - cnt = roundup(cnt, alignment); + cnt = roundup2(cnt, alignment); /* * The number of pages we can skip checking * (might be 0 if cnt > num). @@ -499,7 +499,7 @@ if (boundary != 0 && boundary < size) return (EINVAL); num = atop(round_page(size)); - low = roundup(low, alignment); + low = roundup2(low, alignment); TAILQ_INIT(rlist);
CVS commit: [netbsd-5-0] src/libexec/ld.elf_so
Module Name:src Committed By: bouyer Date: Sat Jan 23 20:37:01 UTC 2010 Modified Files: src/libexec/ld.elf_so [netbsd-5-0]: rtld.h Log Message: Pull up following revision(s) (requested by skrll in ticket #1249): libexec/ld.elf_so/rtld.h: revision 1.88 Restore backwards compatibility for binaries referencing the main Obj_Entry. To generate a diff of this commit: cvs rdiff -u -r1.79.8.2 -r1.79.8.3 src/libexec/ld.elf_so/rtld.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.79.8.2 src/libexec/ld.elf_so/rtld.h:1.79.8.3 --- src/libexec/ld.elf_so/rtld.h:1.79.8.2 Sat Jan 23 17:39:11 2010 +++ src/libexec/ld.elf_so/rtld.h Sat Jan 23 20:37:01 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.79.8.2 2010/01/23 17:39:11 bouyer Exp $ */ +/* $NetBSD: rtld.h,v 1.79.8.3 2010/01/23 20:37:01 bouyer Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -130,7 +130,6 @@ caddr_t entry; /* Entry point */ const Elf_Phdr *__junk001; size_t pathlen; /* Pathname length */ - void *ehdr; /* Items from the dynamic section. */ Elf_Addr *pltgot; /* PLTGOT table */ @@ -195,6 +194,8 @@ Objlist dagmembers; /* DAG has these members (%) */ dev_t dev; /* Object's filesystem's device */ ino_t ino; /* Object's inode number */ + + void *ehdr; } Obj_Entry; #if defined(_RTLD_SOURCE)
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: bouyer Date: Sat Jan 23 20:37:34 UTC 2010 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.2 Log Message: Ticket 1249 To generate a diff of this commit: cvs rdiff -u -r1.1.2.44 -r1.1.2.45 src/doc/CHANGES-5.0.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.0.2 diff -u src/doc/CHANGES-5.0.2:1.1.2.44 src/doc/CHANGES-5.0.2:1.1.2.45 --- src/doc/CHANGES-5.0.2:1.1.2.44 Fri Jan 22 22:18:10 2010 +++ src/doc/CHANGES-5.0.2 Sat Jan 23 20:37:34 2010 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.2,v 1.1.2.44 2010/01/22 22:18:10 snj Exp $ +# $NetBSD: CHANGES-5.0.2,v 1.1.2.45 2010/01/23 20:37:34 bouyer Exp $ A complete list of changes from the NetBSD 5.0.1 release to the NetBSD 5.0.2 release: @@ -1104,3 +1104,9 @@ Fix CVE-2009-4355. [taca, ticket #1265] +libexec/ld.elf_so/rtld.h 1.88 + + Restore backwards compatibility for binaries referencing the main + Obj_Entry. + [skrll, ticket #1249] +
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Sat Jan 23 21:46:59 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: fix a comment. To generate a diff of this commit: cvs rdiff -u -r1.301 -r1.302 src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.301 src/sys/arch/sparc64/sparc64/locore.s:1.302 --- src/sys/arch/sparc64/sparc64/locore.s:1.301 Thu Dec 10 05:10:03 2009 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Jan 23 21:46:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.301 2009/12/10 05:10:03 rmind Exp $ */ +/* $NetBSD: locore.s,v 1.302 2010/01/23 21:46:59 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -56,7 +56,7 @@ */ #ifndef SCHIZO_BUS_SPACE_BROKEN /* Need phys access for USIII so far */ -#define SPITFIRE /* We don't support Cheetah (USIII) yet */ +#define SPITFIRE /* Cheetah (USIII) */ #endif #undef PARANOID /* Extremely expensive consistency checks */ #undef NO_VCACHE /* Map w/D$ disabled */
CVS commit: src/sys/arch/xen
Module Name:src Committed By: cegger Date: Sat Jan 23 22:32:42 UTC 2010 Modified Files: src/sys/arch/xen/x86: xen_bus_dma.c src/sys/arch/xen/xen: xengnt.c xennetback_xenbus.c Log Message: fix address overflow with 32bit PAE. Reported and tested by Mark Davies on port-...@. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/xen/x86/xen_bus_dma.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/xen/xen/xengnt.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/xen/xen/xennetback_xenbus.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/xen/x86/xen_bus_dma.c diff -u src/sys/arch/xen/x86/xen_bus_dma.c:1.15 src/sys/arch/xen/x86/xen_bus_dma.c:1.16 --- src/sys/arch/xen/x86/xen_bus_dma.c:1.15 Wed Jul 29 12:02:08 2009 +++ src/sys/arch/xen/x86/xen_bus_dma.c Sat Jan 23 22:32:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: xen_bus_dma.c,v 1.15 2009/07/29 12:02:08 cegger Exp $ */ +/* $NetBSD: xen_bus_dma.c,v 1.16 2010/01/23 22:32:42 cegger Exp $ */ /* NetBSD bus_dma.c,v 1.21 2005/04/16 07:53:35 yamt Exp */ /*- @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xen_bus_dma.c,v 1.15 2009/07/29 12:02:08 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xen_bus_dma.c,v 1.16 2010/01/23 22:32:42 cegger Exp $"); #include #include @@ -82,8 +82,8 @@ KASSERT(npages >= npagesreq); /* get npages from UWM, and give them back to the hypervisor */ - error = uvm_pglistalloc(npages << PAGE_SHIFT, 0, avail_end, 0, 0, - mlistp, npages, (flags & BUS_DMA_NOWAIT) == 0); + error = uvm_pglistalloc(((psize_t)npages) << PAGE_SHIFT, +0, avail_end, 0, 0, mlistp, npages, (flags & BUS_DMA_NOWAIT) == 0); if (error) return (error); @@ -133,7 +133,7 @@ pa = VM_PAGE_TO_PHYS(pg); xpmap_phys_to_machine_mapping[ (pa - XPMAP_OFFSET) >> PAGE_SHIFT] = mfn+i; - xpq_queue_machphys_update((mfn+i) << PAGE_SHIFT, pa); + xpq_queue_machphys_update(((paddr_t)(mfn+i)) << PAGE_SHIFT, pa); /* while here, give extra pages back to UVM */ if (i >= npagesreq) { TAILQ_REMOVE(mlistp, pg, pageq.queue); @@ -179,7 +179,7 @@ pa = VM_PAGE_TO_PHYS(pg); xpmap_phys_to_machine_mapping[ (pa - XPMAP_OFFSET) >> PAGE_SHIFT] = mfn; - xpq_queue_machphys_update((mfn) << PAGE_SHIFT, pa); + xpq_queue_machphys_update(((paddr_t)mfn) << PAGE_SHIFT, pa); TAILQ_REMOVE(mlistp, pg, pageq.queue); uvm_pagefree(pg); } Index: src/sys/arch/xen/xen/xengnt.c diff -u src/sys/arch/xen/xen/xengnt.c:1.16 src/sys/arch/xen/xen/xengnt.c:1.17 --- src/sys/arch/xen/xen/xengnt.c:1.16 Sat Nov 7 07:27:49 2009 +++ src/sys/arch/xen/xen/xengnt.c Sat Jan 23 22:32:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: xengnt.c,v 1.16 2009/11/07 07:27:49 cegger Exp $ */ +/* $NetBSD: xengnt.c,v 1.17 2010/01/23 22:32:42 cegger Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.16 2009/11/07 07:27:49 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xengnt.c,v 1.17 2010/01/23 22:32:42 cegger Exp $"); #include #include @@ -127,14 +127,14 @@ xengnt_more_entries(void) { gnttab_setup_table_t setup; - unsigned long *pages; + u_long *pages; int nframes_new = gnt_nr_grant_frames + 1; int i; if (gnt_nr_grant_frames == gnt_max_grant_frames) return ENOMEM; - pages = malloc(nframes_new * sizeof(long), M_DEVBUF, M_NOWAIT); + pages = malloc(nframes_new * sizeof(u_long), M_DEVBUF, M_NOWAIT); if (pages == NULL) return ENOMEM; @@ -165,7 +165,8 @@ * the grant table frames */ pmap_kenter_ma(((vaddr_t)grant_table) + gnt_nr_grant_frames * PAGE_SIZE, - pages[gnt_nr_grant_frames] << PAGE_SHIFT, VM_PROT_WRITE, 0); + ((paddr_t)pages[gnt_nr_grant_frames]) << PAGE_SHIFT, + VM_PROT_WRITE, 0); /* * add the grant entries associated to the last grant table frame Index: src/sys/arch/xen/xen/xennetback_xenbus.c diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.32 src/sys/arch/xen/xen/xennetback_xenbus.c:1.33 --- src/sys/arch/xen/xen/xennetback_xenbus.c:1.32 Tue Jan 19 22:06:23 2010 +++ src/sys/arch/xen/xen/xennetback_xenbus.c Sat Jan 23 22:32:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: xennetback_xenbus.c,v 1.32 2010/01/19 22:06:23 pooka Exp $ */ +/* $NetBSD: xennetback_xenbus.c,v 1.33 2010/01/23 22:32:42 cegger Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -591,7 +591,7 @@ */ return -1; - *map = mcl_pages[mcl_pages_alloc] << PAGE_SHIFT; + *map = ((paddr_t)mcl_pages[mcl_pages_alloc]) << PAGE_SHIFT; mcl_pages_alloc--; return 0;
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Sat Jan 23 22:55:04 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: remove CHKPT() macro and uses. it's likely wrong in SMP land and probably should be replaced with KTR-style uses if necessary. To generate a diff of this commit: cvs rdiff -u -r1.302 -r1.303 src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.302 src/sys/arch/sparc64/sparc64/locore.s:1.303 --- src/sys/arch/sparc64/sparc64/locore.s:1.302 Sat Jan 23 21:46:59 2010 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Jan 23 22:55:04 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.302 2010/01/23 21:46:59 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.303 2010/01/23 22:55:04 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -1195,118 +1195,6 @@ .text #endif -#ifdef DEBUG -#define CHKREG(r) \ - ldx [%o0 + 8*1], %o1; \ - cmp r, %o1; \ - stx %o0, [%o0]; \ - tne 1 - .data -globreg_debug: - .xword -1, 0, 0, 0, 0, 0, 0, 0 - .text -globreg_set: - save %sp, -CC64FSZ, %sp - set globreg_debug, %o0 - stx %g0, [%o0] - stx %g1, [%o0 + 8*1] - stx %g2, [%o0 + 8*2] - stx %g3, [%o0 + 8*3] - stx %g4, [%o0 + 8*4] - stx %g5, [%o0 + 8*5] - stx %g6, [%o0 + 8*6] - stx %g7, [%o0 + 8*7] - ret - restore -globreg_check: - save %sp, -CC64FSZ, %sp - rd %pc, %o7 - set globreg_debug, %o0 - ldx [%o0], %o1 - brnz,pn %o1, 1f ! Don't re-execute this - CHKREG(%g1) - CHKREG(%g2) - CHKREG(%g3) - CHKREG(%g4) - CHKREG(%g5) - CHKREG(%g6) - CHKREG(%g7) - nop -1: ret - restore - - /* - * Checkpoint: store a byte value at DATA_START+0x21 - * uses two temp regs - */ -#define CHKPT(r1,r2,val) \ - sethi %hi(DATA_START), r1; \ - mov val, r2; \ - stb r2, [r1 + 0x21] - - /* - * Debug routine: - * - * If datafault manages to get an unaligned pmap entry - * we come here. We want to save as many regs as we can. - * %g3 has the sfsr, and %g7 the result of the wstate - * both of which we can toast w/out much lossage. - * - */ - .data -pmap_dumpflag: - .xword 0 ! semaphore - .globl pmap_dumparea ! Get this into the kernel syms -pmap_dumparea: - .space (32*8) ! room to save 32 registers -pmap_edumparea: - .text -pmap_screwup: - rd %pc, %g3 - sub %g3, (pmap_edumparea-pmap_dumparea), %g3! pc relative addressing 8^) - ldstub [%g3+( 0*0x8)], %g3 - tst %g3 ! Semaphore set? - tnz %xcc, 1; nop ! Then trap - set pmap_dumparea, %g3 - stx %g3, [%g3+( 0*0x8)] ! set semaphore - stx %g1, [%g3+( 1*0x8)] ! Start saving regs - stx %g2, [%g3+( 2*0x8)] - stx %g3, [%g3+( 3*0x8)] ! Redundant, I know... - stx %g4, [%g3+( 4*0x8)] - stx %g5, [%g3+( 5*0x8)] - stx %g6, [%g3+( 6*0x8)] - stx %g7, [%g3+( 7*0x8)] - stx %i0, [%g3+( 8*0x8)] - stx %i1, [%g3+( 9*0x8)] - stx %i2, [%g3+(10*0x8)] - stx %i3, [%g3+(11*0x8)] - stx %i4, [%g3+(12*0x8)] - stx %i5, [%g3+(13*0x8)] - stx %i6, [%g3+(14*0x8)] - stx %i7, [%g3+(15*0x8)] - stx %l0, [%g3+(16*0x8)] - stx %l1, [%g3+(17*0x8)] - stx %l2, [%g3+(18*0x8)] - stx %l3, [%g3+(19*0x8)] - stx %l4, [%g3+(20*0x8)] - stx %l5, [%g3+(21*0x8)] - stx %l6, [%g3+(22*0x8)] - stx %l7, [%g3+(23*0x8)] - stx %o0, [%g3+(24*0x8)] - stx %o1, [%g3+(25*0x8)] - stx %o2, [%g3+(26*0x8)] - stx %o3, [%g3+(27*0x8)] - stx %o4, [%g3+(28*0x8)] - stx %o5, [%g3+(29*0x8)] - stx %o6, [%g3+(30*0x8)] - stx %o7, [%g3+(31*0x8)] - ta 1; nop ! Break into the debugger - -#else -#define CHKPT(r1,r2,val) -#define CHKREG(r) -#endif - #ifdef NOTDEF_DEBUG /* * A hardware red zone is impossible. We simulate one in software by @@ -2079,7 +1967,6 @@ sethi %hi(CPCB), %g6 ! get current pcb - CHKPT(%g4,%g7,0x20) wrpr %g1, 0, %tl ! Pop a trap level rdpr %tt, %g7 ! Read type of prev. trap rdpr %tstate, %g4 ! Try to restore prev %cwp if we were executing a restore @@ -2164,7 +2051,6 @@ wrpr %g0, 0, %cleanwin dec 1, %g5 ! NWINDOWS-1-1 wrpr %g5, 0, %cansave ! Invalidate all windows - CHKPT(%g5,%g7,0xe) ! flushw ! DEBUG ba,pt %icc, datafault wrpr %g4, 0, %tnpc @@ -2175,7 +2061,6 @@ rdpr %tt, %g5 wrpr %g0, 1, %tl! Revert to TL==1 XXX what if this wasn't in rft_user? Oh well. wrpr %g5, %g0, %tt! Set trap type correctly - CHKPT(%g5,%g7,0xe) /* * Here we need to implement the beginning of datafault. * TRAP_SETUP expects to come from either kernel mode or @@ -2205,7 +2090,6 @@ set 0x20, %g6! debug stx %g0, [%g7]! debug stb %g6, [%g7 + 0x20] ! debug - CHKPT(%g4,%g7,0xf) #endif wr %g0, ASI_DMMU, %asi ! We need to re-load trap info ldxa [%g0 + TLB_TAG_ACCESS] %asi, %g1 ! Get fault address from tag access register @@ -2247,7 +2131,6 @@ set 0x12, %g5! debug sethi %hi(DATA_START), %g7 ! debug stb %g5, [%g7 + 0x20] ! debug - CHKPT(%g5,%g7,0x11) #endif /* @@ -2317,7 +2200,6 @@ sir ! Force a watchdog 1: #endif - CHKPT(%g5,%g
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Sat Jan 23 23:06:28 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: remove most of the code that writes debugging info DATA_START + offset. To generate a diff of this commit: cvs rdiff -u -r1.303 -r1.304 src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.303 src/sys/arch/sparc64/sparc64/locore.s:1.304 --- src/sys/arch/sparc64/sparc64/locore.s:1.303 Sat Jan 23 22:55:04 2010 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Jan 23 23:06:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.303 2010/01/23 22:55:04 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.304 2010/01/23 23:06:27 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -1774,13 +1774,6 @@ stx %g4, [%g2+8]! Update TSB entry data nop -#ifdef DEBUG - set DATA_START, %g6 ! debug - stx %g1, [%g6+0x40] ! debug - set 0x88, %g5 ! debug - stx %g4, [%g6+0x48] ! debug -- what we tried to enter in TLB - stb %g5, [%g6+0x8] ! debug -#endif #ifdef TRAPSTATS sethi %hi(_C_LABEL(protfix)), %g1 lduw [%g1+%lo(_C_LABEL(protfix))], %g2 @@ -1902,13 +1895,6 @@ 1: stx %g1, [%g2]! Update TSB entry tag stx %g4, [%g2+8]! Update TSB entry data -#ifdef DEBUG - set DATA_START, %g6 ! debug - stx %g3, [%g6+8] ! debug - set 0xa, %g5 ! debug - stx %g4, [%g6] ! debug -- what we tried to enter in TLB - stb %g5, [%g6+0x20] ! debug -#endif stxa %g4, [%g0] ASI_DMMU_DATA_IN ! Enter new mapping membar #Sync CLRTT @@ -2085,12 +2071,6 @@ #ifdef TRAPS_USE_IG wrpr %g0, PSTATE_KERN|PSTATE_IG, %pstate ! We need to save volatile stuff to AG regs #endif -#ifdef DEBUG - set DATA_START, %g7! debug - set 0x20, %g6! debug - stx %g0, [%g7]! debug - stb %g6, [%g7 + 0x20] ! debug -#endif wr %g0, ASI_DMMU, %asi ! We need to re-load trap info ldxa [%g0 + TLB_TAG_ACCESS] %asi, %g1 ! Get fault address from tag access register ldxa [SFAR] %asi, %g2 ! sync virt addr; must be read first @@ -2127,11 +2107,6 @@ inc %g5 stw %g5, [%g7] #endif -#ifdef DEBUG - set 0x12, %g5! debug - sethi %hi(DATA_START), %g7 ! debug - stb %g5, [%g7 + 0x20] ! debug -#endif /* * Traverse kernel map to find paddr of cpcb and only us ASI_PHYS_CACHED to @@ -2376,12 +2351,6 @@ and %g4, CWP, %g4! %g4 = %cwp of trap wrpr %g4, 0, %cwp! Kernel fault -- restore %cwp and force and trap to debugger -#ifdef DEBUG - set DATA_START, %g7! debug - set 0x11, %g6! debug - stb %g6, [%g7 + 0x20] ! debug -! sir -#endif !! !! Here we managed to fault trying to access a kernel window !! This is a bug. Switch to the interrupt stack if we aren't @@ -2416,11 +2385,6 @@ dec 8, %g7 #endif -#ifdef DEBUG - set DATA_START, %g7! debug - set 0x19, %g6! debug - stb %g6, [%g7 + 0x20] ! debug -#endif #ifdef NOTDEF_DEBUG set panicstack-CC64FSZ, %g5 save %g5, 0, %sp @@ -2494,12 +2458,6 @@ #ifdef TRAPS_USE_IG wrpr %g0, PSTATE_KERN|PSTATE_IG, %pstate ! We need to save volatile stuff to AG regs #endif -#ifdef DEBUG - set DATA_START, %g7! debug - set 0x20, %g6! debug - stx %g0, [%g7]! debug - stb %g6, [%g7 + 0x20] ! debug -#endif wr %g0, ASI_DMMU, %asi ! We need to re-load trap info ldxa [%g0 + TLB_TAG_ACCESS] %asi, %g1 ! Get fault address from tag access register ldxa [SFAR] %asi, %g2 ! sync virt addr; must be read first @@ -2535,11 +2493,6 @@ rd %y, %g5 ! save y stx %g7, [%sp + CC64FSZ + STKB + TF_G + (7*8)] ! sneak in g7 -#ifdef DEBUG - set DATA_START, %g7 ! debug - set 0x21, %g6 ! debug - stb %g6, [%g7 + 0x20]! debug -#endif sth %o1, [%sp + CC64FSZ + STKB + TF_TT] stx %g1, [%sp + CC64FSZ + STKB + TF_TSTATE] ! set tf.tf_psr, tf.tf_pc stx %g2, [%sp + CC64FSZ + STKB + TF_PC] ! set tf.tf_npc @@ -2725,13 +2678,6 @@ 1: stx %g1, [%g2]! Update TSB entry tag stx %g4, [%g2+8]! Update TSB entry data -#ifdef DEBUG - set DATA_START, %g6 ! debug - stx %g3, [%g6+8] ! debug - set 0xaa, %g3 ! debug - stx %g4, [%g6] ! debug -- what we tried to enter in TLB - stb %g3, [%g6+0x20] ! debug -#endif stxa %g4, [%g0] ASI_IMMU_DATA_IN ! Enter new mapping membar #Sync CLRTT @@ -5222,11 +5168,6 @@ .align 8 ENTRY(sp_tlb_flush_pte) #ifdef DEBUG - set DATA_START, %o4! Forget any recent TLB misses - stx %g0, [%o4] - stx %g0, [%o4+16] -#endif -#ifdef DEBUG set pmapdebug, %o3 lduw [%o3], %o3 ! movrz %o1, -1, %o3! Print on either pmapdebug & PDB_DEMAP or ctx == 0
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Sat Jan 23 23:39:27 UTC 2010 Modified Files: src/sys/arch/sparc64/sparc64: locore.s Log Message: remove the final uses of DATA_START. now we can remove the 16KB space reserved at the start of the data segment, and i now understand why i wrote this now removed comment 3.5 years ago: "this shouldn't be needed... but kernel usually hangs without it" To generate a diff of this commit: cvs rdiff -u -r1.304 -r1.305 src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.304 src/sys/arch/sparc64/sparc64/locore.s:1.305 --- src/sys/arch/sparc64/sparc64/locore.s:1.304 Sat Jan 23 23:06:27 2010 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Jan 23 23:39:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.304 2010/01/23 23:06:27 mrg Exp $ */ +/* $NetBSD: locore.s,v 1.305 2010/01/23 23:39:27 mrg Exp $ */ /* * Copyright (c) 1996-2002 Eduardo Horvath @@ -383,12 +383,6 @@ .data .globl _C_LABEL(data_start) _C_LABEL(data_start): ! Start of data segment -#define DATA_START _C_LABEL(data_start) - -#if 1 -/* XXX this shouldn't be needed... but kernel usually hangs without it */ - .space USPACE -#endif #ifdef KGDB /* @@ -1848,13 +1842,7 @@ set 0x080, %g6! 8MB sub %g3, %g7, %g7 cmp %g7, %g6 - sethi %hi(DATA_START), %g7 - mov 6, %g6 ! debug - stb %g6, [%g7+0x20] ! debug tlu %xcc, 1; nop - blu,pn %xcc, winfix! Next insn in delay slot is unimportant - mov 7, %g6 ! debug - stb %g6, [%g7+0x20] ! debug 1: #endif srlx %g3, STSHIFT, %g6 @@ -2626,13 +2614,7 @@ set 0x080, %g6! 8MB sub %g3, %g7, %g7 cmp %g7, %g6 - mov 6, %g6 ! debug - sethi %hi(DATA_START), %g7 - stb %g6, [%g7+0x30] ! debug tlu %xcc, 1; nop - blu,pn %xcc, textfault! Next insn in delay slot is unimportant - mov 7, %g6 ! debug - stb %g6, [%g7+0x30] ! debug 1: #endif srlx %g3, STSHIFT, %g6
CVS commit: src/sys/arch/evbarm/gumstix
Module Name:src Committed By: kiyohara Date: Sun Jan 24 03:46:48 UTC 2010 Modified Files: src/sys/arch/evbarm/gumstix: gumstix_machdep.c Log Message: Please calculate KERNEL_PT_KERNEL_NUM from KERNEL_VM_BASE. Moreover, can define KERNEL_VM_BASE somewhere. (ex. in conf/YOUR_GUMSTIX) For instance, allow miniroot.fs over 16Mbytes. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/evbarm/gumstix/gumstix_machdep.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/evbarm/gumstix/gumstix_machdep.c diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.23 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.24 --- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.23 Sat Dec 26 16:01:24 2009 +++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c Sun Jan 24 03:46:48 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: gumstix_machdep.c,v 1.23 2009/12/26 16:01:24 uebayasi Exp $ */ +/* $NetBSD: gumstix_machdep.c,v 1.24 2010/01/24 03:46:48 kiyohara Exp $ */ /* * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation. * All rights reserved. @@ -185,7 +185,9 @@ /* Kernel text starts 2MB in from the bottom of the kernel address space. */ #define KERNEL_TEXT_BASE (KERNEL_BASE + 0x0020) +#ifndef KERNEL_VM_BASE #define KERNEL_VM_BASE (KERNEL_BASE + 0x0100) +#endif /* * The range 0xc100 - 0xccff is available for kernel VM space @@ -244,7 +246,7 @@ #define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ #define KERNEL_PT_KERNEL 1 /* Page table for mapping kernel */ -#define KERNEL_PT_KERNEL_NUM 4 +#define KERNEL_PT_KERNEL_NUM ((KERNEL_VM_BASE - KERNEL_BASE) >> 22) #define KERNEL_PT_VMDATA (KERNEL_PT_KERNEL+KERNEL_PT_KERNEL_NUM) /* Page tables for mapping kernel VM */ #define KERNEL_PT_VMDATA_NUM 4 /* start with 16MB of KVM */
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: haad Date: Sun Jan 24 04:06:31 UTC 2010 Modified Files: src/sys/arch/xen/xen: xbdback_xenbus.c Log Message: Finaly fix problems with using WEDGE like devices as xen backend devices. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.30 src/sys/arch/xen/xen/xbdback_xenbus.c:1.31 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.30 Sun Jan 17 12:08:29 2010 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Sun Jan 24 04:06:31 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.30 2010/01/17 12:08:29 haad Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.31 2010/01/24 04:06:31 haad Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.30 2010/01/17 12:08:29 haad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.31 2010/01/24 04:06:31 haad Exp $"); #include #include @@ -730,35 +730,29 @@ printf("xbd backend: attach device %s (size %" PRIu64 ") " "for domain %d\n", wi.dkw_devname, xbdi->xbdi_size, xbdi->xbdi_domid); - } - if ((err != 0) && (err != ENOTTY)) { - /* ENOTTY should be returned only when device doesn't implement - DIOCGWEDGEINFO and we are working with non wedge like device. */ - printf("xbdback %s: can't DIOCGWEDGEINFO device " - "0x%"PRIx64": %d\n", xbusd->xbusd_path, - xbdi->xbdi_dev, err); - xbdi->xbdi_size = xbdi->xbdi_dev = 0; - vn_close(xbdi->xbdi_vp, FREAD, NOCRED); - xbdi->xbdi_vp = NULL; - return; - } else { + } else { /* disk device, get partition data */ struct partinfo dpart; - err = VOP_IOCTL(xbdi->xbdi_vp, DIOCGPART, &dpart, FREAD, 0); - if (err) { - printf("xbdback %s: can't DIOCGPART device 0x%"PRIx64": %d\n", - xbusd->xbusd_path, xbdi->xbdi_dev, err); - xbdi->xbdi_size = xbdi->xbdi_dev = 0; - vn_close(xbdi->xbdi_vp, FREAD, NOCRED); - xbdi->xbdi_vp = NULL; - return; - } + if ((err = VOP_IOCTL(xbdi->xbdi_vp, DIOCGPART, &dpart, + FREAD, 0)) == 0) { xbdi->xbdi_size = dpart.part->p_size; printf("xbd backend: attach device %s%"PRId32 "%c (size %" PRIu64 ") for domain %d\n", devname, DISKUNIT(xbdi->xbdi_dev), (char)DISKPART(xbdi->xbdi_dev) + 'a', xbdi->xbdi_size, xbdi->xbdi_domid); + } + } + + if (err != 0) { + /* If both Ioctls failed set device size to 0 and return */ + printf("xbdback %s: can't DIOCGWEDGEINFO device " + "0x%"PRIx64": %d\n", xbusd->xbusd_path, + xbdi->xbdi_dev, err); + xbdi->xbdi_size = xbdi->xbdi_dev = 0; + vn_close(xbdi->xbdi_vp, FREAD, NOCRED); + xbdi->xbdi_vp = NULL; + return; } again: xbt = xenbus_transaction_start();
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Sun Jan 24 04:38:28 UTC 2010 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_obio.c Log Message: remove include of "obio.h" To generate a diff of this commit: cvs rdiff -u -r1.1.2.12 -r1.1.2.13 src/sys/arch/mips/rmi/rmixl_obio.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/mips/rmi/rmixl_obio.c diff -u src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.12 src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.13 --- src/sys/arch/mips/rmi/rmixl_obio.c:1.1.2.12 Wed Jan 20 20:48:12 2010 +++ src/sys/arch/mips/rmi/rmixl_obio.c Sun Jan 24 04:38:28 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixl_obio.c,v 1.1.2.12 2010/01/20 20:48:12 matt Exp $ */ +/* $NetBSD: rmixl_obio.c,v 1.1.2.13 2010/01/24 04:38:28 cliff Exp $ */ /* * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc. @@ -40,10 +40,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rmixl_obio.c,v 1.1.2.12 2010/01/20 20:48:12 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rmixl_obio.c,v 1.1.2.13 2010/01/24 04:38:28 cliff Exp $"); #include "locators.h" -#include "obio.h" #include "pci.h" #include
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf
Module Name:src Committed By: cliff Date: Sun Jan 24 05:27:47 UTC 2010 Added Files: src/sys/arch/evbmips/conf [matt-nb5-mips64]: XLSATX64.MP Log Message: add MP config wrapper for XLSATX64 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/evbmips/conf/XLSATX64.MP Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/evbmips/conf/XLSATX64.MP diff -u /dev/null src/sys/arch/evbmips/conf/XLSATX64.MP:1.1.2.1 --- /dev/null Sun Jan 24 05:27:48 2010 +++ src/sys/arch/evbmips/conf/XLSATX64.MP Sun Jan 24 05:27:47 2010 @@ -0,0 +1,8 @@ +# $NetBSD: XLSATX64.MP,v 1.1.2.1 2010/01/24 05:27:47 cliff Exp $ +# +include "arch/evbmips/conf/XLSATX64" + +options MULTIPROCESSOR +options LOCKDEBUG + +pseudo-device lockstat
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Sun Jan 24 05:32:36 UTC 2010 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixlvar.h Log Message: - move firmware info stuff into struct rmixl_config To generate a diff of this commit: cvs rdiff -u -r1.1.2.11 -r1.1.2.12 src/sys/arch/mips/rmi/rmixlvar.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/mips/rmi/rmixlvar.h diff -u src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.11 src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.12 --- src/sys/arch/mips/rmi/rmixlvar.h:1.1.2.11 Sun Jan 17 00:00:55 2010 +++ src/sys/arch/mips/rmi/rmixlvar.h Sun Jan 24 05:32:36 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixlvar.h,v 1.1.2.11 2010/01/17 00:00:55 cliff Exp $ */ +/* $NetBSD: rmixlvar.h,v 1.1.2.12 2010/01/24 05:32:36 cliff Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -108,8 +108,8 @@ struct mips_bus_space rc_pci_memt; /* PCI MEM */ struct mips_bus_space rc_pci_iot; /* PCI IO */ struct mips_bus_dma_tag rc_64bit_dmat; - bus_dma_tag_t rc_32bit_dmat; - bus_dma_tag_t rc_29bit_dmat; + bus_dma_tag_t rc_32bit_dmat; + bus_dma_tag_t rc_29bit_dmat; struct extent *rc_phys_ex; /* Note: MB units */ struct extent *rc_obio_eb_ex; struct extent *rc_obio_el_ex; @@ -118,6 +118,7 @@ struct extent *rc_pcie_mem_ex; struct extent *rc_pcie_io_ex; int rc_mallocsafe; + rmixlfw_info_t rc_psb_info; volatile struct rmixlfw_cpu_wakeup_info *rc_cpu_wakeup_info; const void *rc_cpu_wakeup_end;
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/rmixl
Module Name:src Committed By: cliff Date: Sun Jan 24 05:34:20 UTC 2010 Modified Files: src/sys/arch/evbmips/rmixl [matt-nb5-mips64]: machdep.c Log Message: - move firmware info stuff into struct rmixl_config To generate a diff of this commit: cvs rdiff -u -r1.1.2.16 -r1.1.2.17 src/sys/arch/evbmips/rmixl/machdep.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/evbmips/rmixl/machdep.c diff -u src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.16 src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.17 --- src/sys/arch/evbmips/rmixl/machdep.c:1.1.2.16 Fri Jan 22 07:58:51 2010 +++ src/sys/arch/evbmips/rmixl/machdep.c Sun Jan 24 05:34:20 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.1.2.16 2010/01/22 07:58:51 cliff Exp $ */ +/* $NetBSD: machdep.c,v 1.1.2.17 2010/01/24 05:34:20 cliff Exp $ */ /* * Copyright 2001, 2002 Wasabi Systems, Inc. @@ -112,7 +112,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.16 2010/01/22 07:58:51 cliff Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1.2.17 2010/01/24 05:34:20 cliff Exp $"); #include "opt_ddb.h" #include "opt_com.h" @@ -204,15 +204,6 @@ (sizeof(rmiclfw_psb_versions)/sizeof(rmiclfw_psb_versions[0])) /* - * kernel copies of firmware info - */ -static rmixlfw_info_t rmixlfw_info; -static rmixlfw_mmap_t rmixlfw_phys_mmap; -static rmixlfw_mmap_t rmixlfw_avail_mmap; -#define RMIXLFW_INFOP_LEGAL 0x8c00 - - -/* * storage for fixed extent used to allocate physical address regions * because extent(9) start and end values are u_long, they are only * 32 bits on a 32 bit kernel, which is insuffucuent since XLS physical @@ -333,6 +324,13 @@ printf("cpu_wakeup_info %p, cpu_wakeup_end %p\n", rcp->rc_cpu_wakeup_info, rcp->rc_cpu_wakeup_end); + printf("userapp_cpu_map: %#"PRIx64"\n", rcp->rc_psb_info.userapp_cpu_map); + printf("wakeup: %#"PRIx64"\n", rcp->rc_psb_info.wakeup); +{ + register_t sp; + asm volatile ("move %0, $sp\n" : "=r"(sp)); + printf("sp: %#"PRIx64"\n", sp); +} #endif rmixl_physaddr_init(); @@ -344,7 +342,7 @@ * Double the Hz if this CPU runs at twice the * external/cp0-count frequency */ - curcpu()->ci_cpu_freq = rmixlfw_info.cpu_frequency; + curcpu()->ci_cpu_freq = rcp->rc_psb_info.cpu_frequency; curcpu()->ci_cctr_freq = curcpu()->ci_cpu_freq; curcpu()->ci_cycles_per_hz = (curcpu()->ci_cpu_freq + hz / 2) / hz; curcpu()->ci_divisor_delay = @@ -625,10 +623,10 @@ #endif infop |= MIPS_KSEG0_START; - rmixlfw_info = *(rmixlfw_info_t *)(intptr_t)infop; + rcp->rc_psb_info = *(rmixlfw_info_t *)(intptr_t)infop; for (int i=0; i < RMICLFW_PSB_VERSIONS_LEN; i++) { - if (rmiclfw_psb_versions[i] == rmixlfw_info.psb_version) + if (rmiclfw_psb_versions[i] == rcp->rc_psb_info.psb_version) goto found; } @@ -637,7 +635,7 @@ #ifdef DIAGNOSTIC rmixl_puts("\r\nWARNING: untested psb_version: "); - rmixl_puthex64(rmixlfw_info.psb_version); + rmixl_puthex64(rcp->rc_psb_info.psb_version); rmixl_puts("\r\n"); #endif @@ -654,7 +652,7 @@ #endif found: - rcp->rc_io_pbase = MIPS_KSEG1_TO_PHYS(rmixlfw_info.io_base); + rcp->rc_io_pbase = MIPS_KSEG1_TO_PHYS(rcp->rc_psb_info.io_base); rmixl_putchar_init(rcp->rc_io_pbase); #ifdef MACHDEP_DEBUG rmixl_puts("\r\ninfop: "); @@ -662,13 +660,13 @@ #endif #ifdef DIAGNOSTIC rmixl_puts("\r\nrecognized psb_version: "); - rmixl_puthex64(rmixlfw_info.psb_version); + rmixl_puthex64(rcp->rc_psb_info.psb_version); rmixl_puts("\r\n"); #endif return mem_clusters_init( - (rmixlfw_mmap_t *)(intptr_t)rmixlfw_info.psb_physaddr_map, - (rmixlfw_mmap_t *)(intptr_t)rmixlfw_info.avail_mem_map); + (rmixlfw_mmap_t *)(intptr_t)rcp->rc_psb_info.psb_physaddr_map, + (rmixlfw_mmap_t *)(intptr_t)rcp->rc_psb_info.avail_mem_map); } void @@ -718,8 +716,7 @@ rmixl_puts("\r\n"); #endif if (psb_physaddr_map != NULL) { - rmixlfw_phys_mmap = *psb_physaddr_map; - map = &rmixlfw_phys_mmap; + map = psb_physaddr_map; mapname = "psb_physaddr_map"; rmixlfw_mmap_print(map); } @@ -735,8 +732,7 @@ rmixl_puts("\r\n"); #endif if (avail_mem_map != NULL) { - rmixlfw_avail_mmap = *avail_mem_map; - map = &rmixlfw_avail_mmap; + map = avail_mem_map; mapname = "avail_mem_map"; rmixlfw_mmap_print(map); }
CVS commit: [matt-nb5-mips64] src/sys/arch/mips/rmi
Module Name:src Committed By: cliff Date: Sun Jan 24 05:39:57 UTC 2010 Modified Files: src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_cpu.c rmixl_subr.S Log Message: - cpu_rmixl_attach calls cpu_setup_trampoline to get control of subordinate CPUs from firmware by using the 'wakeup' callback method and into cpu_wakeup_trampoline where they just spin pending further work. - the callback requires re-basing the stack pointer to be in KSEG0, done in asm subroutine rmixlfw_wakeup_cpu To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/sys/arch/mips/rmi/rmixl_cpu.c \ src/sys/arch/mips/rmi/rmixl_subr.S 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/mips/rmi/rmixl_cpu.c diff -u src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.2 src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.3 --- src/sys/arch/mips/rmi/rmixl_cpu.c:1.1.2.2 Wed Jan 20 20:48:12 2010 +++ src/sys/arch/mips/rmi/rmixl_cpu.c Sun Jan 24 05:39:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rmixl_cpu.c,v 1.1.2.2 2010/01/20 20:48:12 matt Exp $ */ +/* $NetBSD: rmixl_cpu.c,v 1.1.2.3 2010/01/24 05:39:57 cliff Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -38,18 +38,27 @@ #include "locators.h" #include -__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.2 2010/01/20 20:48:12 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rmixl_cpu.c,v 1.1.2.3 2010/01/24 05:39:57 cliff Exp $"); #include #include #include #include +#include +#include +#include +#include #include #include static int cpu_rmixl_match(device_t, cfdata_t, void *); static void cpu_rmixl_attach(device_t, device_t, void *); +#ifdef MULTIPROCESSOR +void cpu_trampoline_park(void); +static void cpu_setup_trampoline(struct device *, struct cpu_info *); +#endif + CFATTACH_DECL_NEW(cpu_rmixl, 0, cpu_rmixl_match, cpu_rmixl_attach, NULL, NULL); static int @@ -75,6 +84,7 @@ cpu_rmixl_attach(device_t parent, device_t self, void *aux) { struct cpucore_attach_args *ca = aux; + if (ca->ca_thread == 0 && ca->ca_core == 0) { struct cpu_info * const ci = curcpu(); ci->ci_dev = self; @@ -82,6 +92,7 @@ #ifdef MULTIPROCESSOR } else { struct pglist pglist; + int error; /* * Grab a page from the first 256MB to use to store @@ -98,12 +109,115 @@ const paddr_t pa = VM_PAGE_TO_PHYS(TAILQ_FIRST(&pglist)); const vaddr_t va = MIPS_PHYS_TO_KSEG0(pa); struct cpu_info * const ci = (void *) (va + 0x400); - memset(va, 0, PAGE_SIZE); + memset((void *)va, 0, PAGE_SIZE); ci->ci_ebase = va; ci->ci_ebase_pa = pa; ci->ci_dev = self; + KASSERT(ca->ca_core < 8); + KASSERT(ca->ca_thread < 4); + ci->ci_cpuid = (ca->ca_core << 2) | ca->ca_thread; self->dv_private = ci; + + cpu_setup_trampoline(self, ci); + #endif } aprint_normal("\n"); } + +#ifdef MULTIPROCESSOR +void +cpu_trampoline_park(void) +{ +} + +#if 0 +static void +cpu_setup_trampoline(struct device *self, struct cpu_info *ci) +{ + volatile struct rmixlfw_cpu_wakeup_info *wip; + u_int cpu, core, thread; + uint32_t ipi; + int32_t addr; + uint64_t gp; + uint64_t sp; + uint32_t mask; + volatile uint32_t *maskp; + __cpu_simple_lock_t *llk; + volatile uint32_t *xflag; /* ??? */ + extern void cpu_wakeup_trampoline(void); + + cpu = ci->ci_cpuid; + core = cpu >> 2; + thread = cpu & __BITS(1,0); +printf("\n%s: cpu %d, core %d, thread %d\n", __func__, cpu, core, thread); + + wip = &rmixl_configuration.rc_cpu_wakeup_info[cpu]; +printf("%s: wip %p\n", __func__, wip); + + llk = (__cpu_simple_lock_t *)(intptr_t)wip->loader_lock; +printf("%s: llk %p\n", __func__, llk); + + /* XXX WTF */ + xflag = (volatile uint32_t *)(intptr_t)(wip->loader_lock + 0x2c); +printf("%s: xflag %p, %#x\n", __func__, xflag, *xflag); + + ipi = (thread << RMIXL_PIC_IPIBASE_ID_THREAD_SHIFT) + | (core << RMIXL_PIC_IPIBASE_ID_CORE_SHIFT) + | RMIXLFW_IPI_WAKEUP; +printf("%s: ipi %#x\n", __func__, ipi); + + /* entry addr must be uncached, use KSEG1 */ + addr = (int32_t)MIPS_PHYS_TO_KSEG1( + MIPS_KSEG0_TO_PHYS(cpu_wakeup_trampoline)); +printf("%s: addr %#x\n", __func__, addr); + + __asm__ volatile("move %0, $gp\n" : "=r"(gp)); +printf("%s: gp %#"PRIx64"\n", __func__, gp); + + sp = (256 * 1024) - 32; /* XXX TMP FIXME */ + sp = MIPS_PHYS_TO_KSEG1(sp); +printf("%s: sp %#"PRIx64"\n", __func__, sp); + + maskp = (uint32_t *)(intptr_t)wip->global_wakeup_mask; +printf("%s: maskp %p\n", __func__, maskp); + + __cpu_simple_lock(llk); + + wip->entry.addr = addr; + wip->entry.args = 0; +if (0) { + wip->entry.sp = sp; + wip->entry.gp = gp; +} + + mask = *maskp; + mask |= 1 << cpu; + *maskp = mask; + +#if 0 + *xflag = mask; /* XXX */ +#endif + + RMIXL_IOREG_WRITE(RMIXL_PIC_IPIBASE, ipi); + + __cpu_simple_unlock(llk); + + Debugger(); +} +#else +static uint64_t argv[4] = { 0x1234, 0x2345, 0x3456, 0x4567 }; +static void +cpu_setup_trampoline(struct device *self, struct cpu_info *ci) +{ + void (*wakeup_cpu)(void