Set window location but do not Invoke() when opening prefs window.
We do not want the Deskbar window location to change on open/show
prefs window, only when you change the preference.
The root problem here is that we currently do not support horizontal
mini-mode in Deskbar preferences, only vertical. Consequently, opening
the prefs window switches Deskbar into vertical mini-mode when in
horizontal mini-mode. Leave the state alone so this doesn't happen.
Change-Id: Ife00e02f4bc16344fed47d23b9d768aa46b8d7f7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11524
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
(cherry picked from commit 6674947bb98ba64da5af9d5de6f894850a194b98)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11533
* Handle threads without masks: this means they can run on any CPU.
* Return only enabled CPUs from get_thread_affinity.
* Clear the user mask's extra bits.
* Allow masks with more CPUs set than are active, same as Linux,
but disallow masks with no intersection with the active CPUs.
* If setting to all enabled CPUs, clear the mask, so that if
more CPUs are enabled in the future, this can run on them too.
* Add permissions checks.
Fixes#20251.
(cherry picked from commit f46b3483057b149179dda7abdcc2dde38994a8cc)
Change-Id: Ib8649cb0a252fc8d9cfca691c2e03748561db741
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11529
Reviewed-by: waddlesplash <[email protected]>
If we've gotten to pack_irqs, it means the current CPU is idle,
so it's not totally overloaded. We then check whether the "small
task" core is less loaded than us, or whether it has a significant
load difference from us, and bail if it doesn't.
This avoids thousands of unnecessary IRQ reassignments when
using power saving mode.
Follows up #18588.
(cherry picked from commit 5ba228dfc6fbf87de734d3f08369c824bd4553a3)
Change-Id: Idc914023911f374ec70a87e13437ce388bcdbd8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11520
Reviewed-by: waddlesplash <[email protected]>
pw_gid and pw_uid aren't pointers, so checking them for 0 just
meant we didn't change the UIDs if we were something other
than root.
(cherry picked from commit acf0e80dc0fe1ae63d89211dfd28133a254a9753)
Change-Id: Ia567d61f645356bb122dd1bce99c581369f8f19f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11498
Reviewed-by: waddlesplash <[email protected]>
As they usually are.
Also delete an unused utility function.
(cherry picked from commit 8cd127ed218340c7d293f1dd94a60ab479204c92)
Change-Id: I43ad195f24c2bd26e875715ea18a63b1222d4e52
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11496
Reviewed-by: waddlesplash <[email protected]>
We have to check for dragging in Pulse(), it's too late to check
this by the time we have gotten to StartEdit().
A bit of additional cleanup including some related comments.
Change-Id: Id292d73593d12028e7368c50dac0869c4a7df94b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11439
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
On SMP systems, we may call ioapic_assign_interrupt_to_cpu from
multiple CPUs at a time, at least under low-latency mode.
May fix#18588.
Change-Id: Ie76e4127b05a8abc5f411d7719997dcfff9c2ff0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11491
Reviewed-by: waddlesplash <[email protected]>
This is a separate thread that takes care of actually freeing vnodes,
so we can avoid doing that (or doing an expensive "free unused vnodes")
from some random thread that called put_vnode.
We still (try to) free vnodes directly in unlink(), though, so that
removal writes go through.
Note that the "reenter" parameter is now load-bearing, as put()
calls that come from a filesystem are executed directly instead of
being deferred. This is necessary in the unmount case.
This should break the deadlock in #20234.
Change-Id: I458f4003b9b8014ca326d477df4782492d8db437
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11444
Reviewed-by: waddlesplash <[email protected]>
(cherry picked from commit bc46fb3e9a83dca0d684bc0d9f1518aafac945be)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11483
We do the same for mmap. This is at least a little better than
only having "pthread func" for pthreads that don't get renamed.
(cherry picked from commit fdc03c5ef9f386e84b9229c667ddba11fabed55e)
Change-Id: Iaaafc4f5393537d3c3e16da04ed12bc56adb88ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11423
Reviewed-by: waddlesplash <[email protected]>
There's no reason to reject them; they should just result in
a zero-byte output.
Should fix#20222.
(cherry picked from commit 4b6aad38968f9fe91712e742aff9166fec6e67a1)
Change-Id: Ifdbe17618d74eca0b873a6808ec0b14a7d38189a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11402
Reviewed-by: waddlesplash <[email protected]>
Instead of elsewhere. Fixes another missed Put(), in VMUserAddressSpace's
_InsertAreaIntoReservedRegion(), and guards against such problems
happening in the future.
Change-Id: If6d87d36225907e281e2341e8b53c461e6954f22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11381
Reviewed-by: waddlesplash <[email protected]>
They were passed to TranslationMap::Query() directly, assuming that the
TranslationMap would just round down to the nearest page address. This
actually isn't guaranteed in the case of X86VMTranslationMap64Bit and
the physical map area, which uses hugepages, and so adds the offset
to the page address itself.
So, here the logic is rewritten to always pass page-aligned addresses
to Query(), and then re-add the offset for the first page only. We then
increment virtualAddress instead of an offset, making the next Query
naturally page-aligned.
This was the cause of #20142: when the BFS I/O hook was disabled,
virtual addresses in the physical map region were passed down to
the disk I/O routines, which were then mistranslated by this function,
resulting in corruption of adjacent pages by DMA, and incorrect
data in the pages where it was supposed to be read into.
Fixes#20142.
Change-Id: Ibacd00b7f5ce23a7b41c620224ddf8d338b6de4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11377
Reviewed-by: waddlesplash <[email protected]>
The video buffer used for colorspace conversion was not aligned enough
(it could need as much as 64 bytes alignment) and did not include enough
padding (the functions work on 64 bytes blocks at once in some cases).
This code could be made simpler by using sws_scale_frame instead of
sws_scale, but that's more refactoring than I'm willing to do right now.
Thanks to k32n13 for providing a script to generate test videos!
Fixes#20200.
Change-Id: I8b51fd777201cdb899ce1834152066378b258521
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11343
Reviewed-by: waddlesplash <[email protected]>
(cherry picked from commit a0bfeae472eee24a9855e9685a507f6f85d91673)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11344
The BIOS module is used to run BIOS code in a "fake" machine so it can
be called from protected mode without having to go back to real mode.
To achieve this, it copies some parts of the physical memory into that
physical machine. It used to also map some of that memory directly
rather than copying it.
In hrev55544 this was changed to do a copy instead of a mapping. The
copy can then be written to, which opens the way for VESA BIOS live
patching.
However, the copy also means that the entire copied physical memory area
is accessed by the CPU. That area includes the VGA memory, which may not
exist or be masked. In particular this happens in QEMU by default (the
memory is only mapped when graphics mode is activated). In the case of
the NVMM virtualizer, this results in a crash of the virtualizer as
the guest attempts to access memory that doesn't exist.
To avoid the issue, the "fake" machine now includes a copy of the EBDA
(top of RAM) and the BIOS ROMs, but not the video RAM (that part of the
memory space is left uninitialized). This way, it doesn't matter if the
hardware has valid memory there or not.
With this fix, Haiku can boot even without the "Don't call the BIOS"
option set.
Thanks to sed4906 and waddlesplash for the help in locating the issue!
Fixes#20123.
Change-Id: Ide9b6900d2b2abe59138c0c370c8f37a856c4bcd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11337
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
(cherry picked from commit f8e60239a31589e57f0693f27bf731fa98ad1c52)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11338
The cache may not have all pages needed to be fully locked. Therefore
we have to use B_LAZY_LOCK if it doesn't.
Fixes some KDLs I was seeing when using NVMM against a raw disk device.
(cherry picked from commit 0ea1a0a835e8093355c5ea4fbe08dc9be93e3eb5)
Change-Id: I403eaf2f14677101cdd327d4b99c12318815c116
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11332
Reviewed-by: waddlesplash <[email protected]>
Discovered by compiling with UBSan (it triggered as a compile-time
warning; I don't know if this actually causes any problems at runtime.)
(cherry picked from commit 6b28f736c09757156abadd560e69b8e090e60f25)
Change-Id: I91f6930fd4b9e870ecc1bad357aae2722f252cd1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11329
Reviewed-by: waddlesplash <[email protected]>
off_t is a signed 64-bit type, but size_t isn't signed or 64-bit
on 32-bit platforms. That meant adding a sign bit caused strange
things to happen there.
Fixes incorrect free-memory computations on 32-bit.
(cherry picked from commit cc565c81afd2dfba34de6ced607199d757080a8d)
Change-Id: I294f92ac1279a6311347b5e25341542d8c862013
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11326
Reviewed-by: waddlesplash <[email protected]>
We allocate/free ranges with the write lock held, so the depot is
just a waste, and actually in low-memory conditions hurts (if we
need a Range and there's none in the cache but there were in the
depots, a scenario I saw when trying to boot with a DEBUG=1 kernel
on my laptop.)
(cherry picked from commit ad189ca258d42e68f493c22bb3ce5f904e1589bc)
Change-Id: Id4af983a8b1337f8e90640218fe63402543355f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11322
Reviewed-by: waddlesplash <[email protected]>
This change corrects the selection of a package
so that if it could not have been in the filtered
list of packages then it becomes unselected. Also
fix a problem where `StackedFeaturedPackagesView`
is getting pointer events and so getting
`MouseDown(..)` all the time. Also remove some
disused code.
Fixes#20195
Change-Id: I4e30a79d1bfe9cd59bca10113376e8fa87f37ec6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11318
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
(cherry picked from commit a2cb86260ce9e1898ed31d9a45f8f76e718c0a1b)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11319