Commit Graph

184858 Commits

Author SHA1 Message Date
Rui Paulo
cb56d4a851 Allow mixing bsd.files.mk with bsd.subdir.mk.
If a single Makefile wants to recurse into subdirectories and also
wants to install files, bsd.files.mk's targets would get ignored in
favor of those defined by bsd.subdir.mk because installfiles would
not get defined in bsd.files.mk.

Prevent this from happening by defining the targets in bsd.files.mk
with auxiliary names and listing them as dependencies of installfiles
instead.

This is required by bsd.test.mk, which needs to install a Kyuafile
in pretty much all cases but may also need to recurse into
subdirectories for build purposes.

Submitted by:	Julio Merino jmmv google.com
Reviewed by:	sjg
MFC after:	2 weeks
2013-10-25 05:11:10 +00:00
Adrian Chadd
dfd325ea2c Add a configuration file and hints file for the Alfa Networks Hornet UB
board.

This is another AR9331 board similar to the Carambola2. It has different
ethernet and LED wiring though.

They make a variety of boards that mostly differ on the amount of RAM/flash
available.  Alfa Networks graciously donated a handful of 64MB RAM/16MB flash
boards so I can finish off 802.11s support for the AR93xx chips and do up
a tech demonstration with it.

This is enough to bring up the board.

Tested:

* Alfa networks UB Hornet board - 64MB ram, 16MB flash version.

Thankyou to Alfa Networks for the development boards!

Sponsored by:	Alfa Networks (hardware only)
2013-10-25 04:06:54 +00:00
Nathan Whitehorn
a3550e73e4 Be a little more suspicious of thermal sensors, which can have single
crazy readings occasionally. One wild reading should not be enough to
trigger a shutdown, so instead wait for several concerning readings in
a row.

PR:		powerpc/180593
Submitted by:	Julio Merino
MFC after:	1 week
2013-10-25 03:55:52 +00:00
Peter Grehan
8f1db961f9 Fix bug in the ioapic emulation for level-triggered interrupts,
where a pin assertion while a source was masked would result in
the interrupt being lost, with the symptom being a console hang.
The condition is now recorded, and the interrupt generated when
the source is unmasked.

Discovered by:	OpenBSD 5.4 MP
Reviewed by:	neel
MFC after:	3 days
2013-10-25 03:18:56 +00:00
Sean Bruno
29ef2f0e31 Queisce quite a few clang warnings -Wdangling-else due to this work around
for compiling gperf under Visual Studio from 1998.

ref. http://msdn.microsoft.com/en-us/library/b80153d8%28v=vs.90%29.aspx
ref. http://stackoverflow.com/questions/984878/what-is-the-possible-use-for-define-for-if-false-else-for
2013-10-25 01:10:07 +00:00
Andrey V. Elsukov
baa09f1891 Initialize inc_fibnum for properly handling ICMP6_PACKET_TOO_BIG errors
in multifib environment.

PR:		183265
MFC after:	1 week
2013-10-25 01:02:25 +00:00
Justin Hibbits
594ce9ad6f ELF PowerPC64 ABI puts the LR save word at 16 byte offset, not 8. 2013-10-25 00:17:12 +00:00
Glen Barber
57bd24ceaa Fix build host pollution by avoiding calling 'uname -srp' to
determine values for 'VERSION'.

Looked at by:	cperciva
2013-10-24 22:55:15 +00:00
Peter Grehan
4083db7d5d Fix panic in the tap driver when a tap and vmnet interface were
created after each other e.g.

 ifconfig tap0
 ifconfig vmnet0
 <panic>

Appears to be a cut'n'paste error from the tap code to the vmnet
code where the name string wasn't updated in the call to make_dev().

