CVS commit: src/doc
Module Name:src Committed By: cnst Date: Fri Mar 19 04:19:28 UTC 2010 Modified Files: src/doc: CHANGES Log Message: document aiboost(4) removal and replacement with aibs(4) in doc/CHANGES To generate a diff of this commit: cvs rdiff -u -r1.1370 -r1.1371 src/doc/CHANGES 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 diff -u src/doc/CHANGES:1.1370 src/doc/CHANGES:1.1371 --- src/doc/CHANGES:1.1370 Sat Mar 13 16:35:08 2010 +++ src/doc/CHANGES Fri Mar 19 04:19:28 2010 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1370 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1371 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -567,3 +567,5 @@ openldap: Update to 2.4.21. [lukem 20100308] atari: Add support for the SMC Elite Ultra Ethernet with the SMC_TT VME-ISA bridge. [tsutsui 20100313] + aibs(4): Remove aiboost(4) as obsolete and redundant + since the introduction of aibs(4). [cnst 20100319]
CVS commit: src
Module Name:src Committed By: cnst Date: Fri Mar 19 04:04:28 UTC 2010 Modified Files: src/share/man/man4: Makefile acpi.4 src/sys/arch/i386/conf: ALL src/sys/dev: DEVNAMES src/sys/dev/acpi: files.acpi src/usr.sbin/envstat: envstat.8 Removed Files: src/share/man/man4: aiboost.4 src/sys/dev/acpi: aiboost.c Log Message: Remove aiboost(4) as obsolete and redundant since the introduction of aibs(4). http://mail-index.netbsd.org/tech-kern/2010/03/06/msg007458.html Reviewed by , , , . To generate a diff of this commit: cvs rdiff -u -r1.511 -r1.512 src/share/man/man4/Makefile cvs rdiff -u -r1.42 -r1.43 src/share/man/man4/acpi.4 cvs rdiff -u -r1.2 -r0 src/share/man/man4/aiboost.4 cvs rdiff -u -r1.249 -r1.250 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.258 -r1.259 src/sys/dev/DEVNAMES cvs rdiff -u -r1.30 -r0 src/sys/dev/acpi/aiboost.c cvs rdiff -u -r1.67 -r1.68 src/sys/dev/acpi/files.acpi cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/envstat/envstat.8 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/Makefile diff -u src/share/man/man4/Makefile:1.511 src/share/man/man4/Makefile:1.512 --- src/share/man/man4/Makefile:1.511 Thu Mar 11 10:38:37 2010 +++ src/share/man/man4/Makefile Fri Mar 19 04:04:27 2010 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.511 2010/03/11 10:38:37 enami Exp $ +# $NetBSD: Makefile,v 1.512 2010/03/19 04:04:27 cnst Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 acpidalb.4 \ adbbt.4 adbkbd.4 adbms.4 \ adc.4 admtemp.4 adv.4 adw.4 age.4 agp.4 agr.4 ahb.4 ahc.4 \ ahcisata.4 ahd.4 \ - aiboost.4 aibs.4 ale.4 alipm.4 altmem.4 amdpm.4 amdtemp.4 amhphy.4 \ + aibs.4 ale.4 alipm.4 altmem.4 amdpm.4 amdtemp.4 amhphy.4 \ amr.4 aps.4 \ an.4 arcmsr.4 aria.4 artsata.4 ata.4 atalk.4 ataraid.4 \ ath.4 atphy.4 atppc.4 attimer.4 atw.4 \ @@ -144,6 +144,7 @@ MLINKS+=drm.4 viadrm.4 MLINKS+=acpiec.4 acpiecdt.4 +MLINKS+=aibs.4 aiboost.4 MLINKS+=ata.4 atabus.4 MLINKS+=audio.4 audioctl.4 MLINKS+=audio.4 mixer.4 Index: src/share/man/man4/acpi.4 diff -u src/share/man/man4/acpi.4:1.42 src/share/man/man4/acpi.4:1.43 --- src/share/man/man4/acpi.4:1.42 Sat Mar 6 06:25:51 2010 +++ src/share/man/man4/acpi.4 Fri Mar 19 04:04:27 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: acpi.4,v 1.42 2010/03/06 06:25:51 jruoho Exp $ +.\" $NetBSD: acpi.4,v 1.43 2010/03/19 04:04:27 cnst Exp $ .\" .\" Copyright (c) 2002, 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -41,7 +41,6 @@ .Cd "acpilid* at acpi?" .Cd "acpismbus* at acpi?" .Cd "acpitz* at acpi?" -.Cd "aiboost* at acpi?" .Cd "aibs* at acpi?" .Cd "asus* at acpi?" .Cd "attimer* at acpi?" @@ -200,8 +199,6 @@ .It acpitz .Tn ACPI thermal zones. -.It aiboost -ASUS AI Booster Hardware monitor. .It aibs ASUSTeK AI Booster ACPI ATK0110 voltage, temperature and fan sensor. .It asus @@ -394,7 +391,6 @@ .Xr acpilid 4 , .Xr acpismbus 4 , .Xr acpitz 4 , -.Xr aiboost 4 , .Xr aibs 4 , .Xr apm 4 , .Xr attimer 4 , Index: src/sys/arch/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.249 src/sys/arch/i386/conf/ALL:1.250 --- src/sys/arch/i386/conf/ALL:1.249 Sat Mar 6 21:12:04 2010 +++ src/sys/arch/i386/conf/ALL Fri Mar 19 04:04:27 2010 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.249 2010/03/06 21:12:04 plunky Exp $ +# $NetBSD: ALL,v 1.250 2010/03/19 04:04:27 cnst 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.249 $" +#ident "ALL-$Revision: 1.250 $" maxusers 64 # estimated number of users @@ -374,7 +374,6 @@ acpiwmi* at acpi? # ACPI WMI Mapper # Mainboard devices -aiboost* at acpi? # ASUS AI Booster Hardware Monitor aibs* at acpi? # ASUSTeK AI Booster hardware monitor asus* at acpi? # ASUS hotkeys attimer* at acpi? # AT Timer Index: src/sys/dev/DEVNAMES diff -u src/sys/dev/DEVNAMES:1.258 src/sys/dev/DEVNAMES:1.259 --- src/sys/dev/DEVNAMES:1.258 Thu Mar 11 10:38:37 2010 +++ src/sys/dev/DEVNAMES Fri Mar 19 04:04:27 2010 @@ -1,4 +1,4 @@ -# $NetBSD: DEVNAMES,v 1.258 2010/03/11 10:38:37 enami Exp $ +# $NetBSD: DEVNAMES,v 1.259 2010/03/19 04:04:27 cnst Exp $ # # This file contains all used device names and defined attributes in # alphabetical order. New devices added to the system somewhere should first @@ -61,7 +61,6 @@ ahsc amiga ahsc amigappc ai MI -aiboost MI aibs MI aic MI akbd mac68k Index: src/sys/dev/acpi/files.acpi diff -u src/sys/dev/acpi/files.acpi:1.67 src/sys/dev/acpi/files.acpi:1.68 --- src/sys/dev/acpi/files.acpi:1.67 Tue Feb 9 03:19:51 2010 +++ src/sys/dev/acpi/files.acpi Fri Mar 19 04:04:28 2010 @@ -1,4 +1,4 @@ -# $NetBSD: files.acpi,v 1.67 2010/02/09 03:19:51 cnst Exp $ +# $NetBSD: files.acpi,v 1.68 2010/03
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Fri Mar 19 02:20:44 UTC 2010 Modified Files: src/share/man/man9: sysmon_envsys.9 Log Message: Document the new sysmon_envsys_sensor_event() function. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/share/man/man9/sysmon_envsys.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/sysmon_envsys.9 diff -u src/share/man/man9/sysmon_envsys.9:1.35 src/share/man/man9/sysmon_envsys.9:1.36 --- src/share/man/man9/sysmon_envsys.9:1.35 Thu Mar 18 22:11:48 2010 +++ src/share/man/man9/sysmon_envsys.9 Fri Mar 19 02:20:44 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysmon_envsys.9,v 1.35 2010/03/18 22:11:48 pgoyette Exp $ +.\" $NetBSD: sysmon_envsys.9,v 1.36 2010/03/19 02:20:44 pgoyette Exp $ .\" .\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -47,6 +47,8 @@ .Fn sysmon_envsys_sensor_attach "struct sysmon_envsys *" "envsys_data_t *" .Ft int .Fn sysmon_envsys_sensor_detach "struct sysmon_envsys *" "envsys_data_t *" +.Ft void +.Fn sysmon_envsys_sensor_event "struct sysmon_envsys *" "envsys_data_t *" "int" .Sh DESCRIPTION .Pp .Nm @@ -96,6 +98,17 @@ .Em sysmon_envsys object. .Pp +Some sensors can be monitored, and when the sensor value changes an event +can be delivered to the +.Xr powerd 8 +daemon. +Sensor monitoring can be performed by the +.Xr sysmon_envsys 9 +framework on a polled basis. +Alternatively, the sensor's device driver can call the +.Fn sysmon_envsys_sensor_event +function to deliver the event without waiting for the device to be polled. +.Pp The .Em sysmon_envsys structure is defined as follows
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pgoyette Date: Fri Mar 19 02:19:13 UTC 2010 Modified Files: src/sys/dev/sysmon: sysmon_envsys_events.c sysmon_envsysvar.h sysmonvar.h Log Message: Modify previous commit. The routine to deliver events is intended to be exported to device drivers, so rename it and move the declaration to To generate a diff of this commit: cvs rdiff -u -r1.86 -r1.87 src/sys/dev/sysmon/sysmon_envsys_events.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/sysmon/sysmon_envsysvar.h \ src/sys/dev/sysmon/sysmonvar.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/sysmon/sysmon_envsys_events.c diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.86 src/sys/dev/sysmon/sysmon_envsys_events.c:1.87 --- src/sys/dev/sysmon/sysmon_envsys_events.c:1.86 Fri Mar 19 01:16:44 2010 +++ src/sys/dev/sysmon/sysmon_envsys_events.c Fri Mar 19 02:19:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_events.c,v 1.86 2010/03/19 01:16:44 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_events.c,v 1.87 2010/03/19 02:19:13 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.86 2010/03/19 01:16:44 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.87 2010/03/19 02:19:13 pgoyette Exp $"); #include #include @@ -642,14 +642,14 @@ } /* - * sme_deliver_typed_event + * sysmon_envsys_sensor_event * * + Find the monitor event of a particular type for a given sensor * on a device and deliver the event if one is required. */ void -sme_deliver_typed_event(struct sysmon_envsys *sme, envsys_data_t *edata, - int ev_type) +sysmon_envsys_sensor_event(struct sysmon_envsys *sme, envsys_data_t *edata, + int ev_type) { sme_event_t *see; Index: src/sys/dev/sysmon/sysmon_envsysvar.h diff -u src/sys/dev/sysmon/sysmon_envsysvar.h:1.33 src/sys/dev/sysmon/sysmon_envsysvar.h:1.34 --- src/sys/dev/sysmon/sysmon_envsysvar.h:1.33 Fri Mar 19 01:16:44 2010 +++ src/sys/dev/sysmon/sysmon_envsysvar.h Fri Mar 19 02:19:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsysvar.h,v 1.33 2010/03/19 01:16:44 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsysvar.h,v 1.34 2010/03/19 02:19:13 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -131,7 +131,6 @@ void sme_events_check(void *); void sme_events_worker(struct work *, void *); void sme_deliver_event(sme_event_t *); -void sme_deliver_typed_event(struct sysmon_envsys *, envsys_data_t *, int); /* * common functions to create/update objects in a dictionary. Index: src/sys/dev/sysmon/sysmonvar.h diff -u src/sys/dev/sysmon/sysmonvar.h:1.33 src/sys/dev/sysmon/sysmonvar.h:1.34 --- src/sys/dev/sysmon/sysmonvar.h:1.33 Sun Mar 14 18:03:15 2010 +++ src/sys/dev/sysmon/sysmonvar.h Fri Mar 19 02:19:13 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmonvar.h,v 1.33 2010/03/14 18:03:15 pgoyette Exp $ */ +/* $NetBSD: sysmonvar.h,v 1.34 2010/03/19 02:19:13 pgoyette Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -205,6 +205,9 @@ uint32_t sysmon_envsys_get_max_value(bool (*)(const envsys_data_t*), bool); +void sysmon_envsys_sensor_event(struct sysmon_envsys *, envsys_data_t *, + int); + void sysmon_envsys_init(void); /*
CVS commit: src/sys/dev/isa
Module Name:src Committed By: cnst Date: Fri Mar 19 02:17:41 UTC 2010 Modified Files: src/sys/dev/isa: wbsio.c Log Message: support W83667HG (0xa5) in wbsio(4); its hw mon is already supported by lm(4) as W83627DHG (0xc1) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/isa/wbsio.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/wbsio.c diff -u src/sys/dev/isa/wbsio.c:1.1 src/sys/dev/isa/wbsio.c:1.2 --- src/sys/dev/isa/wbsio.c:1.1 Sun Feb 21 05:16:29 2010 +++ src/sys/dev/isa/wbsio.c Fri Mar 19 02:17:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wbsio.c,v 1.1 2010/02/21 05:16:29 cnst Exp $ */ +/* $NetBSD: wbsio.c,v 1.2 2010/03/19 02:17:41 cnst Exp $ */ /* $OpenBSD: wbsio.c,v 1.5 2009/03/29 21:53:52 sthen Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -50,6 +50,7 @@ #define WBSIO_ID_W83627DHG 0xa0 #define WBSIO_ID_W83627SF 0x59 #define WBSIO_ID_W83637HF 0x70 +#define WBSIO_ID_W83667HG 0xa5 #define WBSIO_ID_W83697HF 0x60 /* Logical Device Number (LDN) Assignments */ @@ -185,6 +186,9 @@ case WBSIO_ID_W83637HF: desc = "W83637HF"; break; + case WBSIO_ID_W83667HG: + desc = "W83667HG"; + break; case WBSIO_ID_W83697HF: desc = "W83697HF"; break;
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: dyoung Date: Fri Mar 19 01:44:05 UTC 2010 Modified Files: src/sys/dev/cardbus: cardslot.c Log Message: Remove superfluous cast (device_t to device_t). To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/cardbus/cardslot.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/cardbus/cardslot.c diff -u src/sys/dev/cardbus/cardslot.c:1.51 src/sys/dev/cardbus/cardslot.c:1.52 --- src/sys/dev/cardbus/cardslot.c:1.51 Tue Dec 15 22:17:12 2009 +++ src/sys/dev/cardbus/cardslot.c Fri Mar 19 01:44:05 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cardslot.c,v 1.51 2009/12/15 22:17:12 snj Exp $ */ +/* $NetBSD: cardslot.c,v 1.52 2010/03/19 01:44:05 dyoung Exp $ */ /* * Copyright (c) 1999 and 2000 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.51 2009/12/15 22:17:12 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.52 2010/03/19 01:44:05 dyoung Exp $"); #include "opt_cardslot.h" @@ -382,7 +382,7 @@ } if (sc->sc_16_softc) { CARDSLOT_SET_CARDTYPE(sc->sc_status, CARDSLOT_STATUS_CARD_16); -if (pcmcia_card_attach((device_t)sc->sc_16_softc)) { +if (pcmcia_card_attach(sc->sc_16_softc)) { /* Do not attach */ CARDSLOT_SET_WORK(sc->sc_status, CARDSLOT_STATUS_NOTWORK);
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: dyoung Date: Fri Mar 19 01:34:46 UTC 2010 Modified Files: src/sys/dev/cardbus: if_ex_cardbus.c Log Message: Use Cardbus_intr_disestablish() instead of cardbus_intr_disestablish(). Get rid of a (short) staircase in ex_cardbus_detach(). To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/dev/cardbus/if_ex_cardbus.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/cardbus/if_ex_cardbus.c diff -u src/sys/dev/cardbus/if_ex_cardbus.c:1.51 src/sys/dev/cardbus/if_ex_cardbus.c:1.52 --- src/sys/dev/cardbus/if_ex_cardbus.c:1.51 Wed Mar 10 21:00:36 2010 +++ src/sys/dev/cardbus/if_ex_cardbus.c Fri Mar 19 01:34:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ex_cardbus.c,v 1.51 2010/03/10 21:00:36 dyoung Exp $ */ +/* $NetBSD: if_ex_cardbus.c,v 1.52 2010/03/19 01:34:46 dyoung Exp $ */ /* * Copyright (c) 1998 and 1999 @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ex_cardbus.c,v 1.51 2010/03/10 21:00:36 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ex_cardbus.c,v 1.52 2010/03/19 01:34:46 dyoung Exp $"); /* #define EX_DEBUG 4 */ /* define to report information for debugging */ @@ -300,7 +300,7 @@ } int -ex_cardbus_detach(device_t self, int arg) +ex_cardbus_detach(device_t self, int flags) { struct ex_cardbus_softc *csc = device_private(self); struct ex_softc *sc = &csc->sc_softc; @@ -313,23 +313,23 @@ } #endif - rv = ex_detach(sc); - if (rv == 0) { - /* - * Unhook the interrupt handler. - */ - Cardbus_intr_disestablish(ct, sc->sc_ih); + if ((rv = ex_detach(sc)) != 0) + return rv; - if (csc->sc_cardtype == EX_CB_CYCLONE) { - Cardbus_mapreg_unmap(ct, - CARDBUS_3C575BTX_FUNCSTAT_PCIREG, - csc->sc_funct, csc->sc_funch, csc->sc_funcsize); - } + /* + * Unhook the interrupt handler. + */ + Cardbus_intr_disestablish(ct, sc->sc_ih); - Cardbus_mapreg_unmap(ct, PCI_BAR0, sc->sc_iot, - sc->sc_ioh, csc->sc_mapsize); + if (csc->sc_cardtype == EX_CB_CYCLONE) { + Cardbus_mapreg_unmap(ct, + CARDBUS_3C575BTX_FUNCSTAT_PCIREG, + csc->sc_funct, csc->sc_funch, csc->sc_funcsize); } - return (rv); + + Cardbus_mapreg_unmap(ct, PCI_BAR0, sc->sc_iot, + sc->sc_ioh, csc->sc_mapsize); + return 0; } int @@ -354,11 +354,11 @@ ex_cardbus_disable(struct ex_softc *sc) { struct ex_cardbus_softc *csc = (struct ex_cardbus_softc *)sc; - cardbus_function_tag_t cf = csc->sc_ct->ct_cf; - cardbus_chipset_tag_t cc = csc->sc_ct->ct_cc; - cardbus_intr_disestablish(cc, cf, sc->sc_ih); - sc->sc_ih = NULL; + if (sc->sc_ih != NULL) { + Cardbus_intr_disestablish(csc->sc_ct, sc->sc_ih); + sc->sc_ih = NULL; + } Cardbus_function_disable(csc->sc_ct);
CVS commit: src/sys/dev/ic
Module Name:src Committed By: dyoung Date: Fri Mar 19 01:32:30 UTC 2010 Modified Files: src/sys/dev/ic: athvar.h Log Message: Don't pick up the network-interface, ethernet, and 802.11-related definitions by chance (or by the bus-specific front-end #including them!). #include them here, instead. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/dev/ic/athvar.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/ic/athvar.h diff -u src/sys/dev/ic/athvar.h:1.32 src/sys/dev/ic/athvar.h:1.33 --- src/sys/dev/ic/athvar.h:1.32 Sun Mar 14 21:25:59 2010 +++ src/sys/dev/ic/athvar.h Fri Mar 19 01:32:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: athvar.h,v 1.32 2010/03/14 21:25:59 dyoung Exp $ */ +/* $NetBSD: athvar.h,v 1.33 2010/03/19 01:32:30 dyoung Exp $ */ /*- * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting @@ -44,6 +44,12 @@ #ifndef _DEV_ATH_ATHVAR_H #define _DEV_ATH_ATHVAR_H +#include +#include +#include + +#include +#include #include #include
CVS commit: src/sys/dev/ic
Module Name:src Committed By: dyoung Date: Fri Mar 19 01:31:11 UTC 2010 Modified Files: src/sys/dev/ic: ath_netbsd.h Log Message: Don't pick up the definitions by chance, but #include here. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/ath_netbsd.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/ic/ath_netbsd.h diff -u src/sys/dev/ic/ath_netbsd.h:1.9 src/sys/dev/ic/ath_netbsd.h:1.10 --- src/sys/dev/ic/ath_netbsd.h:1.9 Mon Oct 19 23:19:39 2009 +++ src/sys/dev/ic/ath_netbsd.h Fri Mar 19 01:31:11 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ath_netbsd.h,v 1.9 2009/10/19 23:19:39 rmind Exp $ */ +/* $NetBSD: ath_netbsd.h,v 1.10 2010/03/19 01:31:11 dyoung Exp $ */ /*- * Copyright (c) 2003, 2004 David Young @@ -27,6 +27,8 @@ #ifndef _ATH_NETBSD_H #define _ATH_NETBSD_H +#include + #undef KASSERT #define KASSERT(__cond, __complaint) if (!(__cond)) panic __complaint
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pgoyette Date: Fri Mar 19 01:16:45 UTC 2010 Modified Files: src/sys/dev/sysmon: sysmon_envsys_events.c sysmon_envsysvar.h Log Message: Separate event delivery from polling and limit evaluation in sme_events_worker(). Provide a wrapper that can be called from sensor drivers' interrupt routines to find and deliver a specific event. XXX Actually updating sensor drivers (and their parent devices) to XXX have interrupts is a future enhancement. This is simply an XXX enabler. To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/sysmon/sysmon_envsys_events.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/sysmon/sysmon_envsysvar.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/sysmon/sysmon_envsys_events.c diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.85 src/sys/dev/sysmon/sysmon_envsys_events.c:1.86 --- src/sys/dev/sysmon/sysmon_envsys_events.c:1.85 Thu Feb 18 12:30:53 2010 +++ src/sys/dev/sysmon/sysmon_envsys_events.c Fri Mar 19 01:16:44 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_events.c,v 1.85 2010/02/18 12:30:53 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_events.c,v 1.86 2010/03/19 01:16:44 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.85 2010/02/18 12:30:53 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.86 2010/03/19 01:16:44 pgoyette Exp $"); #include #include @@ -578,19 +578,15 @@ void sme_events_worker(struct work *wk, void *arg) { - const struct sme_description_table *sdt = NULL; - const struct sme_sensor_event *sse = sme_sensor_event; sme_event_t *see = (void *)wk; struct sysmon_envsys *sme = see->see_sme; envsys_data_t *edata = see->see_edata; - int i, state = 0; KASSERT(wk == &see->see_wk); KASSERT(sme != NULL || edata != NULL); mutex_enter(&sme->sme_mtx); - if ((see->see_flags & SEE_EVENT_WORKING) == 0) - see->see_flags |= SEE_EVENT_WORKING; + see->see_flags |= SEE_EVENT_WORKING; /* * sme_events_check marks the sensors to make us refresh them here. * Don't refresh if the driver uses its own method for refreshing. @@ -612,7 +608,6 @@ if (edata->state == ENVSYS_SINVALID) goto out; - switch (see->see_type) { /* * For range limits, if the driver claims responsibility for * limit/range checking, just user driver-supplied status. @@ -620,30 +615,74 @@ * relinquish responsibility for ALL limits if there is even * one limit that it cannot handle! */ + if ((see->see_type == PENVSYS_EVENT_LIMITS || + see->see_type == PENVSYS_EVENT_CAPACITY) && + (edata->upropset & PROP_DRIVER_LIMITS) == 0) { + if ((edata->upropset & (PROP_CRITMIN | PROP_BATTCAP)) && + (edata->value_cur < edata->limits.sel_critmin)) + edata->state = ENVSYS_SCRITUNDER; + else if ((edata->upropset & (PROP_WARNMIN | PROP_BATTWARN)) && + (edata->value_cur < edata->limits.sel_warnmin)) + edata->state = ENVSYS_SWARNUNDER; + else if ((edata->upropset & (PROP_CRITMAX | PROP_BATTMAX)) && + (edata->value_cur > edata->limits.sel_critmax)) + edata->state = ENVSYS_SCRITOVER; + else if ((edata->upropset & (PROP_WARNMAX | PROP_BATTHIGH)) && + (edata->value_cur > edata->limits.sel_warnmax)) + edata->state = ENVSYS_SWARNOVER; + else + edata->state = ENVSYS_SVALID; + } + sme_deliver_event(see); + +out: + see->see_flags &= ~SEE_EVENT_WORKING; + cv_broadcast(&sme->sme_condvar); + mutex_exit(&sme->sme_mtx); +} + +/* + * sme_deliver_typed_event + * + * + Find the monitor event of a particular type for a given sensor + * on a device and deliver the event if one is required. + */ +void +sme_deliver_typed_event(struct sysmon_envsys *sme, envsys_data_t *edata, + int ev_type) +{ + sme_event_t *see; + + mutex_enter(&sme->sme_mtx); + LIST_FOREACH(see, &sme->sme_events_list, see_list) { + if (edata != see->see_edata || + see->see_type != ev_type) + continue; + sme_deliver_event(see); + break; + } + mutex_exit(&sme->sme_mtx); +} + +/* + * sme_deliver_event: + * + * + If new sensor state requires it, send an event to powerd + * + * Must be called with the device's sysmon mutex held + * see->see_sme->sme_mtx + */ +void +sme_deliver_event(sme_event_t *see) +{ + envsys_data_t *edata = see->see_edata; + const struct sme_description_table *sdt = NULL; + const struct sme_sensor_event *sse = sme_sensor_event; + int i, state = 0; + + switch (see->see_type) { case PENVSYS_EVENT_LIMITS: case PENVSYS_EVENT_CAPACITY: -#define __EXCEED_LIM(valid, lim, rel) \ - ((edata->upropset & (valid)) && \ - (edata->value_cur rel (edata->limits.lim))) - - if ((edata->upropset & PROP_DRIVER_LIMITS) == 0) { - if __EXCEED_LIM(PROP_CRITMIN | PROP_BATTCAP, - sel_critmin, <) -edata->state = ENVSYS_SCRITUNDER; - else if __EXCEED_LIM(PROP_WARNM
CVS commit: src/sys/arch
Module Name:src Committed By: dholland Date: Thu Mar 18 22:25:51 UTC 2010 Modified Files: src/sys/arch/cats/conf: GENERIC src/sys/arch/netwinder/conf: GENERIC src/sys/arch/zaurus/conf: GENERIC Log Message: grammar patrol To generate a diff of this commit: cvs rdiff -u -r1.128 -r1.129 src/sys/arch/cats/conf/GENERIC cvs rdiff -u -r1.98 -r1.99 src/sys/arch/netwinder/conf/GENERIC cvs rdiff -u -r1.29 -r1.30 src/sys/arch/zaurus/conf/GENERIC 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/cats/conf/GENERIC diff -u src/sys/arch/cats/conf/GENERIC:1.128 src/sys/arch/cats/conf/GENERIC:1.129 --- src/sys/arch/cats/conf/GENERIC:1.128 Sat Dec 5 20:11:10 2009 +++ src/sys/arch/cats/conf/GENERIC Thu Mar 18 22:25:51 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.128 2009/12/05 20:11:10 pooka Exp $ +# $NetBSD: GENERIC,v 1.129 2010/03/18 22:25:51 dholland Exp $ # # GENERIC machine description file # @@ -186,7 +186,7 @@ # Development and Debugging options #options PORTMASTER # Enable PortMaster only options -#options DIAGNOSTIC # internally consistency checks +#options DIAGNOSTIC # internal consistency checks #options PMAP_DEBUG # Enable pmap_debug_level code options DDB # in-kernel debugger options DDB_HISTORY_SIZE=100 # Enable history editing in DDB Index: src/sys/arch/netwinder/conf/GENERIC diff -u src/sys/arch/netwinder/conf/GENERIC:1.98 src/sys/arch/netwinder/conf/GENERIC:1.99 --- src/sys/arch/netwinder/conf/GENERIC:1.98 Sat Dec 5 20:11:16 2009 +++ src/sys/arch/netwinder/conf/GENERIC Thu Mar 18 22:25:51 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.98 2009/12/05 20:11:16 pooka Exp $ +# $NetBSD: GENERIC,v 1.99 2010/03/18 22:25:51 dholland Exp $ # # GENERIC machine description file # @@ -166,7 +166,7 @@ #options ARM700BUGTRACK # track the ARM700 swi bug #options PORTMASTER # Enable PortMaster only options -#options DIAGNOSTIC # internally consistency checks +#options DIAGNOSTIC # internal consistency checks #options PMAP_DEBUG # Enable pmap_debug_level code options DDB # in-kernel debugger options DDB_HISTORY_SIZE=100 # Enable history editing in DDB Index: src/sys/arch/zaurus/conf/GENERIC diff -u src/sys/arch/zaurus/conf/GENERIC:1.29 src/sys/arch/zaurus/conf/GENERIC:1.30 --- src/sys/arch/zaurus/conf/GENERIC:1.29 Sun Dec 13 04:36:02 2009 +++ src/sys/arch/zaurus/conf/GENERIC Thu Mar 18 22:25:51 2010 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.29 2009/12/13 04:36:02 nonaka Exp $ +# $NetBSD: GENERIC,v 1.30 2010/03/18 22:25:51 dholland Exp $ # # GENERIC machine description file # @@ -147,7 +147,7 @@ # Development and Debugging options -options DIAGNOSTIC # internally consistency checks +options DIAGNOSTIC # internal consistency checks #options DEBUG #options VERBOSE_INIT_ARM # verbose bootstraping messages options DDB # in-kernel debugger
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: roy Date: Thu Mar 18 22:17:55 UTC 2010 Modified Files: src/libexec/ld.elf_so: Makefile rtld.c rtld.h symbol.c Log Message: Use alloca(3) instead of local xmalloc for creating our DoneLists. This allows threaded programs to use us a little better, PR lib/43005. We need to disable SSP when using alloca. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/libexec/ld.elf_so/Makefile cvs rdiff -u -r1.129 -r1.130 src/libexec/ld.elf_so/rtld.c cvs rdiff -u -r1.89 -r1.90 src/libexec/ld.elf_so/rtld.h cvs rdiff -u -r1.51 -r1.52 src/libexec/ld.elf_so/symbol.c 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/Makefile diff -u src/libexec/ld.elf_so/Makefile:1.93 src/libexec/ld.elf_so/Makefile:1.94 --- src/libexec/ld.elf_so/Makefile:1.93 Sun Dec 13 09:31:47 2009 +++ src/libexec/ld.elf_so/Makefile Thu Mar 18 22:17:55 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.93 2009/12/13 09:31:47 mrg Exp $ +# $NetBSD: Makefile,v 1.94 2010/03/18 22:17:55 roy Exp $ # # NOTE: when changing ld.so, ensure that ldd still compiles. # @@ -16,6 +16,10 @@ .include # for OBJECT_FMT definition .include # for SHLINKINSTALLDIR definition +# We use alloca +USE_FORT= no +USE_SSP= no + .if defined(LDELFSO_MACHINE_CPU) && !empty(LDELFSO_MACHINE_CPU) && \ exists(${.CURDIR}/arch/${LDELFSO_MACHINE_CPU}) ARCHSUBDIR= ${LDELFSO_MACHINE_CPU} Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.129 src/libexec/ld.elf_so/rtld.c:1.130 --- src/libexec/ld.elf_so/rtld.c:1.129 Sat Feb 27 11:16:38 2010 +++ src/libexec/ld.elf_so/rtld.c Thu Mar 18 22:17:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.129 2010/02/27 11:16:38 roy Exp $ */ +/* $NetBSD: rtld.c,v 1.130 2010/03/18 22:17:55 roy Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.129 2010/02/27 11:16:38 roy Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.130 2010/03/18 22:17:55 roy Exp $"); #endif /* not lint */ #include @@ -822,8 +822,6 @@ def = _rtld_symlook_list(name, hash, &_rtld_list_main, &obj, false, &donelist); - _rtld_donelist_clear(&donelist); - if (def != NULL) return obj->relocbase + def->st_value; return(NULL); @@ -919,10 +917,8 @@ _rtld_donelist_init(&depth); def = _rtld_symlook_needed(name, hash, &fake, &defobj, false, &donelist, &depth); - _rtld_donelist_clear(&depth); } - _rtld_donelist_clear(&donelist); break; } Index: src/libexec/ld.elf_so/rtld.h diff -u src/libexec/ld.elf_so/rtld.h:1.89 src/libexec/ld.elf_so/rtld.h:1.90 --- src/libexec/ld.elf_so/rtld.h:1.89 Sat Feb 27 11:16:38 2010 +++ src/libexec/ld.elf_so/rtld.h Thu Mar 18 22:17:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.h,v 1.89 2010/02/27 11:16:38 roy Exp $ */ +/* $NetBSD: rtld.h,v 1.90 2010/03/18 22:17:55 roy Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -61,13 +61,14 @@ /* * Fill in a DoneList with an allocation large enough to hold all of - * the currently-loaded objects. + * the currently-loaded objects. Keep this in a macro since it calls + * alloca and we want that to occur within the scope of the caller. */ -#define _rtld_donelist_init(dlp) \ -((dlp)->objs = xmalloc(_rtld_objcount * sizeof((dlp)->objs[0])), \ -(dlp)->num_alloc = _rtld_objcount, \ +#define _rtld_donelist_init(dlp) \ +((dlp)->num_alloc = _rtld_objcount, \ +(dlp)->objs = alloca((dlp)->num_alloc * sizeof((dlp)->objs[0])), \ +assert((dlp)->objs != NULL), \ (dlp)->num_used = 0) -#define _rtld_donelist_clear(dlp) xfree((dlp)->objs) #endif /* _RTLD_SOURCE */ Index: src/libexec/ld.elf_so/symbol.c diff -u src/libexec/ld.elf_so/symbol.c:1.51 src/libexec/ld.elf_so/symbol.c:1.52 --- src/libexec/ld.elf_so/symbol.c:1.51 Sat Feb 27 11:16:38 2010 +++ src/libexec/ld.elf_so/symbol.c Thu Mar 18 22:17:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: symbol.c,v 1.51 2010/02/27 11:16:38 roy Exp $ */ +/* $NetBSD: symbol.c,v 1.52 2010/03/18 22:17:55 roy Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: symbol.c,v 1.51 2010/02/27 11:16:38 roy Exp $"); +__RCSID("$NetBSD: symbol.c,v 1.52 2010/03/18 22:17:55 roy Exp $"); #endif /* not lint */ #include @@ -479,8 +479,6 @@ } } - _rtld_donelist_clear(&donelist); - if (def != NULL) *defobj_out = defobj; return def;
CVS commit: src/share/man/man9
Module Name:src Committed By: pgoyette Date: Thu Mar 18 22:11:48 UTC 2010 Modified Files: src/share/man/man9: sysmon_envsys.9 Log Message: Update to reflect recent removal of monitor member from envsys_data_t structure. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/share/man/man9/sysmon_envsys.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/sysmon_envsys.9 diff -u src/share/man/man9/sysmon_envsys.9:1.34 src/share/man/man9/sysmon_envsys.9:1.35 --- src/share/man/man9/sysmon_envsys.9:1.34 Wed Mar 17 07:31:14 2010 +++ src/share/man/man9/sysmon_envsys.9 Thu Mar 18 22:11:48 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: sysmon_envsys.9,v 1.34 2010/03/17 07:31:14 jruoho Exp $ +.\" $NetBSD: sysmon_envsys.9,v 1.35 2010/03/18 22:11:48 pgoyette Exp $ .\" .\" Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 25, 2010 +.Dd March 18, 2010 .Dt SYSMON_ENVSYS 9 .Os .Sh NAME @@ -293,7 +293,6 @@ int32_t value_avg; sysmon_envsys_lim_t limits; int upropset; - bool monitor; char desc[ENVSYS_DESCLEN]; } envsys_data_t; .Ed @@ -309,6 +308,16 @@ Used to set the current state. .It Fa flags Used to set additional flags. +Among other uses, if one or more of the +.Dv ENVSYS_FMONxxx +flags are set, automatic sensor monitoring will be enabled. +Periodically, the sensor's value will be checked and if certain +conditions are met, an event will be sent to the +.Xr powerd 8 +daemon. +.Em NOTE +.Em that limits (or thresholds) can be set at any time to enable +.Em monitoring that the sensor's value remains within those limits . .It Fa rpms Used to set the nominal RPM value for .Sy fan @@ -329,23 +338,6 @@ Structure used to contain the sensor's alarm thresholds. .It Fa upropset Used to keep track of which sensor properties are set. -.It Fa monitor -Used to enable automatic sensor monitoring (by default -it's disabled). -The automatic sensor monitoring will check if -a condition is met periodically and will send an event to the -.Xr powerd 8 -daemon (if running). -The monitoring event will be registered when this flag is -.Dv true -and one or more of the -.Dv ENVSYS_FMONxxx -flags were set in the -.Ar flags -member. -.Em NOTE -.Em that limits (or thresholds) can be set at any time to enable -.Em monitoring that the sensor's value remains within those limits . .It Fa desc Used to set the description string. .Em NOTE
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: dyoung Date: Thu Mar 18 20:54:56 UTC 2010 Modified Files: src/sys/dev/cardbus: adv_cardbus.c ahc_cardbus.c com_cardbus.c siisata_cardbus.c uhci_cardbus.c Log Message: This is *always* compiled with #define rbus 1, so get rid of the conditional compilation. Simplify interrupt (dis)establishment by two source transformations: - cardbus_intr_disestablish(cc, cf, ih); + Cardbus_intr_disestablish(ct, ih); - ih = cardbus_intr_establish(cc, cf, ...); + ih = Cardbus_intr_establish(ct, ...); The identical change to a few other CardBus NICs has not caused any problems, as expected, so I'm going to commit this rather safe change and get on with the work. Testers have been enlisted. I will revisit this change if I get any negative responses. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/dev/cardbus/adv_cardbus.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/cardbus/ahc_cardbus.c cvs rdiff -u -r1.28 -r1.29 src/sys/dev/cardbus/com_cardbus.c cvs rdiff -u -r1.11 -r1.12 src/sys/dev/cardbus/siisata_cardbus.c cvs rdiff -u -r1.16 -r1.17 src/sys/dev/cardbus/uhci_cardbus.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/cardbus/adv_cardbus.c diff -u src/sys/dev/cardbus/adv_cardbus.c:1.26 src/sys/dev/cardbus/adv_cardbus.c:1.27 --- src/sys/dev/cardbus/adv_cardbus.c:1.26 Fri Feb 26 00:57:01 2010 +++ src/sys/dev/cardbus/adv_cardbus.c Thu Mar 18 20:54:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: adv_cardbus.c,v 1.26 2010/02/26 00:57:01 dyoung Exp $ */ +/* $NetBSD: adv_cardbus.c,v 1.27 2010/03/18 20:54:56 dyoung Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: adv_cardbus.c,v 1.26 2010/02/26 00:57:01 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adv_cardbus.c,v 1.27 2010/03/18 20:54:56 dyoung Exp $"); #include #include @@ -109,8 +109,6 @@ struct adv_cardbus_softc *csc = device_private(self); struct asc_softc *sc = &csc->sc_adv; cardbus_devfunc_t ct = ca->ca_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; - cardbus_function_tag_t cf = ct->ct_cf; bus_space_tag_t iot; bus_space_handle_t ioh; pcireg_t reg; @@ -181,20 +179,20 @@ } /* Enable the appropriate bits in the PCI CSR. */ - reg = cardbus_conf_read(cc, cf, ca->ca_tag, PCI_COMMAND_STATUS_REG); + reg = Cardbus_conf_read(ct, ca->ca_tag, PCI_COMMAND_STATUS_REG); reg &= ~(PCI_COMMAND_IO_ENABLE|PCI_COMMAND_MEM_ENABLE); reg |= csc->sc_csr; - cardbus_conf_write(cc, cf, ca->ca_tag, PCI_COMMAND_STATUS_REG, reg); + Cardbus_conf_write(ct, ca->ca_tag, PCI_COMMAND_STATUS_REG, reg); /* * Make sure the latency timer is set to some reasonable * value. */ - reg = cardbus_conf_read(cc, cf, ca->ca_tag, PCI_BHLC_REG); + reg = Cardbus_conf_read(ct, ca->ca_tag, PCI_BHLC_REG); if (PCI_LATTIMER(reg) < latency) { reg &= ~(PCI_LATTIMER_MASK << PCI_LATTIMER_SHIFT); reg |= (latency << PCI_LATTIMER_SHIFT); - cardbus_conf_write(cc, cf, ca->ca_tag, PCI_BHLC_REG, reg); + Cardbus_conf_write(ct, ca->ca_tag, PCI_BHLC_REG, reg); } ASC_SET_CHIP_CONTROL(iot, ioh, ASC_CC_HALT); @@ -218,7 +216,7 @@ /* * Establish the interrupt. */ - sc->sc_ih = cardbus_intr_establish(cc, cf, ca->ca_intrline, IPL_BIO, + sc->sc_ih = Cardbus_intr_establish(ct, ca->ca_intrline, IPL_BIO, adv_intr, sc); if (sc->sc_ih == NULL) { aprint_error_dev(&sc->sc_dev, @@ -245,8 +243,7 @@ return rv; if (sc->sc_ih) { - cardbus_intr_disestablish(csc->sc_ct->ct_cc, - csc->sc_ct->ct_cf, sc->sc_ih); + Cardbus_intr_disestablish(csc->sc_ct, sc->sc_ih); sc->sc_ih = 0; } Index: src/sys/dev/cardbus/ahc_cardbus.c diff -u src/sys/dev/cardbus/ahc_cardbus.c:1.33 src/sys/dev/cardbus/ahc_cardbus.c:1.34 --- src/sys/dev/cardbus/ahc_cardbus.c:1.33 Fri Feb 26 00:57:01 2010 +++ src/sys/dev/cardbus/ahc_cardbus.c Thu Mar 18 20:54:56 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ahc_cardbus.c,v 1.33 2010/02/26 00:57:01 dyoung Exp $ */ +/* $NetBSD: ahc_cardbus.c,v 1.34 2010/03/18 20:54:56 dyoung Exp $ */ /*- * Copyright (c) 2000, 2005 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ahc_cardbus.c,v 1.33 2010/02/26 00:57:01 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ahc_cardbus.c,v 1.34 2010/03/18 20:54:56 dyoung Exp $"); #include "opt_ahc_cardbus.h" @@ -110,8 +110,6 @@ struct ahc_cardbus_softc *csc = device_private(self); struct ahc_softc *ahc = &csc->sc_ahc; cardbus_devfunc_t ct = ca->ca_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; - cardbus_function_tag_t cf = ct->ct_cf; bus_space_tag_t bst; bus_space_handle_t bsh; pcireg_t reg; @@ -146,20 +144,20 @@ } /* Enable the appropriate bits in the PCI CSR. */ - reg = cardbus_conf_read(cc, cf, ca->ca_tag, PCI_COMMAND_STATUS_REG); + reg = Cardbus_conf_read(ct, ca->ca_tag, PCI_COMMAND_STATUS_REG); r
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: dyoung Date: Thu Mar 18 20:52:43 UTC 2010 Modified Files: src/sys/dev/cardbus: if_fxp_cardbus.c Log Message: Simplify interrupt (dis)establishment by two source transformations: - cardbus_intr_disestablish(cc, cf, ih); + Cardbus_intr_disestablish(ct, ih); - ih = cardbus_intr_establish(cc, cf, ...); + ih = Cardbus_intr_establish(ct, ...); The identical change to a few other CardBus NICs has not caused any problems, as expected, so I'm going to commit this rather safe change and get on with the work. Testers have been enlisted. I will revisit this change if I get any negative responses. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/dev/cardbus/if_fxp_cardbus.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/cardbus/if_fxp_cardbus.c diff -u src/sys/dev/cardbus/if_fxp_cardbus.c:1.46 src/sys/dev/cardbus/if_fxp_cardbus.c:1.47 --- src/sys/dev/cardbus/if_fxp_cardbus.c:1.46 Fri Feb 26 00:57:02 2010 +++ src/sys/dev/cardbus/if_fxp_cardbus.c Thu Mar 18 20:52:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_fxp_cardbus.c,v 1.46 2010/02/26 00:57:02 dyoung Exp $ */ +/* $NetBSD: if_fxp_cardbus.c,v 1.47 2010/03/18 20:52:43 dyoung Exp $ */ /* * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.46 2010/02/26 00:57:02 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_fxp_cardbus.c,v 1.47 2010/03/18 20:52:43 dyoung Exp $"); #include "opt_inet.h" #include "rnd.h" @@ -212,8 +212,7 @@ fxp_cardbus_enable(struct fxp_softc * sc) { struct fxp_cardbus_softc *csc = (struct fxp_cardbus_softc *)sc; - cardbus_chipset_tag_t cc = csc->ct->ct_cc; - cardbus_function_tag_t cf = csc->ct->ct_cf; + cardbus_devfunc_t ct = csc->ct; Cardbus_function_enable(csc->ct); @@ -221,7 +220,7 @@ /* Map and establish the interrupt. */ - sc->sc_ih = cardbus_intr_establish(cc, cf, csc->intrline, IPL_NET, + sc->sc_ih = Cardbus_intr_establish(ct, csc->intrline, IPL_NET, fxp_intr, sc); if (NULL == sc->sc_ih) { aprint_error_dev(sc->sc_dev, "couldn't establish interrupt\n"); @@ -235,12 +234,10 @@ fxp_cardbus_disable(struct fxp_softc * sc) { struct fxp_cardbus_softc *csc = (struct fxp_cardbus_softc *)sc; - struct cardbus_devfunc *ct = csc->ct; - cardbus_chipset_tag_t cc = ct->ct_cc; - cardbus_function_tag_t cf = ct->ct_cf; + cardbus_devfunc_t ct = csc->ct; /* Remove interrupt handler. */ - cardbus_intr_disestablish(cc, cf, sc->sc_ih); + Cardbus_intr_disestablish(ct, sc->sc_ih); Cardbus_function_disable(csc->ct); } @@ -263,7 +260,7 @@ /* * Unhook the interrupt handler. */ - cardbus_intr_disestablish(ct->ct_cc, ct->ct_cf, sc->sc_ih); + Cardbus_intr_disestablish(ct, sc->sc_ih); /* * release bus space and close window
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: dyoung Date: Thu Mar 18 20:51:42 UTC 2010 Modified Files: src/sys/dev/cardbus: if_ral_cardbus.c if_re_cardbus.c Log Message: This is *always* compiled with #define rbus 1, so get rid of the conditional compilation. Simplify interrupt (dis)establishment by two source transformations: - cardbus_intr_disestablish(cc, cf, ih); + Cardbus_intr_disestablish(ct, ih); - ih = cardbus_intr_establish(cc, cf, ...); + ih = Cardbus_intr_establish(ct, ...); The identical change to a few other CardBus NICs has not caused any problems, as expected, so I'm going to commit this rather safe change and get on with the work. Testers have been enlisted. I will revisit this change if I get any negative responses. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/dev/cardbus/if_ral_cardbus.c cvs rdiff -u -r1.24 -r1.25 src/sys/dev/cardbus/if_re_cardbus.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/cardbus/if_ral_cardbus.c diff -u src/sys/dev/cardbus/if_ral_cardbus.c:1.20 src/sys/dev/cardbus/if_ral_cardbus.c:1.21 --- src/sys/dev/cardbus/if_ral_cardbus.c:1.20 Fri Feb 26 00:57:02 2010 +++ src/sys/dev/cardbus/if_ral_cardbus.c Thu Mar 18 20:51:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ral_cardbus.c,v 1.20 2010/02/26 00:57:02 dyoung Exp $ */ +/* $NetBSD: if_ral_cardbus.c,v 1.21 2010/03/18 20:51:42 dyoung Exp $ */ /* $OpenBSD: if_ral_cardbus.c,v 1.6 2006/01/09 20:03:31 damien Exp $ */ /*- @@ -22,7 +22,7 @@ * CardBus front-end for the Ralink RT2560/RT2561/RT2561S/RT2661 driver. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.20 2010/02/26 00:57:02 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ral_cardbus.c,v 1.21 2010/03/18 20:51:42 dyoung Exp $"); #include @@ -163,11 +163,6 @@ return; } -#if rbus -#else - (*cf->cardbus_mem_open)(cc, 0, base, base + csc->sc_mapsize); -#endif - csc->sc_bar_val = base | PCI_MAPREG_TYPE_MEM; /* set up the PCI configuration registers */ @@ -184,8 +179,6 @@ struct ral_cardbus_softc *csc = (struct ral_cardbus_softc *)self; struct rt2560_softc *sc = &csc->sc_sc; cardbus_devfunc_t ct = csc->sc_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; - cardbus_function_tag_t cf = ct->ct_cf; int error; error = (*csc->sc_opns->detach)(sc); @@ -194,7 +187,7 @@ /* unhook the interrupt handler */ if (csc->sc_ih != NULL) { - cardbus_intr_disestablish(cc, cf, csc->sc_ih); + Cardbus_intr_disestablish(ct, csc->sc_ih); csc->sc_ih = NULL; } @@ -210,8 +203,6 @@ { struct ral_cardbus_softc *csc = (struct ral_cardbus_softc *)sc; cardbus_devfunc_t ct = csc->sc_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; - cardbus_function_tag_t cf = ct->ct_cf; /* power on the socket */ Cardbus_function_enable(ct); @@ -220,7 +211,7 @@ ral_cardbus_setup(csc); /* map and establish the interrupt handler */ - csc->sc_ih = cardbus_intr_establish(cc, cf, csc->sc_intrline, IPL_NET, + csc->sc_ih = Cardbus_intr_establish(ct, csc->sc_intrline, IPL_NET, csc->sc_opns->intr, sc); if (csc->sc_ih == NULL) { aprint_error_dev(&sc->sc_dev, @@ -237,11 +228,9 @@ { struct ral_cardbus_softc *csc = (struct ral_cardbus_softc *)sc; cardbus_devfunc_t ct = csc->sc_ct; - cardbus_chipset_tag_t cc = ct->ct_cc; - cardbus_function_tag_t cf = ct->ct_cf; /* unhook the interrupt handler */ - cardbus_intr_disestablish(cc, cf, csc->sc_ih); + Cardbus_intr_disestablish(ct, csc->sc_ih); csc->sc_ih = NULL; /* power down the socket */ Index: src/sys/dev/cardbus/if_re_cardbus.c diff -u src/sys/dev/cardbus/if_re_cardbus.c:1.24 src/sys/dev/cardbus/if_re_cardbus.c:1.25 --- src/sys/dev/cardbus/if_re_cardbus.c:1.24 Fri Feb 26 00:57:02 2010 +++ src/sys/dev/cardbus/if_re_cardbus.c Thu Mar 18 20:51:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_re_cardbus.c,v 1.24 2010/02/26 00:57:02 dyoung Exp $ */ +/* $NetBSD: if_re_cardbus.c,v 1.25 2010/03/18 20:51:42 dyoung Exp $ */ /* * Copyright (c) 2004 Jonathan Stone @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_re_cardbus.c,v 1.24 2010/02/26 00:57:02 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_re_cardbus.c,v 1.25 2010/03/18 20:51:42 dyoung Exp $"); #include #include @@ -171,10 +171,6 @@ #ifdef RTK_USEIOSPACE if (Cardbus_mapreg_map(ct, RTK_PCI_LOIO, PCI_MAPREG_TYPE_IO, 0, &sc->rtk_btag, &sc->rtk_bhandle, &adr, &csc->sc_mapsize) == 0) { -#if rbus -#else - (*ct->ct_cf->cardbus_io_open)(cc, 0, adr, adr+csc->sc_mapsize); -#endif csc->sc_csr |= PCI_COMMAND_IO_ENABLE; csc->sc_bar_reg = RTK_PCI_LOIO; csc->sc_bar_val = adr | PCI_MAPREG_TYPE_IO; @@ -182,10 +178,6 @@ #else if (Cardbus_mapreg_map(ct, RTK_PCI_LOMEM, PCI_MAPREG_TYPE_MEM, 0, &sc->rtk_btag, &sc->rtk_bhandle, &adr, &csc->sc_mapsize) == 0) { -#if rbus -#else - (*ct->ct_cf->cardbus_mem_open)(cc, 0, adr, adr+csc->sc_mapsize); -#endif csc->s
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Thu Mar 18 18:25:45 UTC 2010 Modified Files: src/sys/kern: kern_module.c Log Message: Print builtin "use -f" message only if not autoloading. Otherwise it'll get spammy. XXX: this should probably be printed iff the toplevel module is not being autoloaded (i.e. there is a human to interpret the error). Otherwise disabled dependencies give a misleading EPERM. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/kern/kern_module.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/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.61 src/sys/kern/kern_module.c:1.62 --- src/sys/kern/kern_module.c:1.61 Thu Mar 18 17:33:18 2010 +++ src/sys/kern/kern_module.c Thu Mar 18 18:25:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.61 2010/03/18 17:33:18 pooka Exp $ */ +/* $NetBSD: kern_module.c,v 1.62 2010/03/18 18:25:45 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.61 2010/03/18 17:33:18 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.62 2010/03/18 18:25:45 pooka Exp $"); #define _MODULE_INTERNAL @@ -771,8 +771,10 @@ } if (mod) { if ((flags & MODCTL_LOAD_FORCE) == 0) { - module_error("use -f to reinstate " - "builtin module \"%s\"", name); + if (!autoload) { +module_error("use -f to reinstate " +"builtin module \"%s\"", name); + } depth--; return EPERM; } else {
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Thu Mar 18 17:33:18 UTC 2010 Modified Files: src/sys/kern: kern_module.c Log Message: Never autounload builtin modules (they will never be autoloaded if disabled). To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/kern/kern_module.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/kern/kern_module.c diff -u src/sys/kern/kern_module.c:1.60 src/sys/kern/kern_module.c:1.61 --- src/sys/kern/kern_module.c:1.60 Fri Mar 5 20:10:05 2010 +++ src/sys/kern/kern_module.c Thu Mar 18 17:33:18 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.60 2010/03/05 20:10:05 pooka Exp $ */ +/* $NetBSD: kern_module.c,v 1.61 2010/03/18 17:33:18 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.60 2010/03/05 20:10:05 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.61 2010/03/18 17:33:18 pooka Exp $"); #define _MODULE_INTERNAL @@ -1170,6 +1170,8 @@ mutex_enter(&module_lock); for (mod = TAILQ_FIRST(&module_list); mod != NULL; mod = next) { next = TAILQ_NEXT(mod, mod_chain); + if (mod->mod_source == MODULE_SOURCE_KERNEL) +continue; if (uvmexp.free < uvmexp.freemin) { module_thread_ticks = hz; } else if (mod->mod_autotime == 0) {
CVS commit: src/sys/arch/evbppc
Module Name:src Committed By: kiyohara Date: Thu Mar 18 14:15:38 UTC 2010 Modified Files: src/sys/arch/evbppc/conf: Makefile.obs405.inc OPENBLOCKS266 std.obs200 std.obs405 src/sys/arch/evbppc/include: obs405.h src/sys/arch/evbppc/obs405: obs200_machdep.c obs266_machdep.c Added Files: src/sys/arch/evbppc/conf: OPENBLOCKS600 files.obs266 files.obs600 std.obs266 std.obs600 src/sys/arch/evbppc/include: obs600.h src/sys/arch/evbppc/obs405: obs600_autoconf.c obs600_locore.S obs600_machdep.c Removed Files: src/sys/arch/evbppc/obs405: consinit.c Log Message: Support Plathome's OpenBlockS600. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/conf/Makefile.obs405.inc cvs rdiff -u -r1.47 -r1.48 src/sys/arch/evbppc/conf/OPENBLOCKS266 cvs rdiff -u -r0 -r1.1 src/sys/arch/evbppc/conf/OPENBLOCKS600 \ src/sys/arch/evbppc/conf/files.obs266 \ src/sys/arch/evbppc/conf/files.obs600 src/sys/arch/evbppc/conf/std.obs266 \ src/sys/arch/evbppc/conf/std.obs600 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbppc/conf/std.obs200 \ src/sys/arch/evbppc/conf/std.obs405 cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbppc/include/obs405.h cvs rdiff -u -r0 -r1.1 src/sys/arch/evbppc/include/obs600.h cvs rdiff -u -r1.5 -r0 src/sys/arch/evbppc/obs405/consinit.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbppc/obs405/obs200_machdep.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbppc/obs405/obs266_machdep.c cvs rdiff -u -r0 -r1.1 src/sys/arch/evbppc/obs405/obs600_autoconf.c \ src/sys/arch/evbppc/obs405/obs600_locore.S \ src/sys/arch/evbppc/obs405/obs600_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/evbppc/conf/Makefile.obs405.inc diff -u src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.4 src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.5 --- src/sys/arch/evbppc/conf/Makefile.obs405.inc:1.4 Mon May 18 05:17:28 2009 +++ src/sys/arch/evbppc/conf/Makefile.obs405.inc Thu Mar 18 14:15:38 2010 @@ -1,9 +1,28 @@ -# $NetBSD: Makefile.obs405.inc,v 1.4 2009/05/18 05:17:28 mrg Exp $ - -MKIMG?= ${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh +# $NetBSD: Makefile.obs405.inc,v 1.5 2010/03/18 14:15:38 kiyohara Exp $ CFLAGS+=-mcpu=405 AFLAGS+=-mcpu=405 + + +.if ${PRDCTTYPE} == "obs200" + +MKIMG?= ${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh + +TEXTADDR?= 45 + +SYSTEM_FIRST_OBJ= obs200_locore.o +SYSTEM_FIRST_SFILE= ${THISPPC}/obs405/obs200_locore.S + +SYSTEM_LD_TAIL_EXTRA+=; \ + echo ${MKIMG} netbsd netbsd.img ; \ + OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; export OBJDUMP OBJCOPY; \ + ${MKIMG} $@ $...@.img + + +.elif ${PRDCTTYPE} == "obs266" + +MKIMG?= ${HOST_SH} ${THISPPC}/compile/walnut-mkimg.sh + TEXTADDR?= 25000 SYSTEM_FIRST_OBJ= locore.o @@ -13,3 +32,17 @@ echo ${MKIMG} netbsd netbsd.img ; \ OBJDUMP=${OBJDUMP}; OBJCOPY=${OBJCOPY}; export OBJDUMP OBJCOPY; \ ${MKIMG} $@ $...@.img + + +.elif ${PRDCTTYPE} == "obs600" + +TEXTADDR?= 25000 + +SYSTEM_FIRST_OBJ= obs600_locore.o +SYSTEM_FIRST_SFILE= ${THISPPC}/obs405/obs600_locore.S + +SYSTEM_LD_TAIL_EXTRA+=; \ + echo ${OBJCOPY} -S -O binary $@ $...@.bin; \ + ${OBJCOPY} -S -O binary $@ $...@.bin; + +.endif Index: src/sys/arch/evbppc/conf/OPENBLOCKS266 diff -u src/sys/arch/evbppc/conf/OPENBLOCKS266:1.47 src/sys/arch/evbppc/conf/OPENBLOCKS266:1.48 --- src/sys/arch/evbppc/conf/OPENBLOCKS266:1.47 Wed Mar 10 17:25:21 2010 +++ src/sys/arch/evbppc/conf/OPENBLOCKS266 Thu Mar 18 14:15:38 2010 @@ -1,13 +1,13 @@ -# $NetBSD: OPENBLOCKS266,v 1.47 2010/03/10 17:25:21 kiyohara Exp $ +# $NetBSD: OPENBLOCKS266,v 1.48 2010/03/18 14:15:38 kiyohara Exp $ # # GENERIC -- everything that's currently supported # -include "arch/evbppc/conf/std.obs405" +include "arch/evbppc/conf/std.obs266" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "OPENBLOCKS266-$Revision: 1.47 $" +#ident "OPENBLOCKS266-$Revision: 1.48 $" maxusers 32 Index: src/sys/arch/evbppc/conf/std.obs200 diff -u src/sys/arch/evbppc/conf/std.obs200:1.3 src/sys/arch/evbppc/conf/std.obs200:1.4 --- src/sys/arch/evbppc/conf/std.obs200:1.3 Sun Dec 11 12:17:11 2005 +++ src/sys/arch/evbppc/conf/std.obs200 Thu Mar 18 14:15:38 2010 @@ -1,29 +1,11 @@ -# $NetBSD: std.obs200,v 1.3 2005/12/11 12:17:11 christos Exp $ +# $NetBSD: std.obs200,v 1.4 2010/03/18 14:15:38 kiyohara Exp $ # -# Standard/required options for NetBSD/obs200 +# Standard/required options for obs200 -machine evbppc powerpc -include "conf/std" # MI standard options - -# standard ("mandatory") kernel options. -options PPC_IBM4XX # IBM 40x family - -# Executable support: -options EXEC_ELF32 # (native) ELF32 binary support -options EXEC_AOUT # (native) a.out binary support (deprecated) -options EXEC_SCRIPT # shell script support +include "arch/evbppc/conf/std.obs405" +makeoptions PRDCTTYPE="obs200" makeo
CVS commit: src/sys/arch/evbppc
Module Name:src Committed By: kiyohara Date: Thu Mar 18 14:04:07 UTC 2010 Modified Files: src/sys/arch/evbppc/obs405: obs266_autoconf.c src/sys/arch/evbppc/virtex: autoconf.c virtex_start.S src/sys/arch/evbppc/walnut: autoconf.c machdep.c walnut_start.S Log Message: Support PowerPC 405EX/EXr. 1. Add some new source and header files. (MAL(split) and RGMII(new) relations for EMAC) 2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h. 3. intr.c supports MULTIUIC with virtual-irq. likes to oea. support 32-virq/128-hwirq. 4. multiple emac support. 5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx. 6. WALNUT pci uses arch/powerpc/ibm4xx/pci/. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbppc/obs405/obs266_autoconf.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/evbppc/virtex/autoconf.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbppc/virtex/virtex_start.S cvs rdiff -u -r1.17 -r1.18 src/sys/arch/evbppc/walnut/autoconf.c cvs rdiff -u -r1.45 -r1.46 src/sys/arch/evbppc/walnut/machdep.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/evbppc/walnut/walnut_start.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/evbppc/obs405/obs266_autoconf.c diff -u src/sys/arch/evbppc/obs405/obs266_autoconf.c:1.4 src/sys/arch/evbppc/obs405/obs266_autoconf.c:1.5 --- src/sys/arch/evbppc/obs405/obs266_autoconf.c:1.4 Sat Oct 7 14:59:53 2006 +++ src/sys/arch/evbppc/obs405/obs266_autoconf.c Thu Mar 18 14:04:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: obs266_autoconf.c,v 1.4 2006/10/07 14:59:53 tsutsui Exp $ */ +/* $NetBSD: obs266_autoconf.c,v 1.5 2010/03/18 14:04:07 kiyohara Exp $ */ /* * Copyright 2004 Shigeyuki Fukushima. @@ -33,14 +33,17 @@ * DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: obs266_autoconf.c,v 1.4 2006/10/07 14:59:53 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: obs266_autoconf.c,v 1.5 2010/03/18 14:04:07 kiyohara Exp $"); #include #include #include -#include +#include +#include + +#include /* Index: src/sys/arch/evbppc/virtex/autoconf.c diff -u src/sys/arch/evbppc/virtex/autoconf.c:1.1 src/sys/arch/evbppc/virtex/autoconf.c:1.2 --- src/sys/arch/evbppc/virtex/autoconf.c:1.1 Sat Dec 2 22:18:47 2006 +++ src/sys/arch/evbppc/virtex/autoconf.c Thu Mar 18 14:04:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.1 2006/12/02 22:18:47 freza Exp $ */ +/* $NetBSD: autoconf.c,v 1.2 2010/03/18 14:04:07 kiyohara Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -61,21 +61,21 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.1 2006/12/02 22:18:47 freza Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2010/03/18 14:04:07 kiyohara Exp $"); #include #include #include #include -#include +#include #include /* List of port-specific devices to attach to the processor local bus. */ static const struct plb_dev local_plb_devs [] = { - { "xcvbus" }, - { NULL } + { XILVIRTEX, "xcvbus" }, + { 0, NULL } }; /* Index: src/sys/arch/evbppc/virtex/virtex_start.S diff -u src/sys/arch/evbppc/virtex/virtex_start.S:1.5 src/sys/arch/evbppc/virtex/virtex_start.S:1.6 --- src/sys/arch/evbppc/virtex/virtex_start.S:1.5 Thu Feb 25 23:33:44 2010 +++ src/sys/arch/evbppc/virtex/virtex_start.S Thu Mar 18 14:04:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: virtex_start.S,v 1.5 2010/02/25 23:33:44 matt Exp $ */ +/* $NetBSD: virtex_start.S,v 1.6 2010/03/18 14:04:07 kiyohara Exp $ */ /* * Copyright (c) 2006 Jachym Holecek @@ -55,7 +55,7 @@ #include #include -#include +#include #include Index: src/sys/arch/evbppc/walnut/autoconf.c diff -u src/sys/arch/evbppc/walnut/autoconf.c:1.17 src/sys/arch/evbppc/walnut/autoconf.c:1.18 --- src/sys/arch/evbppc/walnut/autoconf.c:1.17 Thu Feb 22 05:27:47 2007 +++ src/sys/arch/evbppc/walnut/autoconf.c Thu Mar 18 14:04:07 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.17 2007/02/22 05:27:47 thorpej Exp $ */ +/* $NetBSD: autoconf.c,v 1.18 2010/03/18 14:04:07 kiyohara Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.17 2007/02/22 05:27:47 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2010/03/18 14:04:07 kiyohara Exp $"); #include #include @@ -41,15 +41,16 @@ #include /* For COM_FREQ */ -#include +#include #include +#include /* * List of port-specific devices to attach to the processor local bus. */ static const struct plb_dev local_plb_devs [] = { - { "pbus", }, - { NULL } + { IBM405GP, "pbus", }, + { 0, NULL } }; /* Index: src/sys/arch/evbppc/walnut/machdep.c diff -u src/sys/arch/evbppc/walnut/machdep.c:1.45 src/sys/arch/evbppc/walnut/machdep.c:1.46 --- src/sys/arch/evbppc/walnut/machdep.c:1.45 Thu Feb 25 23:33:44 2010 +++ src/sys/arch/evbppc/walnut/machdep.c Thu Mar 18 14:04:07 2010 @@ -1,4 +1,4 @@ -
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: kiyohara Date: Thu Mar 18 13:58:38 UTC 2010 Modified Files: src/sys/arch/powerpc/conf: files.ibm4xx src/sys/arch/powerpc/ibm4xx/openbios: locore.S src/sys/arch/powerpc/ibm4xx/pci: pci_machdep.c src/sys/arch/powerpc/powerpc: bus_space.c Log Message: Support PowerPC 405EX/EXr. 1. Add some new source and header files. (MAL(split) and RGMII(new) relations for EMAC) 2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h. 3. intr.c supports MULTIUIC with virtual-irq. likes to oea. support 32-virq/128-hwirq. 4. multiple emac support. 5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx. 6. WALNUT pci uses arch/powerpc/ibm4xx/pci/. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/powerpc/conf/files.ibm4xx cvs rdiff -u -r1.7 -r1.8 src/sys/arch/powerpc/ibm4xx/openbios/locore.S cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/powerpc/bus_space.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/powerpc/conf/files.ibm4xx diff -u src/sys/arch/powerpc/conf/files.ibm4xx:1.10 src/sys/arch/powerpc/conf/files.ibm4xx:1.11 --- src/sys/arch/powerpc/conf/files.ibm4xx:1.10 Mon Mar 13 15:31:11 2006 +++ src/sys/arch/powerpc/conf/files.ibm4xx Thu Mar 18 13:58:38 2010 @@ -1,9 +1,12 @@ -# $NetBSD: files.ibm4xx,v 1.10 2006/03/13 15:31:11 shige Exp $ +# $NetBSD: files.ibm4xx,v 1.11 2010/03/18 13:58:38 kiyohara Exp $ # # IBM 4xx specific configuration info include "arch/powerpc/fpu/files.fpu" +defflag opt_uic.h MULTIUIC +file arch/powerpc/ibm4xx/intr.c + # Board Properties file arch/powerpc/ibm4xx/board_prop.c @@ -37,9 +40,32 @@ # On-chip ethernet device(s) device emac: ether, ifnet, arp, mii attach emac at opb -file arch/powerpc/ibm4xx/dev/if_emac.c emac +file arch/powerpc/ibm4xx/dev/if_emac.c emac needs-flag +file arch/powerpc/ibm4xx/dev/mal.c emac +defflag opt_emac.h EMAC_ZMII_PHY EMAC_RGMII_PHY +#file arch/powerpc/ibm4xx/dev/zmii.c emac_zmii_phy +file arch/powerpc/ibm4xx/dev/rgmii.c emac_rgmii_phy # Watchdog timer device wdog: sysmon_wdog attach wdog at opb file arch/powerpc/ibm4xx/dev/wdog.c wdog + + +# Machine-independent I2O drivers. +include "dev/i2o/files.i2o" + +# PCI bus support +include "dev/pci/files.pci" + +# On-chip PCI bridge +device pchb : pcibus +attach pchb at plb +file arch/powerpc/ibm4xx/pci/pchb.c pchb +file arch/powerpc/ibm4xx/pci/pci_machdep.c pci +file arch/powerpc/ibm4xx/dev/ibm405gp.c pchb | pci + +# On-chip IIC controller +device gpiic: i2cbus, i2c_bitbang +attach gpiic at opb +file arch/powerpc/ibm4xx/dev/gpiic_opb.c gpiic Index: src/sys/arch/powerpc/ibm4xx/openbios/locore.S diff -u src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.7 src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.8 --- src/sys/arch/powerpc/ibm4xx/openbios/locore.S:1.7 Thu Feb 25 23:31:47 2010 +++ src/sys/arch/powerpc/ibm4xx/openbios/locore.S Thu Mar 18 13:58:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.7 2010/02/25 23:31:47 matt Exp $ */ +/* $NetBSD: locore.S,v 1.8 2010/03/18 13:58:38 kiyohara Exp $ */ /* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */ /* @@ -90,7 +90,7 @@ #include #include #include -#include +#include /* Function pointer for requesting board_config_data from openbios*/ #define BOARD_CFG_FP 0xFFFE0B50 Index: src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c diff -u src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c:1.6 src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c:1.7 --- src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c:1.6 Fri May 30 19:26:35 2008 +++ src/sys/arch/powerpc/ibm4xx/pci/pci_machdep.c Thu Mar 18 13:58:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.6 2008/05/30 19:26:35 ad Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.7 2010/03/18 13:58:38 kiyohara Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -43,7 +43,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.6 2008/05/30 19:26:35 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.7 2010/03/18 13:58:38 kiyohara Exp $"); #include #include @@ -100,17 +100,6 @@ #endif } -int -pci_bus_maxdevs(pci_chipset_tag_t pc, int busno) -{ - - /* - * Bus number is irrelevant. Configuration Mechanism 1 is in - * use, can have devices 0-32 (i.e. the `normal' range). - */ - return 31; -} - pcitag_t pci_make_tag(pci_chipset_tag_t pc, int bus, int device, int function) { Index: src/sys/arch/powerpc/powerpc/bus_space.c diff -u src/sys/arch/powerpc/powerpc/bus_space.c:1.21 src/sys/arch/powerpc/powerpc/bus_space.c:1.22 --- src/sys/arch/powerpc/powerpc/bus_space.c:1.21 Thu Feb 25 23:31:48 2010 +++ src/sys/arch/powerpc/powerpc/bus_space.c Thu Mar 18 13:58:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_space.c,v 1.21 2010/02/25 23:31:48
CVS commit: src/sys/arch
Module Name:src Committed By: kiyohara Date: Thu Mar 18 13:53:18 UTC 2010 Removed Files: src/sys/arch/evbppc/walnut/pci: pci_machdep.c src/sys/arch/powerpc/conf: files.ibm405gp Log Message: Support PowerPC 405EX/EXr. 1. Add some new source and header files. (MAL(split) and RGMII(new) relations for EMAC) 2. Create dcr4xx.h. Its moved from dcr405gp.h. Also remove dcr405xx.h. 3. intr.c supports MULTIUIC with virtual-irq. likes to oea. support 32-virq/128-hwirq. 4. multiple emac support. 5. WALNUT and VIRTEX_* includes arch/powerpc/conf/files.ibm4xx. 6. WALNUT pci uses arch/powerpc/ibm4xx/pci/. To generate a diff of this commit: cvs rdiff -u -r1.8 -r0 src/sys/arch/evbppc/walnut/pci/pci_machdep.c cvs rdiff -u -r1.8 -r0 src/sys/arch/powerpc/conf/files.ibm405gp Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/cddl/osnet/dev/dtrace/i386
Module Name:src Committed By: tron Date: Thu Mar 18 13:45:54 UTC 2010 Modified Files: src/external/cddl/osnet/dev/dtrace/i386: dtrace_subr.c Log Message: As this file seems to be a port specific we don't need to check for "__i386__. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c diff -u src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.3 src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.4 --- src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.3 Thu Mar 18 11:00:03 2010 +++ src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Thu Mar 18 13:45:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dtrace_subr.c,v 1.3 2010/03/18 11:00:03 tron Exp $ */ +/* $NetBSD: dtrace_subr.c,v 1.4 2010/03/18 13:45:54 tron Exp $ */ /* * CDDL HEADER START @@ -48,9 +48,7 @@ #include #include -#if defined(__amd64__) || defined(__i386__) #include -#endif extern uintptr_t kernelbase; extern uintptr_t dtrace_in_probe_addr;
CVS commit: src/external/cddl/osnet/dev/dtrace/i386
Module Name:src Committed By: tron Date: Thu Mar 18 11:00:03 UTC 2010 Modified Files: src/external/cddl/osnet/dev/dtrace/i386: dtrace_subr.c Log Message: Fix the build: 1.) "ifdef-out" unused functions and global variables. 2.) Include "x86/include/cpu_counter.h" for amd64 and i386 to get the prototype of "cpu_frequency". To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c diff -u src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.2 src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.3 --- src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c:1.2 Sun Feb 21 01:46:33 2010 +++ src/external/cddl/osnet/dev/dtrace/i386/dtrace_subr.c Thu Mar 18 11:00:03 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dtrace_subr.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */ +/* $NetBSD: dtrace_subr.c,v 1.3 2010/03/18 11:00:03 tron Exp $ */ /* * CDDL HEADER START @@ -48,6 +48,10 @@ #include #include +#if defined(__amd64__) || defined(__i386__) +#include +#endif + extern uintptr_t kernelbase; extern uintptr_t dtrace_in_probe_addr; extern int dtrace_in_probe; @@ -61,6 +65,8 @@ dtrace_invop_hdlr_t *dtrace_invop_hdlr; +void dtrace_gethrtime_init(void *arg); + int dtrace_invop(uintptr_t addr, uintptr_t *stack, uintptr_t eax) { @@ -372,8 +378,10 @@ } #endif +#if 0 static int64_t tgt_cpu_tsc; static int64_t hst_cpu_tsc; +#endif static int64_t tsc_skew[MAXCPUS]; static uint64_t nsec_scale; @@ -389,6 +397,7 @@ return (rv); } +#if 0 static void dtrace_gethrtime_init_sync(void *arg) { @@ -408,7 +417,9 @@ } #endif } +#endif +#if 0 static void dtrace_gethrtime_init_cpu(void *arg) { @@ -419,6 +430,7 @@ else hst_cpu_tsc = dtrace_rdtsc(); } +#endif void dtrace_gethrtime_init(void *arg)
CVS commit: src/external/cddl/osnet/dev/dtrace/i386
Module Name:src Committed By: tron Date: Thu Mar 18 10:57:58 UTC 2010 Modified Files: src/external/cddl/osnet/dev/dtrace/i386: dtrace_isa.c Log Message: "ifdef-out" unused "label" exactly like the code which would use it to get rid of a build error. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c diff -u src/external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c:1.2 src/external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c:1.3 --- src/external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c:1.2 Sun Feb 21 01:46:33 2010 +++ src/external/cddl/osnet/dev/dtrace/i386/dtrace_isa.c Thu Mar 18 10:57:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dtrace_isa.c,v 1.2 2010/02/21 01:46:33 darran Exp $ */ +/* $NetBSD: dtrace_isa.c,v 1.3 2010/03/18 10:57:58 tron Exp $ */ /* * CDDL HEADER START @@ -400,7 +400,9 @@ stack = (uintptr_t *)&fp[1]; +#if 0 load: +#endif DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT); val = stack[arg]; DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT);
CVS commit: src/sys/arch/amd64/include
Module Name:src Committed By: cegger Date: Thu Mar 18 08:28:33 UTC 2010 Modified Files: src/sys/arch/amd64/include: elf_machdep.h Log Message: buildfix: invert comparison to get the 64bit defines by default. Fixes 'i386/elf_machdep.h: No such file or directory error' when compiling amd64 toolchain on OSX. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amd64/include/elf_machdep.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amd64/include/elf_machdep.h diff -u src/sys/arch/amd64/include/elf_machdep.h:1.3 src/sys/arch/amd64/include/elf_machdep.h:1.4 --- src/sys/arch/amd64/include/elf_machdep.h:1.3 Sat May 30 05:56:52 2009 +++ src/sys/arch/amd64/include/elf_machdep.h Thu Mar 18 08:28:33 2010 @@ -1,6 +1,6 @@ -/* $NetBSD: elf_machdep.h,v 1.3 2009/05/30 05:56:52 skrll Exp $ */ +/* $NetBSD: elf_machdep.h,v 1.4 2010/03/18 08:28:33 cegger Exp $ */ -#ifdef __x86_64__ +#if !defined __i386__ #define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB #define ELF32_MACHDEP_ID_CASES \ @@ -48,8 +48,8 @@ #define R_TYPE(name) __CONCAT(R_X86_64_,name) -#else /* __x86_64__ */ +#else /* !__i386__ */ #include -#endif /* __x86_64__ */ +#endif /* !__i386__ */