freebsd.git
8 years agoAdd destroy_object callback to object rewriting framework.
ae [Mon, 23 Nov 2015 22:06:55 +0000 (22:06 +0000)]
Add destroy_object callback to object rewriting framework.
It is called when last reference to named object is going to be released
and allows to do additional cleanup for implementation of named objects.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoRemove "disable" hint, which duplicates system-wide "disabled".
mav [Mon, 23 Nov 2015 20:44:49 +0000 (20:44 +0000)]
Remove "disable" hint, which duplicates system-wide "disabled".

8 years agoRevert r291170
ngie [Mon, 23 Nov 2015 19:44:39 +0000 (19:44 +0000)]
Revert r291170

The mlx5* driver(s) are built [*]/installed separate from the OFED stack thanks
to recent refactoring done in the linuxkpi(4) module.

Always install the manpages instead of conditionally installing them if
MK_OFED != no

* Further refactoring of sys/ofed and linuxkpi(4) is pending to fully divorce
  mlx5* from ofed headers

MFC after: never
Requested by: hps

8 years agonewfs_msdos: rework error handling for eventual use in makefs
emaste [Mon, 23 Nov 2015 18:58:00 +0000 (18:58 +0000)]
newfs_msdos: rework error handling for eventual use in makefs

Return -1 on errors from mkfs_msdos() instead of err()/errx(), to
allow different consumers to handle errors as appropriate.

Obtained from: NetBSD
Sponsored by: The FreeBSD Foundation

8 years agoUpdate $NetBSD$ ID
emaste [Mon, 23 Nov 2015 18:56:10 +0000 (18:56 +0000)]
Update $NetBSD$ ID

NetBSD mkfs_msdos.h rev 1.3 removed the no-endorsement clause from the
license block, which had already been done in the source I imported in
r289629.

8 years agoThe buffer passed to an sbuf drain callback is not necessarily
markj [Mon, 23 Nov 2015 18:45:35 +0000 (18:45 +0000)]
The buffer passed to an sbuf drain callback is not necessarily
null-terminated, so don't assume that it is.

Reported by: pho
X-MFC-With: r291059

8 years agoUse #ifdef to get the file compiling without errors
andrew [Mon, 23 Nov 2015 18:20:32 +0000 (18:20 +0000)]
Use #ifdef to get the file compiling without errors

8 years agoProvide support for userland binaries using the new ELFv2 ABI. This is a
nwhitehorn [Mon, 23 Nov 2015 17:07:51 +0000 (17:07 +0000)]
Provide support for userland binaries using the new ELFv2 ABI. This is a
new, simplified, ELF ABI that avoids some of the stranger aspects of the
existing 64-bit PowerPC ABI (function descriptors, in particular). Actually
generating such executables requires a new version of binutils and a newer
compiler (either GCC or clang) than GCC 4.2.1.

8 years agoOnly enable the first interrupt for now, we don't correctly configure or
andrew [Mon, 23 Nov 2015 17:05:28 +0000 (17:05 +0000)]
Only enable the first interrupt for now, we don't correctly configure or
route interrupts to the needed cpu.

Sponsored by: ABT Systems Ltd

8 years agoFix target mode support for Qlogic 2200 FC adapters.
mav [Mon, 23 Nov 2015 15:49:50 +0000 (15:49 +0000)]
Fix target mode support for Qlogic 2200 FC adapters.

Now target mode works for all supported FC adapters except ancient 2100,
which is not tested.

8 years agoFix dumpon compatibility with dumpdev kenv
smh [Mon, 23 Nov 2015 14:06:21 +0000 (14:06 +0000)]
Fix dumpon compatibility with dumpdev kenv

The dumpdev kenv supports devices without the /dev/ prefix, fix dumpon to
also support this which is required after r288153.

MFC after: 1 week
Sponsored by: Multiplay

8 years agoFix inconsistent use of malloc type for cdev private data.
skra [Mon, 23 Nov 2015 13:23:53 +0000 (13:23 +0000)]
Fix inconsistent use of malloc type for cdev private data.
Remove M_VCHIQ malloc type, now not used anywhere.

Reviewed by: gonzo
Approved by: kib (mentor)

8 years agoFix compile warning about shifting signed negative constant.
hselasky [Mon, 23 Nov 2015 12:55:37 +0000 (12:55 +0000)]
Fix compile warning about shifting signed negative constant.

