summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* Switch back to the 4BSD scheduler for now. There is some more or lessmarius2012-06-301-1/+1
| | | | | | | | recent regression with ULE, causing processes to get stuck in getblk as well as interrupt handler execution delays to rise above the command timeout of mpt(4). MFC after: 3 days
* Now that the mps(4) driver is endian-safe, add it to the powerpc andken2012-06-281-0/+1
| | | | | | sparc64 GENERIC config files. MFC after: 3 days
* Add new pmap layer locks to the predefined lock order. Change the namesalc2012-06-271-2/+3
| | | | of a few existing VM locks to follow a consistent naming scheme.
* Make the wchar_t type machine dependent.andrew2012-06-242-6/+4
| | | | | | | | | | | | | | This is required for ARM EABI. Section 7.1.1 of the Procedure Call for the ARM Architecture (AAPCS) defines wchar_t as either an unsigned int or an unsigned short with the former preferred. Because of this requirement we need to move the definition of __wchar_t to a machine dependent header. It also cleans up the macros defining the limits of wchar_t by defining __WCHAR_MIN and __WCHAR_MAX in the same machine dependent header then using them to define WCHAR_MIN and WCHAR_MAX respectively. Discussed with: bde
* Implement mechanism to export some kernel timekeeping data tokib2012-06-221-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usermode, using shared page. The structures and functions have vdso prefix, to indicate the intended location of the code in some future. The versioned per-algorithm data is exported in the format of struct vdso_timehands, which mostly repeats the content of in-kernel struct timehands. Usermode reading of the structure can be lockless. Compatibility export for 32bit processes on 64bit host is also provided. Kernel also provides usermode with indication about currently used timecounter, so that libc can fall back to syscall if configured timecounter is unknown to usermode code. The shared data updates are initiated both from the tc_windup(), where a fast task is queued to do the update, and from sysctl handlers which change timecounter. A manual override switch kern.timecounter.fast_gettime allows to turn off the mechanism. Only x86 architectures export the real algorithm data, and there, only for tsc timecounter. HPET counters page could be exported as well, but I prefer to not further glue the kernel and libc ABI there until proper vdso-based solution is developed. Minimal stubs neccessary for non-x86 architectures to still compile are provided. Discussed with: bde Reviewed by: jhb Tested by: flo MFC after: 1 month
* Reserve AT_TIMEKEEP auxv entry for providing usermode the pointer tokib2012-06-221-0/+1
| | | | | | timekeeping information. MFC after: 1 week
* The page flag PGA_WRITEABLE is set and cleared exclusively by the pmapalc2012-06-161-0/+1
| | | | | | | | | | | | | | | | layer, but it is read directly by the MI VM layer. This change introduces pmap_page_is_write_mapped() in order to completely encapsulate all direct access to PGA_WRITEABLE in the pmap layer. Aesthetics aside, I am making this change because amd64 will likely begin using an alternative method to track write mappings, and having pmap_page_is_write_mapped() in place allows me to make such a change without further modification to the MI VM layer. As an added bonus, tidy up some nearby comments concerning page flags. Reviewed by: kib MFC after: 6 weeks
* Replace all uses of the vm page queues lock by a r/w lock that is privatealc2012-05-293-47/+55
| | | | | | | | | | | | | to this pmap.c. This new r/w lock is used primarily to synchronize access to the TTE lists. However, it will be used in a somewhat unconventional way. As finer-grained TTE list locking is added to each of the pmap functions that acquire this r/w lock, its acquisition will be changed from write to read, enabling concurrent execution of the pmap functions with finer-grained locking. Reviewed by: attilio Tested by: flo MFC after: 10 days
* Merge from x86: r232521marius2012-05-251-28/+0
| | | | Exclude USB drivers (except umass and ukbd) from main kernel image.
* MFp4 bz_ipv6_fast:bz2012-05-241-0/+4
| | | | | | | | | | | | | | | | | | | | in_cksum.h required ip.h to be included for struct ip. To be able to use some general checksum functions like in_addword() in a non-IPv4 context, limit the (also exported to user space) IPv4 specific functions to the times, when the ip.h header is present and IPVERSION is defined (to 4). We should consider more general checksum (updating) functions to also allow easier incremental checksum updates in the L3/4 stack and firewalls, as well as ponder further requirements by certain NIC drivers needing slightly different pseudo values in offloading cases. Thinking in terms of a better "library". Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems Reviewed by: gnn (as part of the whole) MFC After: 3 days
* MFprojects/zfsd:mav2012-05-241-1/+1
| | | | Generalize and unify ses device description.
* Fix mismerge in r235231.marius2012-05-101-1/+1
|
* Merge r234989 from x86:marius2012-05-102-9/+2
| | | | Revert part of r234723 by re-enabling the SMP protection for intr_bind().
* Add a convenience macro for the returns_twice attribute, and apply it todim2012-04-291-1/+1
| | | | | | | the prototypes of the appropriate functions (getcontext, savectx, setjmp, sigsetjmp and vfork). MFC after: 2 weeks
* Clean up the intr* MD KPI from the SMP dependency, removing a cause ofattilio2012-04-263-4/+16
| | | | | | | | | | | discrepancy between modules and kernel, but deal with SMP differences within the functions themselves. As an added bonus this also helps in terms of code readability. Requested by: gibbs Reviewed by: jhb, marius MFC after: 1 week
* Turn on PREEMPTION by default. After fixing several bugs over time, themarius2012-04-161-1/+1
| | | | | | | | | | | last show-stopper keeping PREEMPTION from being usable on sparc64 should have been dealt with in r230662. At least on 2-way systems, PREEMPTION causes a little bit of a degradation in worldstone performance. However, FreeBSD seems to have started building up regressions in !PREEMPTION cases so sparc64 better should not be an oddball in this regard. MFC after: 1 week
* Merge from x86:marius2012-04-132-3/+7
| | | | | | | | | | | | | | | | | | | | | | | r233961: Fix interrupt load balancing regression, introduced in revision 222813, that left all un-pinned interrupts assigned to CPU 0. In intr_shuffle_irqs(), remove CPU_SETOF() call that initialized the "intr_cpus" cpuset to only contain CPU0. This initialization is too late and nullifies the results of calls to the intr_add_cpu() that occur much earlier in the boot process. r234074 (partial): The BSP is not added to the mask of valid target CPUs for interrupts. Fix this by adding the BSP as an interrupt target directly in r234105: Fix !SMP build after r234074. MFC after: 3 days
* Remove checks that are redundant due to tf_type being unsigned.marius2012-03-311-2/+2
| | | | MFC after: 3 days
* Fix panic on kernel traps having a mapping in trap_sig b0rked in r206086.marius2012-03-311-5/+6
| | | | | | Repored by: David E. Cross MFC after: 3 days
* - Remove erroneous trailing semicolon. [1]marius2012-03-302-2/+10
| | | | | | | | - Correctly determine the maximum payload size for setting the TX link frequent NACK latency and replay timer thresholds. Submitted by: stefanf [1] MFC after: 3 days
* Given that this is a host-PCI-Express bridge driver, create the parentmarius2012-03-241-1/+1
| | | | | | | | DMA tag with a 4 GB boundary as required by PCI-Express. With r232403 in place this actually is redundant. However, the host-PCI-Express bridge driver is the more appropriate place for implementing this restriction. MFC after: 3 days
* Remove pty(4) from our kernel configurations.ed2012-03-211-1/+0
| | | | | | | | | | | As of FreeBSD 8, this driver should not be used. Applications that use posix_openpt(2) and openpty(3) use the pts(4) that is built into the kernel unconditionally. If it turns out high profile depend on the pty(4) module anyway, I'd rather get those fixed. So please report any issues to me. The pty(4) module is still available as a kernel module of course, so a simple `kldload pty' can be used to run old-style pseudo-terminals.
* Make ofw_bus_get_node() consistently return -1 when there is no associatednwhitehorn2012-03-151-1/+1
| | | | | | | OF node, instead of a random mixture of 0 and -1. Update all checks for 0 to check for -1 instead. MFC after: 4 weeks
* Add casts to __uint16_t to the __bswap16() macros on all arches whichdim2012-03-091-2/+2
| | | | | | | | | | | didn't already have them. This is because the ternary expression will return int, due to the Usual Arithmetic Conversions. Such casts are not needed for the 32 and 64 bit variants. While here, add additional parentheses around the x86 variant, to protect against unintended consequences. MFC after: 2 weeks
* Disable the option VFS_ALLOW_NONMPSAFE by default on all the supportedattilio2012-03-061-3/+0
| | | | | | | | | | | | platforms. This will make every attempt to mount a non-mpsafe filesystem to the kernel forbidden, unless it is expressely compiled with VFS_ALLOW_NONMPSAFE option. This patch is part of the effort of killing non-MPSAFE filesystems from the tree. No MFC is expected for this patch.
* - Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge.jhb2012-03-021-5/+6
| | | | | | | | | | | | | | | The tag enforces a single restriction that all DMA transactions must not cross a 4GB boundary. Note that while this restriction technically only applies to PCI-express, this change applies it to all PCI devices as it is simpler to implement that way and errs on the side of caution. - Add a softc structure for PCI bus devices to hold the bus_dma tag and a new pci_attach_common() routine that performs actions common to the attach phase of all PCI bus drivers. Right now this only consists of a bootverbose printf and the allocate of a bus_dma tag if necessary. - Adjust all PCI bus drivers to allocate a PCI bus softc and to call pci_attach_common() from their attach routines. MFC after: 2 weeks
* - Change contigmalloc() to use the vm_paddr_t type instead of an unsignedjhb2012-03-012-2/+2
| | | | | | | | | | | | | | | long for specifying a boundary constraint. - Change bus_dma tags to use bus_addr_t instead of bus_size_t for boundary constraints. These allow boundary constraints to be fully expressed for cases where sizeof(bus_addr_t) != sizeof(bus_size_t). Specifically, it allows a driver to properly specify a 4GB boundary in a PAE kernel. Note that this cannot be safely MFC'd without a lot of compat shims due to KBI changes, so I do not intend to merge it. Reviewed by: scottl
* As it turns out r227960 may still be insufficient with PREEMPTIONmarius2012-01-282-16/+42
| | | | | | | | | | | | | | | | | | so try harder to get the CDMA sync interrupt delivered and also in a more efficient way: - wrap the whole process of sending and receiving the CDMA sync interrupt in a critical section so we don't get preempted, - send the CDMA sync interrupt to the CPU that is actually waiting for it to happen so we don't take a detour via another CPU, - instead of waiting for up to 15 seconds for the interrupt to trigger try the whole process for up to 15 times using a one second timeout (the code was also changed to just ignore belated interrupts of a previous tries should they appear). According to testing done by Peter Jeremy with the debugging also added as part of this commit the first two changes apparently are sufficient to now properly get the CDMA sync interrupts delivered at the first try though.
* Fully disable interrupts while we fiddle with the FP context in themarius2012-01-281-9/+9
| | | | | | VIS-based block copy/zero implementations. While with 4BSD it's sufficient to just disable the tick interrupts, with ULE+PREEMPTION it's otherwise also possible that these are preempted via IPIs.
* Commit file missed in r230633.marius2012-01-271-18/+19
|
* Now that we have a working OF_printf() since r230631 and a OF_panic()marius2012-01-274-90/+25
| | | | | | | | | | | | | | | | helper since r230632, use these for output and panicing during the early cycles and move cninit() until after the static per-CPU data has been set up. This solves a couple of issue regarding the non- availability of the static per-CPU data: - panic() not working and only making things worse when called, - having to supply a special DELAY() implementation to the low-level console drivers, - curthread accesses of mutex(9) usage in low-level console drivers that aren't conditional due to compiler optimizations (basically, this is the problem described in r227537 but in this case for keyboards attached via uart(4)). [1] PR: 164123 [1]
* - Now that we have a working OF_printf() since r230631, use it formarius2012-01-272-2/+17
| | | | | | implementing a simple OF_panic() that may be used during the early cycles when panic() isn't available, yet. - Mark cpu_{exit,shutdown}() as __dead2 as appropriate.
* For machines where the kernel address space is unrestricted increasemarius2012-01-271-1/+1
| | | | | | | | | | VM_KMEM_SIZE_SCALE to 2, awaiting more insight from alc@. As it turns out, the VM apparently has problems with machines that have large holes in the physical address space, causing the kmem_suballoc() call in kmeminit() to fail with a VM_KMEM_SIZE_SCALE of 1. Using a value of 2 allows these, namely Blade 1500 with 2GB of RAM, to boot. PR: 164227
* Mark cpu_{halt,reset}() as __dead2 as appropriate.marius2012-01-271-2/+2
|
* Add C11 macros describing subnormal numbers to float.h.das2012-01-231-0/+15
| | | | Reviewed by: bde
* Add the CAM Target Layer (CTL).ken2012-01-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CTL is a disk and processor device emulation subsystem originally written for Copan Systems under Linux starting in 2003. It has been shipping in Copan (now SGI) products since 2005. It was ported to FreeBSD in 2008, and thanks to an agreement between SGI (who acquired Copan's assets in 2010) and Spectra Logic in 2010, CTL is available under a BSD-style license. The intent behind the agreement was that Spectra would work to get CTL into the FreeBSD tree. Some CTL features: - Disk and processor device emulation. - Tagged queueing - SCSI task attribute support (ordered, head of queue, simple tags) - SCSI implicit command ordering support. (e.g. if a read follows a mode select, the read will be blocked until the mode select completes.) - Full task management support (abort, LUN reset, target reset, etc.) - Support for multiple ports - Support for multiple simultaneous initiators - Support for multiple simultaneous backing stores - Persistent reservation support - Mode sense/select support - Error injection support - High Availability support (1) - All I/O handled in-kernel, no userland context switch overhead. (1) HA Support is just an API stub, and needs much more to be fully functional. ctl.c: The core of CTL. Command handlers and processing, character driver, and HA support are here. ctl.h: Basic function declarations and data structures. ctl_backend.c, ctl_backend.h: The basic CTL backend API. ctl_backend_block.c, ctl_backend_block.h: The block and file backend. This allows for using a disk or a file as the backing store for a LUN. Multiple threads are started to do I/O to the backing device, primarily because the VFS API requires that to get any concurrency. ctl_backend_ramdisk.c: A "fake" ramdisk backend. It only allocates a small amount of memory to act as a source and sink for reads and writes from an initiator. Therefore it cannot be used for any real data, but it can be used to test for throughput. It can also be used to test initiators' support for extremely large LUNs. ctl_cmd_table.c: This is a table with all 256 possible SCSI opcodes, and command handler functions defined for supported opcodes. ctl_debug.h: Debugging support. ctl_error.c, ctl_error.h: CTL-specific wrappers around the CAM sense building functions. ctl_frontend.c, ctl_frontend.h: These files define the basic CTL frontend port API. ctl_frontend_cam_sim.c: This is a CTL frontend port that is also a CAM SIM. This frontend allows for using CTL without any target-capable hardware. So any LUNs you create in CTL are visible in CAM via this port. ctl_frontend_internal.c, ctl_frontend_internal.h: This is a frontend port written for Copan to do some system-specific tasks that required sending commands into CTL from inside the kernel. This isn't entirely relevant to FreeBSD in general, but can perhaps be repurposed. ctl_ha.h: This is a stubbed-out High Availability API. Much more is needed for full HA support. See the comments in the header and the description of what is needed in the README.ctl.txt file for more details. ctl_io.h: This defines most of the core CTL I/O structures. union ctl_io is conceptually very similar to CAM's union ccb. ctl_ioctl.h: This defines all ioctls available through the CTL character device, and the data structures needed for those ioctls. ctl_mem_pool.c, ctl_mem_pool.h: Generic memory pool implementation used by the internal frontend. ctl_private.h: Private data structres (e.g. CTL softc) and function prototypes. This also includes the SCSI vendor and product names used by CTL. ctl_scsi_all.c, ctl_scsi_all.h: CTL wrappers around CAM sense printing functions. ctl_ser_table.c: Command serialization table. This defines what happens when one type of command is followed by another type of command. ctl_util.c, ctl_util.h: CTL utility functions, primarily designed to be used from userland. See ctladm for the primary consumer of these functions. These include CDB building functions. scsi_ctl.c: CAM target peripheral driver and CTL frontend port. This is the path into CTL for commands from target-capable hardware/SIMs. README.ctl.txt: CTL code features, roadmap, to-do list. usr.sbin/Makefile: Add ctladm. ctladm/Makefile, ctladm/ctladm.8, ctladm/ctladm.c, ctladm/ctladm.h, ctladm/util.c: ctladm(8) is the CTL management utility. It fills a role similar to camcontrol(8). It allow configuring LUNs, issuing commands, injecting errors and various other control functions. usr.bin/Makefile: Add ctlstat. ctlstat/Makefile ctlstat/ctlstat.8, ctlstat/ctlstat.c: ctlstat(8) fills a role similar to iostat(8). It reports I/O statistics for CTL. sys/conf/files: Add CTL files. sys/conf/NOTES: Add device ctl. sys/cam/scsi_all.h: To conform to more recent specs, the inquiry CDB length field is now 2 bytes long. Add several mode page definitions for CTL. sys/cam/scsi_all.c: Handle the new 2 byte inquiry length. sys/dev/ciss/ciss.c, sys/dev/ata/atapi-cam.c, sys/cam/scsi/scsi_targ_bh.c, scsi_target/scsi_cmds.c, mlxcontrol/interface.c: Update for 2 byte inquiry length field. scsi_da.h: Add versions of the format and rigid disk pages that are in a more reasonable format for CTL. amd64/conf/GENERIC, i386/conf/GENERIC, ia64/conf/GENERIC, sparc64/conf/GENERIC: Add device ctl. i386/conf/PAE: The CTL frontend SIM at least does not compile cleanly on PAE. Sponsored by: Copan Systems, SGI and Spectra Logic MFC after: 1 month
* Add "options CAPABILITY_MODE" and "options CAPABILITIES" to GENERIC kernelrwatson2011-12-291-0/+2
| | | | | | | | | | configurations for various architectures in FreeBSD 10.x. This allows basic Capsicum functionality to be used in the default FreeBSD configuration on non-embedded architectures; process descriptors are not yet enabled by default. MFC after: 3 months Sponsored by: Google, Inc
* Eliminate vestiges of page coloring.alc2011-12-151-2/+1
|
* Replace __signed by signed.ed2011-12-131-1/+1
| | | | | The signed keyword is an integral part of the C syntax. There's no need to use __signed.
* Revert r225889 a bit. While it's correct that in total store order there'smarius2011-12-031-1/+4
| | | | | | no need to additionally add CPU memory barriers to the acquire variants of atomic(9), these are documented to also include compiler memory barriers. So add the latter, which were previously included by using membar(), back.
* Fix OF_finddevice error return value in case of FDT.jchandra2011-12-022-2/+2
| | | | | | | | | | | | | | | | | | | According to the open firmware standard, finddevice call has to return a phandle with value of -1 in case of error. This commit is to: - Fix the FDT implementation of this interface (ofw_fdt_finddevice) to return (phandle_t)-1 in case of error, instead of 0 as it does now. - Fix up the callers of OF_finddevice() to compare the return value with -1 instead of 0 to check for errors. - Since phandle_t is unsigned, the return value of OF_finddevice should be checked with '== -1' rather than '<= 0' or '> 0', fix up these cases as well. Reported by: nwhitehorn Reviewed by: raj Approved by: raj, nwhitehorn
* Update comment.marius2011-11-271-8/+7
|
* For sparc64 also adjust the geometry of da(4) driven disks to not overflowmarius2011-11-272-3/+78
| | | | | | | | | | | the 16-bit cylinders field of the VTOC8 disk label (at around 502GB). The geometry chosen for disks above that limit allows to use disks up to 2TB, which is the limit of the extended VTOC8 format. The geometry used for disks smaller than the 16-bit cylinders limit stays the same as used by cam_calc_geometry(9) for extended translation. Thanks to Hans-Joerg Sirtl for providing hardware for testing this change. MFC after: 3 days
* Move to SCHED_ULE by default. Since r226057 SCHED_ULE and sparc64 aremarius2011-11-251-1/+1
| | | | | | | | | compatible with each other and since r227539 the last issue seen when using SCHED_ULE is fixed. At least on UP and 2-way machines SCHED_4BSD still performs better than SCHED_ULE, however, the optimizations done in r225889 pretty much compensate that so there's at least no net regression. Thanks go to Peter Jeremy for extensive testing.
* Increase the CDMA sync timeout for Schizo bridges to 15 seconds as used bymarius2011-11-241-1/+1
| | | | | | | | OpenSolaris. One second turned out to be not enough for certain loads while 10 seconds were sufficient. Reported by: Peter Jeremy MFC after: 3 days
* s,KOBJMETHOD_END,DEVMETHOD_END,g in order to fully hide the explicit mentionmarius2011-11-2217-19/+19
| | | | of kobj(9) from device drivers.
* - There's no need to overwrite the default device method with the defaultmarius2011-11-224-11/+6
| | | | | | | | | | one. Interestingly, these are actually the default for quite some time (bus_generic_driver_added(9) since r52045 and bus_generic_print_child(9) since r52045) but even recently added device drivers do this unnecessarily. Discussed with: jhb, marcel - While at it, use DEVMETHOD_END. Discussed with: jhb - Also while at it, use __FBSDID.
* Fix make universe.pjd2011-11-161-1/+1
|
* Define curthread as an inline function that loads the thread pointermarius2011-11-151-0/+10
| | | | | | | | directly from g7, the pcpu pointer. This guarantees correct behavior when the thread migrates to a different CPU. Commit message stolen from r205431. Additional testing by Peter Jeremy. MFC after: 3 days
* Introduce the option VFS_ALLOW_NONMPSAFE and turn it on by default onattilio2011-11-081-0/+3
| | | | | | | | | | | | | | all the architectures. The option allows to mount non-MPSAFE filesystem. Without it, the kernel will refuse to mount a non-MPSAFE filesytem. This patch is part of the effort of killing non-MPSAFE filesystems from the tree. No MFC is expected for this patch. Tested by: gianni Reviewed by: kib
OpenPOWER on IntegriCloud