summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* - Remove the eintrcnt/eintrnames usage and introduce the concept ofattilio2011-07-182-5/+8
| | | | | | | | | | | | | | | | sintrcnt/sintrnames which are symbols containing the size of the 2 tables. - For amd64/i386 remove the storage of intr* stuff from assembly files. This area can be widely improved by applying the same to other architectures and likely finding an unified approach among them and move the whole code to be MI. More work in this area is expected to happen fairly soon. No MFC is previewed for this patch. Tested by: pluknet Reviewed by: jhb Approved by: re (kib)
* Remove NULL assignments which are redundant for static timecounters.marius2011-07-121-4/+0
| | | | Submitted by: jkim
* - Remove redundant timecounter masking from counter_get_timecount().marius2011-07-121-4/+2
| | | | | | | - Zero the timecounter when allocation so we don't need to initialize unused members and remove a now redundant NULL assignment. Submitted by: jkim
* - Current testing shows that (ab)using the JBC performance counter in busmarius2011-07-121-13/+10
| | | | | | | | cycle mode as timecounter just works fine. My best guess is that a firmware update has fixed this, check at run-time whether it advances and use a positive quality if it does. The latter will cause this timecounter to be used instead of the tick counter based one, which just sucks for SMP. - Remove a redundant NULL assignment from the timecounter initialization.
* - Add a missing shift in schizo_get_timecount(). This happened to be non-fatalmarius2011-07-121-3/+3
| | | | | | | as STX_CTRL_PERF_CNT_CNT0_SHIFT actually is zero, if we were using the second counter in the upper 32 bits this would be required though as the MI timecounter code doesn't support 64-bit counters/counter registers. - Remove a redundant NULL assignment from the timecounter initialization.
* Remove the IDR_CHEETAH_MAX_BN_PAIRS limit from cheetah_ipi_selected().marius2011-07-051-2/+2
| | | | | | This is just a simple approach. For reasons unknown OpenSolaris uses a more sophisticated one involving IPIing the remaining CPUs in reverse order after the first batch of 32.
* It can be useful to know which page still has mappings.marius2011-07-051-1/+1
|
* - pmap_cache_remove() and pmap_protect_tte() are only used within pmap.cmarius2011-07-052-6/+6
| | | | | so static'ize them. - Correct a typo.
* In pmap_remove_all() assert that the page is neither fictitious normarius2011-07-051-0/+2
| | | | | | unmanaged as also done on other architectures. Reviewed by: alc
* Call pmap_qremove() before freeing or unwiring the pages, otherwisemarius2011-07-051-1/+1
| | | | | | | | there's a window during which a page can be re-used before its previous mapping is removed. Reviewed by: alc MFC after: 1 week
* With retirement of cpumask_t and usage of cpuset_t for representing aattilio2011-07-041-8/+0
| | | | | | | | | | | | | | | mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient. Remove them and replace their usage with custom pc_cpuid magic (as, atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))). This change is not targeted for MFC because of struct pcpu members removal and dependency by cpumask_t retirement. MD review by: marcel, marius, alc Tested by: pluknet MD testing by: marcel, marius, gonzo, andreast
* UltraSPARC-IV CPUs seem to be affected by a not publicly documentedmarius2011-07-022-1/+26
| | | | | | | | | erratum causing them to trigger stray vector interrupts accompanied by a state in which they even fault on locked TLB entries. Just retrying the instruction in that case gets the CPU back on track though. OpenSolaris also just ignores a certain number of stray vector interrupts. While at it, implement the stray vector interrupt handling for SPARC64-VI which use these for indicating uncorrectable errors in interrupt packets.
* Don't waste a delay slot.marius2011-07-021-2/+2
|
* - For Cheetah- and Zeus-class CPUs don't flush all unlocked entries frommarius2011-07-0210-68/+249
| | | | | | | | | | | | | | | | | | | the TLBs in order to get rid of the user mappings but instead traverse them an flush only the latter like we also do for the Spitfire-class. Also flushing the unlocked kernel entries can cause instant faults which when called from within cpu_switch() are handled with the scheduler lock held which in turn can cause timeouts on the acquisition of the lock by other CPUs. This was easily seen with a 16-core V890 but occasionally also happened with 2-way machines. While at it, move the SPARC64-V support code entirely to zeus.c. This causes a little bit of duplication but is less confusing than partially using Cheetah-class bits for these. - For SPARC64-V ensure that 4-Mbyte page entries are stored in the 1024- entry, 2-way set associative TLB. - In {d,i}tlb_get_data_sun4u() turn off the interrupts in order to ensure that ASI_{D,I}TLB_DATA_ACCESS_REG actually are read twice back-to-back. Tested by: Peter Jeremy (16-core US-IV), Michael Moll (2-way SPARC64-V)
* Using .comm to declare intrnames and eintrnames causes binutils 2.17.50 tomarius2011-07-021-5/+12
| | | | merge the two.
* Add some checks to ensure that Capsicum is behaving correctly, and add somejonathan2011-06-301-0/+21
| | | | | | | more explicit comments about what's going on and what future maintainers need to do when e.g. adding a new operation to a sys_machdep.c. Approved by: mentor(rwatson), re(bz)
* Fix whitespacemarius2011-06-211-5/+5
|
* On machines where we don't need to lock the kernel TSB into the dTLB andmarius2011-06-212-2/+2
| | | | | thus may basically use the entire 64-bit kernel address space reduce VM_KMEM_SIZE_SCALE to 1 allowing kernel to use more memory.
* On machines where we don't need to lock the kernel TSB into the dTLB andmarius2011-06-211-3/+6
| | | | | thus may basically use the entire 64-bit kernel address space increase the kernel virtual memory to not be limited by VM_KMEM_SIZE_MAX.
* As astopgap minimize the sched_lock coverage in pmap_activate() in ordermarius2011-06-201-4/+4
| | | | to reduce lock contention.
* - Remove MD usage of pc_cpumask and pc_other_cpus. [1]marius2011-06-203-16/+15
| | | | | | - Remove CTASSERTs which no longer need to hold since r222813. Submitted by: attilio [1]
OpenPOWER on IntegriCloud