summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-072-2/+2
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-071-1/+1
| | | | This means that their use is restricted to a single C file.
* Add a PCI front-end to esp(4) allowing it to support AMD Am53C974 andmarius2011-11-011-1/+1
| | | | | | | | | | | | | replace amd(4) with the former in the amd64, i386 and pc98 GENERIC kernel configuration files. Besides duplicating functionality, amd(4), which previously also supported the AMD Am53C974, unlike esp(4) is no longer maintained and has accumulated enough bit rot over time to always cause a panic during boot as long as at least one target is attached to it (see PR 124667). PR: 124667 Obtained from: NetBSD (based on) MFC after: 3 days
* Actually, limit to 32-bit DMA for the transfer buffers as the address ismarius2011-10-301-2/+2
| | | | written into a 32-bit register.
* Correct the DMA constraints, the LSI64854 isn't limited to 32-bit DMA.marius2011-10-301-3/+3
|
* - Use device_t rather than the NetBSDish struct device.marius2011-10-302-104/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Move esp_devclass to ncr53c9x.c in order to allow different bus front-ends to use it. - Use KOBJMETHOD_END. - Remove the gl_clear_latched_intr hook as it's not needed for any of the chips nor the front-ends supported in FreeBSD and likely never will be. - Correct the DMA constraints used in the SBus front-end, the LSI64854 isn't limited to 32-bit DMA. - The ESP200 also only supports up to 64k transfers. - Don't let the DMA and SBus front-end supply a maximum transfer size larger than MAXPHYS as that's the maximum the upper layers use and we otherwise just waste resources unnecessarily. - Initialize the ECB callout and don't zero the handle when returning ECBs to the free list so that ncr53c9x_callout() actually is called with the driver lock held. - On detach the driver lock should be held across cam_sim_free() according to isp(4) and a panic received. - Check the return value of NCRDMA_SETUP(), i.e. bus_dmamap_load(9), and try to handle failures gracefully. - In ncr53c9x_action() replace N calls to xpt_done() in a switch with just one at the end. - On XPT_PATH_INQ report "NCR" rather than "Sun" as the vendor as the former is somewhat more correct as well as the maximum supported transfer size via maxio in order to take advantage of controllers that that can handle more than DFLTPHYS. - Print the number of MESSAGE (EXTENDED) rejected. - Fix the path encoded in the multiple inclusion protection of ncr53c9xvar.h. - Correct the DMA constraints used in the LSI64854 core to not exceed the maximum supported transfer size and include the boundary so we don't need to check on every setup of a DMA transfer. - Let the bus DMA map callbacks do nothing in case of an error. - Correctly handle > 64k transfers for FAS366 in the LSI64854. A new feature flag NCR_F_LARGEXFER was introduced so we just need to check for this one and not for individual controllers supporting large transfers in several places. - Let the LSI64854 core load transfer buffers using BUS_DMA_NOWAIT as the NCR53C9x core can't handle EINPROGRESS. Due to lack of bounce buffers support, sparc64 doesn't actually use EINPROGRESS and likely never will, as an example for writing additional front-ends for the NCR53C9x core it makes sense to set BUS_DMA_NOWAIT anyway though. - Some minor cleanup.
* Adjust the debugger options slightly. This should help me do the rightkensmith2011-10-271-1/+4
| | | | | | | | thing when changing the debugging options as part of head becoming a new stable branch. It may also help people who for one reason or another want to run head but don't want it slowed down by the debugging support. Reviewed by: kib
* People porting FreeBSD to new architectures ought not have todas2011-10-211-0/+11
| | | | | | | | | | | | | implement a deprecated FPU control interface in addition to the standard one. To make this clearer, further deprecate ieeefp.h by not declaring the function prototypes except on architectures that implement them already. Currently i386 and amd64 implement the ieeefp.h interface for compatibility, and for fp[gs]etprec(), which doesn't exist on most other hardware. Powerpc, sparc64, and ia64 partially implement it and probably shouldn't, and other architectures don't implement it at all.
* Add a warning about why sbp(4) is commented out so that curious folkskensmith2011-10-191-0/+1
| | | | | | | are forewarned they might wind up with a hole in their foot if they decide to give it a try. Suggested by: dougb
* Comment out the sbp(4) driver for architectures that support it.kensmith2011-10-181-1/+1
| | | | | | | | | | | As part of the 8.0-RELEASE cycle this was done in stable/8 (r199112) but was left alone in head so people could work on fixing an issue that caused boot failure on some motherboards. Apparently nobody has worked on it and we are getting reports of boot failure with the 9.0 test builds. So this time I'll comment out the driver in head (still hoping someone will work on it) and MFC to stable/9. Submitted by: Alberto Villa <avilla at FreeBSD dot org>
* Trace attempts to call restricted MD syscalls.des2011-10-181-0/+4
|
* Merge from NetBSD:marius2011-10-152-16/+20
| | | | | | | - Remove clause 3 and 4 from TNF licenses. - Fix memset usage. - Various cleanup. - Kill caddr_t.
* Remove unused define.kib2011-10-071-1/+0
| | | | MFC after: 1 month
* - Use atomic operations rather than sched_lock for safely assigning pm_activemarius2011-10-063-27/+129
| | | | | | | | and pc_pmap for SMP. This is key to allowing adding support for SCHED_ULE. Thanks go to Peter Jeremy for additional testing. - Add support for SCHED_ULE to cpu_switch(). Committed from: 201110DevSummit
* Actually enable NEW_PCIB by default, missed in r225931.marius2011-10-021-1/+1
|
* Make sparc64 compatible with NEW_PCIB and enable it:marius2011-10-0220-499/+630
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Implement bus_adjust_resource() methods as far as necessary and in non-PCI bridge drivers as far as feasible without rototilling them. - As NEW_PCIB does a layering violation by activating resources at layers above pci(4) without previously bubbling up their allocation there, move the assignment of bus tags and handles from the bus_alloc_resource() to the bus_activate_resource() methods like at least the other NEW_PCIB enabled architectures do. This is somewhat unfortunate as previously sparc64 (ab)used resource activation to indicate whether SYS_RES_MEMORY resources should be mapped into KVA, which is only necessary if their going to be accessed via the pointer returned from rman_get_virtual() but not for bus_space(9) as the later always uses physical access on sparc64. Besides wasting KVA if we always map in SYS_RES_MEMORY resources, a driver also may deliberately not map them in if the firmware already has done so, possibly in a special way. So in order to still allow a driver to decide whether a SYS_RES_MEMORY resource should be mapped into KVA we let it indicate that by calling bus_space_map(9) with BUS_SPACE_MAP_LINEAR as actually documented in the bus_space(9) page. This is implemented by allocating a separate bus tag per SYS_RES_MEMORY resource and passing the resource via the previously unused bus tag cookie so we later on can call rman_set_virtual() in sparc64_bus_mem_map(). As a side effect this now also allows to actually indicate that a SYS_RES_MEMORY resource should be mapped in as cacheable and/or read-only via BUS_SPACE_MAP_CACHEABLE and BUS_SPACE_MAP_READONLY respectively. - Do some minor cleanup like taking advantage of rman_init_from_resource(), factor out the common part of bus tag allocation into a newly added sparc64_alloc_bus_tag(), hook up some missing newbus methods and replace some homegrown versions with the generic counterparts etc. - While at it, let apb_attach() (which can't use the generic NEW_PCIB code as APB bridges just don't have the base and limit registers implemented) regarding the config space registers cached in pcib_softc and the SYSCTL reporting nodes set up.
* Remove obsolete macros.marius2011-10-011-6/+0
|
* Nuke SUN4U #ifdef's which with the demise of sun4v no longer serve anymarius2011-10-011-15/+1
| | | | purpose.
* Also allocate space for the PIL counters. Given that no machine actuallymarius2011-10-011-4/+4
| | | | uses IV_MAX interrupt vectors this wasn't a problem in practice though.
* Re-reading the Schizo errata suggests that it's actually tolerable tomarius2011-10-011-3/+3
| | | | | | also use the streaming buffer of pre version 5/revision 2.3 hardware as long as we stay away from context flushes (which iommu(4) so far doesn't take advantage of). OpenSolaris does the same.
* - Add protective parentheses to macros as far as possible.marius2011-10-011-41/+41
| | | | | - Move {r,w,}mb() to the top of this file where they live on most of the other architectures.
* In total store which we use for running the kernel and all of the userlandmarius2011-10-011-8/+9
| | | | | | | | | | | atomic operations behave as if the were followed by a memory barrier so there's no need to include ones in the acquire variants of atomic(9). Removing these results a small performance improvement, specifically this is sufficient to compensate the performance loss seen in the worldstone benchmark seen when using SCHED_ULE instead of SCHED_4BSD. This change is inspired by Linux even more radically doing the equivalent thing some time ago. Thanks go to Peter Jeremy for additional testing.
* Add a comment about why contrary to what once would think running all ofmarius2011-09-301-0/+4
| | | | userland with total store order actually is appropriate.
* Use the extended integer condition code when comparing 64-bit values. Givenmarius2011-09-301-1/+1
| | | | that ATOMIC_INC_LONG currently is unused this happened to not be fatal.
* - Right-justify backslashes as suggested by style(9).marius2011-09-301-55/+55
| | | | | - Rename ATOMIC_INC_ULONG to ATOMIC_INC_LONG in order to be consistent with the names of the other macros in this file an adjust accordingly.
* Remove locking of the vm page queues from several pmaps, which onlykib2011-09-281-2/+1
| | | | | | | | | protected the dirty mask updates. The dirty mask updates are handled by atomics after the r225840. Submitted by: alc Tested by: flo (sparc64) MFC after: 2 weeks
* It is safe to initialize locks even on early boot (and it is the sameattilio2011-09-192-8/+1
| | | | | | | | | | | thing all the other architectures already do) thus just initialize kernel_pmap in pmap_bootstrap(). Reported by: alc Reviewed by: alc, marius Tested by: flo, marius Approved by: re (kib) MFC after: 1 week
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-161-1/+1
| | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
* Fix a zyd(4) comment typo that was copy+pasted into most kernel config files.brueffer2011-09-111-1/+1
| | | | | | | PR: 160276 Submitted by: MATSUMIYA Ryo <matsumiya@mma.club.uec.ac.jp> Approved by: re (kib) MFC after: 1 week
* Inline the syscallenter() and syscallret(). This reduces the time measuredkib2011-09-111-0/+2
| | | | | | | | by the syscall entry speed microbenchmarks by ~10% on amd64. Submitted by: jhb Approved by: re (bz) MFC after: 2 weeks
* Split the vm_page flags PG_WRITEABLE and PG_REFERENCED into atomickib2011-09-061-16/+16
| | | | | | | | | | | | | | | | | flags field. Updates to the atomic flags are performed using the atomic ops on the containing word, do not require any vm lock to be held, and are non-blocking. The vm_page_aflag_set(9) and vm_page_aflag_clear(9) functions are provided to modify afalgs. Document the changes to flags field to only require the page lock. Introduce vm_page_reference(9) function to provide a stable KPI and KBI for filesystems like tmpfs and zfs which need to mark a page as referenced. Reviewed by: alc, attilio Tested by: marius, flo (sparc64); andreast (powerpc, powerpc64) Approved by: re (bz)
* Since r221218 rman_manage_region(9) actually honors rm_start and rm_endmarius2011-08-281-2/+2
| | | | | | | | which may cause problems when these contain garbage so zero the range descriptors embedding the rmans when allocating them. Approved by: re (kib) MFC after: 3 days
* - Move the PG_UNMANAGED flag from m->flags to m->oflags, renaming the flagkib2011-08-092-22/+19
| | | | | | | | | | | | | | to VPO_UNMANAGED (and also making the flag protected by the vm object lock, instead of vm page queue lock). - Mark the fake pages with both PG_FICTITIOUS (as it is now) and VPO_UNMANAGED. As a consequence, pmap code now can use use just VPO_UNMANAGED to decide whether the page is unmanaged. Reviewed by: alc Tested by: pho (x86, previous version), marius (sparc64), marcel (arm, ia64, powerpc), ray (mips) Sponsored by: The FreeBSD Foundation Approved by: re (bz)
* Change all the sample kernel configurations to usermacklem2011-08-071-1/+1
| | | | | | | | | | NFSCL, NFSD instead of NFSCLIENT, NFSSERVER since NFSCL and NFSD are now the defaults. The client change is needed for diskless configurations, so that the root mount works for fstype nfs. Reported by seanbru at yahoo-inc.com for i386/XEN. Approved by: re (hrs)
* - Merge from r147740:marius2011-08-061-3/+6
| | | | | | | | | | When the last, possibly partially filled buffer is flushed, we didn't reset fragsz to 0 and as such would stop reflecting reality. - Use __FBSDID. - Wrap a too long line. Approved by: re (kib) MFC after: 1 week
* Remove a shortcut which is invalid with MAXCPU > IDR_CHEETAH_MAX_BN_PAIRS.marius2011-08-061-8/+0
| | | | Approved by: re (kib)
* Merge from r224217:marius2011-07-201-1/+1
| | | | | | Bump MAXCPU to 64. Approved by: re (kib)
* On 64 bit architectures size_t is 8 bytes, thus it should use an 8 bytesattilio2011-07-191-2/+2
| | | | | | | | | | storage. Fix the sintrcnt/sintrnames specification. No MFC is previewed for this patch. Reported, reviewed and tested by: marcel Approved by: re (kib)
* Add the possibility to specify from kernel configs MAXCPU value.attilio2011-07-191-0/+2
| | | | | | | | | | This patch is going to help in cases like mips flavours where you want a more granular support on MAXCPU. No MFC is previewed for this patch. Tested by: pluknet Approved by: re (kib)
OpenPOWER on IntegriCloud