Commit Graph

60223 Commits

Author SHA1 Message Date
Augustin Cavalier
63ba21d506 pkgman: Inform the user when a reboot is required to complete installation.
Fixes #14783 following on hrev53005.
2019-06-01 16:19:55 -04:00
Augustin Cavalier
86d552aca2 rpmalloc: Increase the thread cache multiplier somewhat.
Now that the previous commit introduced the adaptive thread cache,
the thread cache multiplier is just a "hard limit", and often
not reached. So we can increase it a bit without adversely
affecting memory usage that much.
2019-06-01 11:30:51 -04:00
Augustin Cavalier
6818450748 rpmalloc: Import adaptive thread cache changes.
This synchronizes to rpmalloc upstream commit
5ffaa237989ac2c74dcd77776e4a3983a387a477.

The primary change in this batch is the "adaptive thread cache",
which was created partially from the use-case of our own Installer,
as mmlr discovered when first testing rpmalloc. Our interim solution
was to tweak the thread cache limits, which helped, but not as
much as this does:

Without patch, default cache multipliers: memory usage peaks at around 227MB.
Without patch, our reduced cache multipliers: memory usage peaks at 37MB.
With patch, default cache multipliers: memory usage peaks at 18MB (!!).
the commit.
2019-06-01 11:30:41 -04:00
Bruno Albuquerque
8c76ab00c4 freebsd_network: Enable memory mapped io and ioport access.
Cofirmed to fix #15016, #15052.
Potentially fixes #14576, #14546, #14298, #14265, #13840.

Change-Id: I27b0bb6692c23aedbdddc70aff9349c713703dd4
Reviewed-on: https://review.haiku-os.org/c/1497
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-31 17:02:48 +00:00
Axel Dörfler
7c2135591b KDiskDeviceManager: Ignore invalid partitions
* Partitions with negative offsets were already ignored, now also ignore
  those with an invalid size of block size, too.

Change-Id: I128e38773933f8eadded0977a957f607363cccbe
Reviewed-on: https://review.haiku-os.org/c/805
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-05-30 23:04:53 +00:00
Jérôme Duval
7f8f4c9c8c tty: some improvements to pass posix_openpt_test.
WriterLocker::AcquireWriter(): don't fail when the other end isn't yet opened.
WriterLocker::_CheckBackgroundWrite(): don't fail when the pgrp_id differs.
ReaderLocker::AcquireReader(): fail when the other end isn't opened anymore.
ReaderLocker::AcquireReader(): check available bytes even in case of failure.
ReaderLocker::_CheckBackgroundRead(): don't fail when the pgrp_id differs.

Change-Id: Ice2bd119cbec2afc9ebd40714e4307856f540ea2
Reviewed-on: https://review.haiku-os.org/c/1418
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-05-29 17:02:56 +00:00
Jérôme Duval
ec1d063cdd ahci: handle partial inquiry requests.
* it seems 36 bytes is the length of a short inquiry request, so use that.
* also remove a data_length check on SCSI_DIR_IN, a zero value is actually
allowed.

Change-Id: I6618f59626c2540d95b5a8b900d758ec65b11b24
Reviewed-on: https://review.haiku-os.org/c/1487
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-05-29 17:02:13 +00:00
Jérôme Duval
88e34b3b3d scsi: use get_memory_map_etc().
get_memory_map_etc() allows to not need an additional empty entry.
also fix a TODO

Change-Id: I1b5dc3e65267ccba2a21c7162cfc2504b16ad8f7
Reviewed-on: https://review.haiku-os.org/c/1490
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-05-28 17:43:10 +00:00
Jérôme Duval
e5b82f8034 scsi: change sg_count to uint32.
coding style.

Change-Id: Ie2e1a71e55b8fe8ac984d47b9b97409b1e436b69
Reviewed-on: https://review.haiku-os.org/c/1489
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-05-28 17:43:10 +00:00
Jérôme Duval
061236d419 scsi_cd: reset io_scheduler and dma_resource on uninit.
it seems possible that a file descriptor is still opened after the device
is uninited. at least handle properly the situation.
help with #15089

