summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
AgeCommit message (Collapse)Author
2023-06-27remove double/tripple o in comments, where it likely was not added on purpose.andvar
2023-06-02follow the steps of Andrew Doran (ad) commit and fix more s/loose/lose/ typos.andvar
also s/beyound/beyond/ and few others along the way, mainly in comments.
2023-05-06few more typos in the word "register", mainly s/resister/register/.andvar
In one comment I assume that it was meant to be pull-up resistor.
2023-04-28Pass local symbols relocations in both passes and provide the kobj_relocskrll
implementation visibility of these relocations. Currently all implementations resolve local symbol relocations in the first pass and simply skip them in the second. The RISC-V implementation will make use of this visiblity.
2023-03-01sparc64: Optimization: Omit needless membar when triggering softint.riastradh
When we are triggering a softint, it can't already hold any mutexes. So any path to mutex_exit(mtx) must go via mutex_enter(mtx), which is always done with atomic r/m/w, and we need not issue any explicit barrier between ci->ci_curlwp = softlwp and a potential load of mtx->mtx_owner in mutex_exit. PR kern/57240 XXX pullup-8 XXX pullup-9 XXX pullup-10
2023-02-23sparc64: Add missing barriers in cpu_switchto.riastradh
Details in comments. PR kern/57240 XXX pullup-8 XXX pullup-9 XXX pullup-10
2023-02-20sparc64: Rename internal barrier macros to be clearer.riastradh
No functional change intended.
2023-02-20sparc64: Add missing LoadStore ordering for mutex_enter stub.riastradh
XXX pullup-8 XXX pullup-9 XXX pullup-10
2023-02-09Adjust _all_ cinclude of *.local filesabs
- Ensure always at end - Use tab rather than spaces - Add consistent comment "Pull in optional local configuration - always at end" The only functional change is that a local file which tried to override an existing setting (eg with "no foo") would have failed in some cases before, but now will work
2023-02-09Ensure GENERIC.local is always at the end of GENERICabs
Where a GENERIC config had an existing inclusion of GENERIC.local, ensure it is always at the end of the file, with a consistent comment: # Pull in optional local configuration cinclude "arch/landisk/conf/GENERIC.local" This allows GENERIC.local to correctly override all options (This pass does not affect any GENERIC which did not already have an include of GENERIC.local)
2023-02-07Avoid using (1<<64)-1 for VM_MAX{,USER}_ADDRESS as rounding that up tohgutch
the next page boundary gives 0 and instead make the VA space end one page earlier. Fixes PR sparc64/57219.
2023-01-24sparc64/db_trace.c: Don't dereference; use db_read_bytes.riastradh
Makes crash(8) and ddb match, and avoids crashing in ddb when you feed in a bad lwp pointer!
2023-01-24sparc64/db_trace.c: Nix trailing whitespace.riastradh
No functional change intended.
2022-10-26sparc64/zs(4): Convert to ttylock/ttyunlock.riastradh
2022-10-26sparc64/sab(4): Convert to ttylock/ttyunlock.riastradh
2022-10-26ddb/db_active.h: New home for extern db_active.riastradh
This can be included unconditionally, and db_active can then be queried unconditionally; if DDB is not in the kernel, then db_active is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
2022-10-01Don't try to make a tag based on node 0charlotte
2022-09-29swwdog(4): Add to GENERIC kernels.riastradh
Plus a handful of others that I'm familiar with. Lots of special- purpose kernels should probably have this too but I'm not going through all the arm, mips, and ppc evaluation board kernels to see which ones are relevant. Omitted from systems I know to be very small: - sun2/GENERIC - dreamcast/GENERIC Feel free to remove it from others that need to be kept smaller. Compile-tested a few of these just in case: - alpha/GENERIC - amd64/GENERIC - evbmips/OCTEON - i386/GENERIC - riscv/GENERIC PR kern/29702
2022-09-18Eliminate use of IFF_OACTIVE.thorpej
2022-08-07UFS/LFS dirhash:simonb
- Enable UFS_DIRHASH if the architecture or kernel model specific config file can use 128MB of RAM or more. - Remove experimental tag from UFS_DIRHASH; it's been with RUMP kernel and by a number of NetBSD developers for years. - Add LFS_DIRHASH if LFS was enabled. - Be somewhat consistent with FS options order.
2022-07-26s/functin/function/ in copy pasted comment.andvar
2022-07-05fix various typos in comments.andvar
2022-06-27fix various typos in comments.andvar
2022-05-28fix various typos in comments.andvar
2022-05-24fix various typos in comment, documentation and log messages.andvar
2022-05-22fix various small typos, mainly in comments.andvar
2022-05-20s/auxillary/auxiliary/ in comments.andvar
2022-05-16try to handle ultrasparc III* "fast ecc error" traps.mrg
i had a sunblade 2500 reset with this trap recently, and the manual says it should have been recoverable. in particular, the US IIIv2 manual says in section 12.4.4.2 that the i-cache won't see this data ever (so nothing needed there), and that the d-cache needs to be disabled, and all the entries flushed, and then re-enabled. tested with a "trap 0x70" from kernel space, that trap.c converted the "0x170" back to "0x70" (with an ADVANCE). this code not commited.
2022-05-16sun4v/vdsk: add handling of SCSI_REPORT_LUNSpalle
2022-05-14PR 56829: Fix "map" call to Open Firmware and no longer mess up OFW stack.hgutch
This unbreaks miniroot.fs. Thanks to Björn Johannesson for originally pointing this out and to mrg@ for pointing out the actual issue and suggesting a fix.
2022-05-11fix various typos in comments.andvar
2022-05-03fix various typos, mainly s/trasfering/transferring/ and s/theese/these/.andvar
2022-04-09sys: Use membar_release/acquire around reference drop.riastradh
This just goes through my recent reference count membar audit and changes membar_exit to membar_release and membar_enter to membar_acquire -- this should make everything cheaper on most CPUs without hurting correctness, because membar_acquire is generally cheaper than membar_enter.
2022-04-06sparc64/pmap: Nix trailing whitespace.riastradh
2022-04-06Nix trailing whitespace in files of membars, atomics, and lock stubs.riastradh
Will be touching many of these files soon for functional changes. No functional change intended.
2022-03-17revert broken to borken, it is used spelling in BSD and "tastes better that ↵andvar
way".
2022-03-16s/paniced/panicked/ and s/borken/broken/ in comments.andvar
2022-03-12sys: Membar audit around reference count releases.riastradh
If two threads are using an object that is freed when the reference count goes to zero, we need to ensure that all memory operations related to the object happen before freeing the object. Using an atomic_dec_uint_nv(&refcnt) == 0 ensures that only one thread takes responsibility for freeing, but it's not enough to ensure that the other thread's memory operations happen before the freeing. Consider: Thread A Thread B obj->foo = 42; obj->baz = 73; mumble(&obj->bar); grumble(&obj->quux); /* membar_exit(); */ /* membar_exit(); */ atomic_dec -- not last atomic_dec -- last /* membar_enter(); */ KASSERT(invariant(obj->foo, obj->bar)); free_stuff(obj); The memory barriers ensure that obj->foo = 42; mumble(&obj->bar); in thread A happens before KASSERT(invariant(obj->foo, obj->bar)); free_stuff(obj); in thread B. Without them, this ordering is not guaranteed. So in general it is necessary to do membar_exit(); if (atomic_dec_uint_nv(&obj->refcnt) != 0) return; membar_enter(); to release a reference, for the `last one out hit the lights' style of reference counting. (This is in contrast to the style where one thread blocks new references and then waits under a lock for existing ones to drain with a condvar -- no membar needed thanks to mutex(9).) I searched for atomic_dec to find all these. Obviously we ought to have a better abstraction for this because there's so much copypasta. This is a stop-gap measure to fix actual bugs until we have that. It would be nice if an abstraction could gracefully handle the different styles of reference counting in use -- some years ago I drafted an API for this, but making it cover everything got a little out of hand (particularly with struct vnode::v_usecount) and I ended up setting it aside to work on psref/localcount instead for better scalability. I got bored of adding #ifdef __HAVE_ATOMIC_AS_MEMBAR everywhere, so I only put it on things that look performance-critical on 5sec review. We should really adopt membar_enter_preatomic/membar_exit_postatomic or something (except they are applicable only to atomic r/m/w, not to atomic_load/store_*, making the naming annoying) and get rid of all the ifdefs.
2022-02-23fix various typos in comments, mainly immediatly/immediately/,andvar
as well shared and recently fixed typos in OpenBSD code by Jonathan Grey.
2022-02-11sparc64/vnet(4): device_t/softc splitriastradh
2022-01-22Change the devhandle_from_*() functions to also take a "super handle",thorpej
from which the newly created handle will inherit it's implementation. The root implementation for a new handle type is used if an invalid "super handle" is passed.
2022-01-21Don't bother with prom_node_to_devhandle() if we're just forwarding alongthorpej
our own node; use device_handle(self) instead.
2022-01-17fix typos in comments, mainly s/foward/forward/.andvar
2022-01-15sun4v: update TODO with T2000 device configuration statepalle
2022-01-10sun4v: add function to retrieve hypervisor api versionpalle
2022-01-09sun4v: enable sun4v_intr_xxx() function previously imported from OpenBSD. ↵palle
Note that the sun4v_intr_devino_to_sysino() function is adapted to match OpenBSD version 1.57 (the introduction of INTR_DEVINO is done in revision 1.58)
2022-01-05fix typos, mainly s/comand/command/andvar
2022-01-01Remove an "#ifdef DIAGNOSTIC", KASSERT() always conumes its expression.hannken
2021-12-26sys: Skip suspendsched on cpu_reboot if we're in ddb.riastradh
If we're in ddb, the scheduler and all other CPUs are quiesced anyway. But suspendsched will try to take an adaptive lock, which causes it to crash and re-enter ddb, which isn't very useful for rebooting.
2021-12-11remove clause 3 from all my licenses that aren't conflicting withmrg
another copyright claim line. again. (i did this in 2008 and then did not update all of my personal templates.)