Commit Graph

3190 Commits

Author SHA1 Message Date
Michael Lotz
d18b04298a Cleanup, remove needless line-break and trailing space. Also switched that "& "
to " &" as really the whole rest of the file uses that style.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32813 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-29 15:35:11 +00:00
Stephan Aßmus
8c5ad61d4b * Prevent the /boot entry from ever being renamed. You couldn't even try to
switch /boot to a different volume in two operations, unless you have first
  linked /system/lib into /bin. This patch assumes that / will always have the
  ID 1. Don't know if that is proper. Note that I also thought about solving
  this in the VFS, since perhaps it isn't the job of root-fs to know about
  /boot, but that would of course introduce another check for every rename
  operation, which I decided against.

+alphabranch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-29 10:43:51 +00:00
Axel Dörfler
e09d819b6c * Since the Media/Translation Kit errors are now in Errors.h as well, we don't
need to include those two anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-28 13:01:33 +00:00
Stefano Ceccherini
11dbc6cf7a Reverted r28531 since we have working wcrtomb() and mbrtowc().
Seems like we didn't remember to change it back, even
with the #warning. :-)
I tested ftp and it works fine. This also closes ticket #4176.
+alphabranch 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32766 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 20:33:18 +00:00
Stefano Ceccherini
1c2a5ae241 Fixed gcc4 warnings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32764 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-27 20:26:31 +00:00
Axel Dörfler
89294b5084 * Added option for enabling serial debug output.
* Moved device_manager/settings.cpp to debug/safemode_settings.cpp.
* Removed the somewhat hacky concatenation of kernel settings and safemode
  settings in the boot loader. Instead, get_safemode_option() will now fall
  back to the kernel settings, if it couldn't spot a setting in the safemode
  settings. This allows for more control, and also makes enabling serial
  debug output actually work (ie. overriding the kernel settings via safemode
  options).
* Adjusted debug_init_post_vm(), and smp_init_other_cpus() to use
  get_safemode_boolean().
* Therefore, I added safemode_settings.cpp to the boot loader as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 08:47:54 +00:00
Axel Dörfler
e17f8de82d * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32684 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 08:27:54 +00:00
Axel Dörfler
f8ebd1a328 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 08:05:22 +00:00
Ingo Weinhold
2fb48fb46b Added missing ENOATTR text.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-26 01:01:43 +00:00
Ingo Weinhold
b02c147c05 Implemented seekdir() and telldir(). They were declared in <dirent.h> already.
So either +alphabranch or remove the declarations from <dirent.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-25 22:16:40 +00:00
Jonas Sundström
9fbc65a94d Modified *jmp stubs for arch mipsel. Removed PowerPC asm.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-23 03:17:13 +00:00
Jonas Sundström
893988af82 Added and modified kernel stubs and headers for arch mipsel. Correctness not included.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-23 02:52:09 +00:00
Michael Lotz
f1a7a3752f * Use the locked version of inherit_parent_user_and_group() by moving the call
into the scope of the lock. Saves an InterruptsSpinLocker.
* Use an InterruptsSpinLocker() as in other places.
* When creating/forking a team fails because the kernel thread cannot be spawned
  balance the already sent TEAM_ADDED notification by sending a TEAM_REMOVED one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-22 03:07:11 +00:00
Jonas Sundström
8e8130d1f0 Adding routerboard_mipsel platform stubs and linker script.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32594 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-22 01:48:18 +00:00
Rene Gollent
c3350a57ff Squashed a TODO: When delivering signals, check if a) any threads were in fact enqueued, and b) if the scheduler's preemption hint indicates that a reschedule is desired. This prevents unnecessarily invoking the scheduler every single time a signal is delivered, regardless of result.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 23:48:42 +00:00
Michael Lotz
29bd9bfd7d Remove SMP_MSG_RESCHEDULE_IF_IDLE as it is not used anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 16:14:18 +00:00
Michael Lotz
861b223cf2 * Strip down scheduler_simple. Anything related to multiple CPU handling has
been removed. That includes CPU disabling and thread pinning, as that becomes
  pointless with only one CPU.
