]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoFix dhclient to properly exit and teardown the configured lease when
jhb [Fri, 17 Aug 2012 15:53:43 +0000 (15:53 +0000)]
Fix dhclient to properly exit and teardown the configured lease when
link is lost.  devd will start a new dhclient instance when link is
restored.

PR: bin/166656
Submitted by: Peter Jeremy (mostly)
Reviewed by: brooks (earlier version from Peter)
MFC after: 1 month

11 years agoAllow static DMA allocations that allow for enough segments to do page-sized
jhb [Fri, 17 Aug 2012 14:14:25 +0000 (14:14 +0000)]
Allow static DMA allocations that allow for enough segments to do page-sized
segments for the entire allocation to use kmem_alloc_attr() to allocate
KVM rather than using kmem_alloc_contig().  This avoids requiring
a single physically contiguous chunk in this case.

Submitted by: Peter Jeremy (original version)
MFC after: 1 month

11 years agoOk jhb, lets move the ifa_free() down to the bottom to
rrs [Fri, 17 Aug 2012 05:51:46 +0000 (05:51 +0000)]
Ok jhb, lets move the ifa_free() down to the bottom to
assure that *all* tables and such are removed before
we start to free. This won't protect the Hash in ip_input.c
but in theory should protect any other uses that *do* use locks.

MFC after: 1 week (or more)

11 years agoFix two problems with pmap_clear_modify().
alc [Fri, 17 Aug 2012 05:02:29 +0000 (05:02 +0000)]
Fix two problems with pmap_clear_modify().

First, pmap_clear_modify() is write protecting all mappings to the specified
page, not just clearing the modified bit.  Specifically, it sets PTE_RO on
the PTE, which is wrong.  Moreover, it is calling vm_page_dirty(), which is
not the expected behavior for pmap_clear_modify().  Generally speaking, the
machine-independent VM layer masks these mistakes.  For example, setting
PTE_RO will result in additional soft faults, but not a catastrophe.

Second, pmap_clear_modify() may not clear the modified bits because it only
iterates over the PV list when the page has the PV_TABLE_MOD flag set and
elsewhere the pmap clears the PV_TABLE_MOD flag anytime a modified mapping
is write protected or destroyed.  However, the page may still have other
mappings with the modified bit set.

Eliminate a stale comment.

11 years agoThe GPIO drivers were initialising their mutexes with type of
rpaulo [Fri, 17 Aug 2012 04:44:57 +0000 (04:44 +0000)]
The GPIO drivers were initialising their mutexes with type of
MTX_NETWORK_LOCK. This is wrong since these mutexes have nothing to do
with networking.

11 years agoregen.
davidxu [Fri, 17 Aug 2012 02:47:16 +0000 (02:47 +0000)]
regen.

11 years agoCorrect a regression introduced during the import of file(1) 5.11.
mckay [Fri, 17 Aug 2012 02:27:17 +0000 (02:27 +0000)]
Correct a regression introduced during the import of file(1) 5.11.

Magic tests containing "search" or "regex" directives were incorrectly
compiled by "mkmagic" and were effectively ignored.  This caused troff
files (for example) to be detected as simply "ASCII text" instead of
as "troff or preprocessor input, ASCII text".

PR: bin/170415
Approved by: consensus on developers@
MFC after: 3 days

11 years agoImplement syscall clock_getcpuclockid2, so we can get a clock id
davidxu [Fri, 17 Aug 2012 02:26:31 +0000 (02:26 +0000)]
Implement syscall clock_getcpuclockid2, so we can get a clock id
for process, thread or others we want to support.
Use the syscall to implement POSIX API clock_getcpuclock and
pthread_getcpuclockid.

PR: 168417

11 years agoThe TCP PAWS fix for kernels with fast tick rates (r231767) changed the TCP
lstewart [Fri, 17 Aug 2012 01:49:51 +0000 (01:49 +0000)]
The TCP PAWS fix for kernels with fast tick rates (r231767) changed the TCP
timestamp related stack variables to reference ms directly instead of ticks.
The h_ertt(4) Khelp module relies on TCP timestamp information in order to
calculate its enhanced RTT estimates, but was not updated as part of r231767.

Consequently, h_ertt has not been calculating correct RTT estimates since
r231767 was comitted, which in turn broke all delay-based congestion control
algorithms because they rely on the h_ertt RTT estimates.

