svn commit: r222373 - in projects/pseries: amd64/amd64
amd64/include cam/scsi cddl/compat/opensolaris/kern
cddl/compat/opensolaris/sys
cddl/contrib/opensolaris/uts/common/fs/zfs cddl/contrib/openso...
Andreas Tobler
andreast at FreeBSD.org
Fri May 27 19:02:38 UTC 2011
Author: andreast
Date: Fri May 27 19:02:37 2011
New Revision: 222373
URL: http://svn.freebsd.org/changeset/base/222373
Log:
MFC
Added:
projects/pseries/dev/ath/ath_hal/ar9002/ar9287.c
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287.c
projects/pseries/dev/ath/ath_hal/ar9002/ar9287.h
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287.h
projects/pseries/dev/ath/ath_hal/ar9002/ar9287.ini
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287.ini
projects/pseries/dev/ath/ath_hal/ar9002/ar9287_attach.c
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c
projects/pseries/dev/ath/ath_hal/ar9002/ar9287_cal.c
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287_cal.c
projects/pseries/dev/ath/ath_hal/ar9002/ar9287_cal.h
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287_cal.h
projects/pseries/dev/ath/ath_hal/ar9002/ar9287_olc.c
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.c
projects/pseries/dev/ath/ath_hal/ar9002/ar9287_olc.h
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287_olc.h
projects/pseries/dev/ath/ath_hal/ar9002/ar9287_reset.c
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c
projects/pseries/dev/ath/ath_hal/ar9002/ar9287_reset.h
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287_reset.h
projects/pseries/dev/ath/ath_hal/ar9002/ar9287an.h
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287an.h
projects/pseries/dev/ath/ath_hal/ar9002/ar9287phy.h
- copied unchanged from r222369, head/sys/dev/ath/ath_hal/ar9002/ar9287phy.h
Modified:
projects/pseries/amd64/amd64/identcpu.c
projects/pseries/amd64/include/specialreg.h
projects/pseries/cam/scsi/scsi_ses.h
projects/pseries/cddl/compat/opensolaris/kern/opensolaris_sysevent.c
projects/pseries/cddl/compat/opensolaris/kern/opensolaris_taskq.c
projects/pseries/cddl/compat/opensolaris/sys/taskq.h
projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c
projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
projects/pseries/cddl/dev/cyclic/cyclic.c
projects/pseries/cddl/dev/cyclic/i386/cyclic_machdep.c
projects/pseries/conf/files
projects/pseries/conf/kern.mk
projects/pseries/conf/kern.post.mk
projects/pseries/conf/kmod.mk
projects/pseries/conf/newvers.sh
projects/pseries/dev/acpica/acpi_hpet.c
projects/pseries/dev/acpica/acpi_timer.c
projects/pseries/dev/ahci/ahci.c
projects/pseries/dev/ahci/ahci.h
projects/pseries/dev/alc/if_alcreg.h
projects/pseries/dev/ale/if_alereg.h
projects/pseries/dev/ath/ah_osdep.c
projects/pseries/dev/ath/ath_hal/ah.c
projects/pseries/dev/ath/ath_hal/ah.h
projects/pseries/dev/ath/ath_hal/ah_devid.h
projects/pseries/dev/ath/ath_hal/ah_eeprom.h
projects/pseries/dev/ath/ath_hal/ah_eeprom_9287.c
projects/pseries/dev/ath/ath_hal/ah_internal.h
projects/pseries/dev/ath/ath_hal/ar5212/ar5212.h
projects/pseries/dev/ath/ath_hal/ar5212/ar5212_attach.c
projects/pseries/dev/ath/ath_hal/ar5212/ar5212_misc.c
projects/pseries/dev/ath/ath_hal/ar5416/ar5416_ani.c
projects/pseries/dev/ath/ath_hal/ar5416/ar5416_attach.c
projects/pseries/dev/ath/ath_hal/ar5416/ar5416_cal.c
projects/pseries/dev/ath/ath_hal/ar5416/ar5416_reset.c
projects/pseries/dev/ath/ath_hal/ar5416/ar5416_xmit.c
projects/pseries/dev/ath/ath_hal/ar5416/ar5416desc.h
projects/pseries/dev/ath/ath_hal/ar5416/ar5416phy.h
projects/pseries/dev/ath/ath_hal/ar5416/ar5416reg.h
projects/pseries/dev/ath/ath_hal/ar9001/ar9160_attach.c
projects/pseries/dev/ath/ath_hal/ar9002/ar9280_attach.c
projects/pseries/dev/ath/ath_hal/ar9002/ar9285_attach.c
projects/pseries/dev/ath/ath_rate/sample/sample.c
projects/pseries/dev/ath/if_athvar.h
projects/pseries/dev/atkbdc/atkbd.c
projects/pseries/dev/atkbdc/atkbdreg.h
projects/pseries/dev/cfi/cfi_dev.c
projects/pseries/dev/cxgbe/t4_main.c
projects/pseries/dev/cxgbe/t4_sge.c
projects/pseries/dev/gem/if_gem.c
projects/pseries/dev/hwpmc/hwpmc_mod.c
projects/pseries/dev/msk/if_msk.c
projects/pseries/dev/msk/if_mskreg.h
projects/pseries/dev/mvs/mvs.c
projects/pseries/dev/pci/pcireg.h
projects/pseries/dev/puc/pucdata.c
projects/pseries/dev/siis/siis.c
projects/pseries/dev/sound/pci/hda/hdac.c
projects/pseries/dev/sound/usb/uaudio.c
projects/pseries/dev/uart/uart_dev_ns8250.c
projects/pseries/dev/usb/controller/xhci_pci.c
projects/pseries/dev/usb/controller/xhcireg.h
projects/pseries/dev/usb/input/uhid.c
projects/pseries/dev/usb/input/ukbd.c
projects/pseries/dev/usb/input/ums.c
projects/pseries/dev/usb/storage/umass.c
projects/pseries/dev/usb/storage/ustorage_fs.c
projects/pseries/dev/usb/usb_device.c
projects/pseries/dev/usb/usbdi.h
projects/pseries/dev/vge/if_vge.c
projects/pseries/fs/cd9660/cd9660_vfsops.c
projects/pseries/fs/ext2fs/ext2_vfsops.c
projects/pseries/fs/hpfs/hpfs_vfsops.c
projects/pseries/fs/msdosfs/msdosfs_vfsops.c
projects/pseries/fs/nfs/nfs_var.h
projects/pseries/fs/nfsclient/nfs_clrpcops.c
projects/pseries/fs/nfsclient/nfs_clvfsops.c
projects/pseries/fs/nfsclient/nfs_clvnops.c
projects/pseries/fs/nfsserver/nfs_nfsdport.c
projects/pseries/fs/ntfs/ntfs_vfsops.c
projects/pseries/fs/nullfs/null_vfsops.c
projects/pseries/fs/tmpfs/tmpfs_vfsops.c
projects/pseries/fs/udf/udf_vfsops.c
projects/pseries/fs/unionfs/union_vfsops.c
projects/pseries/geom/gate/g_gate.c
projects/pseries/geom/part/g_part.c
projects/pseries/geom/part/g_part_ebr.c
projects/pseries/geom/part/g_part_mbr.c
projects/pseries/geom/part/g_part_pc98.c
projects/pseries/geom/vinum/geom_vinum_drive.c
projects/pseries/geom/vinum/geom_vinum_events.c
projects/pseries/gnu/fs/reiserfs/reiserfs_vfsops.c
projects/pseries/gnu/fs/xfs/FreeBSD/support/kdb.c
projects/pseries/gnu/fs/xfs/FreeBSD/xfs_mountops.c
projects/pseries/i386/i386/identcpu.c
projects/pseries/i386/include/specialreg.h
projects/pseries/i386/include/xen/xenvar.h
projects/pseries/i386/xen/mp_machdep.c
projects/pseries/kern/device_if.m
projects/pseries/kern/kern_clocksource.c
projects/pseries/kern/kern_conf.c
projects/pseries/kern/kern_cpuset.c
projects/pseries/kern/kern_environment.c
projects/pseries/kern/kern_sig.c
projects/pseries/kern/kern_synch.c
projects/pseries/kern/sched_4bsd.c
projects/pseries/kern/subr_sbuf.c
projects/pseries/kern/subr_smp.c
projects/pseries/kern/vfs_bio.c
projects/pseries/kern/vfs_default.c
projects/pseries/kern/vfs_syscalls.c
projects/pseries/mips/include/atomic.h
projects/pseries/modules/ath/Makefile
projects/pseries/modules/wlan/Makefile
projects/pseries/net/if_epair.c
projects/pseries/net/if_llatbl.c
projects/pseries/net/if_llatbl.h
projects/pseries/net/netisr.c
projects/pseries/net/netisr.h
projects/pseries/net/netisr_internal.h
projects/pseries/net80211/ieee80211_var.h
projects/pseries/netgraph/bluetooth/drivers/ubt/ng_ubt.c
projects/pseries/netgraph/ng_eiface.c
projects/pseries/netgraph/ng_pipe.c
projects/pseries/netinet/in.c
projects/pseries/netinet/in_pcb.c
projects/pseries/netinet/in_pcb.h
projects/pseries/netinet/in_proto.c
projects/pseries/netinet/in_var.h
projects/pseries/netinet/raw_ip.c
projects/pseries/netinet/sctp_output.c
projects/pseries/netinet/sctp_usrreq.c
projects/pseries/netinet6/in6.c
projects/pseries/netinet6/in6_pcb.c
projects/pseries/netinet6/in6_proto.c
projects/pseries/netinet6/in6_src.c
projects/pseries/nfsclient/nfs_vfsops.c
projects/pseries/nfsclient/nfs_vnops.c
projects/pseries/nfsserver/nfs_srvsubs.c
projects/pseries/nlm/nlm_prot_impl.c
projects/pseries/ofed/drivers/infiniband/ulp/ipoib/ipoib_cm.c
projects/pseries/powerpc/aim/trap_subr64.S
projects/pseries/powerpc/booke/platform_bare.c
projects/pseries/powerpc/include/atomic.h
projects/pseries/powerpc/include/spr.h
projects/pseries/powerpc/ps3/ps3bus.c
projects/pseries/sys/dtrace_bsd.h
projects/pseries/sys/mount.h
projects/pseries/sys/param.h
projects/pseries/sys/proc.h
projects/pseries/sys/sbuf.h
projects/pseries/sys/smp.h
projects/pseries/ufs/ffs/ffs_alloc.c
projects/pseries/ufs/ffs/ffs_vfsops.c
projects/pseries/ufs/ufs/ufs_extern.h
projects/pseries/ufs/ufs/ufs_vfsops.c
projects/pseries/vm/uma_core.c
projects/pseries/vm/uma_int.h
Directory Properties:
projects/pseries/ (props changed)
projects/pseries/amd64/include/xen/ (props changed)
projects/pseries/boot/ (props changed)
projects/pseries/boot/i386/efi/ (props changed)
projects/pseries/boot/ia64/efi/ (props changed)
projects/pseries/boot/ia64/ski/ (props changed)
projects/pseries/boot/powerpc/boot1.chrp/ (props changed)
projects/pseries/boot/powerpc/ofw/ (props changed)
projects/pseries/cddl/contrib/opensolaris/ (props changed)
projects/pseries/conf/ (props changed)
projects/pseries/contrib/dev/acpica/ (props changed)
projects/pseries/contrib/octeon-sdk/ (props changed)
projects/pseries/contrib/pf/ (props changed)
projects/pseries/contrib/x86emu/ (props changed)
Modified: projects/pseries/amd64/amd64/identcpu.c
==============================================================================
--- projects/pseries/amd64/amd64/identcpu.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/amd64/amd64/identcpu.c Fri May 27 19:02:37 2011 (r222373)
@@ -216,6 +216,14 @@ printcpuinfo(void)
printf(" Family = %x", CPUID_TO_FAMILY(cpu_id));
printf(" Model = %x", CPUID_TO_MODEL(cpu_id));
printf(" Stepping = %u", cpu_id & CPUID_STEPPING);
+
+ /*
+ * AMD CPUID Specification
+ * http://support.amd.com/us/Embedded_TechDocs/25481.pdf
+ *
+ * Intel Processor Identification and CPUID Instruction
+ * http://www.intel.com/assets/pdf/appnote/241618.pdf
+ */
if (cpu_high > 0) {
/*
@@ -277,38 +285,29 @@ printcpuinfo(void)
"\012SSSE3" /* SSSE3 */
"\013CNXT-ID" /* L1 context ID available */
"\014<b11>"
- "\015<b12>"
+ "\015FMA" /* Fused Multiply Add */
"\016CX16" /* CMPXCHG16B Instruction */
"\017xTPR" /* Send Task Priority Messages*/
"\020PDCM" /* Perf/Debug Capability MSR */
"\021<b16>"
- "\022PCID" /* Process-context Identifiers */
+ "\022PCID" /* Process-context Identifiers*/
"\023DCA" /* Direct Cache Access */
- "\024SSE4.1"
- "\025SSE4.2"
+ "\024SSE4.1" /* SSE 4.1 */
+ "\025SSE4.2" /* SSE 4.2 */
"\026x2APIC" /* xAPIC Extensions */
- "\027MOVBE"
- "\030POPCNT"
- "\031<b24>"
- "\032AESNI" /* AES Crypto*/
- "\033XSAVE"
- "\034OSXSAVE"
- "\035<b28>"
- "\036<b29>"
+ "\027MOVBE" /* MOVBE Instruction */
+ "\030POPCNT" /* POPCNT Instruction */
+ "\031TSCDLT" /* TSC-Deadline Timer */
+ "\032AESNI" /* AES Crypto */
+ "\033XSAVE" /* XSAVE/XRSTOR States */
+ "\034OSXSAVE" /* OS-Enabled State Management*/
+ "\035AVX" /* Advanced Vector Extensions */
+ "\036F16C" /* Half-precision conversions */
"\037<b30>"
"\040HV" /* Hypervisor */
);
}
- /*
- * AMD64 Architecture Programmer's Manual Volume 3:
- * General-Purpose and System Instructions
- * http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/24594.pdf
- *
- * IA-32 Intel Architecture Software Developer's Manual,
- * Volume 2A: Instruction Set Reference, A-M
- * ftp://download.intel.com/design/Pentium4/manuals/25366617.pdf
- */
if (amd_feature != 0) {
printf("\n AMD Features=0x%b", amd_feature,
"\020" /* in hex */
@@ -361,18 +360,18 @@ printcpuinfo(void)
"\011Prefetch" /* 3DNow! Prefetch/PrefetchW */
"\012OSVW" /* OS visible workaround */
"\013IBS" /* Instruction based sampling */
- "\014SSE5" /* SSE5 */
+ "\014XOP" /* XOP extended instructions */
"\015SKINIT" /* SKINIT/STGI */
"\016WDT" /* Watchdog timer */
"\017<b14>"
- "\020<b15>"
- "\021<b16>"
+ "\020LWP" /* Lightweight Profiling */
+ "\021FMA4" /* 4-operand FMA instructions */
"\022<b17>"
"\023<b18>"
- "\024<b19>"
+ "\024NodeId" /* NodeId MSR support */
"\025<b20>"
- "\026<b21>"
- "\027<b22>"
+ "\026TBM" /* Trailing Bit Manipulation */
+ "\027Topology" /* Topology Extensions */
"\030<b23>"
"\031<b24>"
"\032<b25>"
Modified: projects/pseries/amd64/include/specialreg.h
==============================================================================
--- projects/pseries/amd64/include/specialreg.h Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/amd64/include/specialreg.h Fri May 27 19:02:37 2011 (r222373)
@@ -123,6 +123,7 @@
#define CPUID2_TM2 0x00000100
#define CPUID2_SSSE3 0x00000200
#define CPUID2_CNXTID 0x00000400
+#define CPUID2_FMA 0x00001000
#define CPUID2_CX16 0x00002000
#define CPUID2_XTPR 0x00004000
#define CPUID2_PDCM 0x00008000
@@ -133,7 +134,12 @@
#define CPUID2_X2APIC 0x00200000
#define CPUID2_MOVBE 0x00400000
#define CPUID2_POPCNT 0x00800000
+#define CPUID2_TSCDLT 0x01000000
#define CPUID2_AESNI 0x02000000
+#define CPUID2_XSAVE 0x04000000
+#define CPUID2_OSXSAVE 0x08000000
+#define CPUID2_AVX 0x10000000
+#define CPUID2_F16C 0x20000000
#define CPUID2_HV 0x80000000
/*
@@ -170,9 +176,14 @@
#define AMDID2_PREFETCH 0x00000100
#define AMDID2_OSVW 0x00000200
#define AMDID2_IBS 0x00000400
-#define AMDID2_SSE5 0x00000800
+#define AMDID2_XOP 0x00000800
#define AMDID2_SKINIT 0x00001000
#define AMDID2_WDT 0x00002000
+#define AMDID2_LWP 0x00008000
+#define AMDID2_FMA4 0x00010000
+#define AMDID2_NODE_ID 0x00080000
+#define AMDID2_TBM 0x00200000
+#define AMDID2_TOPOLOGY 0x00400000
/*
* CPUID instruction 1 eax info
Modified: projects/pseries/cam/scsi/scsi_ses.h
==============================================================================
--- projects/pseries/cam/scsi/scsi_ses.h Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cam/scsi/scsi_ses.h Fri May 27 19:02:37 2011 (r222373)
@@ -101,6 +101,7 @@ typedef struct {
#define SESTYP_UPS 0x0b
#define SESTYP_DISPLAY 0x0c
#define SESTYP_KEYPAD 0x0d
+#define SESTYP_ENCLOSURE 0x0e
#define SESTYP_SCSIXVR 0x0f
#define SESTYP_LANGUAGE 0x10
#define SESTYP_COMPORT 0x11
@@ -109,6 +110,9 @@ typedef struct {
#define SESTYP_SCSI_TGT 0x14
#define SESTYP_SCSI_INI 0x15
#define SESTYP_SUBENC 0x16
+#define SESTYP_ARRAY 0x17
+#define SESTYP_SASEXPANDER 0x18
+#define SESTYP_SASCONNECTOR 0x19
/*
* Overall Enclosure Status
Modified: projects/pseries/cddl/compat/opensolaris/kern/opensolaris_sysevent.c
==============================================================================
--- projects/pseries/cddl/compat/opensolaris/kern/opensolaris_sysevent.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/compat/opensolaris/kern/opensolaris_sysevent.c Fri May 27 19:02:37 2011 (r222373)
@@ -113,8 +113,10 @@ sysevent_add_attr(sysevent_attr_list_t *
}
break;
default:
+#if 0
printf("%s: type %d is not implemented\n", __func__,
se_value->value_type);
+#endif
break;
}
@@ -286,8 +288,10 @@ log_sysevent(sysevent_t *evp, int flag,
break;
}
default:
+#if 0
printf("%s: type %d is not implemented\n", __func__,
nvpair_type(elem));
+#endif
break;
}
}
Modified: projects/pseries/cddl/compat/opensolaris/kern/opensolaris_taskq.c
==============================================================================
--- projects/pseries/cddl/compat/opensolaris/kern/opensolaris_taskq.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/compat/opensolaris/kern/opensolaris_taskq.c Fri May 27 19:02:37 2011 (r222373)
@@ -147,9 +147,7 @@ taskq_run_safe(void *arg, int pending __
{
struct ostask *task = arg;
- ASSERT(task->ost_magic == TASKQ_MAGIC);
task->ost_func(task->ost_arg);
- task->ost_magic = 0;
}
taskqid_t
@@ -158,15 +156,12 @@ taskq_dispatch_safe(taskq_t *tq, task_fu
{
int prio;
- ASSERT(task->ost_magic != TASKQ_MAGIC);
-
/*
* If TQ_FRONT is given, we want higher priority for this task, so it
* can go at the front of the queue.
*/
prio = !!(flags & TQ_FRONT);
- task->ost_magic = TASKQ_MAGIC;
task->ost_func = func;
task->ost_arg = arg;
Modified: projects/pseries/cddl/compat/opensolaris/sys/taskq.h
==============================================================================
--- projects/pseries/cddl/compat/opensolaris/sys/taskq.h Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/compat/opensolaris/sys/taskq.h Fri May 27 19:02:37 2011 (r222373)
@@ -35,7 +35,6 @@ struct ostask {
struct task ost_task;
task_func_t *ost_func;
void *ost_arg;
- int ost_magic;
};
taskqid_t taskq_dispatch_safe(taskq_t *tq, task_func_t func, void *arg,
Modified: projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
==============================================================================
--- projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Fri May 27 19:02:37 2011 (r222373)
@@ -421,8 +421,7 @@ struct zio {
#ifdef _KERNEL
/* FreeBSD only. */
- struct ostask io_task_issue;
- struct ostask io_task_interrupt;
+ struct ostask io_task;
#endif
};
Modified: projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c
==============================================================================
--- projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c Fri May 27 19:02:37 2011 (r222373)
@@ -239,15 +239,20 @@ zfs_dirent_lock(zfs_dirlock_t **dlpp, zn
return (ENOENT);
}
if (dl == NULL) {
+ size_t namesize;
+
/*
* Allocate a new dirlock and add it to the list.
*/
- dl = kmem_alloc(sizeof (zfs_dirlock_t), KM_SLEEP);
+ namesize = strlen(name) + 1;
+ dl = kmem_alloc(sizeof (zfs_dirlock_t) + namesize,
+ KM_SLEEP);
cv_init(&dl->dl_cv, NULL, CV_DEFAULT, NULL);
- dl->dl_name = name;
+ dl->dl_name = (char *)(dl + 1);
+ bcopy(name, dl->dl_name, namesize);
dl->dl_sharecnt = 0;
dl->dl_namelock = 0;
- dl->dl_namesize = 0;
+ dl->dl_namesize = namesize;
dl->dl_dzp = dzp;
dl->dl_next = dzp->z_dirlocks;
dzp->z_dirlocks = dl;
@@ -264,20 +269,8 @@ zfs_dirent_lock(zfs_dirlock_t **dlpp, zn
if (flag & ZHAVELOCK)
dl->dl_namelock = 1;
- if ((flag & ZSHARED) && ++dl->dl_sharecnt > 1 && dl->dl_namesize == 0) {
- /*
- * We're the second shared reference to dl. Make a copy of
- * dl_name in case the first thread goes away before we do.
- * Note that we initialize the new name before storing its
- * pointer into dl_name, because the first thread may load
- * dl->dl_name at any time. He'll either see the old value,
- * which is his, or the new shared copy; either is OK.
- */
- dl->dl_namesize = strlen(dl->dl_name) + 1;
- name = kmem_alloc(dl->dl_namesize, KM_SLEEP);
- bcopy(dl->dl_name, name, dl->dl_namesize);
- dl->dl_name = name;
- }
+ if (flag & ZSHARED)
+ dl->dl_sharecnt++;
mutex_exit(&dzp->z_lock);
@@ -361,10 +354,8 @@ zfs_dirent_unlock(zfs_dirlock_t *dl)
cv_broadcast(&dl->dl_cv);
mutex_exit(&dzp->z_lock);
- if (dl->dl_namesize != 0)
- kmem_free(dl->dl_name, dl->dl_namesize);
cv_destroy(&dl->dl_cv);
- kmem_free(dl, sizeof (*dl));
+ kmem_free(dl, sizeof (*dl) + dl->dl_namesize);
}
/*
Modified: projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Fri May 27 19:02:37 2011 (r222373)
@@ -689,6 +689,9 @@ zfs_secpolicy_destroy(zfs_cmd_t *zc, cre
* and destroying snapshots requires descendent permissions, a successfull
* check of the top level snapshot applies to snapshots of all descendent
* datasets as well.
+ *
+ * The top level snapshot may not exist when doing a recursive destroy.
+ * In this case fallback to permissions of the parent dataset.
*/
static int
zfs_secpolicy_destroy_snaps(zfs_cmd_t *zc, cred_t *cr)
@@ -700,6 +703,9 @@ zfs_secpolicy_destroy_snaps(zfs_cmd_t *z
error = zfs_secpolicy_destroy_perms(dsname, cr);
+ if (error == ENOENT)
+ error = zfs_secpolicy_destroy_perms(zc->zc_name, cr);
+
strfree(dsname);
return (error);
}
Modified: projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
==============================================================================
--- projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Fri May 27 19:02:37 2011 (r222373)
@@ -93,7 +93,7 @@ static int zfs_vget(vfs_t *vfsp, ino_t i
static int zfs_sync(vfs_t *vfsp, int waitfor);
static int zfs_checkexp(vfs_t *vfsp, struct sockaddr *nam, int *extflagsp,
struct ucred **credanonp, int *numsecflavors, int **secflavors);
-static int zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp);
+static int zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp);
static void zfs_objset_close(zfsvfs_t *zfsvfs);
static void zfs_freevfs(vfs_t *vfsp);
@@ -2007,7 +2007,7 @@ CTASSERT(SHORT_FID_LEN <= sizeof(struct
CTASSERT(LONG_FID_LEN <= sizeof(struct fid));
static int
-zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vnode_t **vpp)
+zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, int flags, vnode_t **vpp)
{
zfsvfs_t *zfsvfs = vfsp->vfs_data;
znode_t *zp;
@@ -2069,7 +2069,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vno
VN_HOLD(*vpp);
}
ZFS_EXIT(zfsvfs);
- err = zfs_vnode_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
+ err = zfs_vnode_lock(*vpp, flags | LK_RETRY);
if (err != 0)
*vpp = NULL;
return (err);
@@ -2096,7 +2096,7 @@ zfs_fhtovp(vfs_t *vfsp, fid_t *fidp, vno
*vpp = ZTOV(zp);
ZFS_EXIT(zfsvfs);
- err = zfs_vnode_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
+ err = zfs_vnode_lock(*vpp, flags | LK_RETRY);
if (err == 0)
vnode_create_vobject(*vpp, zp->z_size, curthread);
else
Modified: projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
==============================================================================
--- projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri May 27 19:02:37 2011 (r222373)
@@ -1068,19 +1068,9 @@ zio_taskq_dispatch(zio_t *zio, enum zio_
spa_t *spa = zio->io_spa;
zio_type_t t = zio->io_type;
int flags = TQ_SLEEP | (cutinline ? TQ_FRONT : 0);
-#ifdef _KERNEL
- struct ostask *task;
-#endif
ASSERT(q == ZIO_TASKQ_ISSUE || q == ZIO_TASKQ_INTERRUPT);
-#ifdef _KERNEL
- if (q == ZIO_TASKQ_ISSUE)
- task = &zio->io_task_issue;
- else /* if (q == ZIO_TASKQ_INTERRUPT) */
- task = &zio->io_task_interrupt;
-#endif
-
/*
* If we're a config writer or a probe, the normal issue and
* interrupt threads may all be blocked waiting for the config lock.
@@ -1105,7 +1095,7 @@ zio_taskq_dispatch(zio_t *zio, enum zio_
ASSERT3U(q, <, ZIO_TASKQ_TYPES);
#ifdef _KERNEL
(void) taskq_dispatch_safe(spa->spa_zio_taskq[t][q],
- (task_func_t *)zio_execute, zio, flags, task);
+ (task_func_t *)zio_execute, zio, flags, &zio->io_task);
#else
(void) taskq_dispatch(spa->spa_zio_taskq[t][q],
(task_func_t *)zio_execute, zio, flags);
@@ -2904,7 +2894,7 @@ zio_done(zio_t *zio)
(void) taskq_dispatch_safe(
spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE],
(task_func_t *)zio_reexecute, zio, TQ_SLEEP,
- &zio->io_task_issue);
+ &zio->io_task);
#else
(void) taskq_dispatch(
spa->spa_zio_taskq[ZIO_TYPE_CLAIM][ZIO_TASKQ_ISSUE],
Modified: projects/pseries/cddl/dev/cyclic/cyclic.c
==============================================================================
--- projects/pseries/cddl/dev/cyclic/cyclic.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/dev/cyclic/cyclic.c Fri May 27 19:02:37 2011 (r222373)
@@ -341,6 +341,16 @@ static cyc_backend_t cyclic_backend;
MALLOC_DEFINE(M_CYCLIC, "cyclic", "Cyclic timer subsystem");
+static __inline hrtime_t
+cyc_gethrtime(void)
+{
+ struct bintime bt;
+
+ binuptime(&bt);
+ return ((hrtime_t)bt.sec * NANOSEC +
+ (((uint64_t)NANOSEC * (uint32_t)(bt.frac >> 32)) >> 32));
+}
+
/*
* Returns 1 if the upheap propagated to the root, 0 if it did not. This
* allows the caller to reprogram the backend only when the root has been
@@ -507,7 +517,7 @@ cyclic_fire(cpu_t *c)
cyc_index_t *heap = cpu->cyp_heap;
cyclic_t *cyclic, *cyclics = cpu->cyp_cyclics;
void *arg = be->cyb_arg;
- hrtime_t now = gethrtime();
+ hrtime_t now = cyc_gethrtime();
hrtime_t exp;
if (cpu->cyp_nelems == 0) {
@@ -687,7 +697,7 @@ cyclic_add_xcall(cyc_xcallarg_t *arg)
* If a start time hasn't been explicitly specified, we'll
* start on the next interval boundary.
*/
- cyclic->cy_expire = (gethrtime() / cyclic->cy_interval + 1) *
+ cyclic->cy_expire = (cyc_gethrtime() / cyclic->cy_interval + 1) *
cyclic->cy_interval;
} else {
cyclic->cy_expire = when->cyt_when;
Modified: projects/pseries/cddl/dev/cyclic/i386/cyclic_machdep.c
==============================================================================
--- projects/pseries/cddl/dev/cyclic/i386/cyclic_machdep.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/cddl/dev/cyclic/i386/cyclic_machdep.c Fri May 27 19:02:37 2011 (r222373)
@@ -30,6 +30,7 @@ static void enable(cyb_arg_t);
static void disable(cyb_arg_t);
static void reprogram(cyb_arg_t, hrtime_t);
static void xcall(cyb_arg_t, cpu_t *, cyc_func_t, void *);
+static void cyclic_clock(struct trapframe *frame);
static cyc_backend_t be = {
NULL, /* cyb_configure */
@@ -45,6 +46,7 @@ static void
cyclic_ap_start(void *dummy)
{
/* Initialise the rest of the CPUs. */
+ cyclic_clock_func = cyclic_clock;
cyclic_mp_init();
}
@@ -63,18 +65,10 @@ cyclic_machdep_init(void)
static void
cyclic_machdep_uninit(void)
{
- int i;
-
- for (i = 0; i <= mp_maxid; i++)
- /* Reset the cyclic clock callback hook. */
- cyclic_clock_func[i] = NULL;
-
/* De-register the cyclic backend. */
cyclic_uninit();
}
-static hrtime_t exp_due[MAXCPU];
-
/*
* This function is the one registered by the machine dependent
* initialiser as the callback for high speed timer events.
@@ -84,7 +78,7 @@ cyclic_clock(struct trapframe *frame)
{
cpu_t *c = &solaris_cpu[curcpu];
- if (c->cpu_cyclic != NULL && gethrtime() >= exp_due[curcpu]) {
+ if (c->cpu_cyclic != NULL) {
if (TRAPF_USERMODE(frame)) {
c->cpu_profile_pc = 0;
c->cpu_profile_upc = TRAPF_PC(frame);
@@ -102,26 +96,34 @@ cyclic_clock(struct trapframe *frame)
}
}
-static void enable(cyb_arg_t arg)
+static void
+enable(cyb_arg_t arg __unused)
{
- /* Register the cyclic clock callback function. */
- cyclic_clock_func[curcpu] = cyclic_clock;
+
}
-static void disable(cyb_arg_t arg)
+static void
+disable(cyb_arg_t arg __unused)
{
- /* Reset the cyclic clock callback function. */
- cyclic_clock_func[curcpu] = NULL;
+
}
-static void reprogram(cyb_arg_t arg, hrtime_t exp)
+static void
+reprogram(cyb_arg_t arg __unused, hrtime_t exp)
{
- exp_due[curcpu] = exp;
+ struct bintime bt;
+ struct timespec ts;
+
+ ts.tv_sec = exp / 1000000000;
+ ts.tv_nsec = exp % 1000000000;
+ timespec2bintime(&ts, &bt);
+ clocksource_cyc_set(&bt);
}
-static void xcall(cyb_arg_t arg, cpu_t *c, cyc_func_t func, void *param)
+static void xcall(cyb_arg_t arg __unused, cpu_t *c, cyc_func_t func,
+ void *param)
{
- smp_rendezvous_cpus((cpumask_t) (1 << c->cpuid),
+ smp_rendezvous_cpus((cpumask_t)1 << c->cpuid,
smp_no_rendevous_barrier, func, smp_no_rendevous_barrier, param);
}
Modified: projects/pseries/conf/files
==============================================================================
--- projects/pseries/conf/files Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/conf/files Fri May 27 19:02:37 2011 (r222373)
@@ -604,6 +604,9 @@ dev/ath/ath_hal/ah_eeprom_v14.c \
dev/ath/ath_hal/ah_eeprom_v4k.c \
optional ath_hal | ath_ar9285 \
compile-with "${NORMAL_C} -I$S/dev/ath"
+dev/ath/ath_hal/ah_eeprom_9287.c \
+ optional ath_hal | ath_ar9287 \
+ compile-with "${NORMAL_C} -I$S/dev/ath"
dev/ath/ath_hal/ah_regdomain.c optional ath \
compile-with "${NORMAL_C} -I$S/dev/ath"
# ar5210
@@ -651,111 +654,128 @@ dev/ath/ath_hal/ar5211/ar5211_xmit.c op
# ar5212
dev/ath/ath_hal/ar5212/ar5212_ani.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_attach.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_beacon.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_eeprom.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_gpio.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_interrupts.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_keycache.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_misc.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_phy.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_power.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_recv.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_reset.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_rfgain.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5212/ar5212_xmit.c \
optional ath_hal | ath_ar5212 | ath_ar5416 | ath_ar9160 | ath_ar9280 | \
- ath_ar9285 \
+ ath_ar9285 ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
# ar5416 (depends on ar5212)
dev/ath/ath_hal/ar5416/ar5416_ani.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_attach.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_beacon.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_cal.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_cal_iq.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_cal_adcgain.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_cal_adcdc.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_eeprom.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_gpio.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_interrupts.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_keycache.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_misc.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_phy.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_power.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_recv.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_reset.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar5416/ar5416_xmit.c \
- optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 \
+ optional ath_hal | ath_ar5416 | ath_ar9160 | ath_ar9280 | ath_ar9285 | \
+ ath_ar9287 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
# ar9130 (depends upon ar5416) - also requires AH_SUPPORT_AR9130
dev/ath/ath_hal/ar9001/ar9130_attach.c optional ath_hal | ath_ar9130 \
@@ -786,6 +806,16 @@ dev/ath/ath_hal/ar9002/ar9285_phy.c opti
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar9002/ar9285_diversity.c optional ath_hal | ath_ar9285 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+# ar9287 (depends on ar5416)
+dev/ath/ath_hal/ar9002/ar9287_attach.c optional ath_hal | ath_ar9287 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9002/ar9287_reset.c optional ath_hal | ath_ar9287 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9002/ar9287_cal.c optional ath_hal | ath_ar9287 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9002/ar9287_olc.c optional ath_hal | ath_ar9287 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+
# rf backends
dev/ath/ath_hal/ar5212/ar2316.c optional ath_rf2316 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
@@ -807,6 +837,8 @@ dev/ath/ath_hal/ar9002/ar9280.c optional
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
dev/ath/ath_hal/ar9002/ar9285.c optional ath_hal | ath_ar9285 \
compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
+dev/ath/ath_hal/ar9002/ar9287.c optional ath_hal | ath_ar9287 \
+ compile-with "${NORMAL_C} -I$S/dev/ath -I$S/dev/ath/ath_hal"
# ath rate control algorithms
dev/ath/ath_rate/amrr/amrr.c optional ath_rate_amrr \
compile-with "${NORMAL_C} -I$S/dev/ath"
Modified: projects/pseries/conf/kern.mk
==============================================================================
--- projects/pseries/conf/kern.mk Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/conf/kern.mk Fri May 27 19:02:37 2011 (r222373)
@@ -1,15 +1,12 @@
# $FreeBSD$
#
-# Warning flags for compiling the kernel and components of the kernel.
+# Warning flags for compiling the kernel and components of the kernel:
#
-# Note that the newly added -Wcast-qual is responsible for generating
-# most of the remaining warnings. Warnings introduced with -Wall will
-# also pop up, but are easier to fix.
CWARNFLAGS?= -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes \
-Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual \
-Wundef -Wno-pointer-sign -fformat-extensions \
- -Wmissing-include-dirs
+ -Wmissing-include-dirs -fdiagnostics-show-option
#
# The following flags are next up for working on:
# -Wextra
Modified: projects/pseries/conf/kern.post.mk
==============================================================================
--- projects/pseries/conf/kern.post.mk Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/conf/kern.post.mk Fri May 27 19:02:37 2011 (r222373)
@@ -227,7 +227,8 @@ kernel-install:
.endif
mkdir -p ${DESTDIR}${KODIR}
${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR}
-.if defined(DEBUG) && !defined(INSTALL_NODEBUG)
+.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \
+ (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no")
${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR}
.endif
.if defined(KERNEL_EXTRA_INSTALL)
@@ -239,7 +240,8 @@ kernel-install:
kernel-reinstall:
@-chflags -R noschg ${DESTDIR}${KODIR}
${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR}
-.if defined(DEBUG) && !defined(INSTALL_NODEBUG)
+.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && \
+ (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no")
${INSTALL} -p -m 555 -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.symbols ${DESTDIR}${KODIR}
.endif
Modified: projects/pseries/conf/kmod.mk
==============================================================================
--- projects/pseries/conf/kmod.mk Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/conf/kmod.mk Fri May 27 19:02:37 2011 (r222373)
@@ -286,7 +286,8 @@ realinstall: _kmodinstall
_kmodinstall:
${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
-.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG)
+.if defined(DEBUG_FLAGS) && !defined(INSTALL_NODEBUG) && \
+ (defined(MK_KERNEL_SYMBOLS) && ${MK_KERNEL_SYMBOLS} != "no")
${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
${_INSTALLFLAGS} ${PROG}.symbols ${DESTDIR}${KMODDIR}
.endif
Modified: projects/pseries/conf/newvers.sh
==============================================================================
--- projects/pseries/conf/newvers.sh Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/conf/newvers.sh Fri May 27 19:02:37 2011 (r222373)
@@ -139,4 +139,4 @@ int osreldate = ${RELDATE};
char kern_ident[] = "${i}";
EOF
-echo `expr ${v} + 1` > version
+echo $((v + 1)) > version
Modified: projects/pseries/dev/acpica/acpi_hpet.c
==============================================================================
--- projects/pseries/dev/acpica/acpi_hpet.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/dev/acpica/acpi_hpet.c Fri May 27 19:02:37 2011 (r222373)
@@ -476,7 +476,7 @@ hpet_attach(device_t dev)
sc->tc.tc_get_timecount = hpet_get_timecount,
sc->tc.tc_counter_mask = ~0u,
sc->tc.tc_name = "HPET",
- sc->tc.tc_quality = 900,
+ sc->tc.tc_quality = 950,
sc->tc.tc_frequency = sc->freq;
sc->tc.tc_priv = sc;
tc_init(&sc->tc);
Modified: projects/pseries/dev/acpica/acpi_timer.c
==============================================================================
--- projects/pseries/dev/acpica/acpi_timer.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/dev/acpica/acpi_timer.c Fri May 27 19:02:37 2011 (r222373)
@@ -203,7 +203,7 @@ acpi_timer_probe(device_t dev)
if (j == 10) {
acpi_timer_timecounter.tc_name = "ACPI-fast";
acpi_timer_timecounter.tc_get_timecount = acpi_timer_get_timecount;
- acpi_timer_timecounter.tc_quality = 1000;
+ acpi_timer_timecounter.tc_quality = 900;
} else {
acpi_timer_timecounter.tc_name = "ACPI-safe";
acpi_timer_timecounter.tc_get_timecount = acpi_timer_get_timecount_safe;
Modified: projects/pseries/dev/ahci/ahci.c
==============================================================================
--- projects/pseries/dev/ahci/ahci.c Fri May 27 18:59:24 2011 (r222372)
+++ projects/pseries/dev/ahci/ahci.c Fri May 27 19:02:37 2011 (r222373)
@@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$");
#include <machine/resource.h>
#include <machine/bus.h>
#include <sys/rman.h>
+#include <dev/led/led.h>
#include <dev/pci/pcivar.h>
#include <dev/pci/pcireg.h>
#include "ahci.h"
@@ -68,6 +69,7 @@ static int ahci_ch_resume(device_t dev);
static void ahci_ch_pm(void *arg);
static void ahci_ch_intr_locked(void *data);
static void ahci_ch_intr(void *data);
+static void ahci_ch_led(void *priv, int onoff);
static int ahci_ctlr_reset(device_t dev);
static int ahci_ctlr_setup(device_t dev);
static void ahci_begin_transaction(device_t dev, union ccb *ccb);
@@ -117,6 +119,7 @@ static struct {
#define AHCI_Q_NOBSYRES 256
#define AHCI_Q_NOAA 512
#define AHCI_Q_NOCOUNT 1024
+#define AHCI_Q_ALTSIG 2048
} ahci_ids[] = {
{0x43801002, 0x00, "ATI IXP600", 0},
{0x43901002, 0x00, "ATI IXP700", 0},
@@ -190,8 +193,9 @@ static struct {
{0x614511ab, 0x00, "Marvell 88SX6145", AHCI_Q_NOFORCE | AHCI_Q_4CH |
AHCI_Q_EDGEIS | AHCI_Q_NONCQ | AHCI_Q_NOCOUNT},
{0x91201b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_NOBSYRES},
- {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES},
+ {0x91231b4b, 0x11, "Marvell 88SE912x", AHCI_Q_NOBSYRES|AHCI_Q_ALTSIG},
{0x91231b4b, 0x00, "Marvell 88SE912x", AHCI_Q_EDGEIS|AHCI_Q_SATA2|AHCI_Q_NOBSYRES},
+ {0x91721b4b, 0x00, "Marvell 88SE9172", AHCI_Q_NOBSYRES},
{0x91821b4b, 0x00, "Marvell 88SE9182", AHCI_Q_NOBSYRES},
{0x06201103, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES},
{0x06201b4b, 0x00, "HighPoint RocketRAID 620", AHCI_Q_NOBSYRES},
@@ -396,6 +400,13 @@ ahci_attach(device_t dev)
if (ctlr->caps & AHCI_CAP_EMS)
ctlr->capsem = ATA_INL(ctlr->r_mem, AHCI_EM_CTL);
ctlr->ichannels = ATA_INL(ctlr->r_mem, AHCI_PI);
+
+ /* Identify and set separate quirks for HBA and RAID f/w Marvells. */
+ if ((ctlr->quirks & AHCI_Q_NOBSYRES) &&
+ (ctlr->quirks & AHCI_Q_ALTSIG) &&
+ (ctlr->caps & AHCI_CAP_SPM) == 0)
+ ctlr->quirks &= ~AHCI_Q_NOBSYRES;
+
if (ctlr->quirks & AHCI_Q_1CH) {
ctlr->caps &= ~AHCI_CAP_NPMASK;
ctlr->ichannels &= 0x01;
@@ -418,6 +429,8 @@ ahci_attach(device_t dev)
ctlr->caps &= ~AHCI_CAP_SNCQ;
if ((ctlr->caps & AHCI_CAP_CCCS) == 0)
ctlr->ccc = 0;
+ mtx_init(&ctlr->em_mtx, "AHCI EM lock", NULL, MTX_DEF);
+ ctlr->emloc = ATA_INL(ctlr->r_mem, AHCI_EM_LOC);
ahci_ctlr_setup(dev);
/* Setup interrupts. */
if (ahci_setup_interrupt(dev)) {
@@ -521,6 +534,7 @@ ahci_detach(device_t dev)
rman_fini(&ctlr->sc_iomem);
if (ctlr->r_mem)
bus_release_resource(dev, SYS_RES_MEMORY, ctlr->r_rid, ctlr->r_mem);
+ mtx_destroy(&ctlr->em_mtx);
return (0);
}
@@ -887,6 +901,7 @@ ahci_ch_attach(device_t dev)
struct cam_devq *devq;
int rid, error, i, sata_rev = 0;
u_int32_t version;
+ char buf[32];
ch->dev = dev;
ch->unit = (intptr_t)device_get_ivars(dev);
@@ -995,6 +1010,25 @@ ahci_ch_attach(device_t dev)
ahci_ch_pm, dev);
}
mtx_unlock(&ch->mtx);
+ if ((ch->caps & AHCI_CAP_EMS) &&
+ (ctlr->capsem & AHCI_EM_LED)) {
+ for (i = 0; i < AHCI_NUM_LEDS; i++) {
+ ch->leds[i].dev = dev;
+ ch->leds[i].num = i;
+ }
+ if ((ctlr->capsem & AHCI_EM_ALHD) == 0) {
+ snprintf(buf, sizeof(buf), "%s.act",
+ device_get_nameunit(dev));
+ ch->leds[0].led = led_create(ahci_ch_led,
+ &ch->leds[0], buf);
+ }
+ snprintf(buf, sizeof(buf), "%s.locate",
+ device_get_nameunit(dev));
+ ch->leds[1].led = led_create(ahci_ch_led, &ch->leds[1], buf);
+ snprintf(buf, sizeof(buf), "%s.fault",
+ device_get_nameunit(dev));
+ ch->leds[2].led = led_create(ahci_ch_led, &ch->leds[2], buf);
+ }
return (0);
err3:
@@ -1014,7 +1048,12 @@ static int
ahci_ch_detach(device_t dev)
{
struct ahci_channel *ch = device_get_softc(dev);
+ int i;
+ for (i = 0; i < AHCI_NUM_LEDS; i++) {
+ if (ch->leds[i].led)
+ led_destroy(ch->leds[i].led);
+ }
mtx_lock(&ch->mtx);
xpt_async(AC_LOST_DEVICE, ch->path, NULL);
/* Forget about reset. */
@@ -1137,6 +1176,47 @@ static driver_t ahcich_driver = {
};
DRIVER_MODULE(ahcich, ahci, ahcich_driver, ahcich_devclass, 0, 0);
+static void
+ahci_ch_setleds(device_t dev)
+{
+ struct ahci_channel *ch;
+ struct ahci_controller *ctlr;
+ size_t buf;
+ int i, timeout;
+ int16_t val;
+
+ ctlr = device_get_softc(device_get_parent(dev));
+ ch = device_get_softc(dev);
+
+ val = 0;
+ for (i = 0; i < AHCI_NUM_LEDS; i++)
+ val |= ch->leds[i].state << (i * 3);
+
+ buf = (ctlr->emloc & 0xffff0000) >> 14;
+ mtx_lock(&ctlr->em_mtx);
+ timeout = 1000;
+ while (ATA_INL(ctlr->r_mem, AHCI_EM_CTL) & (AHCI_EM_TM | AHCI_EM_RST) &&
+ --timeout > 0)
+ DELAY(1000);
+ if (timeout == 0)
+ device_printf(dev, "EM timeout\n");
+ ATA_OUTL(ctlr->r_mem, buf, (1 << 8) | (0 << 16) | (0 << 24));
+ ATA_OUTL(ctlr->r_mem, buf + 4, ch->unit | (val << 16));
+ ATA_OUTL(ctlr->r_mem, AHCI_EM_CTL, AHCI_EM_TM);
+ mtx_unlock(&ctlr->em_mtx);
+}
+
+static void
+ahci_ch_led(void *priv, int onoff)
+{
+ struct ahci_led *led;
+
+ led = (struct ahci_led *)priv;
+
+ led->state = onoff;
+ ahci_ch_setleds(led->dev);
+}
+
struct ahci_dc_cb_args {
bus_addr_t maddr;
int error;
@@ -1693,7 +1773,7 @@ ahci_execute_transaction(struct ahci_slo
struct ahci_cmd_list *clp;
union ccb *ccb = slot->ccb;
int port = ccb->ccb_h.target_id & 0x0f;
- int fis_size, i;
+ int fis_size, i, softreset;
uint8_t *fis = ch->dma.rfis + 0x40;
uint8_t val;
@@ -1720,17 +1800,20 @@ ahci_execute_transaction(struct ahci_slo
if ((ccb->ccb_h.func_code == XPT_ATA_IO) &&
(ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL)) {
if (ccb->ataio.cmd.control & ATA_A_RESET) {
+ softreset = 1;
/* Kick controller into sane state */
ahci_stop(dev);
ahci_clo(dev);
ahci_start(dev, 0);
clp->cmd_flags |= AHCI_CMD_RESET | AHCI_CMD_CLR_BUSY;
} else {
+ softreset = 2;
/* Prepare FIS receive area for check. */
for (i = 0; i < 20; i++)
fis[i] = 0xff;
}
- }
+ } else
+ softreset = 0;
clp->bytecount = 0;
clp->cmd_table_phys = htole64(ch->dma.work_bus + AHCI_CT_OFFSET +
(AHCI_CT_SIZE * slot->slot));
@@ -1754,8 +1837,7 @@ ahci_execute_transaction(struct ahci_slo
ATA_OUTL(ch->r_mem, AHCI_P_CI, (1 << slot->slot));
/* Device reset commands doesn't interrupt. Poll them. */
if (ccb->ccb_h.func_code == XPT_ATA_IO &&
- (ccb->ataio.cmd.command == ATA_DEVICE_RESET ||
- (ccb->ataio.cmd.flags & CAM_ATAIO_CONTROL))) {
+ (ccb->ataio.cmd.command == ATA_DEVICE_RESET || softreset)) {
int count, timeout = ccb->ccb_h.timeout * 100;
enum ahci_err_type et = AHCI_ERR_NONE;
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-projects
mailing list