* Return a proper reschedule hint on enqueing a thread, based on the priority
  of the current thread vs. the enqueued one.
* Enable dynamic scheduler selection. With one CPU the simple scheduler will
  be used, otherwise affine is selected.
* Removed the scheduler type define as we now always auto-select it.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 16:10:27 +00:00
Rene Gollent
009ccc2962 anevilyak+mmlr:
* scheduler_enqueue_in_runqueue() now allows the scheduler to return a hint as to whether a reschedule is desirable or not. This is used in a few other places in order to relegate scheduling decisions entirely to the scheduler rather than the priority hacks previously used. There are probably other places in the kernel that could now make use of that information to more intelligently call reschedule() though.
* Switch over the default scheduler to scheduler_affine().



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-21 04:11:40 +00:00
Rene Gollent
66dde0a85d Fix build with TRACE_SMP enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-20 23:39:22 +00:00
Axel Dörfler
6d908f83f3 * Must be careful which functions to call in the notifications handler, or else
you can easily produce a dead lock. This should fix the system hang
  experienced as part of bug #4223.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-19 17:09:33 +00:00
Michael Lotz
152132f08a mmlr+anevilyak:
* Keep track of the currently running threads.
* Make use of that info to decide if a thread that becomes ready should preempt
  the running thread.
* If we should preempt we send the target CPU a reschedule message.
* This preemption strategy makes keeping track of idle CPUs by means of a bitmap
  superflous and it is therefore removed.
* Right now only other CPUs are preempted though, not the current one.
* Add missing initialization of the quantum tracking code.
* Do not extend the quantum of the idle thread based quantum tracking as we want
  it to not run longer than necessary. Once the preemption works completely
  adding a quantum timer for the idle thread will become unnecessary though.
* Fix thread stealing code, it did missed the last thread in the run queue.
* When stealing, try to steal the highest priority thread that is currently
  waiting by taking priorities into account when finding the target run queue.
* Simplify stealing code a bit as well.
* Minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-19 03:19:17 +00:00
Jonas Sundström
fe3763173c Add jamfile to build generic memcpy and memset for arch mipsel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-18 15:34:23 +00:00
Michael Lotz
100487755f We explicitly remove the thread from the (priority sorted) run queue to
re-insert it at a new place, but by only setting the priority and not the
next_priority field, the thread would actually be enqueued at the same priority
level as before. Didn't cause any real damage, guess it was just an oversight.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-18 13:19:12 +00:00
Rene Gollent
f940f1e99c Initialize variable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 23:28:58 +00:00
Rene Gollent
494fe97976 Cleanups and some changes to avoid looping to compute the quantum average as suggested by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 23:26:22 +00:00
Michael Lotz
65411f56b7 We can return directly as we use handy locker objects. Adjusted and added
comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 22:51:01 +00:00
Jonas Sundström
a245e6b444 Removing Axel's copyright. Permission given here: https://lists.berlios.de/pipermail/haiku-commits/2009-August/019513.html
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 22:26:09 +00:00
Jonas Sundström
c175f2a63e Adding placeholder machine dependent kernel code for arch mipsel. Copied from src/system/kernel/arch/arm and gutted.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 20:01:11 +00:00
François Revol
541dd9330e I'm obviously not that old. Not officially at least.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 19:22:44 +00:00
Michael Lotz
73c035dc11 * Set freed memory to 0xdeadbeef before returning it to page. This allows us to
not hold the bin lock while setting and only protect the actual freeing. May
  reduce bin lock contention a little bit.
* Tiny optimization for force-clearing 0xdeadbeef. Do it after setting to 0xcc,
  so that it's less likely we have to do it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 17:25:24 +00:00
Jonas Sundström
ac5f5cdf01 Define IEEE-endianness for arch mipsel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 14:59:19 +00:00
Michael Lotz
699bf40942 Add scheduling notifications to scheduler_affine.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 14:51:07 +00:00
Jonas Sundström
31a36e3021 mipsel wip
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-17 14:49:04 +00:00
Ingo Weinhold
4e4ff20294 common_poll():
* Always select POLLNVAL. We wouldn't get notified, if the FD was closed while
  waiting.
