Commit Graph

826 Commits

Author SHA1 Message Date
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
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