]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 years agoRemove end of line whitespace.
Joel Dahl [Mon, 9 Jul 2012 15:44:35 +0000 (15:44 +0000)]
Remove end of line whitespace.

12 years agoRestore error handling lost in r191603
Ed Maste [Mon, 9 Jul 2012 14:16:49 +0000 (14:16 +0000)]
Restore error handling lost in r191603

This was missed in the change from IFQ_ENQUEUE to if_transmit.

Sponsored by:   ADARA Networks

12 years agoFix a bug introduced in r237715.
Michael Tuexen [Mon, 9 Jul 2012 10:59:39 +0000 (10:59 +0000)]
Fix a bug introduced in r237715.

MFC after:i 3 days.

12 years agoSupport Netlogic XLP 8xx B1 revisions in xlpge.
Jayachandran C. [Mon, 9 Jul 2012 10:39:57 +0000 (10:39 +0000)]
Support Netlogic XLP 8xx B1 revisions in xlpge.

Updates to the MDIO access code for the new revision of the
XLP chip.

12 years agoIdentify Netlogic XLP 8xx B1 chip revisions
Jayachandran C. [Mon, 9 Jul 2012 10:24:45 +0000 (10:24 +0000)]
Identify Netlogic XLP 8xx B1 chip revisions

Add functions to check for 8xx B0 and 3xx Ax revisions which will
be used in network block initialization.

12 years agoFix PCIe hardware swap configuration for Netlogic XLP
Jayachandran C. [Mon, 9 Jul 2012 10:17:06 +0000 (10:17 +0000)]
Fix PCIe hardware swap configuration for Netlogic XLP

The last 12 bits of the limit registers have to be set to 1. These
bits are not significant in bridge BARs and are 0 on read, but the
bits are valid in the swap limit register and needs to be set.

12 years agoAdd range and table revision checking to avoid abend.
Takanori Watanabe [Mon, 9 Jul 2012 09:38:53 +0000 (09:38 +0000)]
Add range and table revision checking to avoid abend.

PR:bin/169707
Submitted by:Dan Lukes <dan@obluda.cz>
MFC after:3 days.

12 years agoIf you have pressed CTRL+Z and a process is suspended, then you use gdb
David Xu [Mon, 9 Jul 2012 09:24:46 +0000 (09:24 +0000)]
If you have pressed CTRL+Z and a process is suspended, then you use gdb
to attach to the process, it is surprising that the process is resumed
without inputting any gdb commands, however ptrace manual said:
  The tracing process will see the newly-traced process stop and may
  then control it as if it had been traced all along.
But the current code does not work in this way, unless traced process
received a signal later, it will continue to run as a background task.
To fix this problem, just send signal SIGSTOP to the traced process after
we resumed it, this works like that you are attaching to a running process,
it is not perfect but better than nothing.

12 years agoFurther preparations for the RX EDMA support.
Adrian Chadd [Mon, 9 Jul 2012 08:37:59 +0000 (08:37 +0000)]
Further preparations for the RX EDMA support.

Break out the DMA descriptor setup/teardown code into a method.
The EDMA RX code doesn't allocate descriptors, just ath_buf entries.

12 years ago- Add IFT_L2VLAN (vlan(4)) support.
Hiroki Sato [Mon, 9 Jul 2012 08:11:16 +0000 (08:11 +0000)]
- Add IFT_L2VLAN (vlan(4)) support.
- Add -P option to support PID file.  When -a is specified /var/run/rarpd.pid
  is used, and when an interface is specified /var/run/rarpd.<ifname>.pid is
  used by default.

12 years agoWe don't need to check the result of sending signal when -R option is
Andrey V. Elsukov [Mon, 9 Jul 2012 07:37:10 +0000 (07:37 +0000)]
We don't need to check the result of sending signal when -R option is
specified.

Submitted by: Ilya A. Arkhipov
MFC after: 1 week

12 years agoIntroduce the EDMA related HAL capabilities.
Adrian Chadd [Mon, 9 Jul 2012 07:31:26 +0000 (07:31 +0000)]
Introduce the EDMA related HAL capabilities.

Whilst here, fix a typo in a previous commit.

Obtained from: Qualcomm Atheros

12 years agoMake usbusN logging pseudo-interface used by usbdump(8) clonable. One is
Hiroki Sato [Mon, 9 Jul 2012 07:25:09 +0000 (07:25 +0000)]
Make usbusN logging pseudo-interface used by usbdump(8) clonable.  One is
now created/destroyed automatically by usbdump(8).

Note that "hw.usb.no_pf" loader tunable is now obsolete.

Reviewed by: hselasky

12 years agoExtend the RX HAL API to include the RX queue identifier.
Adrian Chadd [Mon, 9 Jul 2012 07:19:11 +0000 (07:19 +0000)]
Extend the RX HAL API to include the RX queue identifier.

The AR93xx and later chips support two RX FIFO queues - a high and low
priority queue.