Fix the breakage by switching h_ertt to use tcp_ts_getticks() in place of all
previous uses of the ticks variable. This ensures all timestamp related
variables in h_ertt use the same units as the TCP stack and therefore results in
meaningful comparisons and RTT estimate calculations.

Reported & tested by: Naeem Khademi (naeemk at ifi uio no)
Discussed with: bz
MFC after: 3 days

11 years agoMake 'junk' volatile so that compilers won't be tempted to optimize
kevlo [Fri, 17 Aug 2012 01:05:56 +0000 (01:05 +0000)]
Make 'junk' volatile so that compilers won't be tempted to optimize

Reviewed by: ache
MFC after: 3 days

11 years agoSupport for TCP DDP (Direct Data Placement) in the T4 TOE module.
np [Fri, 17 Aug 2012 00:49:29 +0000 (00:49 +0000)]
Support for TCP DDP (Direct Data Placement) in the T4 TOE module.

Basically, this is automatic rx zero copy when feasible.  TCP payload is
DMA'd directly into the userspace buffer described by the uio submitted
in soreceive by an application.

- Works with sockets that are being handled by the TCP offload engine
  of a T4 chip (you need t4_tom.ko module loaded after cxgbe, and an
  "ifconfig +toe" on the cxgbe interface).
- Does not require any modification to the application.
- Not enabled by default.  Use hw.t4nex.<X>.toe.ddp="1" to enable it.

11 years agoInitialize various DDP parameters in the main cxgbe(4) driver:
np [Thu, 16 Aug 2012 22:33:56 +0000 (22:33 +0000)]
Initialize various DDP parameters in the main cxgbe(4) driver:

- Setup multiple DDP page sizes.  When the driver attempts DDP it will
  try to combine physically contiguous pages into regions of these sizes.

- Set the indicate size such that the payload carried in the indicate can
  be copied in the header mbuf (and the 16K rx buffer can be recycled).

- Set DDP threshold to the max payload that the chip will coalesce and
  deliver to the driver (this is ~16K by default, which is also why the
  offload rx queue is backed by 16K buffers).  If the chip is able to
  coalesce up to the max it's allowed to, it's a good sign that the peer
  is transmitting in bulk without any TCP PSH.

MFC after: 2 weeks

11 years agoMerge ACPICA 20120816.
jkim [Thu, 16 Aug 2012 20:54:52 +0000 (20:54 +0000)]
Merge ACPICA 20120816.

11 years agoMake room for DDP page pods in the default configuration profile. While
np [Thu, 16 Aug 2012 20:30:14 +0000 (20:30 +0000)]
Make room for DDP page pods in the default configuration profile.  While
here, bump up the L2 table's size to 4K entries.

MFC after: 2 weeks

11 years agoAdd a routine (t4_set_tcb_field) to update arbitrary parts of a hardware
np [Thu, 16 Aug 2012 20:15:29 +0000 (20:15 +0000)]
Add a routine (t4_set_tcb_field) to update arbitrary parts of a hardware
TCB.  Filters are programmed by modifying the TCB too (via a different
routine) and the reply to any TCB update is delivered via a
CPL_SET_TCB_RPL.  Figure out whether the reply is for a filter-write or
something else and route it appropriately.

MFC after: 2 weeks

11 years ago- Typo fix
gonzo [Thu, 16 Aug 2012 19:22:34 +0000 (19:22 +0000)]
- Typo fix
- style(9) fix

Spotted by: kib@, Andrey Zonov

11 years agoAllow for a different handler for each type of firmware message.
np [Thu, 16 Aug 2012 18:31:50 +0000 (18:31 +0000)]
Allow for a different handler for each type of firmware message.

MFC after: 2 weeks

11 years agoRemove D_NEEDGIANT from dead_devsw. biofinish() (and thus dead_strategy)
jhb [Thu, 16 Aug 2012 18:04:33 +0000 (18:04 +0000)]
Remove D_NEEDGIANT from dead_devsw.  biofinish() (and thus dead_strategy)
does not need Giant.

MFC after: 1 month

11 years agoIts never a good idea to double free the same
rrs [Thu, 16 Aug 2012 17:55:16 +0000 (17:55 +0000)]
Its never a good idea to double free the same
address.

