Commit Graph

556 Commits

Author SHA1 Message Date
nakayama
3eac605929 sparc64_ipi_save_fpstate:
- use primary MMU context for consistency with other trap/interrupt handlers.

sparc64_ipi_save_fpstate, savefpstate:
- avoid storing fp registers as we can.

sparc64_ipi_save_fpstate, savefpstate, loadfpstate:
- remove unaligned case since buffers allocated with pool_cache are ensured
  64-byte aligned.

Ok by martin@.
2008-07-10 15:23:58 +00:00
nakayama
b74ec3e6b6 Switch fpstate buffer allocation from malloc to pool_cache.
Ok by martin@.
2008-07-10 15:04:41 +00:00
nakayama
fa9b47137f Avoid use of "<< TSTATE_PSTATE_SHIFT". 2008-06-30 14:12:20 +00:00
nakayama
88b527f6d7 Ansify and follow the recent cardbus changes:
- split device/softc
- avoid the use of i82365var.h
2008-06-26 15:08:48 +00:00
nakayama
874a376a83 Remove declarations of unexist variables and functions. 2008-06-14 07:51:51 +00:00
nakayama
4b71a66d0f Change my license to 2 clause. 2008-05-31 08:08:54 +00:00
mrg
c2b95373bf remove clause #3 from my license where there are no other
copyright holders involved.
2008-05-29 14:51:25 +00:00
martin
ee9ac5c71f Explicitly pass a "mpsafe" arg down to intr_establish, as at that point
we do not have the original ipl passed in around to check for mpsafeness.
Fixes PR port-sparc64/38673. Thanks to Andrew for pointing at the problem.
2008-05-18 22:40:14 +00:00
ad
a1ddfabe35 Mirror sparc and provide sparc_softintr stuff. There is no functional
change, beyond renaming a function and putting back disestablish/schedule.
PR kern/37540.
2008-04-29 14:06:31 +00:00
martin
ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
nakayama
913a6487e6 #include "opt_multiprocessor.h"
#include <machine/psl.h>

Make sparc64 kernel build again.
2008-04-22 17:09:25 +00:00
nakayama
a9ca1b36dd Remove sparc64_ipi_sync_tick.
Since we can use counter-timer as timecounter instead of %tick on SMP kernel,
it is not necessary to sync all CPUs %tick registers.
2008-04-14 17:54:07 +00:00
nakayama
39b07dd47b Reorganize clock assignments on SMP kernel:
- don't use separate statintr on primary CPU.
- invoke clockintr instead of statintr on secondary CPUs.

This change fixes the problem setitimer(2) didn't work on secodary CPUs.
2008-04-09 14:58:23 +00:00
nakayama
b1253edf64 Revise cpu_need_resched and cpu_signotify, then make them like x86's ones.
This can avoid sending IPI to myself.
2008-04-03 10:34:45 +00:00
tsutsui
02cb47cab2 Split softc and device_t for zsc(4) and its children.
XXX we should restructure MI APIs and make it really machine independent.
2008-03-29 19:15:34 +00:00
martin
e4eb0bc72d Use the passed cpu info for returning the frequency, not the current
cpu
2008-03-28 15:39:31 +00:00
nakayama
6456819faa Make schedintr interrupt handler per-CPU.
While there rename tickintr interrupt handler and share initialization
code with schedintr.
2008-03-17 04:04:00 +00:00
nakayama
8d734e3bd0 Complete per-CPU TSBs and MMU contexts changes. 2008-03-14 15:40:02 +00:00
nakayama
ead4e6f7b9 Improve IPI handling:
- make IPI takes two arguments.
- add IPI event counters per-CPU.
- implement IPI functions which were missing or broken.
- insert DELAY while halting primary CPU in IPI handler.
2008-03-14 15:38:00 +00:00
martin
54c5277e8e Make ddb's "mach cpu" command do the right thing: run ddb on the requested
cpu. There is a tiny bit of cheating involved, but I assume we won't run
parallel + recursive ddb scripts to play towers of hanoi.

This fixes the wrong prompt, and (more importantly) makes things like
"mach dtlb" display the registers of the right MMU.
2008-03-02 22:01:38 +00:00
nakayama
29dbeb72e1 - make interrupt pending list per-CPU.
- make tickintr() MP-safe.
- remove unused port-sparc derived interrupt code.