MFC after: 3 days

8 years agoRetire the NONE cipher option.
des [Mon, 23 Nov 2015 12:48:13 +0000 (12:48 +0000)]
Retire the NONE cipher option.

8 years agomarkup fixes
des [Mon, 23 Nov 2015 12:47:08 +0000 (12:47 +0000)]
markup fixes

8 years agoRevert r291142.
skra [Mon, 23 Nov 2015 11:19:00 +0000 (11:19 +0000)]
Revert r291142.

The not quite consistent logic for bounce pages allocation is utilizited
by re(4) interface which can hang now.

Approved by: kib (mentor)

8 years agoRip off target mode support for parallel SCSI QLogic adapters.
mav [Mon, 23 Nov 2015 10:06:19 +0000 (10:06 +0000)]
Rip off target mode support for parallel SCSI QLogic adapters.

Hacks to enable target mode there complicated code, while didn't really
work.  And for outdated hardware fixing it is not really interesting.

Initiator mode tested with Qlogic 1080 adapter is still working fine.

8 years agoIntegrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test
ngie [Mon, 23 Nov 2015 09:17:25 +0000 (09:17 +0000)]
Integrate contrib/netbsd-tests/kernel/t_mqueue into the FreeBSD test
suite as tests/sys/kern/mqueue_test

MFC after: 1 week

8 years agoFix up convert.c generation
ngie [Mon, 23 Nov 2015 09:15:20 +0000 (09:15 +0000)]
Fix up convert.c generation

- Use a temporary file for convert.c to reduce likelihood of an interrupted
  build resulting in bad code being written to convert.c
- Truncate the file instead of appending to it to ensure that the file being
  touched will not result in duplicate declarations/definitions from
  kern_acct.c if/when kern_acct.c changes.

MFC after: 1 week

8 years agoUse __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.c
ngie [Mon, 23 Nov 2015 07:57:41 +0000 (07:57 +0000)]
Use __MAKE_SHELL instead of HOST_SHELL when generating aton_ether_subr.c
(HOST_SHELL is used in NetBSD)

This fixes permission denied issues when gen_ether_subr is not executable

MFC after: 3 days
Reported by: José Pérez <fbl@aoek.com>
Suggested by: bdrewery, sjg

8 years agoSplit kerne timekeep ABI structure vdso_sv_tk out of the struct
kib [Mon, 23 Nov 2015 07:09:35 +0000 (07:09 +0000)]
Split kerne timekeep ABI structure vdso_sv_tk out of the struct
sysentvec.  This allows the timekeep data to be shared between similar
ABIs which cannot share sysentvec.

Make the timekeep_push_vdso() tick callback to the timekeep structures
instead of sysentvecs.  If several sysentvec share the vdso_sv_tk
structure, we would update the userspace data several times on each
tick, without the change.

Only allocate vdso_sv_tk in the exec_sysvec_init() sysinit when
sysentvec is marked with the new SV_TIMEKEEP flag.  This saves
allocation and update of unneeded vdso_sv_tk for ABIs which do not
provide userspace gettimeofday yet, which are PowerPCs arches right
now.

Make vdso_sv_tk allocator public, namely split out and export
alloc_sv_tk() and alloc_sv_tk_compat32().  ABIs which share timekeep
data now can allocate it manually and share as appropriate.

Requested by: nwhitehorn
Tested by: nwhitehorn, pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoInstall mce(4) and mlx5en(4) if MK_OFED != no
ngie [Mon, 23 Nov 2015 00:43:23 +0000 (00:43 +0000)]
Install mce(4) and mlx5en(4) if MK_OFED != no

MFC after: 1 week

8 years agoBump .Dd
ngie [Mon, 23 Nov 2015 00:40:08 +0000 (00:40 +0000)]
Bump .Dd

8 years ago- Fix bad double space between HW and LRO
ngie [Mon, 23 Nov 2015 00:39:48 +0000 (00:39 +0000)]
- Fix bad double space between HW and LRO
- Fix improperly capitalized `interface`

MFC after: 1 week

8 years agoBump .Dd
ngie [Sun, 22 Nov 2015 23:16:15 +0000 (23:16 +0000)]
Bump .Dd

8 years agoRecommend cc -Wall instead of gcc -Wall
ngie [Sun, 22 Nov 2015 23:15:44 +0000 (23:15 +0000)]
Recommend cc -Wall instead of gcc -Wall