Reviewed by:	glebius
MFC after:	3 days
2013-10-24 22:21:31 +00:00
Andrey Zonov
34f41cb067 Cleanup empty directories
PR:	conf/167133
2013-10-24 21:58:14 +00:00
Nathan Whitehorn
e3f4d74e21 Remove some of the code required for supporting ssm(4) on SPARC in favor
of a more PowerPC/FDT-focused design. Whenever SPARC64 is integrated
into this rework, this should be (trivially) revisited.
2013-10-24 21:49:23 +00:00
Konstantin Belousov
c54a713f6a Make pci_get_dma_tag() non-static. Since the function is only
referenced by pointer, making it non-static should not have even the
negligible impact on the existing code.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-10-24 20:29:29 +00:00
Konstantin Belousov
83cc1cfaea Add some definitions for the bits in root control and status PCIe cap
registers.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-10-24 20:25:29 +00:00
Konstantin Belousov
feb96b46a2 Move the PCI_DMA_BOUNDARY definition into the pcivar.h.
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-10-24 20:21:37 +00:00
Konstantin Belousov
5596528930 Add ddb 'show ioapic' and 'show all ioapics' commands.
Reviewed by:	jhb (previous version)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2013-10-24 20:13:40 +00:00
Sergey Kandaurov
b2420d4d0b Modernize pass(4) description to the 21st century.
Reviewed by:	mav
2013-10-24 19:49:55 +00:00
Sergey Kandaurov
af52cb44d8 Correct typo. s/an an/an/ 2013-10-24 19:32:20 +00:00
Marius Strobl
2ce472e736 Move the implementation of bus_space_barrier(9) to the inline function in
the header. Actually, there's only one version for all types of busses, so
it doesn't make sense to walk up the hierarchy.
2013-10-24 17:06:41 +00:00
Adrian Chadd
e94527beaf Fix a use-after-free node reference issue when waiting for a return
from a management frame transmission.

This bug is a bit loopy, so here goes.

The underlying cause is pretty easy to understand - the node isn't
referenced before passing into the callout, so if the node is deleted
before the callout fires, it'll dereference free'd memory.

The code path however is slightly more convoluted.

The functions _say_ mgt_tx - ie management transmit - which is partially
true.  Yes, that callback is attached to the mbuf for some management
frames.  However, it's only for frames relating to scanning and
authentication attempts.  It helpfully drives the VAP state back to
"SCAN" if the transmission fails _OR_ (as I subsequently found out!)
if the transmission succeeds but the state machine doesn't make progress
towards being authenticated and active.

Now, the code itself isn't terribly clear about this.

It _looks_ like it's just handling the transmit failure case.

However, when you look at what goes on in the transmit success case, it's
moving the VAP state back to SCAN if it hasn't changed state since
the time the callback was scheduled.  Ie, if it's in ASSOC or AUTH still,
it'll go back to SCAN.  But if it has transitioned to the RUN state,
the comparison will fail and it'll not transition things back to the
SCAN state.

So, to fix this, I decided to leave everything the way it is and merely
fix the locking and remove the node reference.

The _better_ fix would be to turn this callout into a "assoc/auth request"
timeout callback and make the callout locked, thus eliminating all races.
However, until all the drivers have been fixed so that transmit completions
occur outside of any locking that's going on, it's going to be impossible
to do this without introducing LORs.  So, I leave some of the evilness
in there.

Tested:

* AR5212, ath(4), STA mode
* 5100 and 4965 wifi, iwn(4), STA mode
2013-10-24 17:04:16 +00:00
Luiz Otavio O Souza
585300e937 Add an OFW SPI compatible bus. Fix the spibus probe to return
BUS_PROBE_GENERIC and not BUS_PROBE_SPECIFIC (0) so the OFW SPI bus can
attach when enabled.  Export the spibus devclass_t and driver_t
declarations.

Submitted by:	ray
Approved by:	adrian (mentor)
2013-10-24 16:56:38 +00:00
Luiz Otavio O Souza
07897970fb Add the Raspberry Pi SPI controller driver.
Reviewed by:	rpaulo
Approved by:	adrian (mentor)
2013-10-24 16:27:33 +00:00
Edward Tomasz Napierala
84fb32a371 Don't spin with mutex hold when there is not enough room in the send socket
buffer.  While here, make the code flow somewhat nicer.

Thanks to mav@ for tracking it down.

Tested by:	mav
MFC after:	3 days
Sponsored by:	FreeBSD Foundation
2013-10-24 15:54:06 +00:00
Nathan Whitehorn
238b0483a7 Do not map IRQs twice. This fixes PowerPC/FDT systems with multiple PICs,
which would try to treat the previously-mapped interrupts from
fdt_decode_intr() as interrupt line numbers on the same parent PIC.
2013-10-24 15:44:29 +00:00
Nathan Whitehorn
544234026d Allow PIC drivers to translate firmware sense codes for themselves. This
is designed to replace the tables in dev/fdt/fdt_ARCH.c, but will not
happen quite yet.
2013-10-24 15:37:32 +00:00
Brooks Davis
6495f64998 Regenerate documentation post r256915:
Stop conflating WITHOUT_CLANG with WITHOUT_CLANG_IS_CC.  This allows
bootstrapping a copy of clang without building clang for the base system
which is useful for nanobsd and similar setups.  It's still probably
wrong to conflate what is installed as /usr/bin/cc with the selection
of a bootstrap compiler under WITH*_CLANG_IS_CC, but that's for another
day.
2013-10-24 15:11:30 +00:00
Glen Barber
44c38c2ca3 Revert r256921 to prevent error output when in the wrong directory.
This should have been reverted with the stable/10/Makefile.inc1
revert, but apparently my commit did not go through.