Change-Id: I76fb41a8439ab7350ce4d781511aceb6496847c3
Reviewed-on: https://review.haiku-os.org/c/1486
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-05-27 16:42:20 +00:00
Jérôme Duval
ff4af513e1 scsi_periph: use bounce buffers for userland raw commands.
also errors when the buffer length is too small for the request buffer type.

basically tested, this is difficult to test without physical hardware.
this fixes #14966

Change-Id: Iebee5ff29dfe498ee52cab5867c8c4ff7d2bcde1
Reviewed-on: https://review.haiku-os.org/c/1484
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-27 16:42:09 +00:00
Andrew Lindesay
325b11bf67 HaikuDepot: Fix Bug with Collation
This resolves a bug where a collation pointer is
not being initialized.

Change-Id: Ice59f82eb6cedd3e15acbafa738445984d7114d3
Reviewed-on: https://review.haiku-os.org/c/1485
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-25 21:23:18 +00:00
Augustin Cavalier
94a67989c2 LegacyPackageInstaller: The system name should be LegacyPackageInstaller. 2019-05-25 14:38:20 -04:00
Augustin Cavalier
85200a1c4c ActivityMonitor: Add swap space to the default memory graph.
I was doing some analysis of the memory areas the kernel was using
after a long uptime, and found that there were 1.3GB worth of
"slab area"s, but the kernel was "only" using 550MB according to
ProcessController ... but then I realized I wasn't looking at
swap, which showed another 700MB of usage.

So, adding it to ActivityMonitor's main memory graph seems to
make sense then. At least most Linux system monitors do this.
2019-05-25 14:33:51 -04:00
Augustin Cavalier
f64ef4a3fd HaikuDepot: Add missing stdlib.h include to fix the build. 2019-05-25 14:31:41 -04:00
PulkoMandy
7048289678 openfirmware: fix jamfiles
Without the MultiArchDirSetup, these would not use the boot cflags, and
end up being compiled position-independant. Of course, the a.out format
does not allow relocations, so this could not work.

Change-Id: I6bb570e545f1533200511e6881f71feedb77025b
Reviewed-on: https://review.haiku-os.org/c/1481
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-25 18:16:35 +00:00
PulkoMandy
cdbda49e88 sparc: fix openfirmware entry point.
According to the IEEE standard documentation, the OpenFirmware entry
point should be in %o3. But that doesn't work, and both FreeBSD and
NetBSD expect it in %o4 (5th argument of the function). I suspect this
was changed for 64bit sparc, but neither the sparc nor 64bit
openfirmware specs mention it.

Move the sparc and powerpc specific parts out of the generic start.cpp
for openfirmware as they each have some specificities. More
specifically:
- sparc already clears bss for us
- entry point arguments are different
- determine_machine is of course platform specific

Change-Id: Icaa05087e88ea4d29198e3565223459aed75cdf9
Reviewed-on: https://review.haiku-os.org/c/1470
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-25 18:16:35 +00:00
PulkoMandy
906c14da63 sparc: use generic w_sqrtl.c implementation.
I accidentally imported a newer version of the file that does the same
thing as the existing one.

Change-Id: Ifab3b24218f017cc57a459e0467cb8225accd9e5
Reviewed-on: https://review.haiku-os.org/c/1368
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-25 18:16:35 +00:00
PulkoMandy
864a3f996b sparc: do not leave a hole between .text and .data
The a.out format does not allow to handle this properly. So we need the
two sections to be contiguous.