MFC after: 1 week (after the other commits ahead of this gets MFC'd)

11 years agoImport ACPICA 20120816.
jkim [Thu, 16 Aug 2012 17:26:22 +0000 (17:26 +0000)]
Import ACPICA 20120816.

11 years agoAdd locking for sscdisk(4) and mark it MPSAFE. Since this driver just
jhb [Thu, 16 Aug 2012 17:17:08 +0000 (17:17 +0000)]
Add locking for sscdisk(4) and mark it MPSAFE.  Since this driver just
makes calls out to the emulator, the locking is fairly simple.  A global
mutex protects the list of ssc disks, and each ssc disk has a mutex
to protect it's bioq.

Approved by: marcel

11 years agoOn lun disable, complete all INOTs and ATIOs with CAM_REQ_ABORTED.
mjacob [Thu, 16 Aug 2012 15:32:16 +0000 (15:32 +0000)]
On lun disable, complete all INOTs and ATIOs with CAM_REQ_ABORTED.

Reviewed by: ken (silently), chuck
MFC after: 3 weeks

11 years agoAs a safety measure, disable lowering pid_max too much.
kib [Thu, 16 Aug 2012 13:04:21 +0000 (13:04 +0000)]
As a safety measure, disable lowering pid_max too much.

Requested by: Peter Jeremy <peter@rulingia.com>
MFC after: 1 week

11 years agoFix grammar.
kib [Thu, 16 Aug 2012 13:01:56 +0000 (13:01 +0000)]
Fix grammar.

Submitted by: jh
MFC after: 1 week

11 years ago- When running out of swzone, instead of spewing an error message every
des [Thu, 16 Aug 2012 08:29:49 +0000 (08:29 +0000)]
- When running out of swzone, instead of spewing an error message every
  tick until the situation is resolved (if ever), just print a single
  message when running out and another when space becomes available.

- When adding more swap, warn if the total amount exceeds half the
  theoretical maximum we can handle.

11 years agoFix "speaker" volume control, broken at r230451.
mav [Thu, 16 Aug 2012 07:43:15 +0000 (07:43 +0000)]
Fix "speaker" volume control, broken at r230451.

Reported and tested by: Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after: 1 month

11 years agoAdd comment why the code has been disabled.
ae [Thu, 16 Aug 2012 06:45:58 +0000 (06:45 +0000)]
Add comment why the code has been disabled.

Requested by: rpaulo

11 years agoPreliminary Embest ATEB9200 support.
imp [Thu, 16 Aug 2012 05:03:59 +0000 (05:03 +0000)]
Preliminary Embest ATEB9200 support.

11 years agoHmmm, somehow this file was completely deleted, rather than just
imp [Thu, 16 Aug 2012 04:53:30 +0000 (04:53 +0000)]
Hmmm, somehow this file was completely deleted, rather than just
having the bogus lines being removed.

11 years agoRemove unused hints.
imp [Thu, 16 Aug 2012 04:49:23 +0000 (04:49 +0000)]
Remove unused hints.

11 years agoEliminate an unused parameter from init_pte_prot().
alc [Thu, 16 Aug 2012 04:41:15 +0000 (04:41 +0000)]
Eliminate an unused parameter from init_pte_prot().

Eliminate stray whitespace within init_pte_prot().

Eliminate a gratuitous variable initialization from pmap_enter().

11 years agoLimit popcorn limit to something sane (either 2ns or 2 ticks if that's
imp [Thu, 16 Aug 2012 02:35:44 +0000 (02:35 +0000)]
Limit popcorn limit to something sane (either 2ns or 2 ticks if that's
longer).

PR: 156481
Submitted by: Ian Lepore

11 years agoFix an incorrect comparison.
adrian [Thu, 16 Aug 2012 00:53:23 +0000 (00:53 +0000)]
Fix an incorrect comparison.

PR: kern/170098

11 years agoMerge somewhat modified r230399 from projects/armv6:
gonzo [Thu, 16 Aug 2012 00:51:50 +0000 (00:51 +0000)]
Merge somewhat modified r230399 from projects/armv6:

Add timeout to wait for network controllers to appear when netbooting.

USB ethernet adapter initialization usually is delayed and
they're not available immidiately after autoconfiguration. So we need
to wait a bit before giving up

Reviewed by: stas@

11 years agoReplace all uses of the vm page queues lock by a r/w lock that is private
alc [Wed, 15 Aug 2012 22:51:01 +0000 (22:51 +0000)]
Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.

Tidy up the #include's.

Remove the (now) unused #define PMAP_SHPGPERPROC.  (This should have
been removed in r239236.)

Tested by: jchandra

11 years agoEliminate some unused declarations.
alc [Wed, 15 Aug 2012 22:25:57 +0000 (22:25 +0000)]
Eliminate some unused declarations.

11 years agoCorrect a KASSERT message.
alc [Wed, 15 Aug 2012 22:12:01 +0000 (22:12 +0000)]
Correct a KASSERT message.

Submitted by: bde

11 years agoDon't call the node iteration function inside the node table / node
adrian [Wed, 15 Aug 2012 20:01:28 +0000 (20:01 +0000)]
Don't call the node iteration function inside the node table / node
iterate lock.

This causes LORs and deadlocks as some code paths will have the com lock
held when calling ieee80211_iterate_nodes().

Here, the comlock isn't held during the node table and node iteration
locks; and the callback isn't called with any (extra) lock held.

PR: kern/170098
Submitted by: moonlightakkiy@yahoo.ca
MFC after: 4 weeks

11 years agoFix argument type for bus_space_map
gonzo [Wed, 15 Aug 2012 18:37:01 +0000 (18:37 +0000)]
Fix argument type for bus_space_map

11 years agoUnbreak build for the rest of AT91 platforms
gonzo [Wed, 15 Aug 2012 18:33:58 +0000 (18:33 +0000)]
Unbreak build for the rest of AT91 platforms

11 years agoSwitch lpc initarm() to use struct arm_boot_params and therefore fix
jceel [Wed, 15 Aug 2012 18:18:29 +0000 (18:18 +0000)]
Switch lpc initarm() to use struct arm_boot_params and therefore fix
EA3250 kernel build.

Approved by: gonzo

11 years agoSmall tweaks:
kib [Wed, 15 Aug 2012 18:00:52 +0000 (18:00 +0000)]
Small tweaks:
- fix macro argument
- wrap long line
- be more explicit about old pid_t type.

MFC after: 1 week

11 years agoMinor mdoc fixes and language tweaks.
joel [Wed, 15 Aug 2012 17:29:05 +0000 (17:29 +0000)]
Minor mdoc fixes and language tweaks.

11 years agoCustomer report of a panic on boot due to the old
jfv [Wed, 15 Aug 2012 17:12:40 +0000 (17:12 +0000)]
Customer report of a panic on boot due to the old
"m_getjcl:invalid cluster type" that occurred some
time back with the igb driver. This happens often when
booting over the net. I believe the NIC hardware is left
in a warm state when handed over to the driver, and a stray
RX interrupt happens earlier than the code is prepared for
it to happen. This change was verified to fix the problem,
its kind of a bandaid... but it is similar to what was done
in the igb code.

11 years agoStreamline use of cdevpriv and correct some corner cases.
hselasky [Wed, 15 Aug 2012 16:19:39 +0000 (16:19 +0000)]
Streamline use of cdevpriv and correct some corner cases.

1) It is not useful to call "devfs_clear_cdevpriv()" from
"d_close" callbacks, hence for example read, write, ioctl and
so on might be sleeping at the time of "d_close" being called
and then then freed private data can still be accessed.
Examples: dtrace, linux_compat, ksyms (all fixed by this patch)