Discussed with:	cperciva (originally)
2013-10-24 15:00:19 +00:00
Nathan Whitehorn
863527800c interrupt-parent and #interrupt-cells are written to the tree using
encode-int.
2013-10-24 14:15:05 +00:00
Alexander Motin
030844d1e7 Some microoptimizations for da and ada drivers:
- Replace ordered_tag_count counter with single flag;
 - From da remove outstanding_cmds counter, duplicating pending_ccbs list;
 - From da_softc remove unused links field.
2013-10-24 14:05:44 +00:00
Bryan Drewery
62940ea951 Add support for using "pkg+http://" for the PACKAGESITE.
pkg 1.2 is adding this support as well. This should help
lessen the confusion on why the default SRV PACKAGESITE
does not load in a browser.

Adapated from:	matthew's upstream pkg change
Approved by:	bapt
MFC after:	2 days
2013-10-24 10:49:55 +00:00
Aleksandr Rybalko
3a1f3e0d0c Fix crossed fingers output. Only comment changed. 2013-10-24 09:27:06 +00:00
Colin Percival
9546dbd128 Be more selective when filtering for lib*.so.N files. These are deleted
at the end of the upgrade process, after warning users to upgrade any
3rd party software (e.g., from the ports tree) which might link to the
libraries being removed.

Prior to this commit, the line
  /usr/lib/libc.so|...|/lib/libc.so.7
matched the regex, which -- upgrading from 9.x to 10.x, where libc.so is
a regular file and thus was not part of a line which matched the regex --
resulted in freebsd-update thinking that /usr/lib/libc.so was a shared
library which was being removed as part of the upgrade.  This had some
unfortunate consequences.

This will be part of an upcoming Errata Notice.
2013-10-24 03:36:39 +00:00
Mark Johnston
2e1ae0b3e9 Redefine the io provider using the SDT(9) macros instead of doing everything
manually. This change has no functional impact.

Discussed with:	gnn
2013-10-24 02:39:07 +00:00
Hiroki Sato
4103b0b025 Return 0 if:
1. "-u N" specified, no -f, and mdN found,
  2. no -u, "-f /pathname" specified, and mdN associated with /pathname found,
  3. "-u N" specified, "-f /pathname" specified, and both of them found,
  4. "-l" specified and no -f,
  5. "-l" specified, "-f /pathname" specified, and /pathname found.

otherwise return -1.

Spotted by:	Julian H. Stacey
2013-10-24 01:06:44 +00:00
Adrian Chadd
8a5e5a978d Break out the debug code into a new include file in preparation for
some more iwn work.
2013-10-24 01:03:42 +00:00
Adrian Chadd
b876a4a384 Add #ifdef wrapper around definitions so they aren't included multiple
times.
2013-10-24 01:02:54 +00:00
Pedro F. Giffuni
4b367145f7 UFS2: make di_extsize unsigned.
di_extsize is the EA size and as such it should be unsigned.
Adjust related types for consistency.

Reviewed by:	mckusick (previous version)
MFC after:	3 weeks
2013-10-24 00:33:29 +00:00
Neel Natu
b5331f4d88 Tidy usage messages for bhyve and bhyveload.
Submitted by:	jhb
2013-10-23 21:42:53 +00:00
Brooks Davis
dd2f74a820 MFP4:
Change 221534 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2013/01/27 16:05:30

        FreeBSD/mips stores page-table entries in a near-identical format
        to MIPS TLB entries -- only it overrides certain "reserved" bits
        in the MIPS-defined EntryLo register to hold software-defined bits
        (swbits) to avoid significantly increasing the page table memory
        footprint.  On n32 and n64, these bits were (a) colliding with
        MIPS64r2 physical memory extensions and (b) being improperly
        cleared.

        Attempt to fix both of these problems by pushing swbits further
        along 64-bit EntryLo registers into the reserved space, and
        improving consistency between C-based and assembly-based clearing
        of swbits -- in particular, to use the same definition.  This
        should stop swbits from leaking into TLB entries -- while ignored
        by most current MIPS hardware, this would cause a problem with
        (much) larger physical memory sizes, and also leads to confusing
        hardware-level tracing as physical addresses contain unexpected
        (and inconsistent) higher bits.

        Discussed with: imp, jmallett

