PERFORCE change 38730 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sat Sep 27 17:27:00 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=38730
Change 38730 by marcel at marcel_nfs on 2003/09/27 17:26:49
IFC @38726
Affected files ...
.. //depot/projects/uart/alpha/alpha/promcons.c#3 integrate
.. //depot/projects/uart/alpha/tlsb/zs_tlsb.c#3 integrate
.. //depot/projects/uart/amd64/amd64/pmap.c#18 integrate
.. //depot/projects/uart/amd64/include/pmap.h#3 integrate
.. //depot/projects/uart/conf/NOTES#16 integrate
.. //depot/projects/uart/conf/files#25 integrate
.. //depot/projects/uart/conf/options#13 integrate
.. //depot/projects/uart/dev/acpica/Osd/OsdSynch.c#3 integrate
.. //depot/projects/uart/dev/acpica/acpi.c#13 integrate
.. //depot/projects/uart/dev/acpica/acpi_acad.c#5 integrate
.. //depot/projects/uart/dev/acpica/acpi_cmbat.c#6 integrate
.. //depot/projects/uart/dev/acpica/acpi_ec.c#10 integrate
.. //depot/projects/uart/dev/acpica/acpi_resource.c#5 integrate
.. //depot/projects/uart/dev/acpica/acpi_thermal.c#4 integrate
.. //depot/projects/uart/dev/adlink/adlink.c#5 integrate
.. //depot/projects/uart/dev/asr/asr.c#5 integrate
.. //depot/projects/uart/dev/ata/ata-all.c#7 integrate
.. //depot/projects/uart/dev/digi/digi.c#3 integrate
.. //depot/projects/uart/dev/fb/fb.c#4 integrate
.. //depot/projects/uart/dev/fb/fbreg.h#3 integrate
.. //depot/projects/uart/dev/gfb/gfb_pci.c#4 integrate
.. //depot/projects/uart/dev/iir/iir.c#4 integrate
.. //depot/projects/uart/dev/iir/iir.h#2 integrate
.. //depot/projects/uart/dev/iir/iir_ctrl.c#3 integrate
.. //depot/projects/uart/dev/iir/iir_pci.c#6 integrate
.. //depot/projects/uart/dev/isp/isp_freebsd.c#4 integrate
.. //depot/projects/uart/dev/kbd/kbd.c#3 integrate
.. //depot/projects/uart/dev/kbd/kbdreg.h#2 integrate
.. //depot/projects/uart/dev/md/md.c#4 integrate
.. //depot/projects/uart/dev/null/null.c#3 integrate
.. //depot/projects/uart/dev/ofw/ofw_console.c#3 integrate
.. //depot/projects/uart/dev/ofw/openfirmio.c#3 integrate
.. //depot/projects/uart/dev/sab/sab.c#4 integrate
.. //depot/projects/uart/dev/sio/sio.c#9 integrate
.. //depot/projects/uart/dev/syscons/syscons.c#5 integrate
.. //depot/projects/uart/dev/uart/uart_tty.c#17 integrate
.. //depot/projects/uart/dev/zs/zs.c#4 integrate
.. //depot/projects/uart/fs/fdescfs/fdesc_vnops.c#2 integrate
.. //depot/projects/uart/fs/msdosfs/direntry.h#2 integrate
.. //depot/projects/uart/fs/msdosfs/msdosfs_conv.c#2 integrate
.. //depot/projects/uart/fs/msdosfs/msdosfs_iconv.c#1 branch
.. //depot/projects/uart/fs/msdosfs/msdosfs_lookup.c#2 integrate
.. //depot/projects/uart/fs/msdosfs/msdosfs_vfsops.c#4 integrate
.. //depot/projects/uart/fs/msdosfs/msdosfs_vnops.c#4 integrate
.. //depot/projects/uart/fs/msdosfs/msdosfsmount.h#3 integrate
.. //depot/projects/uart/fs/ntfs/ntfs.h#2 integrate
.. //depot/projects/uart/fs/ntfs/ntfs_iconv.c#1 branch
.. //depot/projects/uart/fs/ntfs/ntfs_subr.c#3 integrate
.. //depot/projects/uart/fs/ntfs/ntfs_subr.h#2 integrate
.. //depot/projects/uart/fs/ntfs/ntfs_vfsops.c#4 integrate
.. //depot/projects/uart/fs/ntfs/ntfs_vnops.c#2 integrate
.. //depot/projects/uart/fs/ntfs/ntfsmount.h#2 integrate
.. //depot/projects/uart/fs/smbfs/smbfs_vfsops.c#3 integrate
.. //depot/projects/uart/fs/smbfs/smbfs_vnops.c#3 integrate
.. //depot/projects/uart/geom/geom_ctl.c#3 integrate
.. //depot/projects/uart/geom/geom_io.c#4 integrate
.. //depot/projects/uart/i386/bios/smapi.c#2 integrate
.. //depot/projects/uart/i386/i386/elan-mmcr.c#4 integrate
.. //depot/projects/uart/i386/i386/pmap.c#19 integrate
.. //depot/projects/uart/i386/isa/cy.c#2 integrate
.. //depot/projects/uart/i386/isa/pcvt/pcvt_drv.c#4 integrate
.. //depot/projects/uart/ia64/ia64/ssc.c#2 integrate
.. //depot/projects/uart/isa/vga_isa.c#2 integrate
.. //depot/projects/uart/isofs/cd9660/cd9660_iconv.c#1 branch
.. //depot/projects/uart/isofs/cd9660/cd9660_lookup.c#3 integrate
.. //depot/projects/uart/isofs/cd9660/cd9660_mount.h#2 integrate
.. //depot/projects/uart/isofs/cd9660/cd9660_rrip.c#2 integrate
.. //depot/projects/uart/isofs/cd9660/cd9660_util.c#2 integrate
.. //depot/projects/uart/isofs/cd9660/cd9660_vfsops.c#4 integrate
.. //depot/projects/uart/isofs/cd9660/cd9660_vnops.c#2 integrate
.. //depot/projects/uart/isofs/cd9660/iso.h#2 integrate
.. //depot/projects/uart/kern/kern_conf.c#2 integrate
.. //depot/projects/uart/kern/kern_exec.c#4 integrate
.. //depot/projects/uart/kern/kern_sig.c#10 integrate
.. //depot/projects/uart/kern/subr_devstat.c#3 integrate
.. //depot/projects/uart/kern/subr_xxx.c#2 delete
.. //depot/projects/uart/kern/sys_generic.c#3 integrate
.. //depot/projects/uart/kern/tty_cons.c#3 integrate
.. //depot/projects/uart/kern/tty_pty.c#2 integrate
.. //depot/projects/uart/kern/tty_tty.c#2 integrate
.. //depot/projects/uart/kern/vfs_default.c#2 integrate
.. //depot/projects/uart/kern/vfs_mount.c#4 integrate
.. //depot/projects/uart/libkern/iconv.c#2 integrate
.. //depot/projects/uart/libkern/iconv_converter_if.m#2 integrate
.. //depot/projects/uart/libkern/iconv_xlat.c#2 integrate
.. //depot/projects/uart/libkern/iconv_xlat16.c#1 branch
.. //depot/projects/uart/modules/Makefile#10 integrate
.. //depot/projects/uart/modules/cd9660/Makefile#2 integrate
.. //depot/projects/uart/modules/cd9660_iconv/Makefile#1 branch
.. //depot/projects/uart/modules/libiconv/Makefile#2 integrate
.. //depot/projects/uart/modules/msdosfs/Makefile#2 integrate
.. //depot/projects/uart/modules/msdosfs_iconv/Makefile#1 branch
.. //depot/projects/uart/modules/ntfs/Makefile#2 integrate
.. //depot/projects/uart/modules/ntfs_iconv/Makefile#1 branch
.. //depot/projects/uart/net/if_tun.c#2 integrate
.. //depot/projects/uart/net/if_tunvar.h#2 integrate
.. //depot/projects/uart/net80211/ieee80211_ioctl.c#5 integrate
.. //depot/projects/uart/net80211/ieee80211_ioctl.h#2 integrate
.. //depot/projects/uart/net80211/ieee80211_node.c#7 integrate
.. //depot/projects/uart/net80211/ieee80211_node.h#5 integrate
.. //depot/projects/uart/net80211/ieee80211_proto.c#3 integrate
.. //depot/projects/uart/net80211/ieee80211_var.h#5 integrate
.. //depot/projects/uart/netncp/ncp_mod.c#2 integrate
.. //depot/projects/uart/netsmb/smb_dev.c#2 integrate
.. //depot/projects/uart/opencrypto/cryptodev.c#2 integrate
.. //depot/projects/uart/pc98/pc98/pc98gdc.c#3 integrate
.. //depot/projects/uart/pc98/pc98/sio.c#5 integrate
.. //depot/projects/uart/powerpc/include/cpu.h#3 integrate
.. //depot/projects/uart/powerpc/powerpc/clock.c#2 integrate
.. //depot/projects/uart/powerpc/powerpc/cpu.c#2 integrate
.. //depot/projects/uart/sys/conf.h#2 integrate
.. //depot/projects/uart/sys/cons.h#2 integrate
.. //depot/projects/uart/sys/iconv.h#2 integrate
.. //depot/projects/uart/sys/param.h#10 integrate
.. //depot/projects/uart/sys/signalvar.h#3 integrate
.. //depot/projects/uart/sys/systm.h#4 integrate
.. //depot/projects/uart/vm/uma_dbg.c#3 integrate
.. //depot/projects/uart/vm/vm_map.c#10 integrate
.. //depot/projects/uart/vm/vm_map.h#6 integrate
.. //depot/projects/uart/vm/vm_mmap.c#6 integrate
Differences ...
==== //depot/projects/uart/alpha/alpha/promcons.c#3 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.30 2003/08/22 07:20:25 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/alpha/promcons.c,v 1.31 2003/09/26 10:52:16 phk Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -250,7 +250,7 @@
promcnattach(int alpha_console)
{
prom_consdev.cn_pri = CN_NORMAL;
- prom_consdev.cn_dev = makedev(CDEV_MAJOR, 0);
+ sprintf(prom_consdev.cn_name, "promcons");
make_dev(&prom_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "promcons");
cnadd(&prom_consdev);
promcn_attached = 1;
==== //depot/projects/uart/alpha/tlsb/zs_tlsb.c#3 (text+ko) ====
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.37 2003/08/22 07:20:27 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/alpha/tlsb/zs_tlsb.c,v 1.39 2003/09/26 19:35:49 phk Exp $");
#include "opt_ddb.h"
@@ -227,7 +227,8 @@
/* should really bet part of ivars */
zs_console_addr = (caddr_t) ALPHA_PHYS_TO_K0SEG(base + offset);
- zs_consdev.cn_dev = makedev(CDEV_MAJOR, 0);
+ sprintf(zs_consdev.cn_name, "zs0");
+ zs_consdev.cn_unit = 0;
zs_consdev.cn_pri = CN_NORMAL;
make_dev(&zs_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "zs0");
cnadd(&zs_consdev);
@@ -238,7 +239,7 @@
zs_cngetc(struct consdev *cp)
{
int s = spltty();
- int c = zs_getc(zs_console_addr, minor(cp->cn_dev));
+ int c = zs_getc(zs_console_addr, cp->cn_unit);
splx(s);
return c;
}
@@ -247,7 +248,7 @@
zs_cncheckc(struct consdev *cp)
{
int s = spltty();
- int c = zs_maygetc(zs_console_addr, minor(cp->cn_dev));
+ int c = zs_maygetc(zs_console_addr, cp->cn_unit);
splx(s);
return c;
}
@@ -256,7 +257,7 @@
zs_cnputc(struct consdev *cp, int c)
{
int s = spltty();
- zs_putc(zs_console_addr, minor(cp->cn_dev), c);
+ zs_putc(zs_console_addr, cp->cn_unit, c);
splx(s);
}
==== //depot/projects/uart/amd64/amd64/pmap.c#18 (text+ko) ====
@@ -73,7 +73,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.439 2003/09/26 04:12:41 alc Exp $");
+__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.440 2003/09/27 20:53:00 alc Exp $");
/*
* Manages physical address maps.
@@ -1015,12 +1015,6 @@
static vm_pindex_t color;
/*
- * allocate object for the ptes
- */
- if (pmap->pm_pteobj == NULL)
- pmap->pm_pteobj = vm_object_allocate(OBJT_DEFAULT, NUPDE + NUPDPE + NUPML4E + 1);
-
- /*
* allocate the page directory page
*/
while ((pml4pg = vm_page_alloc(NULL, color++, VM_ALLOC_NOOBJ |
@@ -1068,6 +1062,11 @@
/*
* this routine is called if the page table page is not
* mapped correctly.
+ *
+ * Note: If a page allocation fails at page table level two or three,
+ * one or two pages may be held during the wait, only to be released
+ * afterwards. This conservative approach is easily argued to avoid
+ * race conditions.
*/
static vm_page_t
_pmap_allocpte(pmap, ptepindex)
@@ -1075,15 +1074,19 @@
vm_pindex_t ptepindex;
{
vm_page_t m, pdppg, pdpg;
- int is_object_locked;
/*
- * Find or fabricate a new pagetable page
+ * Allocate a page table page.
*/
- if (!(is_object_locked = VM_OBJECT_LOCKED(pmap->pm_pteobj)))
- VM_OBJECT_LOCK(pmap->pm_pteobj);
- m = vm_page_grab(pmap->pm_pteobj, ptepindex,
- VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY);
+ if ((m = vm_page_alloc(NULL, ptepindex, VM_ALLOC_NOOBJ |
+ VM_ALLOC_WIRED | VM_ALLOC_ZERO)) == NULL) {
+ VM_WAIT;
+ /*
+ * Indicate the need to retry. While waiting, the page table
+ * page may have been allocated.
+ */
+ return (NULL);
+ }
if ((m->flags & PG_ZERO) == 0)
pmap_zero_page(m);
@@ -1125,7 +1128,13 @@
pml4 = &pmap->pm_pml4[pml4index];
if ((*pml4 & PG_V) == 0) {
/* Have to allocate a new pdp, recurse */
- _pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index);
+ if (_pmap_allocpte(pmap, NUPDE + NUPDPE + pml4index) == NULL) {
+ vm_page_lock_queues();
+ vm_page_unhold(m);
+ vm_page_free(m);
+ vm_page_unlock_queues();
+ return (NULL);
+ }
} else {
/* Add reference to pdp page */
pdppg = PHYS_TO_VM_PAGE(*pml4);
@@ -1152,7 +1161,13 @@
pml4 = &pmap->pm_pml4[pml4index];
if ((*pml4 & PG_V) == 0) {
/* Have to allocate a new pd, recurse */
- _pmap_allocpte(pmap, NUPDE + pdpindex);
+ if (_pmap_allocpte(pmap, NUPDE + pdpindex) == NULL) {
+ vm_page_lock_queues();
+ vm_page_unhold(m);
+ vm_page_free(m);
+ vm_page_unlock_queues();
+ return (NULL);
+ }
pdp = (pdp_entry_t *)PHYS_TO_DMAP(*pml4 & PG_FRAME);
pdp = &pdp[pdpindex & ((1ul << NPDPEPGSHIFT) - 1)];
} else {
@@ -1160,7 +1175,13 @@
pdp = &pdp[pdpindex & ((1ul << NPDPEPGSHIFT) - 1)];
if ((*pdp & PG_V) == 0) {
/* Have to allocate a new pd, recurse */
- _pmap_allocpte(pmap, NUPDE + pdpindex);
+ if (_pmap_allocpte(pmap, NUPDE + pdpindex) == NULL) {
+ vm_page_lock_queues();
+ vm_page_unhold(m);
+ vm_page_free(m);
+ vm_page_unlock_queues();
+ return (NULL);
+ }
} else {
/* Add reference to the pd page */
pdpg = PHYS_TO_VM_PAGE(*pdp);
@@ -1179,8 +1200,6 @@
vm_page_flag_clear(m, PG_ZERO);
vm_page_wakeup(m);
vm_page_unlock_queues();
- if (!is_object_locked)
- VM_OBJECT_UNLOCK(pmap->pm_pteobj);
return m;
}
@@ -1196,7 +1215,7 @@
* Calculate pagetable page index
*/
ptepindex = pmap_pde_pindex(va);
-
+retry:
/*
* Get the page directory entry
*/
@@ -1219,13 +1238,16 @@
if (pd != 0 && (*pd & PG_V) != 0) {
m = PHYS_TO_VM_PAGE(*pd);
m->hold_count++;
- return m;
+ } else {
+ /*
+ * Here if the pte page isn't mapped, or if it has been
+ * deallocated.
+ */
+ m = _pmap_allocpte(pmap, ptepindex);
+ if (m == NULL)
+ goto retry;
}
- /*
- * Here if the pte page isn't mapped, or if it has been deallocated.
- */
- m = _pmap_allocpte(pmap, ptepindex);
- return m;
+ return (m);
}
@@ -1258,8 +1280,6 @@
vm_page_busy(m);
vm_page_free(m);
vm_page_unlock_queues();
- KASSERT(TAILQ_EMPTY(&pmap->pm_pteobj->memq),
- ("pmap_release: leaking page table pages"));
}
static int
@@ -1955,6 +1975,7 @@
if (mpte && (mpte->pindex == ptepindex)) {
mpte->hold_count++;
} else {
+ retry:
/*
* Get the page directory entry
*/
@@ -1971,6 +1992,8 @@
mpte->hold_count++;
} else {
mpte = _pmap_allocpte(pmap, ptepindex);
+ if (mpte == NULL)
+ goto retry;
}
}
} else {
==== //depot/projects/uart/amd64/include/pmap.h#3 (text+ko) ====
@@ -42,7 +42,7 @@
*
* from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90
* from: @(#)pmap.h 7.4 (Berkeley) 5/12/91
- * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.105 2003/07/09 23:04:23 peter Exp $
+ * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.106 2003/09/27 20:53:01 alc Exp $
*/
#ifndef _MACHINE_PMAP_H_
@@ -219,7 +219,6 @@
struct pmap {
pml4_entry_t *pm_pml4; /* KVA of level 4 page table */
- vm_object_t pm_pteobj; /* Container for pte's */
TAILQ_HEAD(,pv_entry) pm_pvlist; /* list of mappings in pmap */
u_long pm_active; /* active on cpus */
struct pmap_statistics pm_stats; /* pmap statistics */
==== //depot/projects/uart/conf/NOTES#16 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/NOTES,v 1.1177 2003/09/25 16:06:17 sam Exp $
+# $FreeBSD: src/sys/conf/NOTES,v 1.1178 2003/09/26 20:26:22 fjoe Exp $
#
# NOTES -- Lines that can be cut/pasted into kernel and hints configs.
#
@@ -788,6 +788,12 @@
# Cryptographically secure random number generator; /dev/[u]random
device random
+# Optional character code conversion support with LIBICONV.
+# Each option requires their base file system and LIBICONV.
+options CD9660_ICONV
+options MSDOSFS_ICONV
+options NTFS_ICONV
+
#####################################################################
# POSIX P1003.1B
==== //depot/projects/uart/conf/files#25 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/files,v 1.825 2003/09/14 17:02:59 takawata Exp $
+# $FreeBSD: src/sys/conf/files,v 1.827 2003/09/27 12:53:32 phk Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -893,11 +893,13 @@
fs/msdosfs/msdosfs_lookup.c optional msdosfs
fs/msdosfs/msdosfs_vfsops.c optional msdosfs
fs/msdosfs/msdosfs_vnops.c optional msdosfs
+fs/msdosfs/msdosfs_iconv.c optional msdosfs_iconv
fs/ntfs/ntfs_compr.c optional ntfs
fs/ntfs/ntfs_ihash.c optional ntfs
fs/ntfs/ntfs_subr.c optional ntfs
fs/ntfs/ntfs_vfsops.c optional ntfs
fs/ntfs/ntfs_vnops.c optional ntfs
+fs/ntfs/ntfs_iconv.c optional ntfs_iconv
fs/nullfs/null_subr.c optional nullfs
fs/nullfs/null_vfsops.c optional nullfs
fs/nullfs/null_vnops.c optional nullfs
@@ -1056,6 +1058,7 @@
isofs/cd9660/cd9660_util.c optional cd9660
isofs/cd9660/cd9660_vfsops.c optional cd9660
isofs/cd9660/cd9660_vnops.c optional cd9660
+isofs/cd9660/cd9660_iconv.c optional cd9660_iconv
kern/imgact_elf.c standard
kern/imgact_shell.c standard
kern/inflate.c optional gzip
@@ -1144,7 +1147,6 @@
kern/subr_taskqueue.c standard
kern/subr_trap.c standard
kern/subr_witness.c optional witness
-kern/subr_xxx.c standard
kern/sys_generic.c standard
kern/sys_pipe.c standard
kern/sys_process.c standard
@@ -1198,6 +1200,7 @@
libkern/iconv.c optional libiconv
libkern/iconv_converter_if.m optional libiconv
libkern/iconv_xlat.c optional libiconv
+libkern/iconv_xlat16.c optional libiconv
libkern/index.c standard
libkern/inet_ntoa.c standard
libkern/mcount.c optional profiling-routine
==== //depot/projects/uart/conf/options#13 (text+ko) ====
@@ -1,4 +1,4 @@
-# $FreeBSD: src/sys/conf/options,v 1.414 2003/09/11 23:06:41 marcel Exp $
+# $FreeBSD: src/sys/conf/options,v 1.415 2003/09/26 20:26:22 fjoe Exp $
#
# On the handling of kernel options
#
@@ -198,6 +198,11 @@
NFSCLIENT opt_nfs.h
NFSSERVER opt_nfs.h
+# filesystems and libiconv bridge
+CD9660_ICONV opt_dontuse.h
+MSDOSFS_ICONV opt_dontuse.h
+NTFS_ICONV opt_dontuse.h
+
# If you are following the conditions in the copyright,
# you can enable soft-updates which will speed up a lot of thigs
# and make the system safer from crashes at the same time.
==== //depot/projects/uart/dev/acpica/Osd/OsdSynch.c#3 (text+ko) ====
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/Osd/OsdSynch.c,v 1.17 2003/07/13 22:57:16 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/Osd/OsdSynch.c,v 1.18 2003/09/26 21:22:10 njl Exp $
*/
/*
@@ -79,8 +79,9 @@
#endif
static int acpi_semaphore_debug = 0;
TUNABLE_INT("debug.acpi_semaphore_debug", &acpi_semaphore_debug);
-SYSCTL_INT(_debug, OID_AUTO, acpi_semaphore_debug, CTLFLAG_RW,
- &acpi_semaphore_debug, 0, "");
+SYSCTL_DECL(_debug_acpi);
+SYSCTL_INT(_debug_acpi, OID_AUTO, semaphore_debug, CTLFLAG_RW,
+ &acpi_semaphore_debug, 0, "Enable ACPI semaphore debug messages");
#endif
ACPI_STATUS
==== //depot/projects/uart/dev/acpica/acpi.c#13 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.103 2003/09/26 04:32:40 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.104 2003/09/26 21:22:10 njl Exp $
*/
#include "opt_acpi.h"
@@ -157,13 +157,10 @@
DRIVER_MODULE(acpi, nexus, acpi_driver, acpi_devclass, acpi_modevent, 0);
MODULE_VERSION(acpi, 100);
-SYSCTL_INT(_debug, OID_AUTO, acpi_debug_layer, CTLFLAG_RW, &AcpiDbgLayer, 0,
- "");
-SYSCTL_INT(_debug, OID_AUTO, acpi_debug_level, CTLFLAG_RW, &AcpiDbgLevel, 0,
- "");
-static int acpi_ca_version = ACPI_CA_VERSION;
-SYSCTL_INT(_debug, OID_AUTO, acpi_ca_version, CTLFLAG_RD, &acpi_ca_version, 0,
- "");
+SYSCTL_NODE(_debug, OID_AUTO, acpi, CTLFLAG_RW, NULL, "ACPI debugging");
+static char acpi_ca_version[12];
+SYSCTL_STRING(_debug_acpi, OID_AUTO, acpi_ca_version, CTLFLAG_RD,
+ acpi_ca_version, 0, "Version of Intel ACPI-CA");
/*
* ACPI can only be loaded as a module by the loader; activating it after
@@ -212,6 +209,9 @@
if (resource_disabled("acpi", 0))
return_VOID;
+ snprintf(acpi_ca_version, sizeof(acpi_ca_version), "0x%x",
+ ACPI_CA_VERSION);
+
/* Make sure we're not being doubly invoked. */
if (device_find_child(parent, "acpi", 0) != NULL)
return_VOID;
@@ -2187,11 +2187,11 @@
{
char *cp;
- if (!cold)
- return;
+ if (cold) {
+ AcpiDbgLayer = 0;
+ AcpiDbgLevel = 0;
+ }
- AcpiDbgLayer = 0;
- AcpiDbgLevel = 0;
if ((cp = getenv("debug.acpi.layer")) != NULL) {
acpi_parse_debug(cp, &dbg_layer[0], &AcpiDbgLayer);
freeenv(cp);
@@ -2201,11 +2201,61 @@
freeenv(cp);
}
- printf("ACPI debug layer 0x%x debug level 0x%x\n", AcpiDbgLayer,
- AcpiDbgLevel);
+ if (cold) {
+ printf("ACPI debug layer 0x%x debug level 0x%x\n",
+ AcpiDbgLayer, AcpiDbgLevel);
+ }
}
SYSINIT(acpi_debugging, SI_SUB_TUNABLES, SI_ORDER_ANY, acpi_set_debugging,
NULL);
+
+static int
+acpi_debug_sysctl(SYSCTL_HANDLER_ARGS)
+{
+ char *options;
+ int error, len, *dbg;
+ struct debugtag *tag;
+
+ len = 512;
+ MALLOC(options, char *, len, M_TEMP, M_WAITOK);
+ options[0] = '\0';
+
+ if (strcmp(oidp->oid_arg1, "debug.acpi.layer") == 0) {
+ tag = &dbg_layer[0];
+ dbg = &AcpiDbgLayer;
+ } else {
+ tag = &dbg_level[0];
+ dbg = &AcpiDbgLevel;
+ }
+
+ /* Get old values if this is a get request. */
+ if (*dbg == 0) {
+ strlcpy(options, "NONE", sizeof(options));
+ } else if (req->newptr == NULL) {
+ for (; tag->name != NULL; tag++) {
+ if ((*dbg & tag->value) == tag->value) {
+ strlcat(options, tag->name, len);
+ strlcat(options, " ", len); /* XXX */
+ }
+ }
+ }
+
+ error = sysctl_handle_string(oidp, options, len, req);
+
+ /* If the user is setting a string, parse it. */
+ if (error == 0 && req->newptr != NULL) {
+ *dbg = 0;
+ setenv((char *)oidp->oid_arg1, (char *)req->newptr);
+ acpi_set_debugging(NULL);
+ }
+ FREE(options, M_TEMP);
+
+ return (error);
+}
+SYSCTL_PROC(_debug_acpi, OID_AUTO, layer, CTLFLAG_RW | CTLTYPE_STRING,
+ "debug.acpi.layer", 0, acpi_debug_sysctl, "A", "");
+SYSCTL_PROC(_debug_acpi, OID_AUTO, level, CTLFLAG_RW | CTLTYPE_STRING,
+ "debug.acpi.level", 0, acpi_debug_sysctl, "A", "");
#endif
static int
==== //depot/projects/uart/dev/acpica/acpi_acad.c#5 (text+ko) ====
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpi_acad.c,v 1.18 2003/09/14 17:47:44 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi_acad.c,v 1.19 2003/09/26 05:24:55 njl Exp $
*/
#include "opt_acpi.h"
@@ -137,7 +137,7 @@
if (acpi_get_type(dev) == ACPI_TYPE_DEVICE &&
acpi_MatchHid(dev, "ACPI0003")) {
- device_set_desc(dev, "AC adapter");
+ device_set_desc(dev, "AC Adapter");
return (0);
}
return (ENXIO);
==== //depot/projects/uart/dev/acpica/acpi_cmbat.c#6 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.24 2003/09/13 20:13:01 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi_cmbat.c,v 1.25 2003/09/26 05:24:55 njl Exp $
*/
#include "opt_acpi.h"
@@ -316,7 +316,7 @@
if (acpi_get_type(dev) == ACPI_TYPE_DEVICE &&
!acpi_disabled("cmbat") && acpi_MatchHid(dev, "PNP0C0A")) {
- device_set_desc(dev, "Control method Battery");
+ device_set_desc(dev, "Control Method Battery");
return (0);
}
return (ENXIO);
==== //depot/projects/uart/dev/acpica/acpi_ec.c#10 (text+ko) ====
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.40 2003/09/15 21:20:55 njl Exp $
+ * $FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.41 2003/09/26 05:24:55 njl Exp $
*/
/******************************************************************************
*
@@ -137,7 +137,7 @@
*****************************************************************************/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.40 2003/09/15 21:20:55 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_ec.c,v 1.41 2003/09/26 05:24:55 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -437,7 +437,7 @@
*/
magic = acpi_get_magic(dev);
if (DEV_ECDT(dev)) {
- snprintf(desc, sizeof(desc), "embedded controller: ECDT, GPE %#x, GLK",
+ snprintf(desc, sizeof(desc), "Embedded Controller: ECDT, GPE %#x, GLK",
DEV_GET_GPEBIT(magic));
device_set_desc_copy(dev, desc);
ret = 0;
@@ -482,7 +482,7 @@
*/
peer = devclass_get_device(acpi_ec_devclass, uid);
if (peer == NULL || !device_is_alive(peer)) {
- snprintf(desc, sizeof(desc), "embedded controller: GPE %#x%s",
+ snprintf(desc, sizeof(desc), "Embedded Controller: GPE %#x%s",
gpebit, glk != 0 ? ", GLK" : "");
device_set_desc_copy(dev, desc);
ret = 0;
==== //depot/projects/uart/dev/acpica/acpi_resource.c#5 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.19 2003/09/10 22:06:41 marcel Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_resource.c,v 1.20 2003/09/26 05:24:55 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -571,7 +571,7 @@
acpi_sysresource_probe(device_t dev)
{
if (!acpi_disabled("sysresource") && acpi_MatchHid(dev, "PNP0C02"))
- device_set_desc(dev, "system resource");
+ device_set_desc(dev, "System Resource");
else
return (ENXIO);
==== //depot/projects/uart/dev/acpica/acpi_thermal.c#4 (text+ko) ====
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.31 2003/08/28 16:06:30 njl Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_thermal.c,v 1.32 2003/09/26 05:24:55 njl Exp $");
#include "opt_acpi.h"
#include <sys/param.h>
@@ -155,7 +155,7 @@
/* No FUNCTION_TRACE - too noisy */
if (acpi_get_type(dev) == ACPI_TYPE_THERMAL && !acpi_disabled("thermal")) {
- device_set_desc(dev, "thermal zone");
+ device_set_desc(dev, "Thermal Zone");
result = -10;
} else {
result = ENXIO;
==== //depot/projects/uart/dev/adlink/adlink.c#5 (text+ko) ====
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.5 2003/09/05 11:05:41 phk Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/adlink/adlink.c,v 1.6 2003/09/27 12:00:58 phk Exp $");
#ifdef _KERNEL
#include <sys/param.h>
@@ -394,7 +394,6 @@
static struct cdevsw adlink_cdevsw = {
.d_open = adlink_open,
- .d_close = nullclose,
.d_ioctl = adlink_ioctl,
.d_mmap = adlink_mmap,
.d_name = "adlink",
==== //depot/projects/uart/dev/asr/asr.c#5 (text+ko) ====
@@ -105,7 +105,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.37 2003/09/02 17:30:34 jhb Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/asr/asr.c,v 1.38 2003/09/26 15:56:42 phk Exp $");
#define ASR_VERSION 1
#define ASR_REVISION '0'
@@ -590,48 +590,6 @@
IN struct timeval end);
#endif
-#ifdef ASR_VERY_BROKEN
-/*
- * Initialize the dynamic cdevsw hooks.
- */
-STATIC void
-asr_drvinit (
- void * unused)
-{
- static int asr_devsw_installed = 0;
-
- if (asr_devsw_installed) {
- return;
- }
- asr_devsw_installed++;
- /*
- * Find a free spot (the report during driver load used by
- * osd layer in engine to generate the controlling nodes).
- */
- while ((asr_cdevsw.d_maj < NUMCDEVSW)
- && (devsw(makedev(asr_cdevsw.d_maj,0)) != (struct cdevsw *)NULL)) {
- ++asr_cdevsw.d_maj;
- }
- if (asr_cdevsw.d_maj >= NUMCDEVSW) for (
- asr_cdevsw.d_maj = 0;
- (asr_cdevsw.d_maj < CDEV_MAJOR)
- && (devsw(makedev(asr_cdevsw.d_maj,0)) != (struct cdevsw *)NULL);
- ++asr_cdevsw.d_maj);
- /*
- * Come to papa
- */
- cdevsw_add(&asr_cdevsw);
- /*
- * delete any nodes that would attach to the primary adapter,
- * let the adapter scans add them.
- */
- destroy_dev(makedev(asr_cdevsw.d_maj,0));
-} /* asr_drvinit */
-
-/* Must initialize before CAM layer picks up our HBA driver */
-SYSINIT(asrdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,asr_drvinit,NULL)
-#endif
-
/* I2O support routines */
#define defAlignLong(STRUCT,NAME) char NAME[sizeof(STRUCT)]
#define getAlignLong(STRUCT,NAME) ((STRUCT *)(NAME))
==== //depot/projects/uart/dev/ata/ata-all.c#7 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.189 2003/09/08 08:30:43 sos Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.190 2003/09/27 12:00:58 phk Exp $");
#include "opt_ata.h"
#include <sys/param.h>
@@ -57,8 +57,6 @@
/* device structures */
static d_ioctl_t ata_ioctl;
static struct cdevsw ata_cdevsw = {
- .d_open = nullopen,
- .d_close = nullclose,
.d_ioctl = ata_ioctl,
.d_name = "ata",
.d_maj = 159,
==== //depot/projects/uart/dev/digi/digi.c#3 (text+ko) ====
@@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: src/sys/dev/digi/digi.c,v 1.35 2003/08/07 15:04:24 jhb Exp $
+ * $FreeBSD: src/sys/dev/digi/digi.c,v 1.36 2003/09/26 09:05:57 phk Exp $
*/
/*-
@@ -1933,8 +1933,7 @@
digi_free_state(sc);
- destroy_dev(makedev(CDEV_MAJOR,
- (sc->res.unit << 16) | CTRL_DEV));
+ destroy_dev(sc->res.ctldev);
if (sc->res.mem != NULL) {
bus_release_resource(dev, SYS_RES_MEMORY, sc->res.mrid,
==== //depot/projects/uart/dev/fb/fb.c#4 (text+ko) ====
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/dev/fb/fb.c,v 1.28 2003/08/24 17:46:06 obrien Exp $");
+__FBSDID("$FreeBSD: src/sys/dev/fb/fb.c,v 1.29 2003/09/26 10:41:43 phk Exp $");
#include "opt_fb.h"
@@ -399,7 +399,7 @@
DECLARE_MODULE(fb, fb_mod, SI_SUB_PSEUDO, SI_ORDER_ANY);
int
-fb_attach(dev_t dev, video_adapter_t *adp, struct cdevsw *cdevsw)
+fb_attach(int unit, video_adapter_t *adp, struct cdevsw *cdevsw)
{
int s;
@@ -409,7 +409,7 @@
return EINVAL;
s = spltty();
- adp->va_minor = minor(dev);
+ adp->va_minor = unit;
vidcdevsw[adp->va_index] = cdevsw;
splx(s);
@@ -418,7 +418,7 @@
}
int
-fb_detach(dev_t dev, video_adapter_t *adp, struct cdevsw *cdevsw)
+fb_detach(int unit, video_adapter_t *adp, struct cdevsw *cdevsw)
{
int s;
@@ -435,84 +435,6 @@
return 0;
}
-#if experimental
-static int
-fbopen(dev_t dev, int flag, int mode, struct thread *td)
-{
- int unit;
-
- unit = FB_UNIT(dev);
- if (unit >= adapters)
- return ENXIO;
- if (vidcdevsw[unit] == NULL)
- return ENXIO;
- return (*vidcdevsw[unit]->d_open)(makedev(0, adapter[unit]->va_minor),
- flag, mode, td);
-}
-
-static int
-fbclose(dev_t dev, int flag, int mode, struct thread *td)
-{
- int unit;
-
- unit = FB_UNIT(dev);
- if (vidcdevsw[unit] == NULL)
- return ENXIO;
- return (*vidcdevsw[unit]->d_close)(makedev(0, adapter[unit]->va_minor),
- flag, mode, td);
-}
-
-static int
-fbread(dev_t dev, struct uio *uio, int flag)
-{
- int unit;
-
- unit = FB_UNIT(dev);
- if (vidcdevsw[unit] == NULL)
- return ENXIO;
- return (*vidcdevsw[unit]->d_read)(makedev(0, adapter[unit]->va_minor),
- uio, flag);
-}
-
-static int
-fbwrite(dev_t dev, struct uio *uio, int flag)
-{
- int unit;
-
- unit = FB_UNIT(dev);
- if (vidcdevsw[unit] == NULL)
- return ENXIO;
- return (*vidcdevsw[unit]->d_write)(makedev(0, adapter[unit]->va_minor),
- uio, flag);
-}
-
-static int
-fbioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct thread *td)
-{
- int unit;
-
- unit = FB_UNIT(dev);
- if (vidcdevsw[unit] == NULL)
- return ENXIO;
- return (*vidcdevsw[unit]->d_ioctl)(makedev(0, adapter[unit]->va_minor),
- cmd, arg, flag, td);
-}
-
-static int
-fbmmap(dev_t dev, vm_offset_t offset, vm_paddr_t *paddr, int nprot)
-{
- int unit;
-
- unit = FB_UNIT(dev);
- if (vidcdevsw[unit] == NULL)
- return ENXIO;
- return (*vidcdevsw[unit]->d_mmap)(makedev(0, adapter[unit]->va_minor),
- offset, paddr, nprot);
-}
-
-DEV_DRIVER_MODULE(fb, foo, fb_driver, fb_devclass, fb_cdevsw, 0, 0);
-#endif
-
/*
* Generic frame buffer cdev driver functions
* Frame buffer subdrivers may call these functions to implement common
==== //depot/projects/uart/dev/fb/fbreg.h#3 (text+ko) ====
>>> TRUNCATED FOR MAIL (1000 lines) <<<
More information about the p4-projects
mailing list