MFC after: 1 week

8 years agoDon't explicitly set INET/INET6 in the Makefile; opt_inet.h and opt_inet6.h
ngie [Sun, 22 Nov 2015 23:07:07 +0000 (23:07 +0000)]
Don't explicitly set INET/INET6 in the Makefile; opt_inet.h and opt_inet6.h
already do this

MFC after: never (depends on kern.opts.mk; will not be MFCed probably)

8 years agoPrint more detailed info about the disk and partition chosen for booting.
ian [Sun, 22 Nov 2015 20:38:50 +0000 (20:38 +0000)]
Print more detailed info about the disk and partition chosen for booting.
No behavioral changes, just cosmetics.

A partition number of zero is not a wildcard, it's the 'a' partition in
a BSD slice, so don't print it as "<auto>".  (Only slices are 1-based,
unit and partition numbers are 0-based and -1 is their wildcard marker.)

Also, after doing all the probing and choosing, print the final result as
"Booting from <disk spec>" where disk spec has all the wildcards resolved
and looks like familiar BSD slice-and-partition notation (disk0s3a, etc).

8 years agoExplicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.
mav [Sun, 22 Nov 2015 17:03:38 +0000 (17:03 +0000)]
Explicitly call SEND CHANGE REQUEST for pre-24xx chips in target mode.

While later firmware always registers for RSCN requests, older one does
it only in initiator mode.  But in target mode there RSCN can be the only
way to detect gone intiator.

8 years agoGenerate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.
mav [Sun, 22 Nov 2015 16:55:43 +0000 (16:55 +0000)]
Generate fake ISPASYNC_CHANGE_PDB on fake login on pre-24xx.

This makes port scanner fix absent port ID for added initiator.

8 years agoGracefully stop firmware before resetting chip when changing role.
mav [Sun, 22 Nov 2015 15:57:54 +0000 (15:57 +0000)]
Gracefully stop firmware before resetting chip when changing role.

8 years agoAdd some more asynchronous event status codes.
mav [Sun, 22 Nov 2015 11:44:30 +0000 (11:44 +0000)]
Add some more asynchronous event status codes.

8 years agoAdd mode mailbox command codes.
mav [Sun, 22 Nov 2015 11:13:09 +0000 (11:13 +0000)]
Add mode mailbox command codes.

8 years agoRecord proper commit message for r291157.
kib [Sun, 22 Nov 2015 09:50:13 +0000 (09:50 +0000)]
Record proper commit message for r291157.

The r289895 revision did not accounted for the block containing the
requested page, when calculating the run of pages.  Include the pages
before/after the requested page, that fit into the reqblock, into the
calculation.

Noted by: glebius
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoNoted by: glebius
kib [Sun, 22 Nov 2015 09:48:03 +0000 (09:48 +0000)]
Noted by: glebius
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoIgnore the inbound checksum flags when doing packet forwarding in netvsc driver.
whu [Sun, 22 Nov 2015 05:26:13 +0000 (05:26 +0000)]
Ignore the inbound checksum flags when doing packet forwarding in netvsc driver.

PR: 20363
Submitted by: whu
Reviewed by: royger, whu
Approved by: royger
MFC after: 1 week
Relnotes: No
Sponsored by: Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D4131

8 years agobc: sync with OpenBSD
pfg [Sun, 22 Nov 2015 02:43:14 +0000 (02:43 +0000)]
bc: sync with OpenBSD

tty.c Rev. 1.3
Avoid unintended problems with operator precedence when doing an
assignment and comparison.

bc.1, Rev. 1.31, 1.32
'.Ql Quit' -> '.Ql quit' because only the lowercase command is valid.
Clarify sentence about `quit` in BUGS section.

extern.h, Rev. 1.12
whitespace

bc.y, Rev. 1.47
Prefer setvbuf() to setlinebuf() for portability

Obtained from: OpenBSD
MFC after: 2 weeks

8 years ago[mips]: Don't hard-code PHYS_AVAIL_ENTRIES.
adrian [Sun, 22 Nov 2015 02:40:19 +0000 (02:40 +0000)]
[mips]: Don't hard-code PHYS_AVAIL_ENTRIES.

8 years agoRemove unneeded includes of opt_kdtrace.h.
markj [Sun, 22 Nov 2015 02:01:01 +0000 (02:01 +0000)]
Remove unneeded includes of opt_kdtrace.h.