Change 1187301 by brooks@brooks_zenith on 2013/10/23 14:40:10
        Loop back the initial commit of 221534 to HEAD.  Correct its
        implementation for mips32.

MFC after:	3 days
Sponsored by:	DARPA/AFRL
2013-10-23 21:35:39 +00:00
Nathan Whitehorn
a8126ae500 Factor out MI portions of the PowerPC nexus device into /sys/dev/ofw. The
sparc64 driver will be modified to use this shortly.
2013-10-23 20:00:14 +00:00
Nathan Whitehorn
e3bb91c23f Typo while reviewing diffs. Sorry for the breakage! 2013-10-23 19:56:13 +00:00
Xin LI
5fbb683079 Update driver to version 10.0.664.0.
Many thanks to Emulex for their continued support of FreeBSD.

Submitted by:	Venkata Duvvuru <VenkatKumar.Duvvuru Emulex Com>
MFC after:	3 day
2013-10-23 18:58:38 +00:00
Alan Somers
86b2e94a3d sbin/geom/class/part/geom_part.c
Always validate the return of find_geomcfg().  It could be NULL, for
	example when the geom is withering.

Approved by:	ken (mentor)
Sponsored by:	Spectra Logic Corporation
MFC after:	3 weeks
2013-10-23 18:58:11 +00:00
Peter Grehan
fce0413b0a Export the block size capability to guests.
- Use #defines for capability bits
- Export the VTBLK_F_BLK_SIZE capability
- Fix bug in calculating capacity: it is in
  512-byte units, not the underlying sector size

This allows virtio-blk to have backing devices
with non 512-byte sector sizes e.g. /dev/cd0, and
4K-block harddrives.

Reviewed by:	neel
MFC after:	3 days
2013-10-23 18:54:58 +00:00
Steven Hartland
818d321f67 Added support for the 'zfs list -t snap' and 'zfs snap' aliases which are
available under Oracle Solaris 11.

This includes an update to the ZFS(8) man page to reflect all the
available alias (snap, umount, and recv).

Initial changes obtained from ZFS On Linux + fixes for man page and cmd
help:
10b75496bb
cf81b00a73

Obtained from:	https://github.com/zfsonlinux/zfs
MFC after:	2 weeks
Sponsored by:	Multiplay
2013-10-23 18:22:27 +00:00
Alexander Motin
eeb9405409 Remove 128KB bzero() call done for every block I/O data buffer.
On my tests this improves performance of the new iSCSI target backed by
GEOM STRIPE of SSDs from 75K to 110K IOPS.

Reviewed by:	ken
2013-10-23 17:55:35 +00:00
Nathan Whitehorn
f214848258 Add two new interfaces to ofw_bus:
- ofw_bus_map_intr()
  Maps an (iparent, IRQ) tuple to a system-global interrupt number in some
  platform dependent way. This is meant to be implemented as a replacement
  for [FDT_]MAP_IRQ() that is an MI interface that knows about the bus
  hierarchy.
- ofw_bus_config_intr()
  Configures an interrupt (previously mapped) based on firmware sense flags.
  This replaces manual interpretation of the sense field in bus drivers and
  will, in a follow-up, allow that interpretation to be redirected to the PIC
  drivers where it belongs. This will eventually replace the tables in
  /sys/dev/fdt/fdt_ARCH.c

The PowerPC/AIM code has been converted to use these globally, with an
implementation in terms of MAP_IRQ() and powerpc_config_intr(), assuming
OpenPIC, at the bus root in nexus(4). The ofw_bus_config_intr() will shortly
be integrated into pic_if.m and bounced through nexus into the PIC tree.

FDT integration will happen significantly later due to larger testing
requirements. This patch in general also lays the groundwork for the removal
of /sys/dev/fdt/fdt_ARCH.c and machine/fdt.h.
2013-10-23 17:24:21 +00:00
Baptiste Daroussin
959bd87986 Fix build with gcc
MFC after:	3 days
2013-10-23 15:29:42 +00:00
Brooks Davis
8a60ded44f BERI_SIM.hint is no longer used, remove it.
MFC after:	3 days
Sponsored by:	DARPA/AFRL
2013-10-23 15:24:05 +00:00
Alexander Motin
ec08c07e8c Minor (mostly cosmetical) addition to r256960. 2013-10-23 14:58:09 +00:00
Nathan Whitehorn
1c02b4c9fb A quick addendum: the standard says that timebase-frequency can be either
32 or 64 bits, so allow either.
2013-10-23 14:34:04 +00:00