Change-Id: I44455d4fb728bd47d5dcebc48c52b7d90d808104
Reviewed-on: https://review.haiku-os.org/c/1469
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-25 18:16:35 +00:00
PulkoMandy
94ba4f6406 sparc: fix bootloader executable format
- The entry point has to be at the start of the text section
- Use the correct formqt ("impure") for the a.out file
- Strip all symbols (the bootloader isn't relocatable)

Change-Id: I2b973c39eaf1416f874bf1b2668b1e3090eb5f7b
Reviewed-on: https://review.haiku-os.org/c/1468
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-25 18:16:35 +00:00
Andrew Lindesay
89b16bb4d2 HaikuDepot: Categories from Server
The list of categories for packages is currently
hard-coded into the HaikuDepot desktop
application.  This change will change that so that
the list is obtained from the HaikuDepot Server
system and is always up to date with the server's
list of categories.

Change-Id: I757732f4d771e1599d6ad9c85cd65905640de928
Reviewed-on: https://review.haiku-os.org/c/1478
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-05-25 11:10:50 +00:00
Augustin Cavalier
f259502c90 Haiku3D: Clear media_format using assignment operator. 2019-05-24 22:51:10 -04:00
Augustin Cavalier
ca904ab353 system_time: Add temporary hack for GCC 8 to get ia32intrin.
ia32intrin isn't supposed to be included, only x86intrin is,
but GCC 8 changed some of the __builtin definitions in a
backwards-incompatible way for some of the AVX headers.
So, this is a temporary hack until we are using GCC 8 syslibs
packages.
2019-05-24 19:14:28 -04:00
Augustin Cavalier
3a2175926b hoard2: Remove.
rpmalloc has now been turned on by default for over a week, and no
bug reports against it have been filed. So, it's probably safe
to remove this as dead code now.
2019-05-24 18:20:50 -04:00
Augustin Cavalier
3ca2e85bfd Interface: Add casts to memcpy/memset invocations on BPoint & BRect.
Their copy constructors are exactly what GCC would generate,
but we can't remove them because doing so would make them
trivially copyable, and so they would be passed in registers
on x86_64, an ABI breakage.

So instead we have to add explicit casts to void* here.
2019-05-24 16:10:13 -04:00
Augustin Cavalier
057b69a774 Deskbar & Translation: Use assignment operator instead of memcpy. 2019-05-24 16:00:38 -04:00
Augustin Cavalier
f7397837e8 BMessage: Use assignment operator instead of memcpy().
The only non-POD types the macro is used on are BPoint, BRect, BSize,
and rgb_color, so the first change should essentially be a no-op.

The second change will technically have different behavior,
as the BMessenger copy constructor does not touch the _reserved_
field; but this shouldn't break anything, of course.
2019-05-24 14:28:19 -04:00
Augustin Cavalier
632e7fd0a8 Interface Kit: Remove no-op TARGET_PLATFORM_HAIKU_COMPATIBLE. 2019-05-24 14:25:44 -04:00
Augustin Cavalier
bac6edf06f ArchitectureRules: Clean up GCC >= 3 logic & disable -Werror for netfs. 2019-05-24 14:25:26 -04:00
Augustin Cavalier
17089e9ae5 Terminal: Remove a copy constructor and assignment operator. 2019-05-24 14:24:47 -04:00
Augustin Cavalier
43005c1925 libroot: Include emmintrin instead of x86intrin.
We only need one builtin here, not 8 files of them.
2019-05-24 14:24:27 -04:00
Augustin Cavalier
a1ad8af64e Change a number of sprintf to snprintf.
Fixes a number of -Werrors about format overflow from GCC 8.
2019-05-24 14:23:56 -04:00
Augustin Cavalier
5b189b0e1e HaikuDepot & PoorMan: Disable -Werror.
Unlike the last commit, I am not sure whether the memcpy/memsets
in here are properly safe to do. (They look OK, but a lot of them
involve template classes that probably should not make such
assumptions.)

But the code has worked so far, so let's disable the -Werror so
we can move forward with GCC 8 for now.
2019-05-24 14:23:12 -04:00
Augustin Cavalier
1705656eac Add (void*) casts to memcpy/memset invocations to appease GCC 8.
A lot of these classes are not *technically* "trivially copyable"
for one reason or another, but in all of these cases it seems
OK to me to use memcpy/memset on them. Adding a cast to void*
tells GCC that "I know what I'm doing here" and shuts up the
warning.
2019-05-24 14:21:37 -04:00
Augustin Cavalier
38b015579f Media: Use assignment operators instead of memset.
Spotted by GCC 8 -Werror=class-memaccess.
2019-05-24 14:19:07 -04:00
Augustin Cavalier
7a73df5e2c Debugger: Remove needless explicit copy constructors.
These worked in identical fashion to what the default copy
constructors would be, but their mere presence marks the class
as being "non-trivially copyable," which means that memcpy'ing
it is now a -Werror on GCC 8.

We have to be careful when making this change, though: classes
which *are* trivially copyable can be passed inside registers
on x86_64, so changes like these break ABI in a dangerous way.
These classes is private, so it should not be a problem, but
for other classes (e.g. BRect, BPoint) we cannot fix them
properly right now.
2019-05-24 14:17:02 -04:00
Augustin Cavalier
fef13fb917 ArchitectureRules: Add -Wno-error=format-truncation for GCC 8.
It warns on snprintf's output "possibly" being truncated (e.g.,
two B_PATH_NAME_LENGTH chars being concatenated together) which may
be exactly the behavior the programmer wanted. So that's not very
helpful.
2019-05-23 19:50:51 -04:00
Augustin Cavalier
1e78ac9523 BFS: Add missing NULL check in FileSystemVisitor.
Fixes #15082.
2019-05-23 12:11:12 -04:00
Augustin Cavalier
81c06cacc4 Debugger: Add missing SetTarget/AddItem. 2019-05-22 17:16:00 -04:00
Andrew Lindesay
cd00276153 HaikuDepot: Filtering Crash Resolution
I am unable to reproduce the problem locally, but
suspect that the lack of locking around one line
may be the cause.  Hopefully fixes #14025.