As of r258541, KDTRACE_HOOKS is defined in opt_global.h, so opt_kdtrace.h
is not needed when defining SDT(9) probes.

8 years agoRemove a debug panic that crept into r291151
jhibbits [Sun, 22 Nov 2015 01:20:36 +0000 (01:20 +0000)]
Remove a debug panic that crept into r291151

8 years agoModernize mpc85xx PCI hostbridge driver.
jhibbits [Sun, 22 Nov 2015 01:16:43 +0000 (01:16 +0000)]
Modernize mpc85xx PCI hostbridge driver.

Summary:
* Take advantage of NEW_PCIB to remove a lot of setup code.
* Fix some bugs related to multiple PCI bridges.

There's still room for more cleanup, and still some bugs leftover, but this
cleans up a lot.

Test Plan: Tested on P5020 board with IDT PCIe switch.

Differential Revision: https://reviews.freebsd.org/D4127

8 years agoWhen the nfsd threads are terminated, the NFSv4 server state
rmacklem [Sat, 21 Nov 2015 23:55:46 +0000 (23:55 +0000)]
When the nfsd threads are terminated, the NFSv4 server state
(opens, locks, etc) is retained, which I believe is correct behaviour.
However, for NFSv4.1, the server also retained a reference to the xprt
(RPC transport socket structure) for the backchannel. This caused
svcpool_destroy() to not call SVC_DESTROY() for the xprt and allowed
a socket upcall to occur after the mutexes in the svcpool were destroyed,
causing a crash.
This patch fixes the code so that the backchannel xprt structure is
dereferenced just before svcpool_destroy() is called, so the code
does do an SVC_DESTROY() on the xprt, which shuts down the socket upcall.

Tested by: g_amanakis@yahoo.com
PR: 204340
MFC after: 2 weeks

8 years agoUpdate the imx5/imx6 cpu_reset() implementation based on a new understanding
ian [Sat, 21 Nov 2015 23:30:47 +0000 (23:30 +0000)]
Update the imx5/imx6 cpu_reset() implementation based on a new understanding
of the SRS (software reset) bit in the watchdog control register.  Despite
what the manual seems to imply, this bit DOES trigger an immediate reset, as
opposed to simply flagging the type of reset as software-triggered.

8 years agoAdd a missing brace to fix vmstat -s output.
markj [Sat, 21 Nov 2015 23:04:12 +0000 (23:04 +0000)]
Add a missing brace to fix vmstat -s output.

8 years agoIncrease maximal value of vports tunable to 254.
mav [Sat, 21 Nov 2015 21:44:11 +0000 (21:44 +0000)]
Increase maximal value of vports tunable to 254.

I am not sure this value is really viable yet, but that is what chips
officially support in NPIV mode (in loop mode maximum is 125).

8 years agoAdd support for Kana and Eisu keys to the USB keyboard driver.
hselasky [Sat, 21 Nov 2015 21:18:55 +0000 (21:18 +0000)]
Add support for Kana and Eisu keys to the USB keyboard driver.

PR: 204709
Submitted by: naito.yuichiro@gmail.com
MFC after: 3 days

8 years agoFix scancodes for Kana and Eisu keys.
hselasky [Sat, 21 Nov 2015 21:14:16 +0000 (21:14 +0000)]
Fix scancodes for Kana and Eisu keys.

PR: 204709
Submitted by: naito.yuichiro@gmail.com
MFC after: 3 days

8 years agoFix target mode with fabric for pre-24xx chips.
mav [Sat, 21 Nov 2015 21:01:00 +0000 (21:01 +0000)]
Fix target mode with fabric for pre-24xx chips.

For those chips we are not receiving login events, adding initiators
based on ATIO requests.  But there is no port ID in that structure, so
in fabric mode we have to explicitly fetch it from firmware to be able
to do normal scan after that.

8 years agoUpdate Qlogic 23XX firmware from 3.03.26 to 3.03.28
mav [Sat, 21 Nov 2015 20:52:40 +0000 (20:52 +0000)]
Update Qlogic 23XX firmware from 3.03.26 to 3.03.28

