Commit Graph

802 Commits

Author SHA1 Message Date
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
uwe 3ce2a9cb4d On attach check if clock is running, mark it invalid if not. Return
error from gettime method if clock is not valid.  Mark clock as valid
on settime.

Report more debugging info.
2007-03-30 00:32:58 +00:00
uwe a4d20321d9 Re-enable interrupts in tlb_exception too. 2007-03-30 00:12:54 +00:00
uwe 86d3d1e448 Include #include <sh3/devreg.h> like other *reg.h do. 2007-03-29 23:09:41 +00:00
uwe 39792f9d55 Mark inline functions we call while running on P2 with
__attribute__((always_inline)) or gcc might decide not to inline them,
resulting in P2->P1 call while we mess with the cache, and kernel
would just hang immediately on boot.
2007-03-29 01:51:49 +00:00
uwe 5f9be1916f G/c ancient workaround that has been commented out for ages. 2007-03-28 23:59:00 +00:00
uwe f36e3e9ebe G/c unused defines/includes. 2007-03-24 21:32:11 +00:00
uwe fc61a45d33 There are only 32 bits in a VA, not 33 - sync comment with this harsh reality. 2007-03-21 14:50:43 +00:00
uwe f54c2e5ccf Don't do curupte checks if the miss address is in user space. 2007-03-18 20:18:36 +00:00
uwe 911335e303 Shave off few instructions when doing ldtlb. 2007-03-17 17:23:31 +00:00
uwe 62f5ccf3c2 Cosmetic - fix local label name to match the name of the var it refers. 2007-03-17 14:23:07 +00:00
uwe cfeed1498f sh3_switch_setup: make md_upte[] map uarea pages in reverse order so
that mapping for the bottom of the stack (practically the only page we
ever touch) is found on earlier iterations through md_upte[] in the
tlb miss handler.
2007-03-17 00:56:46 +00:00
uwe a4c73117e3 Cosmetic changes in {sh3,sh4}_switch_setup to make them easier to read.
Same object code is generated.
2007-03-16 18:31:36 +00:00
uwe 66f80b8d65 There's no sense in duplicating function prototype in preceding comments.
While here, make ANSI'fy idle() definition.
2007-03-16 18:20:40 +00:00
uwe ee31aeeb82 Use dt to loop over md_upte in sh3_vector_tlbmiss. Saves a few instructions. 2007-03-16 04:22:22 +00:00
uwe 7233c378a1 Comment proc_trampoline properly. 2007-03-16 02:27:16 +00:00
uwe c67ce65c70 L_MD_PCB and L_MD_UPTE are small enough to be used as immediate values. 2007-03-16 01:30:56 +00:00
uwe 1edd00232c Comment sh3_vector_tlbmiss. Same object code is generated. 2007-03-15 23:13:59 +00:00
uwe eae42fb475 Arrange for data blocks to start on 32B cache line boundary. 2007-03-15 01:54:18 +00:00
uwe b602f9a09b Use .L* for local labels. Misc cosmetic.
Same object code is generated.
2007-03-15 00:00:38 +00:00
uwe 67862e14f4 s/TAB/space/ to separate instruction operands. There are quite a few
cpp macros and long src operands anyway that destroy any intended
"neatly lined up" effect that TAB was supposed to achieve.