Change-Id: I14ba6d2cb4f264af732fad9c783c55f690cece4f
Reviewed-on: https://review.haiku-os.org/c/1472
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-22 19:12:02 +00:00
Alexander von Gluck IV
a70eb9a982 rpmalloc: Make 64-bit arch detection more generic
Change-Id: Ide9def37fd76641003dc25b7df8ade17d8443d19
Reviewed-on: https://review.haiku-os.org/c/1475
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-21 20:47:20 +00:00
Andrew Lindesay
4f8d9e120f HaikuDepot: Load Languages from HDS - Fixes
Follow-on changes from recent commit of the same title
with some improvements and fixes.

Change-Id: Ic4439966340578b920345332669591f6cdfcc203
Reviewed-on: https://review.haiku-os.org/c/1471
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-21 20:23:18 +00:00
Jérôme Duval
38ce902686 posix: add posix_fadvise(), only error checks.
should help for ports.

Change-Id: Id504bdb79cb68db4b615f58848e0e1a86ced8d2b
Reviewed-on: https://review.haiku-os.org/c/1467
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-05-21 15:07:43 +00:00
Adrien Destugues
66cb2efaa8 Move StripeView to libshared
Change-Id: Ib8ff2f731f9d34e04854f1c2ec288a3db1036793
Reviewed-on: https://review.haiku-os.org/c/1458
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-05-21 06:55:45 +00:00
Adrien Destugues
33fc4f4063 Revert "debug_server: Remove the "Write core file" button."
This reverts commit 02079c66f3.

Change-Id: I95a4bbef67e2a982da49a18105a4cbd85c4e11e9
Reviewed-on: https://review.haiku-os.org/c/1457
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-05-21 06:55:45 +00:00
Augustin Cavalier
d906fe3cc7 freebsd_network: Allocate a new root device for every attach.
This also means that when attach fails, we destroy the root device.
This should fix stale root devices getting left around when attach
fails.

Probably helps with or even outright fixes #15016.
2019-05-20 11:51:44 -04:00
Augustin Cavalier
6d880c9085 SerialConnect: Fix build on 64-bit. 2019-05-20 11:05:46 -04:00
Jérôme Duval
3802df804f pthread_key: set value planned for destruction to NULL.
* This fixes bug fix #10951.

Change-Id: I152cea3651b3307171ea4d6a0c49aceae2f0f797
Reviewed-on: https://review.haiku-os.org/c/1456
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-05-20 14:09:15 +00:00
Augustin Cavalier
33f7f28798 kernel & runtime_loader: Don't load from non-packaged when "Disable user
add-ons" is set.

Confirmed to fix #14361. It is finally possible to un-brick an install
with a bad system library in non-packaged without having to use another
install to do so.

Change-Id: Iafea7821f02cb34e77c766b1f97d1c19206b1081
Reviewed-on: https://review.haiku-os.org/c/1452
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-05-20 14:08:28 +00:00
Augustin Cavalier
69712d5c00 OS.h: Reorder includes alphabetically. 2019-05-19 12:37:14 -04:00