Commit Graph

60169 Commits

Author SHA1 Message Date
Augustin Cavalier
d230b5fdd3 packagefs: Use object caches for the most used node classes.
Slab statistics from KDL show that on a stock nightly image
(i.e. no additional packages besides the standards installed)
there are 43848 *objects* (not bytes) in the PackageNodeAttribute
cache, and 25090 in the PackageFile cache, so this seems more than
worth it.

The last commit seems to reduce memory usage at boot by about 1%,
this commit seems to not affect it at all; but it is a significant
performance optimization and on systems with more packages installed
the effect may be very noticeable.

Change-Id: I676a642ed6003f82b14396e1f02684575d899362
2019-07-09 22:38:59 -04:00
Augustin Cavalier
71e255cd31 packagefs: Remove PackageDataV1 from PackageData.
Now that we never access V1 packages in here, we don't need this.
This saves *24* bytes off the size of the class, which is
extremely significant as not only every PackageFile instance
has an instance of this class, but every PackageNode does too;
so the savings from this change is probably in the MB.
2019-07-08 23:29:40 -04:00
Jérôme Duval
ed9a502a9a console: allow one user at a time.
Fixes #15142.

Change-Id: I203cb62a6640fcd5f674eeaf4aa1145e1e831ca6
Reviewed-on: https://review.haiku-os.org/c/1566
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-08 22:01:44 +00:00
Augustin Cavalier
2f6dc2bb79 kernel: Commit missing change to team.h.
If the buildbots were working, I would have been informed of this
about an hour after I committed it last night. But it seems they aren't.
Maybe kallisti5 will have some more incentive to work on that?
2019-07-08 17:58:43 -04:00
Jérôme Duval
d2e519391f Messenger: style fix.
Change-Id: I5b1b7e745de91bd1bedbbbe13faf848fdd284785
Reviewed-on: https://review.haiku-os.org/c/1565
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-07-08 18:53:48 +00:00
Augustin Cavalier
5c97129ce3 kernel/team: Remove team_get_team_struct, add team_geteuid.
Thanks to Axel for the review.
2019-07-07 22:51:09 -04:00
Augustin Cavalier
05901d8963 kernel/cpu: Only root can enable or disable CPUs. 2019-07-04 17:00:28 -04:00
Augustin Cavalier
6f0aa00c6b kernel/user_debugger: Add missing permissions checks.
Part of #14961.
2019-07-04 16:54:50 -04:00
Augustin Cavalier
a90e9ba7b9 kernel/team: Create a team_get_team_struct() function and utilize it.
Cleans up some lock/get/unlock sequences, and makes it possible
for external consumers to get team structs (which will be necessary
for permissions checks.)
2019-07-04 16:54:33 -04:00
Augustin Cavalier
6f6cba7c16 kernel/system_profiler: Do not allow non-root users access.
The single-team profiler can still be used without root access.
Part of #14961.
2019-07-04 16:41:36 -04:00
Augustin Cavalier
ebb0db62d1 kits: Only export private dummy copy constructors for R5 ABI.
Fixes #546 (after all these years!)
2019-07-04 15:24:23 -04:00
Augustin Cavalier
45dcac89df usb_hid: Fix copy/paste error in HIDReport.
Spotted by Coverity.
2019-07-04 12:39:31 -04:00
waddlesplash
8b19fb0f55 Partially revert "XHCI: Set the TRB_3_ENT_BIT on the final Link TRB, also."
This reverts commit 63895cb5f2.