8 years agoFix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being
skra [Sat, 21 Nov 2015 19:55:01 +0000 (19:55 +0000)]
Fix BUS_DMA_MIN_ALLOC_COMP flag logic. When bus_dmamap_t map is being
created for bus_dma_tag_t tag, bounce pages should be allocated
only if needed.

Before the fix, they were allocated always if BUS_DMA_COULD_BOUNCE flag
was set but BUS_DMA_MIN_ALLOC_COMP not. As bounce pages are never freed,
it could cause memory exhaustion when a lot of such tags together with
their maps were created.

Note that there could be more maps in one tag by current design.
However BUS_DMA_MIN_ALLOC_COMP flag is tag's flag. It's set after
bounce pages are allocated. Thus, they are allocated only for first
tag's map which needs them.

Approved by: kib (mentor)

8 years agoFix the handling of IPSec policies in the SCTP stack. At least
tuexen [Sat, 21 Nov 2015 18:21:16 +0000 (18:21 +0000)]
Fix the handling of IPSec policies in the SCTP stack. At least
make sure they are not leaked...

MFC after:  1 week

8 years agoRevert part of r291137 which seems correct, bit does not fix the
tuexen [Sat, 21 Nov 2015 16:46:59 +0000 (16:46 +0000)]
Revert part of r291137 which seems correct, bit does not fix the
resource problem I'm currently hunting down.

MFC after: 1 week
X-MFC with: 291137

8 years agoDocument why we use -z nonexecstack in the Makefile since it
imp [Sat, 21 Nov 2015 16:37:11 +0000 (16:37 +0000)]
Document why we use -z nonexecstack in the Makefile since it
is so unusual. Turn off mis-match warnings for building uathload
because the firmware .o file is produced in a way that we
can't get to match exactly. This fixes the build on mips,
so stop excluding it from the build.

8 years agoClear the so_pcb pointer in case of ipsec_init_policy() fails.
tuexen [Sat, 21 Nov 2015 16:32:14 +0000 (16:32 +0000)]
Clear the so_pcb pointer in case of ipsec_init_policy() fails.

MFC after: 1 week

8 years agoDon't send SHUTDOWN chunk when the association is in a front state
tuexen [Sat, 21 Nov 2015 16:25:09 +0000 (16:25 +0000)]
Don't send SHUTDOWN chunk when the association is in a front state
and the applications calls shutdown(..., SHUT_WR) or
shutdown(..., SHUT_RDWR).

MFC after: 1 week.

8 years agoMove hdmi_if.m to files.arm so other kernel configs can use it.
andrew [Sat, 21 Nov 2015 16:25:03 +0000 (16:25 +0000)]
Move hdmi_if.m to files.arm so other kernel configs can use it.

8 years agoCreate device options for the two common ARM timers.
andrew [Sat, 21 Nov 2015 16:23:56 +0000 (16:23 +0000)]
Create device options for the two common ARM timers.

Sponsored by: ABT Systems Ltd

8 years agoMove more bus_space_* files to be built by files.arm. This leaves the
andrew [Sat, 21 Nov 2015 15:30:08 +0000 (15:30 +0000)]
Move more bus_space_* files to be built by files.arm. This leaves the
definition in a file.* file under sys/arm/arm in the few cases we need it
for non-fdt platforms.

Sponsored by: ABT Systems Ltd

8 years agoUpdate firmware for QLogic 22xx from 2.02.06 to 2.02.08.
mav [Sat, 21 Nov 2015 14:39:57 +0000 (14:39 +0000)]
Update firmware for QLogic 22xx from 2.02.06 to 2.02.08.

8 years agoLimit arm_base_bs_tag to ARMv4 and ARMv5, we only used it in one place in
andrew [Sat, 21 Nov 2015 13:02:34 +0000 (13:02 +0000)]
Limit arm_base_bs_tag to ARMv4 and ARMv5, we only used it in one place in
armv6 and that can use fdtbus_bs_tag.

8 years agoFix a logic inversion, we should build dtrace on armv6, not on arm and
andrew [Sat, 21 Nov 2015 12:53:44 +0000 (12:53 +0000)]
Fix a logic inversion, we should build dtrace on armv6, not on arm and
armeb.

8 years agoRevert a modification that crept in and should not
bapt [Sat, 21 Nov 2015 11:06:20 +0000 (11:06 +0000)]
Revert a modification that crept in and should not

8 years agoSynchronize m4(1) with OpenBSD
bapt [Sat, 21 Nov 2015 11:05:38 +0000 (11:05 +0000)]
Synchronize m4(1) with OpenBSD