2) In sys/dev/drm* there are some cases in which memory will
be freed twice, if open fails, first by code in the open
routine, secondly by the cdevpriv destructor. Move registration
of the cdevpriv to the end of the drm open routines.

3) devfs_clear_cdevpriv() is not called if the "d_open" callback
registered cdevpriv data and the "d_open" callback function
returned an error. Fix this.

Discussed with: phk
MFC after: 2 weeks

11 years agoAdd a short man page describing how to run a.out binaries on the
kib [Wed, 15 Aug 2012 16:01:45 +0000 (16:01 +0000)]
Add a short man page describing how to run a.out binaries on the
current kernels.

MFC after: 1 week

11 years agoAdd a sysctl kern.pid_max, which limits the maximum pid the system is
kib [Wed, 15 Aug 2012 15:56:21 +0000 (15:56 +0000)]
Add a sysctl kern.pid_max, which limits the maximum pid the system is
allowed to allocate, and corresponding tunable with the same
name. Note that existing processes with higher pids are left intact.

MFC after: 1 week

11 years agoFix build
kib [Wed, 15 Aug 2012 15:53:27 +0000 (15:53 +0000)]
Fix build

11 years agoRevert r239178 and implement two new functions, namely
hselasky [Wed, 15 Aug 2012 15:42:57 +0000 (15:42 +0000)]
Revert r239178 and implement two new functions, namely
"device_free_softc()" and "device_claim_softc()",
to allow USB serial drivers refcounting the softc.
These functions are used to grab the softc from
auto-free and to free the softc back to the correct
malloc type, respectivly.