* Skip negative FDs (as per POSIX standard).
* When encountering an invalid FD, we must not wait. Previously we did that as
  long as any FD was valid.
* The return count must consider all FDs with non-null revents, including
  invalid ones (revents is POLLNVAL then).

common_poll()/common_wait_for_objects():
* Don't bail out early, when no FDs/objects have been selected. We always want
  to wait.

_user_poll()/_user_wait_for_objects():
* Copy the array back to userland even if common_*() returned an error. The
  functions do now always fill in the resulting events.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 16:42:18 +00:00
Ingo Weinhold
57dc0e2a53 Changed the FD selection/deselection handling a bit:
* B_EVENT_INVALID is no longer passed to the FD's select()/deselect() hooks.
* Now we always attach the select info to the I/O context, even if no event has
  been selected. The reasoning is that B_EVENT_INVALID is always automatically
  selected and handled by the VFS, so we need the handle to notify on close().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32417 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 16:28:15 +00:00
François Revol
5ce6cb5c32 [GSoC] [ARM] Patch by Johannes Wischert.
Some debug output.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 14:31:14 +00:00
François Revol
4b953dec79 [GSoC] [ARM] Patch by Johannes Wischert.
Do call mmu_init_for_kernel() here.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 14:29:20 +00:00
François Revol
d10d43315b [GSoC] [ARM] Patch by Johannes Wischert.
Fix arch_int_are_interrupts_enabled().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32414 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 14:28:00 +00:00
François Revol
33a3c23a00 [GSoC] [ARM] Patch by Johannes Wischert.
- cleanup,
- implement atomic_set() for PXA and other pre-arm6.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 14:22:53 +00:00
François Revol
f6e18219c3 [GSoC] [ARM] Patch by Johannes Wischert.
Add assembler code to actually jump to the kernel.
The terminal now says:

kernel entry at 80048228
PANIC: acquire_spinlock: attempt to acquire lock 0x8012a59c with interrupts enabled
Welcome to Kernel Debugging Land...
Thread 0 "" running on CPU 0
kdebug>



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 02:16:23 +00:00
François Revol
d20ab0b9af [GSoC] [ARM] Patch by Johannes Wischert.
Add missing kernel stub.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 02:14:51 +00:00
François Revol
12f64a3b27 [GSoC] [ARM] Patch by Johannes Wischert.
- don't panic on missing page table, just add it,
- less debug output,
- include PXA LCD regs in hw memory map.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 02:13:39 +00:00
François Revol
bb7479a182 [GSoC] [ARM] Patch by Johannes Wischert.
Turn off interrupts at loader entryn and make sure the mmu is disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 02:11:07 +00:00
François Revol
639b8a4905 [GSoC] [ARM] Patch by Johannes Wischert.
This seems to work around the dynamic segment having a huge file size in headers, it must also be in the data segment...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-15 01:15:18 +00:00
François Revol
98a3545295 [ARM]
Add support for boot splash, only for PXA.
Disabled for now as it forces the framebuffer onto some useful data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 22:14:07 +00:00
François Revol
477d2636d8 Return B_OK on success.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 21:04:29 +00:00
François Revol
7db9fbfe80 Factor out the splash image display logic too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 20:51:29 +00:00
Ingo Weinhold
7435db9ff0 * _user_read_dir(): Allocate a temporary heap buffer passed into the kernel
instead of using the user buffer. This frees the VFS and FS implementations
  from handling user buffers.
* Adjusted fix_dirent() accordingly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 18:31:35 +00:00
François Revol
0573d397e1 Factor out the RLE and blitting functions from bios_ia32 to platform/generic/ so it can be reused by other platforms.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 18:15:44 +00:00
Axel Dörfler
55be27517f * Also print the capabilities on boot up.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-14 14:31:38 +00:00