Change-Id: I44d8ee7a4c0a6b0cd5ed0fbc2201a1d63fd8dde6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3662
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
* Enable TLS for riscv64. For now select a dummy
implementation.
* RISC-V has a register (tp) dedicated to TLS
* All the "desktop-like" RV64 chipsets implement GC
* Same ISA we currently build for... but calls it out
in-case defaults change.
Change-Id: I623b6e5c309b6a6e80ec378e456b2335c561269d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3632
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Store the bus cookie in the mmc_disk driver and pass it to the bus
manager when executing commands. This avoids calling into the device
manager at each read and write operation. The code to get the cookie
from mmc_disk isn't so nice since it needs to access the grandparent
device (the mmc bus root), it would be simpler if this cookie would be
available directly from mmc bus devices.
We can get card removal and card insertion interrupt at the same time
due to insufficient hardware debouncing (the SDHCI spec says we
shouldn't, but it happens on Ricoh controllers. Can't blame them, they
don't advertise themselves as compliant with the spec). So, check the
card status from the interrupt handler and ignore the incorrect
interrupts.
Fix unreliable card initialization: power must be turned on before
starting up the SD clock. Remove a now unneeded delay that was added in
an attempt to avoid initial instability.
Change-Id: Ibd8d051da1a1d859f3924ee535f4a05d9b6398d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3639
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
It works, but performance is still unexpectedly low (getting about
50kB/s write speed) with almost no CPU load.
Change-Id: I7da3ee70c8b379c4e6c2250d67f880c78635874f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3630
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Should allow us to at least play the same files we could play before.
Fixes#16738, though not its cause
Change-Id: I2d23011696b730a891c802e8c2bfc23afe0041cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3628
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
When BSocket::Read() returns 0, it was treated as
a finished transfer. This is OK when we don't know
the content length, but when we do, there is no reason
not to bubble up the error. Return B_IO_ERROR in this
case.
Change-Id: I68801dbbb85bcfd2e7aa68fd6a9ded6304e82b19
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3621
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* otherwise the signal to be handled might be blocked. fixes#15193
* also remove automatic syscall restart on _kern_select, to match Linux and
BSDs behavior: this fixes parallel build with newer gnu make, which happens
to use pselect.
* also remove automatic syscall restart on _kern_poll.
from https://man7.org/linux/man-pages/man7/signal.7.html
"The following interfaces are never restarted after being
interrupted by a signal handler, regardless of the use of
SA_RESTART; they always fail with the error EINTR when
interrupted by a signal handler: ...
select(2), and pselect(2)."
from https://notes.shichao.io/unp/ch6/
"Berkeley-derived kernels never automatically restart select."
Change-Id: I3e9488f60c966b38d427f992f06e6e2217d4adc5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3636
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Somehow B_CANCELED doesn't seem to convey the correct
meaning. Using B_IO_ERROR will also fit to the recent
changes in the Package Kit and will trigger a re-try of
package downloads.
Change-Id: I58c4d4faa705e6519e0ff9ec7c4654a6151e5486
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3635
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* otherwise the signal to be handled might be blocked. fixes#15193
* also remove automatic syscall restart on _kern_select, to match Linux and
BSDs behavior: this fixes parallel build with newer gnu make, which happens
to use pselect.
* also remove automatic syscall restart on _kern_poll.
from https://man7.org/linux/man-pages/man7/signal.7.html
"The following interfaces are never restarted after being
interrupted by a signal handler, regardless of the use of
SA_RESTART; they always fail with the error EINTR when
interrupted by a signal handler: ...
select(2), and pselect(2)."
from https://notes.shichao.io/unp/ch6/
"Berkeley-derived kernels never automatically restart select."
Change-Id: I7f86d221eae1ad93d8a308a75581d2c30a369c9e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3627
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
- Fix VERSION macro in auich.h / auvia.h, used for log_create()
in debug.c.
- Add string.h to debug.c for strlen().
Change-Id: Iff4878763f49fe5b7e317c47e96ebd79f90725c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3629
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
There is a very good reason to have this: for low number of cores, the
default computation makes stupidly large bars.
I had tested my changes with various number of cores (1, 2, 3, 4, 8, 16)
in QEMU to make sure it looked correct in all cases. I don't understand
why kallisti5 reintroduced broken code.
This reverts commit b18298348a.
This reverts commit b1b6769b6f.
Switching to 4 bit mode requires some more coordination as the host
controller must also be switched, right after sending this command.
I will revisit this, but the previous commit was accidentally pushed to
master.
At least we get the 25MHz clock instead of 400kHz, that should already
be quite a performance improvement.
- Switch to 25MHz clock
- Switch to 4bit transfers mode (the default is 1bit)
Reading and writing SD cards do not seem to work anymore with these
changes. I get invalid data on read, and on write, an interrupt is never
called in some cases.
* It was making things confusing and honestly the dynamic
calculation code does a pretty good job.
* Just make sure we scale the scale the CPU bars with a
multipler that makes sense for a minimum width.
* This should give us a good baseline. Tested 1 to 32 cpus
Change-Id: If41c73e68b2de2b39196013af13e6c0ffdbe6489
* We saw a "big" cpu bar on 1 core.
* This was because adding 8 to the static "15" width
resulted in the static CPU sizing code getting disabled
* Converting this to 4 just completely disabled the static
scaling code and made dynamic always enabled
Change-Id: Ida8c718c0d0a2fcf72aedbf525daad040d5b3678
I don't know if the behavior makes sense, but anything is better than a
kernel crash. The ticket is an example calling the syscall directly,
so there is no user-oriented guarantee on how we behave here.
Fixes#16741.
Change-Id: I803596004d005c8c0e058c5422c4b0f7c78cfad8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3623
Reviewed-by: Rene Gollent <rene@gollent.com>
Change-Id: Ie10acfd10e8feab71660f99938cbb5bbab565772
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3618
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
DriveSetup does not make it clear when there is empty space or when a
partition is not formatted. Reword things a bit to make this easier to
understand.
This was a common source of confusion in various video reviews of Haiku,
with people trying to install Haiku to a partition that had not been
formatted.
Part of #16304
* 4 cores or less, use static table. More make view larger.
* 16 cores or less, 2px CPU bars
* More than 16 cores, 1px CPU bars
* Tested through 128 cores in qemu
Change-Id: I5fb460e7ee5848d0395b109acc602e86f4d5bbd7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3616
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Regression introduced in hrev54742 which used DeskTextColor() on a
non-desktop view. The view color isn't set anywhere in that case and
does not match the background color, which led to drawing white text on
a white background.
Moreover, a second bug was stacked on that: the selection is drawn in
"reverse video" (using the document color for the text and document text
color for the background) only for active windows. For inactive ones, it
is drawn normally, and then a middle-grey rectangle is alpha blended on
top. Add a comment to clarify that and reintroduce the ckeck that had
been removed.
Also replace the hardcoded black for the selection background, so it
will be more easily visible for people using dark mode.
Fixes#16627.
They were accidentally removed in hrev54634 in an attempt to clean up
the code.
Reintroduce the old logic with some cleanup and improvements:
- There was a mixup of "tab side" vs "border". The constant values for
the two are the same, so it still worked as designed, but it made the
code harder to follow since it deals with both borders and tab sides.
- Define an isVertical boolean to decide if the tab view is vertical,
avoiding repeated tests for specific tabview sides.
Fixes#16640.
We do not want flat buttons here. This was introduced to get the Be
control look to draw inverted color labels on the buttons, but there
must be another way to do this.
Fixes#16660.
+ avoid spaces at the end of a translatable string, as those can
easily be missed by the translators.
Change-Id: Ic41e613b44e4248529d1f68f6bab13a048e66f3e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3612
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>