From owner-p4-projects@FreeBSD.ORG Mon Oct 27 02:45:25 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B6630106567A; Mon, 27 Oct 2008 02:45:25 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 603781065672 for ; Mon, 27 Oct 2008 02:45:25 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 4A1638FC1D for ; Mon, 27 Oct 2008 02:45:25 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R2jPxk013899 for ; Mon, 27 Oct 2008 02:45:25 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id m9R2jPoG013896 for perforce@freebsd.org; Mon, 27 Oct 2008 02:45:25 GMT (envelope-from marcel@freebsd.org) Date: Mon, 27 Oct 2008 02:45:25 GMT Message-Id: <200810270245.m9R2jPoG013896@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 151999 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 02:45:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=151999 Change 151999 by marcel@marcel_jnpr on 2008/10/27 02:44:49 IFC @151998 Affected files ... .. //depot/projects/e500/etc/rc.subr#7 integrate .. //depot/projects/e500/sys/amd64/amd64/local_apic.c#8 integrate .. //depot/projects/e500/sys/arm/at91/at91.c#6 integrate .. //depot/projects/e500/sys/conf/files.powerpc#27 integrate .. //depot/projects/e500/sys/dev/adb/adb.h#1 branch .. //depot/projects/e500/sys/dev/adb/adb_bus.c#1 branch .. //depot/projects/e500/sys/dev/adb/adb_hb_if.m#1 branch .. //depot/projects/e500/sys/dev/adb/adb_if.m#1 branch .. //depot/projects/e500/sys/dev/adb/adb_kbd.c#1 branch .. //depot/projects/e500/sys/dev/adb/adb_mouse.c#1 branch .. //depot/projects/e500/sys/dev/adb/adbvar.h#1 branch .. //depot/projects/e500/sys/geom/vinum/geom_vinum.c#2 integrate .. //depot/projects/e500/sys/geom/vinum/geom_vinum.h#3 integrate .. //depot/projects/e500/sys/geom/vinum/geom_vinum_drive.c#5 integrate .. //depot/projects/e500/sys/geom/vinum/geom_vinum_init.c#3 integrate .. //depot/projects/e500/sys/geom/vinum/geom_vinum_plex.c#3 integrate .. //depot/projects/e500/sys/geom/vinum/geom_vinum_raid5.c#2 integrate .. //depot/projects/e500/sys/geom/vinum/geom_vinum_rm.c#3 integrate .. //depot/projects/e500/sys/geom/vinum/geom_vinum_state.c#2 integrate .. //depot/projects/e500/sys/geom/vinum/geom_vinum_subr.c#3 integrate .. //depot/projects/e500/sys/geom/vinum/geom_vinum_volume.c#3 integrate .. //depot/projects/e500/sys/i386/i386/local_apic.c#7 integrate .. //depot/projects/e500/sys/net80211/ieee80211.c#8 integrate .. //depot/projects/e500/sys/net80211/ieee80211_adhoc.c#4 integrate .. //depot/projects/e500/sys/net80211/ieee80211_freebsd.h#8 integrate .. //depot/projects/e500/sys/net80211/ieee80211_hostap.c#4 integrate .. //depot/projects/e500/sys/net80211/ieee80211_ht.c#7 integrate .. //depot/projects/e500/sys/net80211/ieee80211_ht.h#7 integrate .. //depot/projects/e500/sys/net80211/ieee80211_ioctl.c#9 integrate .. //depot/projects/e500/sys/net80211/ieee80211_node.c#9 integrate .. //depot/projects/e500/sys/net80211/ieee80211_node.h#8 integrate .. //depot/projects/e500/sys/net80211/ieee80211_output.c#9 integrate .. //depot/projects/e500/sys/net80211/ieee80211_power.c#5 integrate .. //depot/projects/e500/sys/net80211/ieee80211_power.h#3 integrate .. //depot/projects/e500/sys/net80211/ieee80211_proto.h#8 integrate .. //depot/projects/e500/sys/net80211/ieee80211_scan_sta.c#7 integrate .. //depot/projects/e500/sys/net80211/ieee80211_var.h#8 integrate .. //depot/projects/e500/sys/netinet/in.c#8 integrate .. //depot/projects/e500/sys/netinet/tcp_input.c#12 integrate .. //depot/projects/e500/sys/netinet/tcp_sack.c#5 integrate .. //depot/projects/e500/sys/netinet/tcp_syncache.c#13 integrate .. //depot/projects/e500/sys/netinet6/frag6.c#7 integrate .. //depot/projects/e500/sys/netinet6/ip6_var.h#7 integrate .. //depot/projects/e500/sys/powerpc/aim/locore.S#9 integrate .. //depot/projects/e500/sys/powerpc/booke/locore.S#9 integrate .. //depot/projects/e500/sys/powerpc/booke/trap.c#11 integrate .. //depot/projects/e500/sys/powerpc/conf/GENERIC#12 integrate .. //depot/projects/e500/sys/powerpc/include/cpu.h#4 integrate .. //depot/projects/e500/sys/powerpc/include/profile.h#3 integrate .. //depot/projects/e500/sys/powerpc/powermac/ata_kauai.c#4 integrate .. //depot/projects/e500/sys/powerpc/powermac/cuda.c#1 branch .. //depot/projects/e500/sys/powerpc/powermac/cudavar.h#1 branch .. //depot/projects/e500/sys/powerpc/powermac/macgpio.c#1 branch .. //depot/projects/e500/sys/powerpc/powermac/macgpiovar.h#1 branch .. //depot/projects/e500/sys/powerpc/powermac/macio.c#7 integrate .. //depot/projects/e500/sys/powerpc/powermac/pmu.c#1 branch .. //depot/projects/e500/sys/powerpc/powermac/pmuvar.h#1 branch .. //depot/projects/e500/sys/powerpc/powermac/viareg.h#1 branch .. //depot/projects/e500/sys/security/mac/mac_framework.h#8 integrate .. //depot/projects/e500/sys/security/mac/mac_inet6.c#2 integrate .. //depot/projects/e500/sys/security/mac/mac_policy.h#8 integrate .. //depot/projects/e500/sys/security/mac_biba/mac_biba.c#5 integrate .. //depot/projects/e500/sys/security/mac_lomac/mac_lomac.c#7 integrate .. //depot/projects/e500/sys/security/mac_mls/mac_mls.c#7 integrate .. //depot/projects/e500/sys/security/mac_stub/mac_stub.c#7 integrate .. //depot/projects/e500/sys/security/mac_test/mac_test.c#7 integrate Differences ... ==== //depot/projects/e500/etc/rc.subr#7 (text+ko) ==== @@ -1,5 +1,5 @@ # $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ -# $FreeBSD: src/etc/rc.subr,v 1.86 2008/06/23 05:09:10 mtm Exp $ +# $FreeBSD: src/etc/rc.subr,v 1.87 2008/10/27 01:05:09 thompsa Exp $ # # Copyright (c) 1997-2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -913,6 +913,7 @@ else ( trap "echo Script $_file interrupted; kill -QUIT $$" 3 trap "echo Script $_file interrupted; exit 1" 2 + trap "echo Script $_file running" 29 set $_arg; . $_file ) fi fi ==== //depot/projects/e500/sys/amd64/amd64/local_apic.c#8 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.46 2008/08/23 12:35:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.47 2008/10/26 18:58:04 sobomax Exp $"); #include "opt_hwpmc_hooks.h" #include "opt_kdtrace.h" @@ -401,7 +401,11 @@ lapic_timer_hz = hz * 2; else lapic_timer_hz = hz * 4; - stathz = lapic_timer_hz / (lapic_timer_hz / 128); + if (lapic_timer_hz < 128) { + stathz = 128; + } else { + stathz = lapic_timer_hz / (lapic_timer_hz / 128); + } profhz = lapic_timer_hz; lapic_timer_period = value / lapic_timer_hz; ==== //depot/projects/e500/sys/arm/at91/at91.c#6 (text) ==== @@ -23,7 +23,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.18 2008/09/05 22:27:10 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/at91.c,v 1.20 2008/10/26 22:53:59 stas Exp $"); #include #include @@ -168,6 +168,42 @@ generic_armv4_bs_c_2, NULL, NULL, + + /* read (single) stream */ + generic_bs_r_1, + generic_armv4_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple stream */ + generic_bs_rm_1, + generic_armv4_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region stream */ + generic_bs_rr_1, + generic_armv4_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) stream */ + generic_bs_w_1, + generic_armv4_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple stream */ + generic_bs_wm_1, + generic_armv4_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region stream */ + NULL, + generic_armv4_bs_wr_2, + generic_bs_wr_4, + NULL, }; static int @@ -534,8 +570,10 @@ case SYS_RES_MEMORY: rle->res = rman_reserve_resource(&sc->sc_mem_rman, start, end, count, flags, child); - rman_set_bustag(rle->res, &at91_bs_tag); - rman_set_bushandle(rle->res, start); + if (rle->res != NULL) { + rman_set_bustag(rle->res, &at91_bs_tag); + rman_set_bushandle(rle->res, start); + } break; } if (rle->res) { ==== //depot/projects/e500/sys/conf/files.powerpc#27 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.powerpc,v 1.84 2008/10/25 06:18:12 marcel Exp $ +# $FreeBSD: src/sys/conf/files.powerpc,v 1.85 2008/10/26 19:37:38 nwhitehorn Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -28,6 +28,11 @@ crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/bm/if_bm.c optional bm powermac +dev/adb/adb_bus.c optional adb +dev/adb/adb_kbd.c optional adb +dev/adb/adb_mouse.c optional adb +dev/adb/adb_hb_if.m optional adb +dev/adb/adb_if.m optional adb dev/cfi/cfi_bus_lbc.c optional cfi dev/fb/fb.c optional sc dev/hwpmc/hwpmc_powerpc.c optional hwpmc @@ -121,6 +126,9 @@ powerpc/powermac/openpic_macio.c optional powermac pci powerpc/powermac/pswitch.c optional powermac pswitch powerpc/powermac/uninorth.c optional powermac pci +powerpc/powermac/cuda.c optional powermac cuda +powerpc/powermac/pmu.c optional powermac pmu +powerpc/powermac/macgpio.c optional powermac pci powerpc/powerpc/atomic.S standard powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.c standard ==== //depot/projects/e500/sys/geom/vinum/geom_vinum.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum.c,v 1.21 2006/03/30 14:01:25 le Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum.c,v 1.22 2008/10/26 17:20:37 lulf Exp $"); #include #include @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -42,12 +43,12 @@ #include #include -#if 0 SYSCTL_DECL(_kern_geom); SYSCTL_NODE(_kern_geom, OID_AUTO, vinum, CTLFLAG_RW, 0, "GEOM_VINUM stuff"); -SYSCTL_UINT(_kern_geom_vinum, OID_AUTO, debug, CTLFLAG_RW, &gv_debug, 0, +u_int g_vinum_debug = 0; +TUNABLE_INT("kern.geom.vinum.debug", &g_vinum_debug); +SYSCTL_UINT(_kern_geom_vinum, OID_AUTO, debug, CTLFLAG_RW, &g_vinum_debug, 0, "Debug level"); -#endif int gv_create(struct g_geom *, struct gctl_req *); @@ -363,7 +364,7 @@ */ pp = g_provider_by_name(d->device); if (pp == NULL) { - printf("geom_vinum: %s: drive disapeared?\n", + G_VINUM_DEBUG(0, "%s: drive disappeared?", d->device); continue; } ==== //depot/projects/e500/sys/geom/vinum/geom_vinum.h#3 (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/geom/vinum/geom_vinum.h,v 1.14 2008/10/01 14:50:36 lulf Exp $ + * $FreeBSD: src/sys/geom/vinum/geom_vinum.h,v 1.15 2008/10/26 17:20:37 lulf Exp $ */ #ifndef _GEOM_VINUM_H_ @@ -96,4 +96,30 @@ off_t gv_vol_size(struct gv_volume *); off_t gv_plex_size(struct gv_plex *); +extern u_int g_vinum_debug; + +#define G_VINUM_DEBUG(lvl, ...) do { \ + if (g_vinum_debug >= (lvl)) { \ + printf("GEOM_VINUM"); \ + if (g_vinum_debug > 0) \ + printf("[%u]", lvl); \ + printf(": "); \ + printf(__VA_ARGS__); \ + printf("\n"); \ + } \ +} while (0) + +#define G_VINUM_LOGREQ(lvl, bp, ...) do { \ + if (g_vinum_debug >= (lvl)) { \ + printf("GEOM_VINUM"); \ + if (g_vinum_debug > 0) \ + printf("[%u]", lvl); \ + printf(": "); \ + printf(__VA_ARGS__); \ + printf(" "); \ + g_print_bio(bp); \ + printf("\n"); \ + } \ +} while (0) + #endif /* !_GEOM_VINUM_H_ */ ==== //depot/projects/e500/sys/geom/vinum/geom_vinum_drive.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_drive.c,v 1.31 2008/10/02 09:35:47 lulf Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_drive.c,v 1.32 2008/10/26 17:20:37 lulf Exp $"); #include #include @@ -172,7 +172,7 @@ g_free(d_hdr); return (-1); } else if (gv_legacy_header_type(d_hdr, be) == GV_LEGACY_SPARC64) { - printf("VINUM: detected legacy sparc64 header\n"); + G_VINUM_DEBUG(1, "detected legacy sparc64 header"); m_hdr->magic = GV_MAGIC; /* Legacy sparc64 on-disk header */ m_hdr->config_length = GV_GET64(be); @@ -186,7 +186,7 @@ m_hdr->label.last_update.tv_usec = GV_GET64(be); m_hdr->label.drive_size = GV_GET64(be); } else if (gv_legacy_header_type(d_hdr, be) == GV_LEGACY_POWERPC) { - printf("VINUM: detected legacy PowerPC header\n"); + G_VINUM_DEBUG(1, "detected legacy PowerPC header"); m_hdr->magic = GV_MAGIC; /* legacy 32-bit big endian on-disk header */ m_hdr->config_length = GV_GET32(be); @@ -200,7 +200,7 @@ m_hdr->label.last_update.tv_usec = GV_GET32(be); m_hdr->label.drive_size = GV_GET64(be); } else if (gv_legacy_header_type(d_hdr, be) == GV_LEGACY_I386) { - printf("VINUM: detected legacy i386 header\n"); + G_VINUM_DEBUG(1, "detected legacy i386 header"); m_hdr->magic = GV_MAGIC; /* legacy i386 on-disk header */ m_hdr->config_length = GV_GET32(le); @@ -214,7 +214,7 @@ m_hdr->label.last_update.tv_usec = GV_GET32(le); m_hdr->label.drive_size = GV_GET64(le); } else { - printf("VINUM: detected legacy amd64 header\n"); + G_VINUM_DEBUG(1, "detected legacy amd64 header"); m_hdr->magic = GV_MAGIC; /* legacy amd64 on-disk header */ m_hdr->config_length = GV_GET64(le); @@ -354,7 +354,7 @@ hdr = d->hdr; if (hdr == NULL) { - printf("GEOM_VINUM: drive %s has NULL hdr\n", d->name); + G_VINUM_DEBUG(0, "drive %s has NULL hdr", d->name); g_free(vhdr); return; } @@ -367,7 +367,7 @@ error = g_access(cp2, 0, 1, 0); if (error) { - printf("GEOM_VINUM: g_access failed on drive %s, errno %d\n", + G_VINUM_DEBUG(0, "g_access failed on drive %s, errno %d", d->name, error); sbuf_delete(sb); g_free(vhdr); @@ -378,7 +378,7 @@ do { error = gv_write_header(cp2, vhdr); if (error) { - printf("GEOM_VINUM: writing vhdr failed on drive %s, " + G_VINUM_DEBUG(0, "writing vhdr failed on drive %s, " "errno %d", d->name, error); break; } @@ -386,7 +386,7 @@ error = g_write_data(cp2, GV_CFG_OFFSET, sbuf_data(sb), GV_CFG_LEN); if (error) { - printf("GEOM_VINUM: writing first config copy failed " + G_VINUM_DEBUG(0, "writing first config copy failed " "on drive %s, errno %d", d->name, error); break; } @@ -394,7 +394,7 @@ error = g_write_data(cp2, GV_CFG_OFFSET + GV_CFG_LEN, sbuf_data(sb), GV_CFG_LEN); if (error) - printf("GEOM_VINUM: writing second config copy failed " + G_VINUM_DEBUG(0, "writing second config copy failed " "on drive %s, errno %d", d->name, error); } while (0); @@ -836,8 +836,8 @@ LIST_FOREACH(cp, &gp->consumer, consumer) { if (cp->nstart != cp->nend) { - printf("GEOM_VINUM: dead drive '%s' has still " - "active requests, can't detach consumer\n", + G_VINUM_DEBUG(0, "dead drive '%s' still has " + "active requests, cannot detach consumer", d->name); g_post_event(gv_drive_dead, d, M_WAITOK, d, NULL); @@ -847,7 +847,7 @@ g_access(cp, -cp->acr, -cp->acw, -cp->ace); } - printf("GEOM_VINUM: lost drive '%s'\n", d->name); + G_VINUM_DEBUG(1, "lost drive '%s'", d->name); d->geom = NULL; LIST_FOREACH(s, &d->subdisks, from_drive) { s->provider = NULL; ==== //depot/projects/e500/sys/geom/vinum/geom_vinum_init.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_init.c,v 1.12 2007/10/20 23:23:20 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_init.c,v 1.13 2008/10/26 17:20:37 lulf Exp $"); #include #include @@ -420,15 +420,15 @@ error = g_access(cp, 1, 1, 0); if (error) { g_topology_unlock(); - printf("GEOM_VINUM: rebuild of %s failed to access consumer: " - "%d\n", p->name, error); + G_VINUM_DEBUG(0, "rebuild of %s failed to access consumer: " + "%d", p->name, error); kproc_exit(error); } g_topology_unlock(); buf = g_malloc(sync->syncsize, M_WAITOK); - printf("GEOM_VINUM: rebuild of %s started\n", p->name); + G_VINUM_DEBUG(1, "rebuild of %s started", p->name); i = 0; for (i = 0; i < p->size; i += (p->stripesize * (p->sdcount - 1))) { /* @@ -437,8 +437,8 @@ */ bp = g_new_bio(); if (bp == NULL) { - printf("GEOM_VINUM: rebuild of %s failed creating bio: " - "out of memory\n", p->name); + G_VINUM_DEBUG(0, "rebuild of %s failed creating bio: " + "out of memory", p->name); break; } bp->bio_cmd = BIO_WRITE; @@ -454,8 +454,8 @@ /* ... and wait for the result. */ error = biowait(bp, "gwrite"); if (error) { - printf("GEOM_VINUM: rebuild of %s failed at offset %jd " - "errno: %d\n", p->name, i, error); + G_VINUM_DEBUG(0, "rebuild of %s failed at offset %jd " + "errno: %d", p->name, i, error); break; } g_destroy_bio(bp); @@ -477,7 +477,7 @@ /* Successful initialization. */ if (!error) - printf("GEOM_VINUM: rebuild of %s finished\n", p->name); + G_VINUM_DEBUG(1, "rebuild of %s finished", p->name); g_free(sync); kproc_exit(error); @@ -508,8 +508,8 @@ error = g_access(from, 1, 0, 0); if (error) { g_topology_unlock(); - printf("GEOM_VINUM: sync from '%s' failed to access " - "consumer: %d\n", sync->from->name, error); + G_VINUM_DEBUG(0, "sync from '%s' failed to access " + "consumer: %d", sync->from->name, error); g_free(sync); kproc_exit(error); } @@ -517,21 +517,21 @@ if (error) { g_access(from, -1, 0, 0); g_topology_unlock(); - printf("GEOM_VINUM: sync to '%s' failed to access " - "consumer: %d\n", p->name, error); + G_VINUM_DEBUG(0, "sync to '%s' failed to access " + "consumer: %d", p->name, error); g_free(sync); kproc_exit(error); } g_topology_unlock(); - printf("GEOM_VINUM: plex sync %s -> %s started\n", sync->from->name, + G_VINUM_DEBUG(1, "plex sync %s -> %s started", sync->from->name, sync->to->name); for (i = 0; i < p->size; i+= sync->syncsize) { /* Read some bits from the good plex. */ buf = g_read_data(from, i, sync->syncsize, &error); if (buf == NULL) { - printf("GEOM_VINUM: sync read from '%s' failed at " - "offset %jd; errno: %d\n", sync->from->name, i, + G_VINUM_DEBUG(0, "sync read from '%s' failed at " + "offset %jd; errno: %d", sync->from->name, i, error); break; } @@ -544,8 +544,8 @@ */ bp = g_new_bio(); if (bp == NULL) { - printf("GEOM_VINUM: sync write to '%s' failed at " - "offset %jd; out of memory\n", p->name, i); + G_VINUM_DEBUG(0, "sync write to '%s' failed at " + "offset %jd; out of memory", p->name, i); g_free(buf); break; } @@ -569,7 +569,7 @@ g_destroy_bio(bp); g_free(buf); if (error) { - printf("GEOM_VINUM: sync write to '%s' failed at " + G_VINUM_DEBUG(0, "sync write to '%s' failed at " "offset %jd; errno: %d\n", p->name, i, error); break; } @@ -586,7 +586,7 @@ /* Successful initialization. */ if (!error) - printf("GEOM_VINUM: plex sync %s -> %s finished\n", + G_VINUM_DEBUG(1, "plex sync %s -> %s finished", sync->from->name, sync->to->name); p->flags &= ~GV_PLEX_SYNCING; @@ -630,8 +630,8 @@ if (error) { s->init_error = error; g_topology_unlock(); - printf("GEOM_VINUM: subdisk '%s' init: failed to access " - "consumer; error: %d\n", s->name, error); + G_VINUM_DEBUG(0, "subdisk '%s' init: failed to access " + "consumer; error: %d", s->name, error); kproc_exit(error); } g_topology_unlock(); @@ -639,8 +639,8 @@ for (i = start; i < offset + length; i += init_size) { error = g_write_data(cp, i, buf, init_size); if (error) { - printf("GEOM_VINUM: subdisk '%s' init: write failed" - " at offset %jd (drive offset %jd); error %d\n", + G_VINUM_DEBUG(0, "subdisk '%s' init: write failed" + " at offset %jd (drive offset %jd); error %d", s->name, (intmax_t)s->initialized, (intmax_t)i, error); break; @@ -664,7 +664,7 @@ gv_set_sd_state(s, GV_SD_UP, GV_SETSTATE_CONFIG); g_topology_unlock(); s->initialized = 0; - printf("GEOM_VINUM: subdisk '%s' init: finished successfully\n", + G_VINUM_DEBUG(1, "subdisk '%s' init: finished successfully", s->name); } kproc_exit(error); ==== //depot/projects/e500/sys/geom/vinum/geom_vinum_plex.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_plex.c,v 1.18 2007/10/20 23:23:20 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_plex.c,v 1.19 2008/10/26 17:20:37 lulf Exp $"); #include #include @@ -189,7 +189,7 @@ if (!(bp->bio_cflags & GV_BIO_SYNCREQ)) return (ENXIO); - printf("GEOM_VINUM: sd %s is initializing\n", s->name); + G_VINUM_DEBUG(1, "sd %s is initializing", s->name); gv_set_sd_state(s, GV_SD_INITIALIZING, GV_SETSTATE_FORCE); break; @@ -558,9 +558,7 @@ * clean up a lot. */ if (err) { - printf("GEOM_VINUM: plex request failed for "); - g_print_bio(bp); - printf("\n"); + G_VINUM_LOGREQ(0, bp, "plex request failed."); TAILQ_FOREACH_SAFE(bq, &wp->bits, queue, bq2) { TAILQ_REMOVE(&wp->bits, bq, queue); g_free(bq); @@ -620,9 +618,7 @@ /* Building the sub-request failed. */ if (err) { - printf("GEOM_VINUM: plex request failed for "); - g_print_bio(bp); - printf("\n"); + G_VINUM_LOGREQ(0, bp, "plex request failed."); cbp = bp->bio_driver1; while (cbp != NULL) { pbp = cbp->bio_caller1; @@ -719,7 +715,7 @@ /* Now find the correct plex where this subdisk belongs to. */ p = gv_find_plex(sc, s->plex); if (p == NULL) { - printf("gv_plex_taste: NULL p for '%s'\n", s->name); + G_VINUM_DEBUG(0, "%s: NULL p for '%s'", __func__, s->name); return (NULL); } @@ -740,7 +736,7 @@ cp = g_new_consumer(gp); error = g_attach(cp, pp); if (error) { - printf("geom_vinum: couldn't attach consumer to %s\n", + G_VINUM_DEBUG(0, "unable to attach consumer to %s", pp->name); g_destroy_consumer(cp); return (NULL); @@ -749,8 +745,8 @@ if ((cp2 != NULL) && (cp2->acr || cp2->acw || cp2->ace)) { error = g_access(cp, cp2->acr, cp2->acw, cp2->ace); if (error) { - printf("geom_vinum: couldn't set access counts" - " for consumer on %s\n", pp->name); + G_VINUM_DEBUG(0, "unable to set access counts" + " for consumer on %s", pp->name); g_detach(cp); g_destroy_consumer(cp); return (NULL); ==== //depot/projects/e500/sys/geom/vinum/geom_vinum_raid5.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_raid5.c,v 1.10 2004/11/26 11:59:51 le Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_raid5.c,v 1.11 2008/10/26 17:20:37 lulf Exp $"); #include #include @@ -208,7 +208,7 @@ if (!(bp->bio_cflags & GV_BIO_REBUILD)) return (ENXIO); - printf("GEOM_VINUM: sd %s is reviving\n", broken->name); + G_VINUM_DEBUG(1, "sd %s is reviving", broken->name); gv_set_sd_state(broken, GV_SD_REVIVING, GV_SETSTATE_FORCE); break; ==== //depot/projects/e500/sys/geom/vinum/geom_vinum_rm.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_rm.c,v 1.14 2008/10/02 10:01:05 lulf Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_rm.c,v 1.15 2008/10/26 17:20:37 lulf Exp $"); #include #include @@ -351,8 +351,8 @@ cp = LIST_FIRST(&gp->consumer); err = g_access(cp, 0, 1, 0); if (err) { - printf("GEOM_VINUM: gv_rm_drive: couldn't access '%s', errno: " - "%d\n", cp->provider->name, err); + G_VINUM_DEBUG(0, "%s: unable to access '%s', errno: " + "%d", __func__, cp->provider->name, err); return (err); } @@ -361,8 +361,8 @@ g_topology_unlock(); err = gv_write_header(cp, d->hdr); if (err) { - printf("GEOM_VINUM: gv_rm_drive: couldn't write header to '%s'" - ", errno: %d\n", cp->provider->name, err); + G_VINUM_DEBUG(0, "%s: unable to write header to '%s'" + ", errno: %d", __func__, cp->provider->name, err); d->hdr->magic = GV_MAGIC; } g_topology_lock(); ==== //depot/projects/e500/sys/geom/vinum/geom_vinum_state.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_state.c,v 1.8 2006/03/30 14:01:25 le Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_state.c,v 1.9 2008/10/26 17:20:37 lulf Exp $"); #include #include @@ -280,8 +280,8 @@ s->state = GV_SD_UP; if (s->state != oldstate) - printf("GEOM_VINUM: subdisk %s state change: %s -> %s\n", - s->name, gv_sdstate(oldstate), gv_sdstate(s->state)); + G_VINUM_DEBUG(1, "subdisk %s state change: %s -> %s", s->name, + gv_sdstate(oldstate), gv_sdstate(s->state)); /* Update the plex, if we have one. */ if (s->plex_sc != NULL) @@ -324,7 +324,7 @@ p->state = GV_PLEX_DOWN; if (p->state != oldstate) - printf("GEOM_VINUM: plex %s state change: %s -> %s\n", p->name, + G_VINUM_DEBUG(1, "plex %s state change: %s -> %s", p->name, gv_plexstate(oldstate), gv_plexstate(p->state)); /* Update our volume, if we have one. */ ==== //depot/projects/e500/sys/geom/vinum/geom_vinum_subr.c#3 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_subr.c,v 1.17 2008/07/11 16:46:29 lulf Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_subr.c,v 1.18 2008/10/26 17:20:37 lulf Exp $"); #include #include @@ -113,7 +113,7 @@ if (!strcmp(token[0], "volume")) { v = gv_new_volume(tokens, token); if (v == NULL) { - printf("geom_vinum: failed volume\n"); + G_VINUM_DEBUG(0, "failed volume"); break; } @@ -132,7 +132,7 @@ } else if (!strcmp(token[0], "plex")) { p = gv_new_plex(tokens, token); if (p == NULL) { - printf("geom_vinum: failed plex\n"); + G_VINUM_DEBUG(0, "failed plex"); break; } @@ -152,7 +152,7 @@ s = gv_new_sd(tokens, token); if (s == NULL) { - printf("geom_vinum: failed subdisk\n"); + G_VINUM_DEBUG(0, "failed subdisk"); break; } @@ -265,8 +265,8 @@ /* Check correct size of this subdisk. */ s2 = LIST_FIRST(&p->subdisks); if (s2 != NULL && gv_is_striped(p) && (s2->size != s->size)) { - printf("GEOM_VINUM: need equal sized subdisks for " - "this plex organisation - %s (%jd) <-> %s (%jd)\n", + G_VINUM_DEBUG(0, "need equal sized subdisks for " + "this plex organisation - %s (%jd) <-> %s (%jd)", s2->name, s2->size, s->name, s->size); return (-1); } @@ -439,8 +439,8 @@ s = LIST_FIRST(&p->subdisks); LIST_FOREACH(s2, &p->subdisks, in_plex) { if (s->size != s2->size) { - printf("geom_vinum: subdisk size mismatch " - "%s (%jd) <> %s (%jd)\n", s->name, s->size, + G_VINUM_DEBUG(0, "subdisk size mismatch %s" + "(%jd) <> %s (%jd)", s->name, s->size, s2->name, s2->size); state = GV_PLEX_DOWN; } @@ -450,10 +450,9 @@ LIST_FOREACH(s, &p->subdisks, in_plex) { remainder = s->size % p->stripesize; if (remainder) { - printf("gvinum: size of sd %s is not a " + G_VINUM_DEBUG(1, "size of sd %s is not a " "multiple of plex stripesize, taking off " - "%jd bytes\n", s->name, - (intmax_t)remainder); + "%jd bytes", s->name, (intmax_t)remainder); gv_adjust_freespace(s, remainder); } } @@ -544,7 +543,7 @@ /* No good slot found? */ if (s->size == -1) { - snprintf(errstr, errlen, "couldn't autosize '%s' on " + snprintf(errstr, errlen, "could not autosize '%s' on " "'%s'", s->name, d->name); return (-1); } ==== //depot/projects/e500/sys/geom/vinum/geom_vinum_volume.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_volume.c,v 1.12 2007/10/20 23:23:20 julian Exp $"); +__FBSDID("$FreeBSD: src/sys/geom/vinum/geom_vinum_volume.c,v 1.13 2008/10/26 17:20:37 lulf Exp $"); #include #include @@ -385,8 +385,8 @@ if ((ocp != NULL) && (ocp->acr > 0 || ocp->acw > 0 || ocp->ace > 0)) { error = g_access(cp, ocp->acr, ocp->acw, ocp->ace); if (error) { - printf("GEOM_VINUM: failed g_access %s -> %s; " - "errno %d\n", v->name, p->name, error); + G_VINUM_DEBUG(0, "failed g_access %s -> %s; " + "errno %d", v->name, p->name, error); g_detach(cp); g_destroy_consumer(cp); if (first) ==== //depot/projects/e500/sys/i386/i386/local_apic.c#7 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.49 2008/09/10 07:11:08 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/local_apic.c,v 1.50 2008/10/26 18:58:04 sobomax Exp $"); #include "opt_hwpmc_hooks.h" #include "opt_kdtrace.h" @@ -403,7 +403,11 @@ lapic_timer_hz = hz * 2; else lapic_timer_hz = hz * 4; - stathz = lapic_timer_hz / (lapic_timer_hz / 128); + if (lapic_timer_hz < 128) { + stathz = 128; + } else { + stathz = lapic_timer_hz / (lapic_timer_hz / 128); + } profhz = lapic_timer_hz; lapic_timer_period = value / lapic_timer_hz; ==== //depot/projects/e500/sys/net80211/ieee80211.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.55 2008/09/03 20:33:11 brooks Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.57 2008/10/25 23:43:08 sam Exp $"); /* * IEEE 802.11 generic handler @@ -350,11 +350,6 @@ vap->iv_opmode = opmode; vap->iv_caps |= ieee80211_opcap[opmode]; switch (opmode) { - case IEEE80211_M_STA: - /* auto-enable s/w beacon miss support */ - if (flags & IEEE80211_CLONE_NOBEACONS) - vap->iv_flags_ext |= IEEE80211_FEXT_SWBMISS; - break; case IEEE80211_M_WDS: /* * WDS links must specify the bssid of the far end. @@ -370,6 +365,9 @@ vap->iv_flags_ext |= IEEE80211_FEXT_WDSLEGACY; break; } + /* auto-enable s/w beacon miss support */ + if (flags & IEEE80211_CLONE_NOBEACONS) + vap->iv_flags_ext |= IEEE80211_FEXT_SWBMISS; /* * Enable various functionality by default if we're * capable; the driver can override us if it knows better. @@ -1065,8 +1063,7 @@ } static int -media2mode(const struct ieee80211com *ic, - const struct ifmedia_entry *ime, enum ieee80211_phymode *mode) +media2mode(const struct ifmedia_entry *ime, uint32_t flags, uint16_t *mode) { switch (IFM_MODE(ime->ifm_media)) { case IFM_IEEE80211_11A: @@ -1099,7 +1096,7 @@ */ if (ime->ifm_media & IFM_IEEE80211_TURBO) { if (*mode == IEEE80211_MODE_11A) { - if (ic->ic_flags & IEEE80211_F_TURBOP) + if (flags & IEEE80211_F_TURBOP) *mode = IEEE80211_MODE_TURBO_A; else *mode = IEEE80211_MODE_STURBO_A; @@ -1113,51 +1110,12 @@ } /* - * Handle a media change request on the underlying - * interface; we accept mode changes only. + * Handle a media change request on the underlying interface. */ int ieee80211com_media_change(struct ifnet *ifp) { - struct ieee80211com *ic = ifp->if_l2com; - struct ifmedia_entry *ime = ic->ic_media.ifm_cur; - enum ieee80211_phymode newphymode; - int error = 0; - - /* - * First, identify the phy mode. - */ - if (!media2mode(ic, ime, &newphymode)) - return EINVAL; - /* NB: mode must be supported, no need to check */ - - /* - * Handle phy mode change. - */ - IEEE80211_LOCK(ic); - if (ic->ic_curmode != newphymode) { /* change phy mode */ - struct ieee80211vap *vap; - - (void) ieee80211_setmode(ic, newphymode); - /* - * Propagate new state to each vap. - */ - TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) { - } - } - IEEE80211_UNLOCK(ic); - return error; -} - -static int -findrate(const struct ieee80211com *ic, enum ieee80211_phymode m, int r) -{ - int i, nrates; - - for (i = 0, nrates = ic->ic_sup_rates[m].rs_nrates; i < nrates; i++) - if ((ic->ic_sup_rates[m].rs_rates[i] & IEEE80211_RATE_VAL) == r) - return i; - return -1; + return EINVAL; } /* @@ -1168,26 +1126,12 @@ { struct ieee80211vap *vap = ifp->if_softc; struct ifmedia_entry *ime = vap->iv_media.ifm_cur; - struct ieee80211com *ic = vap->iv_ic; - int newrate; + uint16_t newmode; - /* XXX this won't work unless ic_curmode is != IEEE80211_MODE_AUTO */ - if (ic->ic_curmode == IEEE80211_MODE_AUTO) + if (!media2mode(ime, vap->iv_flags, &newmode)) return EINVAL; - if (IFM_SUBTYPE(ime->ifm_media) != IFM_AUTO) { - /* - * NB: this can only be used to specify a legacy rate. - */ - newrate = ieee80211_media2rate(ime->ifm_media); - if (newrate == 0) - return EINVAL; - if (findrate(ic, ic->ic_curmode, newrate) == -1) - return EINVAL; - } else { - newrate = IEEE80211_FIXED_RATE_NONE; >>> TRUNCATED FOR MAIL (1000 lines) <<<