8 years agocolldef(1) does not need the libc's internal collate.h header anymore
bapt [Sat, 21 Nov 2015 10:52:32 +0000 (10:52 +0000)]
colldef(1) does not need the libc's internal collate.h header anymore

8 years agoAdd API to obtain primary enclosure name and ID for /dev/sesX devices.
mav [Sat, 21 Nov 2015 10:22:01 +0000 (10:22 +0000)]
Add API to obtain primary enclosure name and ID for /dev/sesX devices.

sesX device number may change between reboots, so to properly identify
the instance we need more data.  Name and ID reported here may mach ones
reported by SCSI device, but that is not really required by specs.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

8 years agoMFV r291123:
delphij [Sat, 21 Nov 2015 09:09:25 +0000 (09:09 +0000)]
MFV r291123:

xz 5.2.2.

MFC after: 1 month
Relnotes: yes

8 years agotrunc_page() goes through unsigned long, which is too short.
jhibbits [Sat, 21 Nov 2015 06:03:46 +0000 (06:03 +0000)]
trunc_page() goes through unsigned long, which is too short.

sizeof(unsigned long) < sizeof(vm_paddr_t) on Book-E, which uses 36-bit
addressing.  With this, a CCSR with a physical address above 4GB successfully
maps.

Sponsored by: Alex Perez/Inertial Computing

8 years agoMerge from r290547:
marius [Sat, 21 Nov 2015 02:49:33 +0000 (02:49 +0000)]
Merge from r290547:
Since r289279 bufinit() uses mp_ncpus so adapt to what x86 does and
set this variable already in cpu_mp_setmaxid().
While at it, rename cpu_cpuid_prop() to cpu_portid_prop() as well as
the MD cpuid variable to portid to avoid confusion with the MI use
of "cpuid" and make some variable static/global in order to reduce
stack usage.

PR: 204685

8 years agoAvoid a NULL pointer dereference in bounce_bus_dmamap_unload() when
marius [Sat, 21 Nov 2015 02:08:47 +0000 (02:08 +0000)]
Avoid a NULL pointer dereference in bounce_bus_dmamap_unload() when
the map has been created via bounce_bus_dmamem_alloc(). In that case
bus_dmamap_unload(9) typically isn't called during normal operation
but still should be during detach, cleanup from failed attach etc.

Submitted by: yongari
MFC after: 3 days

8 years agoRemove a link to the now defunct "Release Engineering of Third Party Packages".
brd [Sat, 21 Nov 2015 00:35:40 +0000 (00:35 +0000)]
Remove a link to the now defunct "Release Engineering of Third Party Packages".

PR: 202803
Submitted by: Tobias Kortkamp <tobias.kortkamp@gmail.com>
MFC after: 1 week

8 years agomips: teach the malta platform about extended memory.
adrian [Sat, 21 Nov 2015 00:22:47 +0000 (00:22 +0000)]
mips: teach the malta platform about extended memory.

Extended memory here is "physical memory above 256MB".
"memsize" in the environment only grows to 256MB; "ememsize" is the entire
memory range.  Extended memory shows up at physical address 0x90000000.

This allows for malta64 VMs to be created with > 256MB RAM, all the way
up to 2GB RAM.

Tested:

* qemu-devel package; qemu-system-mips64 -m 2048 (and -m 256 to test the
  no-ememsize case.)

TODO:

* testing mips32 with > 256MB RAM.

Reviewed by: imp

8 years agoRevert r283330 since it broke directory caching in the client.
rmacklem [Sat, 21 Nov 2015 00:15:41 +0000 (00:15 +0000)]
Revert r283330 since it broke directory caching in the client.
At this time I cannot see a way to fix directory caching when it
has partial blocks in the buffer cache, due to the fact that the
syscall's uio_offset won't stay the same as the lblkno * NFS_DIRBLKSIZ
offset.

Reported by: bde
MFC after: 2 weeks

8 years agoRemove remnants of the old NFS from vnode pager.
glebius [Fri, 20 Nov 2015 23:52:27 +0000 (23:52 +0000)]
Remove remnants of the old NFS from vnode pager.

Reviewed by: kib
Sponsored by: Netflix

