Commit Graph

850 Commits

Author SHA1 Message Date
dsl 7e2790cf6f Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
    int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.
2007-12-20 23:02:38 +00:00
uwe 4a77686dd9 Use dedicated interrupt stack. Tested on hpcsh and landisk. This has
been sitting in my tree for quite a while.  While here s/top/bottom/
in a few places related to stacks to confirm to conventional
terminology.
2007-12-14 00:58:37 +00:00
pooka db06a930e6 Remove cn_lwp from struct componentname. curlwp should be used
from on.  The NDINIT() macro no longer takes the lwp parameter and
associates the credentials of the calling thread with the namei
structure.
2007-12-08 19:29:36 +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
ad 890e076b1a Pending review by uwe@:
- Make _lock_cas() do "compare and swap", not "compare and set".
- Add aliases for atomic_cas_ulong() and friends.
2007-11-29 17:33:09 +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 dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
uwe 0ecea51f05 Misc cleanup: use device_* and aprint_*, group declarations, g/c some
dead code, etc.
2007-11-06 05:01:26 +00:00
uwe 84e75de6c1 Get rid of local product table, instead just match id register and
pci_devinfo().  While here, convert to device_t, aprint_*.
2007-11-06 03:23:15 +00:00
uwe 88c74cddaf Convert to aprint_* 2007-11-06 01:33:00 +00:00
ad bd6663fc4d Don't set l_usrpri / spc_curpriority here. mi_userret() does it. 2007-11-05 20:37:48 +00:00
uwe 538e94b48f We don't need MIN_LWP_ALIGNMENT. 2007-10-26 22:24:51 +00:00
ad bccf777b72 Make ras_lookup() lockless. 2007-10-24 14:50:38 +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
uwe 04d80981e9 For KSTACK_DEBUG fill lwp0 switchframe with 0xb4 too to match
what we do to other lwps in sh3_setup_uarea in vm_machdep.c.
2007-10-14 22:38:48 +00:00
ad 9f56dfa520 Merge brelse() changes from the vmlocking branch. 2007-10-08 18:02:53 +00:00
ad 3bf03448f0 Make want_resched a member of cpu_info. 2007-10-01 21:26:03 +00:00
uwe 42598e2348 Shave off an instruction in __EXCEPTION_UNBLOCK. 2007-09-25 02:21:12 +00:00
uwe 25b921930f Misc comment fixes. 2007-09-25 01:55:07 +00:00
uwe 3d8a597d48 Don't expose asm macros (traditional cpp) to C code (ANSI cpp) so that
we don't have to do weird dances protecting # that indicates asm
immediate operand from being iterpreted as cpp stringification
operator.
2007-09-25 01:50:47 +00:00
uwe 3ba81886ab sh_vector_interrupt - while here, shave off a few cycles and run with
exceptions disabled only the code that really needs to.
2007-09-25 00:53:04 +00:00
uwe 609dd932e5 Do RAS check in sh_vector_interrupt, don't abuse ast() for that. 2007-09-24 01:17:15 +00:00
pooka 1c1e708cf7 include machine/cpu.h instead of sh3/cpu.h. Effectively it's the
same, but makes rump build on sh3 platforms.
2007-09-23 23:07:27 +00:00
martin d9a407bba2 Add a new option DDB_VERBOSE_HELP that adds online help to ddb.
From Adam Hamsik.
Minor modifications by me, all bugs are probably mine.
2007-09-22 18:40:20 +00:00
skrll 9fdaf800d9 Merge nick-csl-alignment. 2007-09-10 11:34:05 +00:00
drochner dce09ea075 clean up some definitions around rune_t which are not needed anymore 2007-09-03 20:31:56 +00:00
drochner 0e0fe2c353 Fix definitions of UCHAR_MAX/USHRT_MAX and related
types. C99 requires that these definitions promote to (signed/unsigned)
integer the same way as the types the definition is for. And since
unsigned char/short fit into an "int" on all our archs and thus promote
to signed int, the definitions must not be unsigned.
Fixes PR lib/31306 by Neil Booth.
2007-08-31 16:24:21 +00:00
uwe 77cf5cb29c Move child_return() and startlwp() to be in the same file with
cpu_lwp_fork() that is used to call them.
2007-08-27 00:22:20 +00:00
uwe 9ad0553da6 Factor out code to setup lwp u-area into a separate function used by
both cpu_lwp_fork and cpu_setfunc.
2007-08-21 01:13:05 +00:00
uwe f710f36828 Fix couple of whitespace glitches. 2007-08-20 21:17:39 +00:00
uwe 4e3006c663 Add back comma between operands lost in s/tab/space/ cosmetics of 1.21
(as(1) doesn't mind, apparently)
2007-08-20 01:05:23 +00:00
ad 07b0fe01aa cpu_lwp_fork: don't rely on struct mdlwp being zeroed in advance. 2007-08-17 23:58:45 +00:00
ad 63c4506184 Changes to make ktrace LKM friendly and reduce ifdef KTRACE. Proposed
on tech-kern.
2007-08-15 12:07:23 +00:00
ad 9c6535a6de Add ci_cpuid where it's missing. 2007-08-04 09:49:51 +00:00
ad 66fefd117b It's not a good idea for device drivers to modify b_flags, as they don't
need to understand the locking around that field. Instead of setting
B_ERROR, set b_error instead. b_error is 'owned' by whoever completes
the I/O request.
2007-07-29 12:15:35 +00:00
macallan a1457f5905 change pmap_phys_address()s parameter to paddr_t since that's what it gets
fed from mmap*() anyway
approved by gimpy
2007-07-16 23:48:03 +00:00
ad 63811f5275 Generic soft interrupts are mandatory. 2007-07-14 21:48:17 +00:00
ad 88ab7da936 Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
2007-07-09 20:51:58 +00:00
pooka 0bc323f5cd Initialize the link context in a signal frame to the receiving lwp's
link context instead of NULL.  Otherwise, if we got a signal while the
lwp had a link context set, the link context would be set to NULL upon
return from signal delivery.

christos@tech-kern: "I think you are right."
2007-07-08 10:19:21 +00:00
tsutsui 6a8a584d1a Remove leftover netns stuff. 2007-07-07 05:13:14 +00:00
dsl 639a2edf3b Pass TRYEMULROOT to NDINIT() instead of using CHECK_ALT_XXX.
(Code is inside a big #if 0)
2007-06-23 16:58:18 +00:00
uwe 269ff6629e In sh3_tlb_update we need to ensure we are not interrupted while
meesing with the TLB.  That would usually show up as misterious kernel
crashes under heavy load.

Prettify the code while here so that traversal of the memory mapped
TLB arrays looks congruent in all functions.

Fixes PR 34706
2007-05-27 12:21:24 +00:00
tsutsui 2ae2a9ae1e Update function names in comments. 2007-05-26 03:26:49 +00:00
uwe 6a75919c1e Clarify comments in pmap_enter. 2007-05-25 23:55:13 +00:00
tsutsui 9275ebae10 Fix prototype of cpu_switchto(9) in LINTSTUB comment. 2007-05-21 14:05:02 +00:00
uwe 1d63bcac56 Implement fast path TLB miss handling. Walk the page table without
creating a trapframe, with exceptions disabled and using only BANK1
registers.  If a valid pte is found, load it and return.  Otherwise
create a trapframe and proceed to the full-blown C handler.
2007-05-18 02:31:06 +00:00
uwe b348c690b7 Print pc/pr when faulting in ddb, it comes in handy. 2007-05-17 22:12:08 +00:00
yamt f03010953f merge yamt-idlelwp branch. asked by core@. some ports still needs work.
from doc/BRANCHES:

	idle lwp, and some changes depending on it.

	1. separate context switching and thread scheduling.
	   (cf. gmcgarry_ctxsw)
	2. implement idle lwp.
	3. clean up related MD/MI interfaces.
	4. make scheduler(s) modular.
2007-05-17 14:51:11 +00:00
uwe 17dd2bf13d Mark __sh4_itlb_invalidate_all we call while running on P2 with
__attribute__((always_inline)) or gcc might decide not to inline it,
resulting in P2->P1 call.
2007-03-31 22:49:49 +00:00
uwe 58951c715e In sh_clock_init just make sure that rtc oscillator is running, but
don't start rtc, so that rtc(4) can report wall time as invalid if
clock was not running on attach.
2007-03-30 00:37:51 +00:00