White space change only, same object code is generated, but it is much
easier on the eyes now.
2007-03-14 22:38:00 +00:00
uwe 2d73ff48ec More nano-optimizations to mutex stubs: rely on _lock_cas to preserve
things for us to shave off a few cycles.
2007-03-14 06:42:46 +00:00
uwe ecde82d887 Tweak to shave off a few cycles. 2007-03-14 05:38:28 +00:00
uwe 07a908343d Convert _lock_cas to RAS. Check for restart in ast() on return from interrupt. 2007-03-14 05:03:52 +00:00
uwe 7b073b8364 Oops. Don't define stubs if LOCKDEBUG. 2007-03-14 02:01:19 +00:00
uwe beab1d398c LINTSTUB: include <sys/mutex.h> to make the lint stub lintable. 2007-03-14 01:20:20 +00:00
uwe 8e5c3b9886 Implement fast-path mutex_enter and mutex_exit stubs. 2007-03-14 01:14:25 +00:00
ad 59d979c5f1 Pass an ipl argument to pool_init/POOL_INIT to be used when initializing
the pool's lock.
2007-03-12 18:18:22 +00:00
uwe 11957bf405 Note in that TAS.B in inline asm clobbers "cc".
Use MOVT instead of clear+rotate with carry in __cpu_simple_lock_try.
2007-03-12 01:33:50 +00:00
uwe d96c2a32bc Use simple mutexes. This file is effectively a copy of arm's one now. 2007-03-12 00:57:13 +00:00
uwe 7983f30ad7 Do cpu_exit with proper locking.
Rename assembly cpu_exit to cpu_do_exit and make a C version of
cpu_exit() to do proper locking.  While here, g/c switch_exit entry
point and don't call lwp_exit2 from cpu_exit.
From ad@

Completes PR port-sh3/35971 - my Jornada now boots to multiuser with a
LOCKDEBUG kernel.
2007-03-12 00:32:56 +00:00
uwe f3c67932b4 Cosmetic. Group function declarations and variable definitions. 2007-03-12 00:12:29 +00:00
uwe c24277d5f4 Factor out code to save processor state to pcb->pcb_sf switchframe
into a macro.  While here, clarify l->l_md.md_pcb->pcb_sf
vs. l->l_md.md_pcb confusion with proper naming and some comments.
Idea from OpenBSD.
2007-03-11 23:54:03 +00:00
ad 7a902dfca5 PR port-sh3/35971: Mutex error on SH3 DIAGNOSTIC kernels 2007-03-11 20:09:03 +00:00
he 8a3ceb1726 Cast to char* before doing pointer arithmetic. 2007-03-06 23:38:37 +00:00
tsutsui 1032472464 Call uvm_pageidlezero() only if uvm.page_idle_zero is true. 2007-03-04 10:41:59 +00:00
christos 53524e44ef Kill caddr_t; there will be some MI fallout, but it will be fixed shortly. 2007-03-04 05:59:00 +00:00
uwe 3cdc20a9de Brute force _lock_cas() by disabling interrupts.
Need to redo it with RAS later.
2007-02-23 03:24:47 +00:00
uwe b2fe1ffc55 Sprinkle static so that gcc can eliminate simple helper functions that
get inlined.
2007-02-23 03:14:32 +00:00
uwe b0513c4b84 Catch up with bool rototill. 2007-02-23 02:57:43 +00:00
uwe 7856f87f0d Add lock_stubs.S with fake _lock_cas - just to make the kernel compile
for now.
2007-02-22 22:53:26 +00:00
uwe b8be26359e Provide an empty cpu_lwp_free2(). 2007-02-22 22:37:52 +00:00
uwe cb750a7039 Undef __HAVE_MUTEX_STUBS, there are no mutex stubs yet. 2007-02-22 22:29:10 +00:00
thorpej f6d76ae22a TRUE -> true, FALSE -> false 2007-02-22 16:45:48 +00:00
thorpej 712239e366 Replace the Mach-derived boolean_t type with the C99 bool type. A
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
ad 3363855a4a Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
2007-02-16 02:53:43 +00:00
ad def3fb26c7 Add MUTEX_CLEAR_WAITERS(). 2007-02-15 22:52:42 +00:00
ad b07ec3fc38 Merge newlock2 to head. 2007-02-09 21:55:00 +00:00
hubertf 142c2a33ba Remove duplicate #includes, patch contributed in private mail
by Slava Semushin <slava.semushin@gmail.com>.

To verify that no nasty side effects of duplicate includes (or their
removal) have an effect here, I've compiled an i386/ALL kernel with
and without the patch, and the only difference in the resulting .o
files was in shifted line numbers in some assert() calls.
The comparison of the .o files was based on the output of "objdump -D".

Thanks to martin@ for the input on testing.
2007-01-24 13:08:11 +00:00