8 years agoReintegrate colldef(1) and mklocale(1)
bapt [Fri, 20 Nov 2015 23:15:05 +0000 (23:15 +0000)]
Reintegrate colldef(1) and mklocale(1)

While those tools are not needed anymore they are necessary to build FreeBSD 9
and 10. it does not hurt to keep those tools around until both 9 and 10 branch
become EOLed.

Modify colldef(1) to build after the change in the collation header, and ensure
it does produce the same collation definition it used to generate for 9 and 10

Reported by: Oliver Pinter

8 years agopopen() requires check for fdopen() failure
rpokala [Fri, 20 Nov 2015 22:36:41 +0000 (22:36 +0000)]
popen() requires check for fdopen() failure

Move fdopen() up near other resource allocation like malloc(); do proper
deallocation on failure later on in the function.

Submitted by: Ramachandra Topannavar <rtopannavar@panasas.com>
Reviewed by: jilles
Approved by: jhb (mentor)
MFC after: 2 weeks
Sponsored by: Panasas, Inc.
Differential Revision: https://reviews.freebsd.org/D4126

M    lib/libc/gen/popen.c

8 years agoDisconnect unused kgzldr from sys/boot/i386
emaste [Fri, 20 Nov 2015 21:56:20 +0000 (21:56 +0000)]
Disconnect unused kgzldr from sys/boot/i386

Sponsored by: The FreeBSD Foundation

8 years agoAdd support for passing TARGET_CPUTYPE into the build. It's more
imp [Fri, 20 Nov 2015 21:54:05 +0000 (21:54 +0000)]
Add support for passing TARGET_CPUTYPE into the build. It's more
important for arm and mips than for the more generic x86 systems.

8 years agoAdd aarch64 support to CPUTYPE
imp [Fri, 20 Nov 2015 21:49:49 +0000 (21:49 +0000)]
Add aarch64 support to CPUTYPE

8 years agoMakeoption ARM_LITLE_ENDIAN does nothing. Remove it since it isn't
imp [Fri, 20 Nov 2015 21:49:46 +0000 (21:49 +0000)]
Makeoption ARM_LITLE_ENDIAN does nothing. Remove it since it isn't
consistently used. It was a carry over from NetBSD that FreeBSD
doesn't use.

8 years agoAdd myself (rpokala) and my mentor (jhb)
rpokala [Fri, 20 Nov 2015 21:03:04 +0000 (21:03 +0000)]
Add myself (rpokala) and my mentor (jhb)

Approved by: jhb (mentor)
Differential Revision: https://reviews.freebsd.org/D4231

8 years agoRemove bus_space_asm_generic.S from the per-SoC files.* files, it's already
andrew [Fri, 20 Nov 2015 19:48:32 +0000 (19:48 +0000)]
Remove bus_space_asm_generic.S from the per-SoC files.* files, it's already
in files.arm.

Sponsored by: ABT Systems Ltd

8 years agoRemove disconnected boot0ext.
bdrewery [Fri, 20 Nov 2015 18:10:02 +0000 (18:10 +0000)]
Remove disconnected boot0ext.

This was [re-]added in r127458 (apparently with disconnected history as well)
and never connected to the build.

It is no longer relevant for modern systems from the past 20 years.

Discussed with: jhb
Sponsored by: EMC / Isilon Storage Division

8 years agoFix not skipping uathload for mips after r291021.
bdrewery [Fri, 20 Nov 2015 17:52:46 +0000 (17:52 +0000)]
Fix not skipping uathload for mips after r291021.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove pl310.c from the SoC std.* files, it's in files.arm
andrew [Fri, 20 Nov 2015 16:43:21 +0000 (16:43 +0000)]
Remove pl310.c from the SoC std.* files, it's in files.arm

Sponsored by: ABT Systems Ltd

8 years agoDTrace is known to work on armv6, enable building it as a module.
andrew [Fri, 20 Nov 2015 16:18:27 +0000 (16:18 +0000)]
DTrace is known to work on armv6, enable building it as a module.

Reviewed by: imp
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4221

8 years agoStop setting {KERN,}PHYSADDR on armv6, it's unneeded.
andrew [Fri, 20 Nov 2015 16:12:22 +0000 (16:12 +0000)]
Stop setting {KERN,}PHYSADDR on armv6, it's unneeded.

Sponsored by: ABT Systems Ltd