Ok by martin@.
2008-03-02 15:28:26 +00:00
nakayama
9543ae7d83 Correct TSTATE_KERN and TSTATE_USER macros. 2008-03-02 15:07:02 +00:00
martin
e674d1c49a Rearange ddb saved register values slightly.
While there fix completely bogus register access ops for < 64 bit values.
2008-02-29 20:27:07 +00:00
martin
a9e7d15afd Make TSBs and MMU contexts per-cpu. 2008-02-28 11:50:40 +00:00
xtraeme
f402cadf9a Remove CTL_MACHDEP_NAMES, it's not used anywhere.
Ok by martin@.
2008-02-27 18:26:15 +00:00
nakayama
119e34ec59 Fix macro to convert CCR field between PSR and TSTATE.
CCR filed in PSR starts from bit 20, not from bit 19.
2008-02-25 09:51:38 +00:00
martin
1fc8a17916 Get rid of the IPI simple_lock. 2008-02-22 10:55:00 +00:00
martin
828c9eb2ec remove unused extern declarations 2008-02-18 21:08:42 +00:00
martin
4262f42f3b For non-mpsafe interrupt handlers, grab the kernel lock via a biglock
wrapper. Fixes PR port-sparc64/37468.
2008-02-18 12:16:37 +00:00
joerg
e69482d49d Introduce device_find_by_xname and device_find_by_driver_unit to replace
alldevs iterations all over src.

Patch discussed with and improved on suggestioned from cube@.
2008-02-12 17:30:57 +00:00
dsl
5da7cb61ba Remove NETBSD32_OFF_T_RETURN() netbsd32_lseek() now uses MI code to return
all 64 bits of the new position.
2008-01-27 17:37:40 +00:00
martin
633ac5fa86 Extend the MD kernel core header, so that crashdumps record enough
information to recover all per-cpu mappings. This provides access to
the interrupt stack for example.
2008-01-18 16:24:42 +00:00
martin
8409a2d11e Rename cpuset_t for now to sparc64_cpuset_t, to avoid a name clash with
<sys/pset.h>. Mid-term we should probably convert to the MI cpuset_t.
2008-01-15 10:35:33 +00:00
martin
b432cf5a27 Include lock.h, as we are using memory barrier macros defined there. 2008-01-05 13:27:27 +00:00
martin
57f85d1876 Make sure the compiler does not reorder stores accross spl...() calls
[or, for completeness, calls changing the processor state]. The mutex
code has small race windows otherwise.
2007-12-11 08:59:57 +00:00
martin
3947df41d1 Provide cpu_intr_p(), at least for non-MULTIPROCESSOR kernels.
Based on suggestions by Andrew Doran.
2007-12-09 20:12:54 +00:00
ad
4b293a84e1 Interrupt handling changes, in discussion since February:
- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
2007-12-03 15:33:00 +00:00
yamt
38d5e34116 make kmutex_t and krwlock_t smaller by killing lock id.
ok'ed by Andrew Doran.
2007-11-21 10:19:06 +00:00
ad
d37935697b Merge tty changes from the vmlocking branch. 2007-11-07 15:56:11 +00:00
ad
bd6663fc4d Don't set l_usrpri / spc_curpriority here. mi_userret() does it. 2007-11-05 20:37:48 +00:00
martin
b050fccbb2 Extend the sparc64 cpu kcore segment so that it records all kernel mappings
done via locked 4 MB pages. The old format could only record physically
continous kernel text mappings.
For compatibility reasons, just extend the structure and fill in all the
old fields as well.
2007-11-05 00:43:41 +00:00
garbled
d974db0ada Merge the ppcoea-renovation branch to HEAD.
This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree.  Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches.  The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
2007-10-17 19:52:51 +00:00
dsl
8b937dec65 Fix previous, 'long long' is 8 byte aligned on sparc32 2007-09-16 22:44:31 +00:00
dsl
06b0a1bdab Define netbsd32_uint64 for 64bit integers with the alignment requirement
of the corresponding 32bit architecture.
Use it for the 64bit items in netbsd32_statvfs so that the structure
doesn't collect 8byte alignment (and 4 bytes of trailing padding).
This replaces the 'packed' attribute which wasn't architecture specific
and would cause massive overheads accessing every member of sparc64.
Should allow the MIPS64 port do DTRT.
2007-09-16 22:35:01 +00:00
martin
913f43886d Cleanup cpu_info: get rid of ci_number and ci_upaid, use ci_index
and ci_cpuid instead.
2007-09-11 16:00:05 +00:00
martin
e680b6ed1a Make cpufrequency and friends per cpu values.
Prepare a hz tick interrupt on secondary CPUs via %tick, but do not
enable it yet, as it breaks ddb.
2007-09-09 22:37:39 +00:00
martin
5bb7297fe4 Remove the (now unused) second 64k page mapped per CPU.
From matthew green, with small changes by me. All bugs are mine.
2007-09-06 20:22:51 +00:00
drochner
dce09ea075 clean up some definitions around rune_t which are not needed anymore 2007-09-03 20:31:56 +00:00
martin
782448944c Remove INITSTACK completely - at the time we used to switch to it, we
already have access to all of lwp0 and it's uarea - so we can switch
to the correct lwp0 stack easily before calling main.
2007-08-25 19:16:10 +00:00
martin
0617d834b5 Initialize lwp0.l_md.md_tf - it was NULL before. Spotted by tnn.
While there, g/c the unused md_pcbpaddr.
2007-08-14 10:42:00 +00:00