Discussed with: jhb
MFC after: 2 weeks

11 years agoAdd new USB device quirk.
hselasky [Wed, 15 Aug 2012 15:35:20 +0000 (15:35 +0000)]
Add new USB device quirk.

Submitted by: Kra OTN
MFC after: 2 weeks

11 years agoRegenerate.
kib [Wed, 15 Aug 2012 15:18:20 +0000 (15:18 +0000)]
Regenerate.

11 years agoProvide 32bit compat for truncate(2) and ftruncate(2).
kib [Wed, 15 Aug 2012 15:17:56 +0000 (15:17 +0000)]
Provide 32bit compat for truncate(2) and ftruncate(2).

MFC after: 1 week

11 years agoDon't include opt_ddb.h & <ddb/ddb.h> twice.
obrien [Wed, 15 Aug 2012 14:18:54 +0000 (14:18 +0000)]
Don't include opt_ddb.h & <ddb/ddb.h> twice.

11 years agoSome BIOSes return incorrect number of sectors, make checks less
ae [Wed, 15 Aug 2012 12:01:13 +0000 (12:01 +0000)]
Some BIOSes return incorrect number of sectors, make checks less
strictly, to do not lost some partitions.

Reported by: swills@

11 years agoRework r239232 to unbreak ZFS detection on MBR slices.
ae [Wed, 15 Aug 2012 10:11:29 +0000 (10:11 +0000)]
Rework r239232 to unbreak ZFS detection on MBR slices.

11 years agoExplicitly terminate the string after strncpy(3).
ae [Wed, 15 Aug 2012 09:18:49 +0000 (09:18 +0000)]
Explicitly terminate the string after strncpy(3).

11 years agoUnbreak ATMEL kernel build
gonzo [Wed, 15 Aug 2012 08:34:31 +0000 (08:34 +0000)]
Unbreak ATMEL kernel build

11 years agoExtend the non-aggregate TX descriptor chain routine to be aware of:
adrian [Wed, 15 Aug 2012 08:14:16 +0000 (08:14 +0000)]
Extend the non-aggregate TX descriptor chain routine to be aware of:

* the descriptor ID, and
* the multi-buffer support that the EDMA chips support.

This is required for successful MAC transmission of multi-descriptor
frames.  The MAC simply hangs if there are NULL buffers + 0 length pointers,
but the descriptor did have TxMore set.

This won't be done for the 11n aggregate path, as that will be modified
to use the newer API (ie, ath_hal_filltxdesc() and then set first|middle|
last_aggr), which will deprecate some of the current code.

TODO:

* Populate the numTxMaps field in the HAL, then make sure that's fetched
  by the driver.  Then I can undo that hack.

Tested:

* AR9380, AP mode, TX'ing non-aggregate 802.11n frames;
* AR9280, STA/AP mode, doing aggregate and non-aggregate traffic.

11 years agoBump up the rate control table size to incorporate 3 stream entries.
adrian [Wed, 15 Aug 2012 08:06:06 +0000 (08:06 +0000)]
Bump up the rate control table size to incorporate 3 stream entries.

11 years agoRemove this comment, it's no longer relevant.
adrian [Wed, 15 Aug 2012 07:56:48 +0000 (07:56 +0000)]
Remove this comment, it's no longer relevant.

11 years agoExtend the duration calculations to work with three and four stream
adrian [Wed, 15 Aug 2012 07:52:49 +0000 (07:52 +0000)]
Extend the duration calculations to work with three and four stream
rates.

11 years agoAdd a missing comma.
adrian [Wed, 15 Aug 2012 07:50:42 +0000 (07:50 +0000)]
Add a missing comma.

Pointy hat to: me, for not doing a 'clean' build first.

11 years agoAdd 3 stream rates to the sample rate control module.
adrian [Wed, 15 Aug 2012 07:32:34 +0000 (07:32 +0000)]
Add 3 stream rates to the sample rate control module.

11 years agoExtend the sample mask from 32 bits to 64 bits.
adrian [Wed, 15 Aug 2012 07:10:10 +0000 (07:10 +0000)]
Extend the sample mask from 32 bits to 64 bits.

This is required to support > MCS15 as more than 32 bit rate entries are
suddenly available.

This is quite messy - instead of doing typecasts at each mask operation,
this should be migrated to use a macro and have that do the typecast.