For legacy chips, just assume the queues are high priority.

This is inspired by the reference driver but is a reimplementation of
the API and code.

12 years agoMake ipfw0 logging pseudo-interface clonable. It can be created automatically
Hiroki Sato [Mon, 9 Jul 2012 07:16:19 +0000 (07:16 +0000)]
Make ipfw0 logging pseudo-interface clonable.  It can be created automatically
by $firewall_logif rc.conf(5) variable at boot time or manually by ifconfig(8)
after a boot.

Discussed on: freebsd-ipfw@

12 years agoExtend the debugging flags to include some AR9300 HAL related options.
Adrian Chadd [Mon, 9 Jul 2012 06:41:18 +0000 (06:41 +0000)]
Extend the debugging flags to include some AR9300 HAL related options.

Obtained from: Qualcomm Atheros

12 years agoExtend the RX descriptor completion debugging to log the larger
Adrian Chadd [Mon, 9 Jul 2012 06:39:46 +0000 (06:39 +0000)]
Extend the RX descriptor completion debugging to log the larger
AR93xx receive descriptors.

This isn't entirely complete - the AR93xx and later descriptors
don't have a link/buffer pointer; the descriptor contents just
start.

12 years ago- Add support of the following USB devices to run(4):
Hiroki Sato [Mon, 9 Jul 2012 06:34:15 +0000 (06:34 +0000)]
- Add support of the following USB devices to run(4):

 * Logitec LAN-W150N/U2
 * Buffalo WLI-UC-GNM2

- Add device id of Planex GW-USValue-EZ.

12 years agoRemove "prefer_source" address selection option. FreeBSD has had an
Hiroki Sato [Mon, 9 Jul 2012 06:21:46 +0000 (06:21 +0000)]
Remove "prefer_source" address selection option.  FreeBSD has had an
implementation of RFC 3484 for this purpose for a long time and "prefer_source"
was never implemented actually.  ND6_IFF_PREFER_SOURCE macro is left intact.

12 years agoFollow-up commit to r238220:
Mateusz Guzik [Mon, 9 Jul 2012 05:39:31 +0000 (05:39 +0000)]
Follow-up commit to r238220:

Pass only FEXEC (instead of FREAD|FEXEC) in fgetvp_exec. _fget has to check for
!FWRITE anyway and may as well know about FREAD.

Make _fget code a bit more readable by converting permission checking from if()
to switch(). Assert that correct permission flags are passed.

In collaboration with: kib
Approved by: trasz (mentor)
MFC after: 6 days
X-MFC: with r238220

12 years agoAdd a debug category for RX EDMA.
Adrian Chadd [Mon, 9 Jul 2012 05:23:02 +0000 (05:23 +0000)]
Add a debug category for RX EDMA.

12 years agoFinally fix lookup (account remaining '\0') and deletion
Alexander V. Chernikov [Sun, 8 Jul 2012 21:13:04 +0000 (21:13 +0000)]
Finally fix lookup (account remaining '\0') and deletion
(provide valid key length for radix lookup).

Submitted by:    Ihor Kaharlichenko<madkinder at gmail.com>  (prev version)
Approved by:     kib(mentor)
MFC after:       3 days

Sponsored by:    Shtorm ISP

12 years agoAvoid vm page queues lock leak after r238212.
Konstantin Belousov [Sun, 8 Jul 2012 18:04:26 +0000 (18:04 +0000)]
Avoid vm page queues lock leak after r238212.

Reported and tested by: Michael Butler <imb protected-networks net>
Reviewed by: alc
Pointy hat to: kib
MFC after: 20 days

12 years agoMove PCPU initialization to a new function called cpu_pcpu_setup().
Marcel Moolenaar [Sun, 8 Jul 2012 18:00:22 +0000 (18:00 +0000)]
Move PCPU initialization to a new function called cpu_pcpu_setup().
This makes it easier to add additional CPU or platform information
to the per-CPU structure without duplicated code.

12 years agoUnleash the APs at SI_SUB_KICK_SCHEDULER so that we have them all
Marcel Moolenaar [Sun, 8 Jul 2012 17:43:25 +0000 (17:43 +0000)]
Unleash the APs at SI_SUB_KICK_SCHEDULER so that we have them all
up and running to service interrupts. This is especially important
when the firmware has bound interrupts to CPUs, like for the SGI
Altix 350. We wake up APs at SI_SUB_CPU time and they sit and spin
until we unleash them, so there's nothing fundamentally different
from a MD perspective.

12 years agoAfter the binutils 2.17.50 import, the assembler supports AS_REL16
Nathan Whitehorn [Sun, 8 Jul 2012 17:02:14 +0000 (17:02 +0000)]
After the binutils 2.17.50 import, the assembler supports AS_REL16
relocations.

