summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/include
AgeCommit message (Collapse)Author
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-03-28s/interrput/interrupt/ and s/accesss/access/ in comments.andvar
2023-03-20__HAVE_HASHLOCKED_ATOMICS needs to be visible to userlandmartin
2022-07-30sys/atomic.h: Fix atomic_store_* on sparcv7, sparcv8.riastradh
These did not cooperate with the hash-locked scheme of the other atomic operations, with the effect that, for instance, a typical naive spin lock based on atomic_*, volatile unsigned locked = 0; lock() { while (atomic_swap_uint(&locked, 1)) continue; membar_acquire(); } unlock() { membar_release(); atomic_store_relaxed(&locked, 0); } would fail to achieve mutual exclusion. For this case, we need to use atomic_swap_* (or, for 8- or 16-bit objects, atomic_cas_32 loops, since there is no atomic_swap_8 or atomic_swap_16). The new machine/types.h macro __HAVE_HASHLOCKED_ATOMICS says whether these contortions are necessary. Note that this _requires_ the use of atomic_store_*(p, v), not regular stores *p = v, to work with the r/m/w atomic operations.
2022-05-29fix various typos in comments and log messages.andvar
2022-05-22fix various small typos, mainly in comments.andvar
2022-02-15Document the calculation of CC64FSZpalle
2022-02-13sparc: __cpu_simple_lock membar audit.riastradh
No functional change -- comments only, to justify the absence of barriers with reference to chapter & verse.
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.
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.)
2021-11-02In order to prevent _mcount() from being recursively called when built with ↵ryo
COPTS=-O0, sprinkle `__always_inline' to make _mcount() be generated as a single function.
2021-10-28Making "struct sigcontext" visible only to _LIBC || _KERNEL is toothorpej
restrictive for sparc (it's accessed by libasan).
2021-10-27Make sigcontext13 visible only to _KERNEL. Make sigcontext visible onlythorpej
to _LIBC and _KERNEL.
2021-10-26Merge all MD __sigaction14_sigtramp.c copies into one:christos
- sparc and sparc64 were not using version 0 sigcontext when there were no arguments in the signal version. This was probably a bug. - vax is using +1 the version numbers of the other archs. - Only hppa was defining __LIBC12_SOURCE__ so it was getting a working sigcontext before. all the other ports that supported sigcontext had the compat code disabled. [pointed out by thorpej, thanks!] If we want to remove sigcontext support from userland at least now there is less work to do so.
2021-09-06fix various typos in comments.andvar
2021-08-14Improved the performance of kernel profiling on MULTIPROCESSOR, and possible ↵ryo
to get profiling data for each CPU. In the current implementation, locks are acquired at the entrance of the mcount internal function, so the higher the number of cores, the more lock conflict occurs, making profiling performance in a MULTIPROCESSOR environment unusable and slow. Profiling buffers has been changed to be reserved for each CPU, improving profiling performance in MP by several to several dozen times. - Eliminated cpu_simple_lock in mcount internal function, using per-CPU buffers. - Add ci_gmon member to struct cpu_info of each MP arch. - Add kern.profiling.percpu node in sysctl tree. - Add new -c <cpuid> option to kgmon(8) to specify the cpuid, like openbsd. For compatibility, if the -c option is not specified, the entire system can be operated as before, and the -p option will get the total profiling data for all CPUs.
2021-05-10sparc{,64} promlib -> devhandle_t gluethorpej
2021-01-25avoid needing <machine/promlib.h>. fixes sparc64 build.mrg
2021-01-24avoid using 'extern <func|data>;' inside a .c file, but insteadmrg
use header files and ensure definitions are not duplicated or are technically (if not in codegen) wrong.
2021-01-23Document via __HAVE_BUS_SPACE_8 platforms that implement bus_space_*_8christos
2021-01-17set machine_model[] earlier, so that bootstrap can use it.mrg
also, avoid "extern <variable>" in .c files, and add idempotency to autoconf.h.
2020-12-18remove unused and #if 0'd since introduced in 1996 struct kvm_cpustate.mrg
sparc kvm was handled differently for the sun4m port.
2020-12-06undo previous; __register_t is already definedchristos
2020-12-06don't expose register_tchristos
2020-09-14Switch from register_t to unsigned long intkamil
Removes dependency on _KERNTYPES.
2020-09-12Improve am7930 family drivers to share more code.isaki
audioamd(4) on sparc, vsaudio(4) on vax, and bba(4) are. - Remove complex and useless callbacks: onopen, onclose, and indirect_{read,write}. This makes audioamd and vsaudio almost the same. - Remove (already disabled) assembly fast interrupt path from audioamd(4). cf. http://mail-index.netbsd.org/source-changes/2009/12/19/msg004585.html - Use trigger_* method rather than start_* method. It's more suitable. vsaudio(4) was tested by naru@, bba(4) was tested by tsutsui@.
2020-09-06forward declare struct vm_page, and include uvm_prot.h and uvm_pmap.h.mrg
fixes build, presumeably after uvm.h external rototill.
2020-05-17Install sparc/intr.had
2020-05-17__HAVE_CPU_DATA_FIRST is still true for sparc64 (which shares this file)martin
2020-05-16PR port-sparc/55261: sparc still panics running ATF testsad
Reinstate the cpu_info change and remove __HAVE_CPU_DATA_FIRST to fix build failure.
2020-05-16Back out previous - it doesn't work.ad
2020-05-15PR port-sparc/55261: sparc still panics running ATF testsad
Put cpu_data at the end of cpu_info to see how that modifies the symptom.
2020-05-01Move machine dependent AUDIO_BLK_MS default value to <machine/param.h>.isaki
If the port has __AUDIO_BLK_MS in <machine/param.h>, it will be used. Otherwise the default value (currently 10 msec) defined in audio.c will be used. This mechanism is for very old ports which cannot satisfactorily handle 10 msec block. Currently hppa, m68k, sh3, sparc(!64) and vax are. For port maintainers, if general models in your port cannot satisfactorily handle 10 msec block, please consider to define your suitable longer period (40 msec would be a good first choice). But please don't be eager to make the default value shorter. <machine/param.h> was discussed in source-changes-d. It's better than ifdef storm, or adding 60+ new header files in every arch/*/include/ directories for this. Thanks mrg@, ad@, and everyone. http://mail-index.netbsd.org/source-changes-d/2020/05/01/msg012572.html
2020-04-17Mark the .ident section as mergable string section to avoid redundantjoerg
entries.
2020-03-14pmap_remove_all(): Return a boolean value to indicate the behaviour. Ifad
true, all mappings have been removed, the pmap is totally cleared out, and UVM can then avoid doing the work to call pmap_remove() for each map entry. If false, either nothing has been done, or some helpful arch-specific voodoo has taken place.
2020-03-10tuck curproc/curlwp under _KERNEL only (no _KMEMUSER)christos
2019-12-30PR port-sparc/54789: Sparc boot fails with "Trap 0x21 while interrupts disabled"ad
Remove assumption that cpu_info is smaller than 1kB.
2019-12-27Harmonize the namespace of fast TLS base pointer getter functionskamil
Protect __lwp_getprivate_fast() with _RTLD_SOURCE, _LIBC_SOURCE and __LIBPTHREAD_SOURCE__. Include in this namespace <sys/tcl.h> and use __BEGIN_DECLS/__END_DECLS for the sake of consistency.
2019-12-24Introduce PT_LWPSTATUS + PT_LWPNEXT, obsolete PT_LWPINFOkamil
PT_LWPINFO is a legacy ptrace(2) operation that was originally intended to retrieve the thread (LWP) information inside a traced process. It has a number of flaws and is confused with PT_LWPINFO from FreeBSD. PT_LWPSTATUS and PT_LWPNEXT address the problems (shortly by: rename, removal of pl_event) and introduces new features: signal context (pl_sigpend, pl_sigmask), LWP name (pl_name), LWP TLS base address (pl_private). The private pointer was so far missing information for a debugger. PT_LWPSTATUS@nnn is now shipped with core(5) files and contain LWP specific information, so far missed in the core(5) files. PT_LWPSTATUS retrieves LWP information for the prompted thread. PT_LWPNEXT retrieves LWP information for the next thread, borrowing the semantics from NetBSD specific PT_LWPINFO. PT_LWPINFO is namespaced with __LEGACY_PT_LWPINFO and still available for the foreseeable future, without plans of removing it. Add ATF tests for PT_LWPSTATUS + PT_LWPNEXT. Keep ATF tests for PT_LWPINFO. Switch GDB to new API. Proposed on tech-kern@.
2019-12-01Fix false sharing problems with cpu_info. Identified with tprof(8).ad
This was a very nice win in my tests on a 48 CPU box. - Reorganise cpu_data slightly according to usage. - Put cpu_onproc into struct cpu_info alongside ci_curlwp (now is ci_onproc). - On x86, put some items in their own cache lines according to usage, like the IPI bitmask and ci_want_resched.
2019-11-29Nix now-unused definitions of MUTEX_GIVE/MUTEX_RECEIVE.riastradh
2019-11-29Nix mb_* on sparc and sparc64.riastradh
2019-11-29Largely eliminate the MD rwlock.h header file.riastradh
This was full of definitions that have been obsolete for over a decade. The file still remains for __HAVE_RW_STUBS but that's all. Used only internally in kern_rwlock.c now, not by <sys/rwlock.h>.
2019-11-29PR port-sparc/54718 (sparc install hangs since recent scheduler changes)ad
- userret() must be called every time we return to user, it's not optional. - If clearing the AST with interrupts off, you must loop over userret().
2019-11-23cpu_need_resched():ad
- Remove all code that should be MI, leaving the bare minimum under arch/. - Make the required actions very explicit. - Pass in LWP pointer for convenience. - When a trap is required on another CPU, have the IPI set it locally. - Expunge cpu_did_resched().
2019-11-23Looks like sparc clears want_ast with interrupts enabled, so check+clear itad
and call mi_userret() in a loop.
2019-11-21mi_userret(): take care of calling preempt(), set spc_curpriority directly,ad
and remove MD code that does the same.
2019-09-23Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all archesskrll
to follow arm and (generic) mips. Reviewed by christos.
2019-08-29 Add missing NUL to prevent buffer overrun.msaitoh
2019-08-21 Fix typo (s/contoller/controller/).msaitoh