11 years agoSpecify architecture for assembler
gonzo [Wed, 15 Aug 2012 07:00:34 +0000 (07:00 +0000)]
Specify architecture for assembler

11 years agoImplement a sequential descriptor ID value and stuff it in the ath_buf.
adrian [Wed, 15 Aug 2012 06:48:34 +0000 (06:48 +0000)]
Implement a sequential descriptor ID value and stuff it in the ath_buf.

This will be used by the EDMA TX code to assign descriptor IDs in order
to provide some debugging.

11 years agoMerging of projects/armv6, part 10
gonzo [Wed, 15 Aug 2012 06:31:32 +0000 (06:31 +0000)]
Merging of projects/armv6, part 10

- Support for Texas Instruments SoCs:
- AM335x
- OMAP4

- Kernel configs, DTS for Beaglebone and Pandaboard

Submitted by: Ben Gray, Damjan Marion

11 years agoMerging of projects/armv6, part 9
gonzo [Wed, 15 Aug 2012 06:06:43 +0000 (06:06 +0000)]
Merging of projects/armv6, part 9

Very basic support for Nvidia Tegra2: timer, interrupts, UART.

Submitted by: Damjan Marion <dmarion@freebsd.org>

11 years agoMerging of projects/armv6, intermission
gonzo [Wed, 15 Aug 2012 05:55:16 +0000 (05:55 +0000)]
Merging of projects/armv6, intermission

Add configs missed in previous commits:
    - ARMADA XP
- Embedded Artists EA3250

11 years agoMerging of projects/armv6, part 8
gonzo [Wed, 15 Aug 2012 05:37:10 +0000 (05:37 +0000)]
Merging of projects/armv6, part 8

r235162:

  Initial LPC32x0 support. Includes DTS file for Embedded Artists EA3250
  board.

  Peripherals currently supported:
  - Serial ports
  - Interrupt controller
  - Timers
  - Ethernet
  - USB host
  - Framebuffer (in conjunction with SSD1289 LCD controller)
  - RTC
  - SPI
  - GPIO

Submitted by: Jakub Wojciech Klama <jceel@freebsd.org>

11 years agoMerging of projects/armv6, part 7
gonzo [Wed, 15 Aug 2012 05:15:49 +0000 (05:15 +0000)]
Merging of projects/armv6, part 7

Add Marvell ARMADA XP support

Obtained from: Marvell, Semihalf

11 years agoMerging of projects/armv6, part 6
gonzo [Wed, 15 Aug 2012 04:07:18 +0000 (04:07 +0000)]
Merging of projects/armv6, part 6

r229271:
    Import files needed to build ARMADA XP kernel.

Submitted by: Grzegorz Bernacki

11 years agoMerging of projects/armv6, part 5
gonzo [Wed, 15 Aug 2012 04:03:55 +0000 (04:03 +0000)]
Merging of projects/armv6, part 5

- Driver for SMSC LAN95XX and LAN8710A ethernet controllers
- Driver for LAN8710A PHY

Submitted by: Ben Gray, Damjan Marion, Tim Kientzle

11 years agoMerging of projects/armv6, part 4
gonzo [Wed, 15 Aug 2012 03:49:10 +0000 (03:49 +0000)]
Merging of projects/armv6, part 4

r233822:
  Remove useless and wrong piece of code in fdt_get_range() which i
  overwrites passed phandle_t node. Modify debug printf in fdt_reg_to_rl()
  to be consistent (that is, print start and end *virtual* addresses).

r230560:
  Handle "ranges;"
  Make fdt_reg_to_rl() responsible for mapping the device memory, instead
  on just hoping that there's only one simplebus, and using fdt_immr_va as
  the base VA.

r230315
  Add a function to get the PA from range, instead of (ab)using
  fdt_immr_pa, and use it for the UART driver

11 years agoMerging of projects/armv6, part 4
gonzo [Wed, 15 Aug 2012 03:33:57 +0000 (03:33 +0000)]
Merging of projects/armv6, part 4

r232281:
Fix byte order.

11 years agoMerging of projects/armv6, part 3
gonzo [Wed, 15 Aug 2012 03:21:56 +0000 (03:21 +0000)]
Merging of projects/armv6, part 3

r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions.  In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
 * GCC to default to arm1176jz-s
 * GCC to predefine __FreeBSD_ARCH_armv6__
 * gas to default to ARM_ARCH_V6K
 * uname -p to return 'armv6'
 * make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by: Tim Kientzle <kientzle@freebsd.org>