12 years agoImplement handling of "atomic fragements" as outlined in
Bjoern A. Zeeb [Sun, 8 Jul 2012 15:30:24 +0000 (15:30 +0000)]
Implement handling of "atomic fragements" as outlined in
draft-gont-6man-ipv6-atomic-fragments to mitigate one class of
possible fragmentation-based attacks.

MFC after: 5 days

12 years agoacpi_cpu: we are able to handle _CST change notifications...
Andriy Gapon [Sun, 8 Jul 2012 10:57:49 +0000 (10:57 +0000)]
acpi_cpu: we are able to handle _CST change notifications...

so un-ifdef code that is supposed to tell ACPI platform about that

Tested by: Taku YAMAMOTO <taku@tackymt.homeip.net>
MFC after: 2 weeks

12 years agoAs mentioned in the commit message of r237571 (copied from a prototype
Bjoern A. Zeeb [Sun, 8 Jul 2012 08:49:37 +0000 (08:49 +0000)]
As mentioned in the commit message of r237571 (copied from a prototype
patch of mine) also check if the 2nd in6_setscope() failed and return
the error in that case.

MFC after: 5 days

12 years agoFix always 0 tautologly revealed by gcc46
Eitan Adler [Sun, 8 Jul 2012 00:52:54 +0000 (00:52 +0000)]
Fix always 0 tautologly revealed by gcc46

Approved by: cperciva
MFC after: 1 week

12 years agoUnbreak handling of descriptors opened with O_EXEC by fexecve(2).
Mateusz Guzik [Sun, 8 Jul 2012 00:51:38 +0000 (00:51 +0000)]
Unbreak handling of descriptors opened with O_EXEC by fexecve(2).

While here return EBADF for descriptors opened for writing (previously it was ETXTBSY).

Add fgetvp_exec function which performs appropriate checks.

PR: kern/169651
In collaboration with: kib
Approved by: trasz (mentor)
MFC after: 1 week

12 years agoAdd trivial resize handling to gnop(8).
Edward Tomasz Napierala [Sat, 7 Jul 2012 22:22:13 +0000 (22:22 +0000)]
Add trivial resize handling to gnop(8).

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoAdd trivial resize handling to gmountver(8).
Edward Tomasz Napierala [Sat, 7 Jul 2012 22:20:47 +0000 (22:20 +0000)]
Add trivial resize handling to gmountver(8).

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoMake the da(4) driver notify GEOM about LUN size change.
Edward Tomasz Napierala [Sat, 7 Jul 2012 22:19:51 +0000 (22:19 +0000)]
Make the da(4) driver notify GEOM about LUN size change.

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoAdd disk_resize(), to make it possible for the disk drivers such as da(4)
Edward Tomasz Napierala [Sat, 7 Jul 2012 21:28:31 +0000 (21:28 +0000)]
Add disk_resize(), to make it possible for the disk drivers such as da(4)
to notify GEOM about LUN size change.

Reviewed by: mav (earlier version)
Sponsored by: FreeBSD Foundation

12 years agoMake it possible to resize md(4) devices.
Edward Tomasz Napierala [Sat, 7 Jul 2012 20:32:21 +0000 (20:32 +0000)]
Make it possible to resize md(4) devices.

Reviewed by: kib
Sponsored by: FreeBSD Foundation

12 years agoChange the interface to the Energy Efficient Ethernet (EEE)
Jack F Vogel [Sat, 7 Jul 2012 20:21:05 +0000 (20:21 +0000)]
Change the interface to the Energy Efficient Ethernet (EEE)
setting in the igb and em driver. This was necessitated by
a shared code change that I was given late in the game, a data
type changed from bool to int, in the last update I dealt with
it by a cast, but it was pointed out (thanks jhb) that there
was a potential problem with this. John suggested this safer
approach, and it is fine with me...

MFC after:2 days (to catch the 9.1 update)

12 years agoAdd a new GEOM method, resize(), which is called after provider size changes.
Edward Tomasz Napierala [Sat, 7 Jul 2012 20:13:40 +0000 (20:13 +0000)]
Add a new GEOM method, resize(), which is called after provider size changes.
Add a new routine, g_resize_provider(), to use to notify GEOM about provider
change.

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoDrop page queues mutex on each iteration of vm_pageout_scan over the
Konstantin Belousov [Sat, 7 Jul 2012 19:39:08 +0000 (19:39 +0000)]
Drop page queues mutex on each iteration of vm_pageout_scan over the
inactive queue, unless busy page is found.

Dropping the mutex often should allow the other lock acquires to
proceed without waiting for whole inactive scan to finish. On machines
with lot of physical memory scan often need to iterate a lot before it
finishes or finds a page which requires laundring, causing high
latency for other lock waiters.

Suggested and reviewed by: alc
MFC after: 3 weeks

12 years agoAdd missing sleep stat increase
Eitan Adler [Sat, 7 Jul 2012 17:46:11 +0000 (17:46 +0000)]
Add missing sleep stat increase

PR: kern/168211
Submitted by: linimon
Reviewed by: alc
Approved by: cperciva
MFC after: 3 days

12 years agoAdd a description of the Spanish Dvorak keymap added in r235251
Eitan Adler [Sat, 7 Jul 2012 17:35:34 +0000 (17:35 +0000)]
Add a description of the Spanish Dvorak keymap added in r235251

PR: conf/160235
Submitted by: gavin
Approved by: cperciva
MFC after: 3 days

12 years agoRemove unneeded variable reported by gcc46 which stopped being used in
Eitan Adler [Sat, 7 Jul 2012 17:25:36 +0000 (17:25 +0000)]
Remove unneeded variable reported by gcc46 which stopped being used in
r234178.

Approved by: cperciva
MFC after: 3 days

12 years agoRemove variables which are initialized but never used thereafter
Eitan Adler [Sat, 7 Jul 2012 17:20:52 +0000 (17:20 +0000)]
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva
MFC after: 1 week

12 years agoRemove ancient vnconfig symlink
Eitan Adler [Sat, 7 Jul 2012 17:20:27 +0000 (17:20 +0000)]
Remove ancient vnconfig symlink

Submitted by: ak
Approved by: cperciva
MFC after: 1 week

12 years agoRemove variables which are initialized but never used thereafter
Eitan Adler [Sat, 7 Jul 2012 17:20:24 +0000 (17:20 +0000)]
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva
MFC after: 1 week

12 years agoRemove variables which are initialized but never used thereafter
Eitan Adler [Sat, 7 Jul 2012 17:17:43 +0000 (17:17 +0000)]
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Reviewed by: scottl
Approved by: cperciva
MFC after: 1 week

12 years agoRemove variables which are initialized but never used thereafter
Eitan Adler [Sat, 7 Jul 2012 17:13:09 +0000 (17:13 +0000)]
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva
MFC after: 1 week

12 years agoFix orphan() methods of several GEOM classes to not assume that there
Edward Tomasz Napierala [Sat, 7 Jul 2012 17:09:44 +0000 (17:09 +0000)]
Fix orphan() methods of several GEOM classes to not assume that there
is an error set on the provider.  With GEOM resizing, class can become
orphaned when it doesn't implement resize() method and the provider size
decreases.

Reviewed by: mav
Sponsored by: FreeBSD Foundation

12 years agoFix spelling
Eitan Adler [Sat, 7 Jul 2012 17:05:55 +0000 (17:05 +0000)]
Fix spelling

PR: bin/167480
Submitted by: zeising
Approved by: cperciva

12 years agoacpi_cpu_generic_cx_probe: for consistency set cpu_non_c3 here too
Andriy Gapon [Sat, 7 Jul 2012 08:19:34 +0000 (08:19 +0000)]
acpi_cpu_generic_cx_probe: for consistency set cpu_non_c3 here too

although by default only C1 is enabled (cx_lowest=0) and enabling deeper
states goes through acpi_cpu_set_cx_lowest which re-evaluates cpu_non_c3

MFC after: 2 weeks

12 years agoacpi_cpu_cx_list: there is no need to re-evaluate cpu_non_c3 here
Andriy Gapon [Sat, 7 Jul 2012 08:12:51 +0000 (08:12 +0000)]
acpi_cpu_cx_list: there is no need to re-evaluate cpu_non_c3 here

cpu_non_c3 is already evaluated in acpi_cpu_cx_cst and in
acpi_cpu_set_cx_lowest.
Besides acpi_cpu_cx_list is not protected by any locking.

As a result also move setting of cpu_can_deep_sleep to more appropriate
places.

MFC after: 2 weeks

12 years agoacpi_cpu_cx_cst: consistently use cpu_cx_count during state enumeration
Andriy Gapon [Sat, 7 Jul 2012 07:59:14 +0000 (07:59 +0000)]
acpi_cpu_cx_cst: consistently use cpu_cx_count during state enumeration

cpu_cx_count is an index into accepted states, while i is an index into
original _CST states

MFC after: 1 week

12 years agoImplement ia64_physmem_alloc() and use it consistently to get memory
Marcel Moolenaar [Sat, 7 Jul 2012 05:17:43 +0000 (05:17 +0000)]
Implement ia64_physmem_alloc() and use it consistently to get memory
before VM has been initialized. This includes:
1.  Replacing pmap_steal_memory(),
2.  Replace the handcrafted logic to allocate a naturally aligned VHPT,
3.  Properly allocate the DPCPU for the BSP.

Ad 3: Appending the DPCPU to kernend worked as long as we wouldn't
      cross into the next PBVM page. If we were to cross into the next
      page, then there wouldn't be a PTE entry on the page table for it
      and we would end up with a MCA following a page fault. As such,
      this commit fixes MCAs occasionally seen.

12 years agoCreate a generic way to support multiple boards within an
Warner Losh [Sat, 7 Jul 2012 05:02:39 +0000 (05:02 +0000)]
Create a generic way to support multiple boards within an
arm platform.  Add all the atmel boards to the ATMEL kernel for
testing purposes.  Until boot loader arg parsing of baord type
is done, this won't actually be able to do the runtime selection.

12 years agoGeneralize this for loading the loader into the SPI. Plus trim about
Warner Losh [Sat, 7 Jul 2012 04:55:42 +0000 (04:55 +0000)]
Generalize this for loading the loader into the SPI. Plus trim about
100 bytes from the binary with silly tricks.  Hope to get this small
enough to run on the models that have 4k SRAM.  We are close compiled
for the at91rm9200, but still need to trim for the target.

12 years agoAllow other SOCs to be compiled in, first step.
Warner Losh [Sat, 7 Jul 2012 04:51:59 +0000 (04:51 +0000)]
Allow other SOCs to be compiled in, first step.

12 years agoStrip out the useless junk. All we really care about is the text,
Warner Losh [Sat, 7 Jul 2012 04:49:53 +0000 (04:49 +0000)]
Strip out the useless junk.  All we really care about is the text,
data and bss sections.  All the rest is needed for normal binaries,
but boot loaders aren't normal.

12 years agoUnbreak building WITH_ICONV=yes and new yacc.
Tim Kientzle [Sat, 7 Jul 2012 04:14:28 +0000 (04:14 +0000)]
Unbreak building WITH_ICONV=yes and new yacc.

12 years agoHide the creation of phys_avail behind an API to make it easier to do it
Marcel Moolenaar [Sat, 7 Jul 2012 00:25:17 +0000 (00:25 +0000)]
Hide the creation of phys_avail behind an API to make it easier to do it
correctly. We now iterate the EFI memory descriptors once and collect all
the information in a single pass. This includes:
1.  The I/O port base address,
2.  The PAL memory region. Have the physmem API track this.
3.  Memory descriptors of memory we can't use, like bad memory, runtime
    services code & data, etc. Have the physmem API track these.
4.  memory descriptors of memory we can use or re-use, such as free
    memory, boot time services code & data, loader code & data, etc.
    These are added by the physmem API.

Since the PBVM page table and pages are in memory described as loader
data, inform the physmem API of chunks that need to be delated from the
available physical memory.

While here, remove Maxmem and replace it with the better named paddr_max.
Maxmem was defined as physmem, which is generally wrong. Now, paddr_max
is properly defined as the largesty physical address.

The upshot of all this is that:
1.  We properly determine realmem.
2.  We maximize physmem by re-using memory where possible.
3.  We remove complexity from ia64_init() in machdep.c.
4.  Remove confusion about realmem, physmem & Maxmem.

The new ia64_physmem_alloc() is to replace pmap_steal_memory() in pmap.c,
as well as replace the handcrafted allocation of the VHPT for the BSP in
pmap_bootstrap() in pmap.c. This is step 2 and addresses the manipulation
of phys_avail after it is being created.

12 years agoImplement SIOCGIFMEDIA for if_tap(4)
Ed Maste [Fri, 6 Jul 2012 23:17:30 +0000 (23:17 +0000)]
Implement SIOCGIFMEDIA for if_tap(4)

Appease certain if_tap(4) consumers by providing simulated Ethernet
media status.

DragonFly commit 70d9a675bf5441cc854a843ead702d08928c37f3

Obtained from:  DragonFly BSD

12 years agoRestore the __collate_load_error global that was accidentally removed in the
David Chisnall [Fri, 6 Jul 2012 20:16:22 +0000 (20:16 +0000)]
Restore the __collate_load_error global that was accidentally removed in the
xlocale refactoring.

MFC after: 1 week

12 years agoAdd a source file needed for module linking.
Konstantin Belousov [Fri, 6 Jul 2012 20:14:27 +0000 (20:14 +0000)]
Add a source file needed for module linking.

MFC after:   4 days

12 years agoStyle.
Konstantin Belousov [Fri, 6 Jul 2012 20:13:16 +0000 (20:13 +0000)]
Style.

Reviewed by: alc (previous version)
MFC after: 1 week

12 years agoUse assembler mnemonic instead of manually assembling, contination for r238142.
Konstantin Belousov [Fri, 6 Jul 2012 20:11:58 +0000 (20:11 +0000)]
Use assembler mnemonic instead of manually assembling, contination for r238142.

Reviewed by: jhb
MFC after: 1 month

12 years agoMerge a small update from NetBSD.
Pedro F. Giffuni [Fri, 6 Jul 2012 19:30:50 +0000 (19:30 +0000)]
Merge a small update from NetBSD.

Feb 15 21:55:23 2009 - chared.c chared.h
pass lint on _LP64.

MFC after: 1 week

12 years agoAllow continuous packet transmission (via -t 0)
Ed Maste [Fri, 6 Jul 2012 17:03:43 +0000 (17:03 +0000)]
Allow continuous packet transmission (via -t 0)

Also add a missing check for the cancel flag while waiting for the first
packet in receive mode.

12 years agoFix issue resizing bin/sh
Pedro F. Giffuni [Fri, 6 Jul 2012 16:43:56 +0000 (16:43 +0000)]
Fix issue resizing bin/sh

This partially reverts some changes from r237448 that are causing
breakage when resizing under bin/sh .

Reverted changes from NetBSD are:

Mar 10 20:46:15 2009 - editline.3 read.c
make el_gets set the count to -1 on error to distinguish between EOF and
error.

Feb 19 15:20:22 2009 - read.c sig.c sig.h
reset and redraw on sigcont. From Anon Ymous.

Feb 15 21:24:13 2009
don't restart on EINTR, instead return NULL immediately. From Anon Ymous

PR: 169603
Reported by: Peter Jeremy, David Shao
MFC after: 3 days

12 years agoagp.c:
Marcel Moolenaar [Fri, 6 Jul 2012 15:57:03 +0000 (15:57 +0000)]
agp.c:
Don't use Maxmem when the amount of memory is meant. Use realmem instead.
Maxmem is not only a MD variable, it represents the highest physical memory
address in use. On systems where memory is sparsely layed-out the highest
memory address and the amount of memory are not interchangeable. Scaling the
AGP aperture based on the actual amount of memory (= realmem) rather than
the available memory (= physmem) makes sure there's consistent behaviour
across architectures.

agp_i810.c:
While arguably the use of Maxmem can be considered correct, replace its use
with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, which
have a dense physical memory layout. Avoiding Maxmem here is done with an
eye on copy-n-paste behaviour in general and to avoid confusion caused by
using realmem in agp.c and Maxmem in agp_i810.c.

In both cases, remove the inclusion of md_var.h

12 years agoFix typo in the comment.
Edward Tomasz Napierala [Fri, 6 Jul 2012 15:46:38 +0000 (15:46 +0000)]
Fix typo in the comment.

12 years agoAlso report tx bandwidth with Ethernet overhead
Ed Maste [Fri, 6 Jul 2012 15:36:39 +0000 (15:36 +0000)]
Also report tx bandwidth with Ethernet overhead

12 years agor237748 continuation: fix nopw (0f 1f) behavior with respect to modifiers
Andriy Gapon [Fri, 6 Jul 2012 14:45:30 +0000 (14:45 +0000)]
r237748 continuation: fix nopw (0f 1f) behavior with respect to modifiers

To do: proper merge with Illumos vendor area.

Reported by: emaste
Tested by: emaste
Obtained from: Illumos commit 13442:4adbe6de60c8
MFC after: 5 days

12 years agor237748 continuation: segment-override prefixes are not invalid in long mode
Andriy Gapon [Fri, 6 Jul 2012 14:41:02 +0000 (14:41 +0000)]
r237748 continuation: segment-override prefixes are not invalid in long mode

Update DTrace disassembler accordingly.  The code to treat the prefixes
as null prefixes was already in place.
Although in practice compilers seem to generate only cs-prefix for use
in long NOPs, the same treatment is applied to all of cs, ds, es, ss for
consistency.

Reported by: emaste
Tested by: emaste
Obtained from: Illumos commit 13442:4adbe6de60c8 (+ local changes)
MFC after: 5 days

12 years agoAdd support for the 'invept' and 'invvpid' instructions. Beyond simply
John Baldwin [Fri, 6 Jul 2012 14:28:18 +0000 (14:28 +0000)]
Add support for the 'invept' and 'invvpid' instructions.  Beyond simply
adding appropriate table entries, the assembler had to be adjusted as
these are the first non-SSE instructions to use a 3-byte opcode (and a
mandatory prefix to boot).

MFC after: 1 month

12 years agoSeveral fixes to the amd64 disassembler:
John Baldwin [Fri, 6 Jul 2012 14:25:59 +0000 (14:25 +0000)]
Several fixes to the amd64 disassembler:
- Add generic support for opcodes that are escape bytes used for
  multi-byte opcodes (such as the 0x0f prefix).  Use this to replace
  the hard-coded 0x0f special case and add support for three-byte
  opcodes that use the 0x0f38 prefix.
- Decode all Intel VMX instructions.  invept and invvpid in particular are
  three-byte opcodes that use the 0x0f38 escape prefix.
- Rework how the special 'SDEP' size flag works such that the default
  instruction name (i_name) is the instruction when the data size
  prefix (0x66) is not specified, and the alternate name in i_extra is
  used when the prefix is included.
- Add a new 'ADEP' size flag similar to 'SDEP' except that it chooses
  between i_name and i_extra based on the address size prefix (0x67).
  Use this to fix the decoding for jrcxz vs jecxz which is determined
  by the address size prefix, not the operand size prefix.  Also, jcxz
  is not possible in 64-bit mode, but jrcxz is the default instruction
  for that opcode.
- Add support for handling instructions that have a mandatory 'rep'
  prefix (this means not outputting the 'repe ' prefix until determining
  if it is used as part of an opcode).  Make 'pause' less of a special
  case this way.
- Decode 'cmpxchg16b' and 'cdqe' which are variants of other instructions
  but with a REX.W prefix.

MFC after: 1 month

12 years agoAllow threads to finish up when terminated by user
Ed Maste [Fri, 6 Jul 2012 13:21:23 +0000 (13:21 +0000)]
Allow threads to finish up when terminated by user

Set a flag and allow worker threads to finish upon ^C, instead of
immediately cancelling them, so that final packet count and rate
stats can be displayed.

12 years agoAdd another PS/2 keyboard PNP ID. This ID is listed as
John Baldwin [Fri, 6 Jul 2012 12:13:28 +0000 (12:13 +0000)]
Add another PS/2 keyboard PNP ID.  This ID is listed as
"Reserved by Microsoft" in the standard PNP ID table, but has been seen
in the wild on at least one laptop.

PR: kern/169571
Submitted by: Matthias Apitz  guru unixarea de
MFC after: 3 days

12 years agoMake pmap_enter()'s management of PV entries consistent with the other pmap
Alan Cox [Fri, 6 Jul 2012 06:42:25 +0000 (06:42 +0000)]
Make pmap_enter()'s management of PV entries consistent with the other pmap
functions that manage PV entries.  Specifically, remove the PV entry from
the containing PV list only after the corresponding PTE is destroyed.

Update the pmap's wired mapping count in pmap_enter() before the PV list
lock is acquired.

12 years agoReplace all uses of the vm page queues lock by a r/w lock that is private
Alan Cox [Fri, 6 Jul 2012 02:18:49 +0000 (02:18 +0000)]
Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.

Tested by: andreast, jhibbits

12 years agoCorrect small regressions pointed out by jhb, thanks John.
Jack F Vogel [Thu, 5 Jul 2012 23:36:17 +0000 (23:36 +0000)]
Correct small regressions pointed out by jhb, thanks John.

MFC after:5 days

12 years agoUpdate to the ixgbe driver:
Jack F Vogel [Thu, 5 Jul 2012 20:51:44 +0000 (20:51 +0000)]
Update to the ixgbe driver:
  - Add a couple of new devices
  - Flow control changes in shared and core code
  - Bug fix to Flow Director for 82598
  - Shared code sync to internal with required core change

Thanks to those helping in the testing and improvements to this driver!

MFC after:5 days

12 years agoSync with Intel internal source:
Jack F Vogel [Thu, 5 Jul 2012 20:26:57 +0000 (20:26 +0000)]
Sync with Intel internal source:
   shared code update and small changes in core required
Add support for new i210/i211 devices
Improve queue calculation based on mac type

MFC after:5 days

12 years agoRemove the "funny targets" make check. We no longer need embedded :: targets
David E. O'Brien [Thu, 5 Jul 2012 18:23:36 +0000 (18:23 +0000)]
Remove the "funny targets" make check.  We no longer need embedded :: targets
to build FreeBSD (they are used in Perl man pages).  We never needed embedded
"!" in targets that I can find.

We got this from OpenBSD and I cannot find any other make that supports
such things -- contrary to their commit message claim: "This behaviour
is also consistent with other versions of make.".

12 years agoNow that our assembler supports the xsave family of instructions, use them
John Baldwin [Thu, 5 Jul 2012 18:19:35 +0000 (18:19 +0000)]
Now that our assembler supports the xsave family of instructions, use them
natively rather than hand-assembled versions.  For xgetbv/xsetbv, add a
wrapper API to deal with xcr* registers: rxcr() and load_xcr().

Reviewed by: kib
MFC after: 1 month

12 years agoDocument the behavior (from 4.4-lite) that tokens returned by telldir() are
Brooks Davis [Thu, 5 Jul 2012 17:02:20 +0000 (17:02 +0000)]
Document the behavior (from 4.4-lite) that tokens returned by telldir() are
single use.

Sponsored by: DARPA, AFRL
MFC after: 3 days

12 years agoFix LINT.
Marcel Moolenaar [Thu, 5 Jul 2012 15:23:45 +0000 (15:23 +0000)]
Fix LINT.

Obtained from: Juniper Networks, Inc.

12 years agoCalculate the new PTE value in pmap_enter() before acquiring any locks.
Alan Cox [Thu, 5 Jul 2012 07:20:16 +0000 (07:20 +0000)]
Calculate the new PTE value in pmap_enter() before acquiring any locks.

Move an assertion to the beginning of pmap_enter().

12 years agoRestore r211786 by rpaulo:
Ed Maste [Thu, 5 Jul 2012 00:52:23 +0000 (00:52 +0000)]
Restore r211786 by rpaulo:

  Port dtruss to FreeBSD.

  Sponsored by:   The FreeBSD Foundation

It appears the change was reverted by r235380.

12 years agoCorrect an error in r237513. The call to reserve_pv_entries() must come
Alan Cox [Thu, 5 Jul 2012 00:08:47 +0000 (00:08 +0000)]
Correct an error in r237513.  The call to reserve_pv_entries() must come
before pmap_demote_pde() updates the PDE.  Otherwise, pmap_pv_demote_pde()
can crash.

Crash reported by: kib
Patch tested by: kib

12 years agoAdd support for the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', and 'xsetbv'
John Baldwin [Wed, 4 Jul 2012 22:12:10 +0000 (22:12 +0000)]
Add support for the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', and 'xsetbv'
instructions.  I reimplemented this from scratch based on the Intel
manuals and the existing support for handling the fxsave and fxrstor
instructions.  This will let us use these instructions natively with GCC
rather than hardcoding the opcodes in hex.

Reviewed by: kib
MFC after: 1 month

12 years agoUse consistent method to determine IPV4_OUTPUT/IPV6_OUTPUT.
Michael Tuexen [Wed, 4 Jul 2012 20:59:30 +0000 (20:59 +0000)]
Use consistent method to determine IPV4_OUTPUT/IPV6_OUTPUT.

MFC after: 3 days

12 years agoUse CSUM_SCTP_IPV6 for IPv6.
Michael Tuexen [Wed, 4 Jul 2012 20:29:16 +0000 (20:29 +0000)]
Use CSUM_SCTP_IPV6 for IPv6.

MFC after: 3 days

12 years agoMake use of GEOM Gate direct reads feature. This allows HAST to serve
Pawel Jakub Dawidek [Wed, 4 Jul 2012 20:20:48 +0000 (20:20 +0000)]
Make use of GEOM Gate direct reads feature. This allows HAST to serve
reads with native speed of the underlying provider.
There are three situations when direct reads are not used:
1. Data is being synchronized and synchronization source is the secondary
   node, which means secondary node has more recent data and we should read
   from it.
2. Local read failed and we have to try to read from the secondary node.
3. Local component is unavailable and all I/O requests are served from the
   secondary node.

Sponsored by: Panzura, http://www.panzura.com
MFC after: 1 month

12 years agoExtend GEOM Gate class to handle read I/O requests directly within the kernel.
Pawel Jakub Dawidek [Wed, 4 Jul 2012 20:16:28 +0000 (20:16 +0000)]
Extend GEOM Gate class to handle read I/O requests directly within the kernel.
This will allow HAST to read directly from the local component without
even communicating userland daemon.

Sponsored by: Panzura, http://www.panzura.com
MFC after: 1 month

12 years agoPrefer sysctl to open/read/close for obtaining random data.
Pawel Jakub Dawidek [Wed, 4 Jul 2012 19:51:25 +0000 (19:51 +0000)]
Prefer sysctl to open/read/close for obtaining random data.
This method is more sandbox-friendly and also should be faster as only
one syscall is needed instead of three.
In case of an error fall back to the old method.

Reviewed by: simon, gleb
MFC after: 2 weeks

12 years agoImprove description of various key used by GELI.
Pawel Jakub Dawidek [Wed, 4 Jul 2012 17:59:26 +0000 (17:59 +0000)]
Improve description of various key used by GELI.

PR: docs/169089
Submitted by: John W. O'Brien <john@saltant.com>
MFC after: 3 days

12 years agoUse correct part of the Master-Key for generating encryption keys.
Pawel Jakub Dawidek [Wed, 4 Jul 2012 17:54:17 +0000 (17:54 +0000)]
Use correct part of the Master-Key for generating encryption keys.
Before this change the IV-Key was used to generate encryption keys,
which was incorrect, but safe - for the XTS mode this key was unused
anyway and for CBC mode it was used differently to generate IV
vectors, so there is no risk that IV vector collides with encryption
key somehow.

Bump version number and keep compatibility for older versions.

MFC after: 2 weeks

12 years agoCorrect comment.
Pawel Jakub Dawidek [Wed, 4 Jul 2012 17:44:39 +0000 (17:44 +0000)]
Correct comment.

MFC after: 3 days

12 years agoCorrect a comment and correct style of a flag check.
Pawel Jakub Dawidek [Wed, 4 Jul 2012 17:43:25 +0000 (17:43 +0000)]
Correct a comment and correct style of a flag check.

MFC after: 3 days

12 years agovdev_io_done stage is not used for ioctls.
Pawel Jakub Dawidek [Wed, 4 Jul 2012 17:39:29 +0000 (17:39 +0000)]
vdev_io_done stage is not used for ioctls.

MFC after: 1 week

12 years agoFix an obvious typo.
Pawel Jakub Dawidek [Wed, 4 Jul 2012 17:36:26 +0000 (17:36 +0000)]
Fix an obvious typo.

MFC after: 3 days