8 years agoSome cosmetics for ancient cards.
mav [Fri, 20 Nov 2015 14:20:24 +0000 (14:20 +0000)]
Some cosmetics for ancient cards.

8 years agoThe freebsd4_getfsstat() was broken in r281551 to always return 0 on success.
trasz [Fri, 20 Nov 2015 14:08:12 +0000 (14:08 +0000)]
The freebsd4_getfsstat() was broken in r281551 to always return 0 on success.
All versions of getfsstat(3) are supposed to return the number of [o]statfs
structs in the array that was copied out.

Also fix missing bounds checking and signed comparison of unsigned types.

Submitted by: bde@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoDon't truncate an interface name when -W option is specified.
ume [Fri, 20 Nov 2015 12:32:49 +0000 (12:32 +0000)]
Don't truncate an interface name when -W option is specified.

Spotted by: Jim Thompson <jim__at__netgate.com>
MFC after: 1 week

8 years agoAvoid core dump when output style is html.
ume [Fri, 20 Nov 2015 12:15:58 +0000 (12:15 +0000)]
Avoid core dump when output style is html.

8 years agoFix build when KTR is defined but not KTR_TULIP.
skra [Fri, 20 Nov 2015 09:37:04 +0000 (09:37 +0000)]
Fix build when KTR is defined but not KTR_TULIP.

Approved by: kib (mentor)

8 years agoAdd usermode variable to KTR output. Fix style.
skra [Fri, 20 Nov 2015 09:34:59 +0000 (09:34 +0000)]
Add usermode variable to KTR output. Fix style.

Approved by: kib (mentor)

8 years agoFix style and argument count for KTR.
skra [Fri, 20 Nov 2015 09:33:22 +0000 (09:33 +0000)]
Fix style and argument count for KTR.

Approved by: kib (mentor)

8 years agoOptimize SNS_GID_FT request scratch memory usage.
mav [Fri, 20 Nov 2015 08:54:19 +0000 (08:54 +0000)]
Optimize SNS_GID_FT request scratch memory usage.

Now with present 4K of scratch we can fetch up to 508 ports (16 more).

8 years agoinstall: do not follow symlinks
bapt [Fri, 20 Nov 2015 08:45:59 +0000 (08:45 +0000)]
install: do not follow symlinks

In case the target of install is a dead symlink, install(1) used to not
consider it as "existing" because of the usage of stat(2) instead of
lstat(2).  meaning the old file (the symlink) is not removed before the new
file is created. The symlink is being followed and the new file becoming the
target of the symlink instead of the target of install(1)

Reviewed by: jhb, brooks
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4191

8 years agoConvert vmstat to use libxo.
rodrigc [Fri, 20 Nov 2015 05:15:34 +0000 (05:15 +0000)]
Convert vmstat to use libxo.

This patch was based on this patch:
https://github.com/Juniper/libxo/blob/master/patches/vmstat.patch

by Phil Shafer at Juniper Networks, but updated to the latest
vmstat code.

Reviewed by:           allanjude
Differential Revision: https://reviews.freebsd.org/D3935

8 years agoCopy README into /usr/tests
rodrigc [Fri, 20 Nov 2015 03:24:04 +0000 (03:24 +0000)]
Copy README into /usr/tests

Add a few sentences describing how to run the tests.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D4224

8 years agoAvoid a NULL pointer dereference in bounce_bus_dmamap_sync() when the
marius [Fri, 20 Nov 2015 02:23:35 +0000 (02:23 +0000)]
Avoid a NULL pointer dereference in bounce_bus_dmamap_sync() when the
map has been created via bounce_bus_dmamem_alloc(). Even for coherent
DMA - which bus_dmamem_alloc(9) typically is used for -, calling of
bus_dmamap_sync(9) isn't optional.

PR: 188899 (non-original problem)
MFC after: 3 days

8 years agoMETA MODE: Don't stage INTERNALPROGs.
bdrewery [Fri, 20 Nov 2015 00:22:55 +0000 (00:22 +0000)]
META MODE: Don't stage INTERNALPROGs.

This is only for sys/boot.  INTERNALPROG is not a build tool, it is just a way
to generate OBJS from a list of SRCS and use those objects elsewhere.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove unsupported ia64.
bdrewery [Thu, 19 Nov 2015 22:54:37 +0000 (22:54 +0000)]
Remove unsupported ia64.

Sponsored by: EMC / Isilon Storage Division