11 years agoMerging of projects/armv6, part 2
gonzo [Wed, 15 Aug 2012 03:09:00 +0000 (03:09 +0000)]
Merging of projects/armv6, part 2

Handle TLS for ARMv6 and ARMv7

11 years agoMerging of projects/armv6, part 2
gonzo [Wed, 15 Aug 2012 03:08:29 +0000 (03:08 +0000)]
Merging of projects/armv6, part 2

Handle TLS for ARMv6 and ARMv7

11 years agoMerging of projects/armv6, part 2
gonzo [Wed, 15 Aug 2012 03:07:41 +0000 (03:07 +0000)]
Merging of projects/armv6, part 2

Handle TLS for ARMv6 and ARMv7

11 years agoMerging projects/armv6, part 1
gonzo [Wed, 15 Aug 2012 03:03:03 +0000 (03:03 +0000)]
Merging projects/armv6, part 1

Cummulative patch of changes that are not vendor-specific:
- ARMv6 and ARMv7 architecture support
- ARM SMP support
- VFP/Neon support
- ARM Generic Interrupt Controller driver
- Simplification of startup code for all platforms

11 years agoThe size of the buffers in an Ethernet freelist has to be higher than the
np [Wed, 15 Aug 2012 01:03:13 +0000 (01:03 +0000)]
The size of the buffers in an Ethernet freelist has to be higher than the
interface's MTU.  Initialize such freelists with correct values.

This wasn't a problem for common MTUs (1500 and 9000) as the buffers (2048
and 9216 in size) happened to have enough spare room.  I ran into it when
playing around with unusual MTUs.

MFC after: 2 weeks

11 years agoAssume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and
np [Tue, 14 Aug 2012 23:08:49 +0000 (23:08 +0000)]
Assume INET, INET6, and TCP_OFFLOAD when the driver is built out of tree and
KERNBUILDDIR is not set.

MFC after: 2 weeks

11 years agoDump out the TX FIFO depth.
adrian [Tue, 14 Aug 2012 22:34:22 +0000 (22:34 +0000)]
Dump out the TX FIFO depth.

11 years agoBreak out the TX completion code into a separate function, so it can be
adrian [Tue, 14 Aug 2012 22:32:20 +0000 (22:32 +0000)]
Break out the TX completion code into a separate function, so it can be
re-used by the upcoming EDMA TX completion code.

Make ath_stoptxdma() public, again so the EDMA TX code can use it.

Don't check for the TXQ bitmap in the ISR when doing EDMA work as it
doesn't apply for EDMA.

11 years agoAdd an assertion to check that the given TXQ is _not_ locked.
adrian [Tue, 14 Aug 2012 22:30:17 +0000 (22:30 +0000)]
Add an assertion to check that the given TXQ is _not_ locked.

11 years agoRename command defines to match names used in the datasheet, in order to
gavin [Tue, 14 Aug 2012 22:21:46 +0000 (22:21 +0000)]
Rename command defines to match names used in the datasheet, in order to
make maintaining this driver from the documentation easier in the future.
This is a mostly mechanical change.

In uslcom_param(), move the zeroing of the final two fields of the
flowctrl structure outside of the "if CRTSCTS" section - not only were
they being zeroed in both the clauses, but these two fields have nothing
to do with hardware flow control anyway.

11 years agoif_iqdrops should include frames truncated within the chip.
np [Tue, 14 Aug 2012 22:15:12 +0000 (22:15 +0000)]
if_iqdrops should include frames truncated within the chip.

MFC after: 2 weeks