This does go against the specification, and on a very small set of
XHCI hardware, seems to break booting (#15137). So, let's revert it;
the buggy hardware it potentially helped will just have to deal with
it.
2019-07-03 20:51:05 -04:00
Adrien Destugues
b11f8cb28c tty driver: build fix. 2019-07-02 22:45:47 +02:00
Alexander von Gluck IV
5965cdf80b glibc/riscv64: Add native missing sqrt functions from BSD
Change-Id: I7dbbb5be0dd56b2a0b5148a4f7f81c66b76e9632
Reviewed-on: https://review.haiku-os.org/c/1554
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-02 13:34:46 +00:00
Alexander von Gluck IV
f1f452b3cf libroot/os: Fix missing time funcs on riscv64
Change-Id: I291ebc949d63860e20eb609e4d3d2f600309d4e9
Reviewed-on: https://review.haiku-os.org/c/1553
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-02 13:34:22 +00:00
John Scipione
a9d549c969 BFS: Set -std=c++11 in bfs_shell c++flags for gcc >= 3
Required for use of non-static data member

clang complains about this line in CheckVisitor.cpp:
memset(&Control().stats, 0, sizeof(check_control::stats));

some explination:
https://stackoverflow.com/questions/29359661/clang-error-invalid-use-of-non-static-data-member
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2253.html

Referencing a non-static data member inside a struct was retroactively
made undefined in C++98 and only allowed on C++11 even though gcc
permits the code to compile.

No change to functionality intended.

Thanks Jérôme and waddlesplash

Change-Id: Ic6bc332cf2796c709584488c60a067cd341bf894
Reviewed-on: https://review.haiku-os.org/c/1503
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-02 10:52:02 +00:00
Alexander von Gluck IV
0dbb417d43 3rdparty/docker/bootstrap: Fix defaults to be more generic and engine selection
Change-Id: I8a1e3c6bd641ea08a5a06985389269d708d94655
2019-07-01 14:07:03 -05:00
Adrien Destugues
e399a8832d usb_serial: don't allow Service() on a closed device.
- In Service, check that the device is open.
- In Close, clear dangling pointers to more easily spot problems and
avoid risk of accessing freed memory.

Change-Id: I970c4b8b8ec14db448388f74fc275634801c359a
Reviewed-on: https://review.haiku-os.org/c/1551
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-07-01 03:01:07 +00:00
Adrien Destugues
865a165f1c legacy tty driver: share common files with the new implementation
Let's make it easier to keep them in sync for now.

Change-Id: Ic0f1488c7f7da7770db56c25d07fb3ead5e3649e
Reviewed-on: https://review.haiku-os.org/c/1550
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-07-01 03:01:07 +00:00
Fabio Tomat
46aa215360 Friulian keymap
Change-Id: Ib766f88b21d40c8a014d85d097bb557bca3c235d
Reviewed-on: https://review.haiku-os.org/c/1548
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-07-01 03:00:36 +00:00
Murai Takashi
749c57a325 drivers/input/wacom: Fix -Wformat=
Change-Id: I164aa8e0ad7e0c19f7e59d7b6e36877fde9f2877
Reviewed-on: https://review.haiku-os.org/c/1547
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-30 09:17:08 +00:00
Murai Takashi
20c352526a drivers/audio/emuxki: Fix -Wformat=
Change-Id: I2ab8be10ed9f020b139f81d8826dc20d83fa1e4e
Reviewed-on: https://review.haiku-os.org/c/1542
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-30 09:16:53 +00:00
Murai Takashi
4c031f6847 drivers/graphics/radeon_hd: Fix -Wformat=
Change-Id: I383a3685247c8b6b00062ac135cb1f9144ec8039
Reviewed-on: https://review.haiku-os.org/c/1546
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-30 09:16:35 +00:00
Augustin Cavalier
63895cb5f2 XHCI: Set the TRB_3_ENT_BIT on the final Link TRB, also.
This should not be necessary due to a note in the specification,
but it seems some controllers may not obey that; see inline comment.

Possibly fixes the "mouse slowness" of #15115 that began following
the Event Data changes.
2019-06-29 15:46:52 -04:00
Augustin Cavalier
8bb337b5fe libnvme: make configure_aer failing a warning.
The spec generally requires this feature, but some emulated hardware
(e.g. QEMU) does not support it. SPDK seems to just ignore the
error and continue on with a warning, so let's do the same here.
2019-06-29 15:25:21 -04:00
Augustin Cavalier
9d75a81958 libnvme: Actually implement nvme_static_assert. 2019-06-29 13:40:30 -04:00
Augustin Cavalier
e2aa2b55a7 nvme_disk: Trace I/O errors to syslog.
This really should never occur, but in case it does, whoever called
us may not print such an error, so we should.
2019-06-29 13:22:26 -04:00
Murai Takashi
b2de0c59cb drivers/graphics/intel_810: fix -Wformat
Change-Id: Ia52bbcdc98847910c36bb1495418dbb3f0bc3cb0
Reviewed-on: https://review.haiku-os.org/c/1543
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-29 10:44:39 +00:00
Murai Takashi
66fa08aa81 bin/mail_utils/mail2mbox: Fix -Wformat=
Change-Id: I38ebad839c96d4c5ff2c38f678cfa03c58931335
Reviewed-on: https://review.haiku-os.org/c/1545
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-29 10:44:04 +00:00
Murai Takashi
44c006d567 file_systems/reiserfs: Fix -Wformat=
Change-Id: Ic011a5407ff5ecb832606541d258005217dcd6be
Reviewed-on: https://review.haiku-os.org/c/1529
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-06-29 10:38:12 +00:00
Alexander von Gluck IV
bc71f97ed7 efi: Don't assume x86 and x86_64 build flags
Change-Id: If11a892665d08f61c46b5a6a5b4bf0453225c3ee
Reviewed-on: https://review.haiku-os.org/c/1533
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-06-28 18:12:29 +00:00
John Scipione
2a1cc90e3e configure: use stat -f on bsds, -c otherwise
Move host platform detection up, fix indentation.

If the host platform is a BSD (darwin|freebsd|openbsd) use stat -f,
otherwise use stat -c to check for a restrictive umask.

Change-Id: Ifb57eb69153221a23a84700445ff08a96517844a
Reviewed-on: https://review.haiku-os.org/c/1535
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-28 03:31:06 +00:00
John Scipione
fdc59e4e7e fs_darwin fix warning: '&&' within '||'
place parentheses around the '&&' expression to silence this warning

Change-Id: Ie6152d2371ed65f57e6e75c9541263a5e1511513
Reviewed-on: https://review.haiku-os.org/c/1532
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-06-25 06:47:10 +00:00
Murai Takashi
37c1db12f3 add-ons/kernel/file_systems/fat: Fix -Wformat=
Change-Id: Ife9278565adedc95d8574b1a539c3d6c5642a565
Reviewed-on: https://review.haiku-os.org/c/1520
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-06-24 21:58:21 +00:00
Murai Takashi
5caa9c867e drivers/audio/hda: Fix -Wformat=
Change-Id: Ifbc08eefc53cac2e23fc3ac4b003bf4d897265d7
Reviewed-on: https://review.haiku-os.org/c/1522
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-06-24 21:58:10 +00:00
Murai Takashi
fe5e83a681 drivers/audio/ac97: Fix -Wformat=
Change-Id: I454ca76cfd5f8ebddb74c6b68a940d0444a82bb1
Reviewed-on: https://review.haiku-os.org/c/1530
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-06-24 21:57:53 +00:00
Alexander von Gluck IV
650c8b81a2 nvme: Use kernel private memory barriers
Change-Id: I1747de7afb2a5b2ec845c1c14f013dbcb9bd72f8
Reviewed-on: https://review.haiku-os.org/c/1528
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-06-20 20:20:03 +00:00
Alexander von Gluck IV
b313d63eae arm/atomics: Move cpu-specific memory barriers to arch_cpu
* Now matches the rest of the architectures.

Change-Id: I6699e0c8f729923770f136f2c9599185a685336a
Reviewed-on: https://review.haiku-os.org/c/1527
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-06-20 20:20:03 +00:00
Alexander von Gluck IV
37761761a0 jam: Style fix in build/MMCImage
Change-Id: Idb169f59ed77c9038e48e0e26e4fa53e92103ffe
2019-06-19 19:28:52 -05:00
Alexander von Gluck IV
f2762b2d56 fdt/serial: Fix tracing, enhance
Change-Id: Ibc42267fa1208344dbf9062075dbad7086e4e3d4
2019-06-19 19:28:02 -05:00
Alexander von Gluck IV
75262df789 arm: Fix SD Image after haiku_loader changes
* haiku_loader.u-boot doesn't fit in fat32 like haiku_loader.ub
* Adjust when writing. Update u-boot scripts to expect new filename
* Shrink loader partition to 32M, add our filesystem to end

Change-Id: I62936526a7dea2c41e26a7c0f9e05a368622a6a3
2019-06-19 16:02:39 -05:00
Alexander von Gluck IV
23c507bd15 docker/bootstrap: Add alternative fedora bootstrap container
Change-Id: I2e77f04a6b74858abf74a266a360dbf1dba4bed7
2019-06-19 11:25:05 -05:00
Alexander von Gluck IV
4b0251ba5b docker/bootstrap: Improve local code injection
Change-Id: Ib1961d829ef1418a9b64307c73a01bab3520279a
2019-06-19 11:24:18 -05:00
Alexander von Gluck IV
cb343bfe59 nvme: Fix nvme driver build on non-x86
Change-Id: Ia7a1dc56bcec69678e1fc2d8a427c24a32215bb8
2019-06-19 08:58:06 -05:00
Alexander von Gluck IV
81afd20b21 arm/repositories: Add final missing requirements
Change-Id: I7fdc23160719774d8977ae6b5ac4af8a5d0ee358
2019-06-19 08:45:32 -05:00
Alexander von Gluck IV
70ebf78e12 arm/repositories: Add missing ncurses6 package
Change-Id: I6ca29abbcde80bd09db4c1a4808bd71346afd20e
2019-06-19 07:57:37 -05:00
Alexander von Gluck IV
836e51c326 arm/repositories: Update for latest build_packages
* For tracking, there are *mega* hacked together using
  llvm's linker and functionality isn't a sure thing.
* Thanks waddlesplash for the sketchy changes :-)
* Hopefully gets non-bootstrap arm builds working again
  and let us work on the toolchain without blocking arm
  development.

Change-Id: I0617ed83cc757d098e6464222405f75eed91196e
2019-06-18 19:42:16 -05:00
Augustin Cavalier
8c8615a293 libroot/arm: Add generic_stack_trace.
Fixes the link of libroot_debug. Now Haiku ARM bootstrap builds
complete successfully!
2019-06-17 21:07:44 -04:00
Augustin Cavalier
99bcdc503c bootloade/arm: Change a physical address to phys_addr_t.
Fixes a compile error with recent GCC.
2019-06-17 21:07:16 -04:00