Peter Avalos [Fri, 13 May 2016 00:44:10 +0000 (17:44 -0700)]
Merge branch 'vendor/LIBARCHIVE'
Matthew Dillon [Thu, 12 May 2016 21:44:16 +0000 (14:44 -0700)]
rc - Add unconfigured wifi interfaces to the netif list
* Use sysctl net.wlan.devices to get a list of wifi interfaces.
This sysctl is not yet active in master but will be when the wifi
update goes in (at which point the devices no longer show up in
ifconfig -l).
* This will allow existing wifi configurations in /etc/rc.conf to just
work with the upcoming update.
Matthew Dillon [Thu, 12 May 2016 21:27:09 +0000 (14:27 -0700)]
sysctl - Add -i and -q from FreeBSD
Enhance the sysctl code, will be used by /etc/network.subr
* sysctl -i - Exit cleanly with exit code 0 if a sysctl mib does not
exist. No warning or error message is output for this
case.
* sysctl -q - Exit with exit code N if a sysctl mib does not exist.
N is the number of mib's on the command line which failed.
No warning or error message is output for this case.
Peter Avalos [Thu, 12 May 2016 20:58:50 +0000 (13:58 -0700)]
Import libarchive-3.2.0.
Peter Avalos [Thu, 12 May 2016 19:00:30 +0000 (12:00 -0700)]
chown(8)/chgrp(1): Sync with FreeBSD
- Be consistent with chmod(1) for symlinks.
- Use basename(3).
- Use uid_t.
- Allocate buffers for getgroups(3) dynamically.
- Add -x option to prevent crossing of mountpoints.
- Sprinkle some static.
Obtained-from: FreeBSD
Peter Avalos [Thu, 12 May 2016 03:28:34 +0000 (20:28 -0700)]
chflags(1): symlink handling similar to chmod(1)
Obtained-from: FreeBSD
Peter Avalos [Thu, 12 May 2016 02:31:08 +0000 (19:31 -0700)]
chmod(1): Bring in some changes from FreeBSD.
- Change directory permissions in pre-order.
- Allow "-v -v" to mean very verbose.
- Follow symbolic links named as command line arguments if run w/o -R.
Obtained-from: FreeBSD
zrj [Tue, 10 May 2016 17:32:32 +0000 (20:32 +0300)]
kernel/drm: Resort radeon sources alphabetically.
While there, add hint for module depends in LINT64.
zrj [Tue, 10 May 2016 16:29:10 +0000 (19:29 +0300)]
drm: Destroy events consistently.
Fixes wrong function casting in drm_atomic.c
While there, make all call sites more similar.
zrj [Tue, 10 May 2016 14:10:50 +0000 (17:10 +0300)]
bwn.4: Update firmware dport reference.
Reported-and-tested-by: basedacid@
zrj [Tue, 10 May 2016 13:10:27 +0000 (16:10 +0300)]
drm/radeon: Add ACPI function stubs.
Reduces diffs in radeon_bios with Linux v3.18
zrj [Tue, 10 May 2016 12:59:03 +0000 (15:59 +0300)]
drm/radeon: Fix some leaks on module unload.
This prevents leaking of whopping 1008 bytes of M_DRM memory:
* 512 bytes from radeon/atom.c
* 440 bytes from radeon/radeon_atombios.c voltage_tables
* 56 bytes from allocation of struct fb_info *info
fb_info case needs help from syscons, for now let it leak those 56 bytes.
zrj [Tue, 10 May 2016 06:07:52 +0000 (09:07 +0300)]
drm/radeon: Nuke some orphaned externs.
Spotted-by: swildner
Imre Vadász [Sat, 7 May 2016 21:14:46 +0000 (23:14 +0200)]
80211 - Further ifp->if_softc -> ic_softc conversions in wlan drivers.
Imre Vadász [Sat, 7 May 2016 20:38:31 +0000 (22:38 +0200)]
u4b/wlan - Convert ifp->if_softc -> ic->ic_softc.
Taken-From: FreeBSD
Imre Vadász [Sat, 7 May 2016 17:57:15 +0000 (19:57 +0200)]
u4b/wlan - Mechanically convert to IFNET_STAT_INC.
Inspired-by: FreeBSD (SVN r271866)
Imre Vadász [Tue, 5 Jan 2016 14:46:41 +0000 (15:46 +0100)]
if_iwm: Utilize updated net80211 stuff, improves scanning behaviour.
* Just remove some #if defined(__DragonFly__) workarounds that were
previously needed.
* Now scanning should find access points on all channels, and not just on
the currently selected channel.
Imre Vadász [Sat, 7 May 2016 07:41:03 +0000 (09:41 +0200)]
80211 - Add missing ic_softc initializations in sys/bus/u4b/wlan drivers.
Matthew Dillon [Fri, 6 May 2016 00:57:54 +0000 (17:57 -0700)]
80211 - Fixup missing ic_name, ic_softc
* Fixup missing ic_name and ic_softc assignments.
Imre Vadász [Tue, 3 May 2016 22:18:00 +0000 (00:18 +0200)]
80211 - Update README.DRAGONFLY, we use "if_inc_counter -> IFNET_STAT_INC".
Imre Vadász [Thu, 5 May 2016 23:05:57 +0000 (01:05 +0200)]
80211 - Check if_clone_destroy return value.
* Otherwise ieee80211_ifdetach can end up in an infinite loop, when
if_clone_destroy fails.
Imre Vadász [Mon, 4 Jan 2016 11:14:51 +0000 (12:14 +0100)]
80211 - Update up to FreeBSD's r287029 (only skipping a few minor changes)
Taken-From: FreeBSD
Imre Vadász [Tue, 3 May 2016 20:07:19 +0000 (22:07 +0200)]
80211 - Migrate the scan iterator lock typedefs into ieee80211_dragonfly.h
Now only wlan_global_serializer locking remains, all other os-specific
locking is inside ieee80211_dragonfly.h.
Taken-From: FreeBSD (SVN r283556)
zrj [Mon, 9 May 2016 12:08:42 +0000 (15:08 +0300)]
drm/radeon: Release firmware on CIK at driver fini.
While testing on Bonaire noticed that firmware stays behind
after kldunload radeonkms. Fix it.
zrj [Tue, 1 Dec 2015 16:26:19 +0000 (18:26 +0200)]
drm/radeon: Expand atomic_cmpxchg() use in UVD/VCE
I somehow lost this one in a pile. Likely fixes few bugs on msg packet destroy.
zrj [Mon, 9 May 2016 05:58:14 +0000 (08:58 +0300)]
drm/radeon: Revert "drm/radeon: Partial sync with Linux 3.18"
This partially reverts commit
bd519ccc430654ba519981ec2781920010d5bb19
Caused driver teardown problems.
Tomohiro Kusumi [Mon, 9 May 2016 08:15:12 +0000 (17:15 +0900)]
sys/vfs/tmpfs: Use vop_write_dirent()
Make filesystem code independent of struct dirent format.
struct dirent is basically for userspace to retrieve entries.
zrj [Sun, 8 May 2016 15:42:08 +0000 (18:42 +0300)]
drm/radeon/dp: Fix long-standing bug in Display Port handling.
This fixes EDID information fetching from monitor through aux/iic
when using Display Port and no longer requires providing binary
EDID block with drm.edid_firmware="DP-1:edidfw_MONITOR" tunable.
From testing/disecting looks like bug was from initial radeonkms port.
While there, add hpd (hot plug detection) pin assignment for future
reference when common drm i2c/iic over aux will be implemented.
Changes intended only for Display-Port.
Note that currently on DP cable remove or monitor power off when monitor
is plugged-in DP connector stays in disconnected state (DP-only quirk).
Tested-on: R7 360 BONAIRE w/ HP LA DP-1(1920x1200), HP LP DVI(1600x1200)
HD5770 JUNIPER w/ DELL P2416D DP-1(2560x1440) and
HDMI(1920x1200)[card limit]
zrj [Sun, 8 May 2016 16:07:39 +0000 (19:07 +0300)]
drm/radeon/dp: Sync Display Port code with drm v3.18
Some heavy changes were needed because of missing common
i2c/iic over aux helpers in drm.
Actual fix to fetch EDID info through Display Port will follow.
Sascha Wildner [Sun, 8 May 2016 19:12:57 +0000 (21:12 +0200)]
Remove some duplicated #include's in thread.h and queue.h.
Sascha Wildner [Sun, 8 May 2016 06:54:26 +0000 (08:54 +0200)]
ifconfig(8): Adjust for
cec7392796354.
Commit
cec7392796354c53ac6469588a64f6536ed22659 changed ia6t_vltime
and ia6t_pltime to use time_uptime instead of time_second in
sys/netinet6/in6.c.
This change had not been reflected in the userland 'ifconfig'
command which still tried to interpret inet6 vltime and pltime
values as wall clock seconds.
The commit fixes the issue. It was adapted from FreeBSD r268049.
Submitted-by: Yann Grossel
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/2889>
Matthew Dillon [Sun, 8 May 2016 18:47:09 +0000 (11:47 -0700)]
upgrade - Make sure /var/run/sem exists
* Make sure /var/run/sem exists and is mode 1777. Newer mtrees already
handle this, but upgrades from older installs might not have the directory.
Reported-by: benjolitz
zrj [Sat, 7 May 2016 15:50:03 +0000 (18:50 +0300)]
drm/radeon: Clean up DPCD debug hex output print.
Linux uses "%*ph" format that does different thing on DragonFly.
It already got into into i915(4), so in radeonkms use hexncpy().
Tomohiro Kusumi [Fri, 6 May 2016 14:11:47 +0000 (23:11 +0900)]
sys/vfs/hammer: Add missing \n in debug kprintf
Sascha Wildner [Fri, 6 May 2016 11:29:19 +0000 (13:29 +0200)]
ctags(1): Sync with FreeBSD.
* -t is now default, per POSIX. A new option -T specifies the old default
(to not create tags for typedefs, structs, unions, and enums).
* Stop using system(3).
* Fix a parsing bug in the FORTRAN code.
While here, remove (void) casts.
François Tigeot [Fri, 6 May 2016 06:29:53 +0000 (08:29 +0200)]
drm/i915: Update to Linux 4.3
* Generic stability improvements
* Stability fixes and support improvements for various GPU families, including
Broxton, Valleyview, Cherryview, Broadwell and Skylake
* Skylake support is no longer considered experimental
* HDMI now uses 12 bits per color component if the screen supports it.
* Power saving features improvements: many fixes have been made to the
PSR (panel self refresh) and FBC (framebuffer compression) code.
These features are not yet enabled by default though.
Sascha Wildner [Thu, 5 May 2016 09:35:53 +0000 (11:35 +0200)]
<sys/msg.h>: Define msglen_t and msgqnum_t, use them in struct msqid_ds.
See:
http://pubs.opengroup.org/onlinepubs/
9699919799/basedefs/sys_msg.h.html
Justin C. Sherrill [Thu, 5 May 2016 03:17:34 +0000 (23:17 -0400)]
Fix filename and also misspelled word.
Sascha Wildner [Wed, 4 May 2016 21:04:48 +0000 (23:04 +0200)]
<stdio.h>/<wchar.h>: Reduce namespace pollution in <wchar.h>.
Instead of including the whole of <stdio.h> in <wchar.h>, just define
FILE there too, which is all it needs.
Based on FreeBSD's similar definitions.
zrj [Wed, 4 May 2016 07:15:03 +0000 (10:15 +0300)]
drm/radeon: Add missing new bonaire pci id
Tested-on: Gigabyte R7 360 (rev 2.0) card
Sascha Wildner [Tue, 3 May 2016 19:57:45 +0000 (21:57 +0200)]
Local adjustments for OpenSSL 1.0.1t.
Sascha Wildner [Tue, 3 May 2016 19:53:00 +0000 (21:53 +0200)]
Merge branch 'vendor/OPENSSL'
Sascha Wildner [Tue, 3 May 2016 19:47:42 +0000 (21:47 +0200)]
Import OpenSSL 1.0.1t.
* Fix CVE-2016-2107, CVE-2016-2105, CVE-2016-2106, CVE-2016-2109,
CVE-2016-2176, CVE-2016-0702
For a more detailed list of changes, see crypto/openssl/CHANGES.
Sepherosa Ziehau [Tue, 3 May 2016 12:29:11 +0000 (20:29 +0800)]
Revert "kqueue: Avoid reprocessing processed knotes in KNOTE."
This reverts commit
ed9db6a1912db34af387ff6978a265003258df16.
This cause panic under certain network load.
Reported-by: pavalos@
Sepherosa Ziehau [Tue, 3 May 2016 12:27:50 +0000 (20:27 +0800)]
Revert "kqueue: Return value of knote_release is no longer useful."
This reverts commit
b75b5648541ea38deaf678ee62466780ffe62374.
Prepare to revert
ed9db6a1912db34af387ff6978a265003258df16, which causes
panic under certain network load.
Reported-by: pavalos@
François Tigeot [Sun, 3 Apr 2016 11:46:08 +0000 (13:46 +0200)]
drm/linux: Add linux/pwm.h
François Tigeot [Tue, 3 May 2016 11:31:21 +0000 (13:31 +0200)]
drm/linux: Add linux/gpio/consumer.h
François Tigeot [Tue, 3 May 2016 11:13:03 +0000 (13:13 +0200)]
drm/linux: Define U64_MAX
François Tigeot [Tue, 3 May 2016 09:28:37 +0000 (11:28 +0200)]
drm/linux: Add __test_and_clear_bit
Obtained-from: NetBSD
Imre Vadász [Sun, 1 May 2016 15:10:45 +0000 (17:10 +0200)]
gpio_intel: Slightly simplify interface to chipset-specific code.
* The intidx value in struct pin_intr_map is slightly redundant at the
moment, but it avoids needless lookups for now.
Imre Vadász [Sat, 30 Apr 2016 20:07:57 +0000 (22:07 +0200)]
gpio_intel: Use a cookie object for gpio interrupt allocation as well.
* This tries to improve the gpio_if.m api, e.g. only the interrupt pin
allocation can legitimately fail. The interrupt setup and teardown
functions can't really fail for proper input values (and for bogus
arguments it can just panic).
Tomohiro Kusumi [Sun, 1 May 2016 00:12:10 +0000 (09:12 +0900)]
sys/dev/disk/dm: Remove read/write support for /dev/mapper/control
It's obvious that /dev/mapper/control has nothing to read/write.
Running below results in kernel panic as the code requires properly
initialized a per-table lock while this chrdev has no tables mapped.
(control chrdev and dm blkdevs use the same dm device structures)
-----
[root@]~# cat ./dm1.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
int main(void)
{
int fd;
char buf[1024];
fd = open("/dev/mapper/control", O_RDWR);
if (fd == -1) {
perror("open");
exit(1);
}
if (read(fd, buf, sizeof(buf)) == -1)
perror("read");
if (write(fd, buf, sizeof(buf)) == -1)
perror("write");
close(fd);
return 0;
}
With this commit.
-----
[root@]~# uname
DragonFly
[root@]~# kldload dm
[root@]~# ls -l /dev/mapper/control
crw-r----- 1 root operator 65, 0x00000000 May 1 09:25 /dev/mapper/control
[root@]~# gcc -Wall -g ./dm1.c -o ./dm1
[root@]~# ./dm1
read: Operation not supported by device
write: Operation not supported by device
With Linux kernel.
-----
[root@localhost]~# uname
Linux
[root@localhost]~# ls -l /dev/mapper/control
crw-rw---- 1 root root 10, 236 Apr 25 12:44 /dev/mapper/control
[root@localhost]~# gcc -Wall -g ./dm1.c -o ./dm1
[root@localhost]~# ./dm1
read: Invalid argument
write: Invalid argument
Imre Vadász [Fri, 29 Apr 2016 20:32:09 +0000 (22:32 +0200)]
gpio_acpi: Introduce separate setup_intr and teardown_intr functions.
* This allows us to actually reserve the gpio pin before, and separately
from actually setting up the interrupt handler.
* XXX This interface is still a bit inconvenient to use, because the
code allows gpio_setup_intr to fail. Instead the gpio_alloc_intr
function should be returning a cookie to use for gpio_setup_intr
(which could obviously never fail then).
Sascha Wildner [Fri, 29 Apr 2016 14:02:44 +0000 (16:02 +0200)]
libstand: Fix -Wstrict-prototypes warning.
Sascha Wildner [Fri, 29 Apr 2016 12:05:07 +0000 (14:05 +0200)]
sys/boot: Fix a prototype (pointed out by zrj).
Sascha Wildner [Fri, 29 Apr 2016 08:42:56 +0000 (10:42 +0200)]
sys/boot: Ansify the remaining cases found by -Wold-style-definition.
Imre Vadász [Thu, 28 Apr 2016 20:54:08 +0000 (22:54 +0200)]
boot/common: Clean up, ansify some functions, remove unneeded statements.
* No functional changes.
* Change some int variables into size_t in boot/common/module.c.
* Use MAX macro.
zrj [Thu, 28 Apr 2016 16:29:22 +0000 (19:29 +0300)]
drm/radeon: Retire old UMS driver.
Cleanup before next, removed upstream.
Sepherosa Ziehau [Thu, 28 Apr 2016 14:37:58 +0000 (22:37 +0800)]
tcp: Count connections by TCP state
Inspired-by: FreeBSD 'netstat -s -p tcp' output
zrj [Thu, 28 Apr 2016 13:09:18 +0000 (16:09 +0300)]
Use size_t to remove casts.
While there, perform some style(9) fixes.
No functional change.
zrj [Tue, 26 Apr 2016 14:30:32 +0000 (17:30 +0300)]
examples: Add binary firmware wrapping reference script.
Mainly to keep base with dports synchronized.
Also could be used while developing drivers to quickly make
firmware modules for testing.
zrj [Tue, 26 Apr 2016 14:28:27 +0000 (17:28 +0300)]
boot/loader: Handle the /boot/modules.local
Weather /boot/modules.local is used during boot or by kldload(8)
is controlled by a new "local_modules" loader variable.
If local_modules is set to "YES", /boot/modules.local is also
appended to kern.module_path sysctl variable for use by kldload(8).
Setting variable to any other value disables that.
By default allow modules to searched in /boot/modules.local directory
since it does not shadow the default kernel modules and has lower
directory search priority.
zrj [Tue, 26 Apr 2016 13:53:23 +0000 (16:53 +0300)]
mtree: Create /boot/modules.local
Intended for external modules and firmware e.g. from dports or for
user driver testing to keep base system clean during development.
This directory does not get affected when upgrading base system.
Tomohiro Kusumi [Thu, 28 Apr 2016 04:34:00 +0000 (13:34 +0900)]
sys/kern: Add comment on unmounting
Imre Vadász [Sat, 23 Apr 2016 11:23:14 +0000 (13:23 +0200)]
ahci: Add and use AHCI_PREG_SCTL_IPM_NODEVSLP definition from ahci-1.3.1.
* The DevSleep interface power saving state was introduced with the
ahci-1.3.1 specification. However actual DevSleep support needs to be
recognized via the AHCI_REG_CAP2_SDS bit, since many controllers
identifying as ahci-1.3 already support DevSleep.
* Since the correct bitmask to use in the AHCI_PREG_SCTL_IPM field
for disabling all power-management features depends on DevSleep support,
store that precomputed value in sc->sc_ipm_disable.
* Make some operations on the AHCI_PREG_SCTL_IPM_* bitfield a bit clearer.
* While there add AHCI_PREG_CMD_ICC_DEVSLEEP definition.
Sepherosa Ziehau [Wed, 27 Apr 2016 12:54:34 +0000 (20:54 +0800)]
tcp: No need to return tcpcb from tcp_newtcpcb()
Sepherosa Ziehau [Wed, 27 Apr 2016 12:49:50 +0000 (20:49 +0800)]
tcp: Remove redundant tcpcb state setting
Sepherosa Ziehau [Wed, 27 Apr 2016 12:41:20 +0000 (20:41 +0800)]
dhclient: Log a warning instead of bailing upon "illegal" options
Obtained-from: FreeBSD r298385
Sascha Wildner [Tue, 26 Apr 2016 17:28:52 +0000 (19:28 +0200)]
Sync zoneinfo database with tzdata2016d from ftp://ftp.iana.org/tz/releases
* America/Caracas switches from -0430 to -04 on 2016-05-01 at 02:30.
(Thanks to Alexander Krivenyshev for the heads-up.)
* Asia/Magadan switched from +10 to +11 on 2016-04-24 at 02:00.
(Thanks to Alexander Krivenyshev and Matt Johnson.)
* New zone Asia/Tomsk, split off from Asia/Novosibirsk. It covers
Tomsk Oblast, Russia, which switches from +06 to +07 on 2016-05-29
at 02:00. (Thanks to Stepan Golosunov.)
* New zone Europe/Kirov, split off from Europe/Volgograd. It covers
Kirov Oblast, Russia, which switched from +04/+05 to +03/+04 on
1989-03-26 at 02:00, roughly a year after Europe/Volgograd made
the same change. (Thanks to Stepan Golosunov.)
* Russia and nearby locations had daylight-saving transitions on
1992-03-29 at 02:00 and 1992-09-27 at 03:00, instead of on
1992-03-28 at 23:00 and 1992-09-26 at 23:00. (Thanks to Stepan
Golosunov.)
* Many corrections to historical time in Kazakhstan from 1991
through 2005. (Thanks to Stepan Golosunov.) Replace Kazakhstan's
invented time zone abbreviations with numeric abbreviations.
* Mention Internet RFCs 7808 (TZDIST) and 7809 (CalDAV time zone references).
Sepherosa Ziehau [Tue, 26 Apr 2016 12:57:42 +0000 (20:57 +0800)]
igb: Fix MSI-X allocation when # of rings is less than # of cpus
Dragonfly-bug: http://bugs.dragonflybsd.org/issues/2902
zrj [Tue, 26 Apr 2016 06:24:28 +0000 (09:24 +0300)]
hier.7: Add missing /etc/devd entry.
There is also empty /etc/X11 /etc/skell in BSD.root.dist
and documented /pfs/ not in BSD.root.dist
zrj [Fri, 22 Apr 2016 14:52:09 +0000 (17:52 +0300)]
mtree: Move pam.d to correct dirname order.
Reduces diffs when comparing with BSD.X.new
François Tigeot [Mon, 25 Apr 2016 08:55:01 +0000 (10:55 +0200)]
drm/i915: Remove a duplicated assignment
Noticed-by: davshao, issue #2903
Sascha Wildner [Sun, 24 Apr 2016 22:18:12 +0000 (00:18 +0200)]
Sync ACPICA with Intel's version
20160422.
* Fixed AcpiHwRead/AcpiHwWrite regression from
20160318. It was
insufficiently worked around by me in
3b9bfd22b87e14, but was
still causing issues with qemu (as reported by zrj).
* Support for I2cSerialBusV2, SpiSerialBusV2 and UartSerialBusV2.
The original non-V2 names are deprecated. V2 macros have one
new argument.
* Support for new integer field in _BIX's returned package object.
* New PCCT subtable (HW-Reduced Comm Subspace Type2).
* Various improvements to iASL.
For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.
Tested-by: ivadasz, zrj
Tomohiro Kusumi [Sun, 24 Apr 2016 19:39:56 +0000 (04:39 +0900)]
sys/vfs/tmpfs: Remove unused mount variables
François Tigeot [Sat, 23 Apr 2016 19:14:27 +0000 (21:14 +0200)]
drm/i915/gem: Switch to the Linux scatterlist API
* We were previously using regular arrays of pointers to vm pages
* This change tremendously reduces differences with the Linux code
and will make future evolutions of this driver easier to implement
* Remove some unused i915 agp functions while I'm here
Matthew Dillon [Sat, 23 Apr 2016 18:36:58 +0000 (11:36 -0700)]
kernel - Reduce BSS size (3)
* Fix ordering issue in emergency interrupt thread management. These
routines may be called before objcache is operational, so we have to
kmalloc() the thread structure manually.
Reported-by: jh32
Matthew Dillon [Sat, 23 Apr 2016 16:39:02 +0000 (09:39 -0700)]
kernel - Enhance the examine (x) command.
* Change x/a to work similar to gdb. The content of the memory is
treated as an address, printed symbolically and the address is advanced.
This way you can x/a <stack_address> and then just hit return a bunch
of times to locate useful data on the stack.
* Add x/p. The content of the memory is treated as an address and
printed as hex.
Matthew Dillon [Sat, 23 Apr 2016 05:08:43 +0000 (22:08 -0700)]
kernel - Reduce BSS size (2)
* Fix a bunch of other places in the kernel where large BSS arrays are
declared. Reduces the kernel image by another ~2MB or so on top of
the ~6MB saved in the last commit.
* Primarily these are places where a 'struct thread' is being embedded
in a structure which is being declared [MAXCPU]. With MAXCPU at 256
the result is pretty bloated. Changing the embedded thread to a
thread pointer removes most of the bloat.
Charlie Root [Sat, 23 Apr 2016 03:33:37 +0000 (20:33 -0700)]
kernel - Reduce BSS size to fix loader initrd problem
* kernel + modules + initrd.img (unpacked) exceeded the 63MB the loader has
available for load-time data.
* Top hogs are mainly in BSS. Make intr_info_ary and pcpu_sysctl
kmalloc after boot instead of BSS as a temporary fix.
335872 ifnet_threads
335872 netisr_cpu
339968 dummy_pcpu
344064 bsd4_pcpu
344064 stoppcbs
346112 softclock_pcpu_ary
538624 cpu_topology_nodes
755712 dfly_pcpu
786432 icu_irqmaps
958464 map_entry_init
1048576 idt_arr
1064960 pcpu_sysctl <---- now kmallocd
1179648 ioapic_irqmaps <---- (used too early, cannot be kmallocd)
5242880 intr_info_ary <---- now kmallocd
* Should fix loader issues when trying to use initrd.img[.gz] for now.
Reported-by: Valheru
Imre Vadász [Sun, 2 Aug 2015 10:30:28 +0000 (12:30 +0200)]
ahci: Add some DevSleep defintions. Recognize DevSleep link state.
* Add the AHCI_PREG_SSTS_IPM_DEVSLEEP definition, and recognize
the DevSleep power-state via the dev.ahci.X.Y.link_pwr_state sysctl.
* Use AHCI_PREG_SSTS_* definitions in ahci_port_link_pwr_state(), instead
of SATA_PM_SSTS_* ones.
* Add CAP2 bits for DevSleep.
* Add DEVSLP register definitions.
Imre Vadász [Fri, 22 Apr 2016 18:18:30 +0000 (20:18 +0200)]
ahci: Clean up SET_FEATURES definitions. Add some power-mgmt definitions.
* The ATA_C_SATA_FEATURE_ENA and ATA_C_SATA_FEATURE_DIS definitions aren't
ata commands themselves, they are subcommands of ATA_C_SET_FEATURES.
* Add definitions for device-initiated power-management and for the
devsleep power-state (which isn't supported in DragonFly yet).
François Tigeot [Fri, 22 Apr 2016 09:17:20 +0000 (11:17 +0200)]
kernel/linux: Move M_DRM definition to kern_slaballoc.c
Making it available to more than the drm subsystem
François Tigeot [Fri, 22 Apr 2016 08:50:07 +0000 (10:50 +0200)]
drm/radeon: Add explicit dependency to the acpi module
Suggested-by: zrj
François Tigeot [Fri, 22 Apr 2016 08:48:38 +0000 (10:48 +0200)]
drm/i915: Add explicit dependency to the acpi module
Suggested-by: zrj
François Tigeot [Wed, 20 Apr 2016 05:15:51 +0000 (07:15 +0200)]
gpt: Align partitions to 1MiB
Submitted-by: pascii, bug report #2830
zrj [Tue, 19 Apr 2016 11:14:09 +0000 (14:14 +0300)]
efi/boot1: Fix best text mode detection.
According to EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL QueryMode() specs
Mode 0 is 80x25 and Mode 1 is 80x50, rest of device supported
modes follow as modes 2 and above. In case when device does not
support Mode 1, querying for it will return EFI_UNSUPPORTED.
Tested-on: Toshiba laptop w/o Mode 1 support.
Tomohiro Kusumi [Mon, 18 Apr 2016 19:15:26 +0000 (04:15 +0900)]
sys/kern: Fix mountctl options list
Add some minor mount flags that are missing in vfs_flagstostr().
MNT_IGNORE should be ignored since the purpose of this flag is to ignore.
Imre Vadász [Mon, 18 Apr 2016 19:09:23 +0000 (21:09 +0200)]
sys/boot/efi/loader: Make module autoloading work as in pc32/loader.
* For now keep sys/boot/efi/loader/autoload.c around, but we just
use i386_module() from sys/boot/pc32/libi386/i386_module.c.
Tomohiro Kusumi [Mon, 18 Apr 2016 10:01:29 +0000 (19:01 +0900)]
sbin/hammer: Use printf() instead of fprintf(stdout)
Follow sbin/hammer's coding style (as well as C in general).
# grep "fprintf(stdout" sbin/hammer -riI
sbin/hammer/cmd_info.c: fprintf(stdout, "\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "No mounted HAMMER filesystems found\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "No mounted filesystems found\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "Volume identification\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tLabel %s\n", fip->vol_name);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tNo. Volumes %d\n", fip->nvolumes);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tHAMMER Volumes ");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tRoot Volume %s\n", rootvol);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tFSID %s\n", fsid);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tHAMMER Version %d\n", fip->version);
sbin/hammer/cmd_info.c: fprintf(stdout, "Big-block information\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tTotal %10jd\n", (intmax_t)fip->bigblocks);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tUsed %10jd (%.2lf%%)\n"
sbin/hammer/cmd_info.c: fprintf(stdout, "Space information\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tNo. Inodes %10jd\n", (intmax_t)fip->inodes);
sbin/hammer/cmd_info.c: fprintf(stdout, "\tTotal size %6s (%jd bytes)\n",
sbin/hammer/cmd_info.c: fprintf(stdout, "\tUsed %6s (%.2lf%%)\n", buf,
sbin/hammer/cmd_info.c: fprintf(stdout, "\tReserved %6s (%.2lf%%)\n", buf,
sbin/hammer/cmd_info.c: fprintf(stdout, "\tFree %6s (%.2lf%%)\n", buf,
sbin/hammer/cmd_info.c: fprintf(stdout, "PFS information\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\tPFS ID Mode Snaps Mounted on\n");
sbin/hammer/cmd_info.c: fprintf(stdout, "\t%6d %-6s",
sbin/hammer/cmd_info.c: fprintf(stdout, " %6s ", (pi->head.error && pi->snapcount == 0) ? "-" : buf);
sbin/hammer/cmd_info.c: fprintf(stdout, "%s", pi->mountedon);
sbin/hammer/cmd_info.c: fprintf(stdout, "not mounted");
sbin/hammer/cmd_info.c: fprintf(stdout, "\n");
Tomohiro Kusumi [Mon, 18 Apr 2016 09:57:10 +0000 (18:57 +0900)]
sbin/hammer: Add no hammer found message if not mounted
The local variable 'first' being non-zero after the loop means
none of them were hammer.
Tomohiro Kusumi [Sun, 17 Apr 2016 18:09:08 +0000 (03:09 +0900)]
sbin/mount_hammer: Remove duplicated MOPT_UPDATE macro definition
include/mntopts.h has this for getmntopts(3).
mount_dirfs(8) has this too probably because it's been copy-pasted
from mount_hammer(8) though this commit doesn't touch that.
(the one in mount_devfs(8) is if0'd)
# grep MOPT_UPDATE . -riI | grep define
./contrib/smbfs/mount_smbfs/mntopts.h:#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 }
./include/mntopts.h:#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 }
./sbin/mount_devfs/mount_devfs.c:#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 }
./sbin/mount_dirfs/mount_dirfs.c:#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 }
./sbin/mount_hammer/mount_hammer.c:#define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 }
Imre Vadász [Sun, 21 Feb 2016 10:21:05 +0000 (11:21 +0100)]
efi/loader: Increase default staging area to 96MB. Retry with half of that.
* The default 48MB area is too small for loading additional kernel modules
beyond just acpi.ko, ehci.ko and xhci.ko.
* The 96MB allocation fails in qemu with 128MB memory configured.
François Tigeot [Sun, 17 Apr 2016 14:22:17 +0000 (16:22 +0200)]
drm/i915/gem: Update i915_gem_fault()
Reducing differences with Linux 4.2
François Tigeot [Sun, 17 Apr 2016 13:37:53 +0000 (15:37 +0200)]
drm/linux: Add dma_map_sg and dma_unmap_sg()
François Tigeot [Sun, 17 Apr 2016 12:40:42 +0000 (14:40 +0200)]
drm/i915: Import two fixes from Linux 4.2.8
* Always mark the object as dirty when used by the GPU
* Flush pipecontrol post-sync writes
In both cases, software didn't explicitely order cpu write buffers to be
flushed, leading to graphics corruption or a hung gpu after incoherent
reads on the gpu side.
Imre Vadász [Sat, 16 Apr 2016 10:59:37 +0000 (12:59 +0200)]
sys/boot/efi/boot1: Use NELEM.
Imre Vadász [Sat, 16 Apr 2016 10:50:08 +0000 (12:50 +0200)]
sys/boot/efi: Add boot1 to the build.
Imre Vadász [Sat, 16 Apr 2016 10:48:58 +0000 (12:48 +0200)]
sys/boot/efi/boot1: Port efi boot1 loader from FreeBSD to DragonFly.
* Add PATH_* #define-s to boot1.c instead of using a paths.h header.
* Remove ZFS related code.
* Some fixes for compile errors.
Imre Vadász [Sat, 16 Apr 2016 10:46:34 +0000 (12:46 +0200)]
sys/boot/efi/boot1: Port Makefile, comment out fatfs template stuff.