11 years agoConvert some fixed parameters to tunables (with reasonable default
np [Tue, 14 Aug 2012 21:47:41 +0000 (21:47 +0000)]
Convert some fixed parameters to tunables (with reasonable default
values).

- cong_drop specifies what to do on congestion: nothing, backpressure,
  or drop.
- fl_pktshift specifies the padding before Ethernet payload.
- fl_pad specifies the boundary upto which to pad Ethernet payload.
- spg_len controls the length of the status page.

MFC after: 2 weeks

11 years agoReserve room for the terminating NUL when setting or getting kernel
jh [Tue, 14 Aug 2012 19:16:30 +0000 (19:16 +0000)]
Reserve room for the terminating NUL when setting or getting kernel
environment variables. KENV_MNAMELEN and KENV_MVALLEN doesn't include
space for the terminating NUL.

11 years agoAs discussed on -current, remove the hardcoded default maxswzone.
des [Tue, 14 Aug 2012 17:01:21 +0000 (17:01 +0000)]
As discussed on -current, remove the hardcoded default maxswzone.

MFC after: 3 weeks

11 years agoFix multichannel input signals tracing on some CODECs like ALC260.
mav [Tue, 14 Aug 2012 14:07:34 +0000 (14:07 +0000)]
Fix multichannel input signals tracing on some CODECs like ALC260.

Reported and tested by: Slawa Olhovchenkov <slw@zxy.spb.ru>
MFC after: 1 month

11 years agoPospone the DF_1_NODELETE processing until object DAG is fully loaded.
kan [Tue, 14 Aug 2012 13:28:30 +0000 (13:28 +0000)]
Pospone the DF_1_NODELETE processing until object DAG is fully loaded.

Trying to up the reference from the load loop risks missing dependencies
that have not been loaded yet.

MFC afer: 1 week
Reported by: nox
Reviewd by: kib

11 years agoAdd a hackish debugging facility to provide a bit of information about
kib [Tue, 14 Aug 2012 12:15:01 +0000 (12:15 +0000)]
Add a hackish debugging facility to provide a bit of information about
reason for generated trap. The dump of basic signal information and 8
bytes of the faulting instruction are printed on the controlling
terminal of the process, if the machdep.uprintf_signal syscal is
enabled.

The print is the only practical way to debug traps from a.out
processes I am aware of. Because I have to reimplement it each time I
debug an issue with a.out support on amd64, commit the hack to main
tree.

MFC after: 1 week

11 years agoReal hardware, as opposed to QEMU, does not allow to have a call gate
kib [Tue, 14 Aug 2012 12:13:27 +0000 (12:13 +0000)]
Real hardware, as opposed to QEMU, does not allow to have a call gate
in long mode which transfers control to 32bit code segment. Unbreak
the lcall $7,$0 implementation on amd64 by putting the 64bit user code
segment' selector into call gate, and execute the 64bit trampoline
which converts the return frame into 32bit format and switches back to
32bit mode for executing int $0x80 trampoline.

Note that all jumps over the hoops are performed in the user mode.

MFC after: 1 week

11 years agoFor old mmap syscall, when executing on amd64 or ia64, enforce the
kib [Tue, 14 Aug 2012 12:11:48 +0000 (12:11 +0000)]
For old mmap syscall, when executing on amd64 or ia64, enforce the
PROT_EXEC if prot is non-zero, process is 32bit and
kern.elf32.i386_read_exec syscal is enabled. This workaround is needed
for old i386 a.out binaries, where dynamic linker did not specified
PROT_EXEC for mapping of the text.

The kern.elf32.i386_read_exec MIB name looks weird for a.out binaries,
but I reused the existing knob which already has the needed semantic.

MFC after: 1 week

11 years agoRegenerate.
kib [Tue, 14 Aug 2012 12:09:36 +0000 (12:09 +0000)]
Regenerate.

11 years agoImplement the old mmap syscall for compat32, when COMPAT_43 option is
kib [Tue, 14 Aug 2012 12:09:09 +0000 (12:09 +0000)]
Implement the old mmap syscall for compat32, when COMPAT_43 option is
enabled. The syscall is used by FreeBSD 1.1.5.1 dynamic linker.

MFC after: 1 week

11 years agoAdjust the r205536, by allowing a non-zero offset for anonymous
kib [Tue, 14 Aug 2012 11:47:07 +0000 (11:47 +0000)]
Adjust the r205536, by allowing a non-zero offset for anonymous
mappings for a.out binaries. Apparently, a.out ld.so from FreeBSD
1.1.5.1 can issue such requests.

Reported and tested by: Dan Plassche <dplassche@gmail.com>
MFC after: 1 week

11 years agoDo not leave invalid pages in the object after the short read for a
kib [Tue, 14 Aug 2012 11:45:47 +0000 (11:45 +0000)]
Do not leave invalid pages in the object after the short read for a
network file systems (not only NFS proper). Short reads cause pages
other then the requested one, which were not filled by read response,
to stay invalid.

Change the vm_page_readahead_finish() interface to not take the error
code, but instead to make a decision to free or to (de)activate the
page only by its validity. As result, not requested invalid pages are
freed even if the read RPC indicated success.

Noted and reviewed by: alc
MFC after: 1 week

11 years agoFix typo in comment.
andreast [Tue, 14 Aug 2012 05:16:35 +0000 (05:16 +0000)]
Fix typo in comment.