Commit Graph

1377 Commits

Author SHA1 Message Date
adrian
dbefb0c523 Ensure hwpmc support is correctly included. 2012-11-17 04:11:57 +00:00
adrian
ef2dbd479f Make MIPS24k PMC optional on "hwpmc_mips24k."
Requested by:	juli
2012-11-17 04:10:42 +00:00
adrian
d0887d66eb Migrate the AR71xx UART (an 8250 derivative) to hide behind uart_ar71xx.
The AR9330/AR9331 UART is a totally different thing, so having it included
with 'uart' is not going to work out.
2012-11-17 04:05:46 +00:00
kib
e8ae50d444 Flip the semantic of M_NOWAIT to only require the allocation to not
sleep, and perform the page allocations with VM_ALLOC_SYSTEM
class. Previously, the allocation was also allowed to completely drain
the reserve of the free pages, being translated to VM_ALLOC_INTERRUPT
request class for vm_page_alloc() and similar functions.

Allow the caller of malloc* to request the 'deep drain' semantic by
providing M_USE_RESERVE flag, now translated to VM_ALLOC_INTERRUPT
class. Previously, it resulted in less aggressive VM_ALLOC_SYSTEM
allocation class.

Centralize the translation of the M_* malloc(9) flags in the single
inline function malloc2vm_flags().

Discussion started by:	"Sears, Steven" <Steven.Sears@netapp.com>
Reviewed by:	alc, mdf (previous version)
Tested by:	pho (previous version)
MFC after:	2 weeks
2012-11-14 20:01:40 +00:00
alc
1bce6c4064 The function pmap_alloc_direct_page() unconditionally zeroes the returned
page.  Therefore, it is really inappropriate for use by the function
uma_small_alloc().  The effect of using it was that every page was zeroed
at least once and possibly twice if M_ZERO was passed as a "wait" flag.
2012-11-14 17:33:00 +00:00
jmallett
c9968192ed Add preliminary Octeon PCI console support. Radisys-specific PCI console
support may follow soon (it uses a proprietary memory layout, but operation
looks pretty trivial.)
2012-11-13 07:39:49 +00:00
jmallett
4c38399f30 Add some useful options to consider. 2012-11-13 07:34:46 +00:00
adrian
ab66165b63 Update AP96 to directly attach an arswitch. 2012-11-07 23:50:28 +00:00
ray
3fb7192739 Hint miibus to attach arswitch on AP91, AP93 and RSPRO boards.
Submitted by:	Luiz Otavio O Souza
Approved by:	adrian (menthor)
2012-11-07 22:46:30 +00:00
attilio
f3501b109e Rework the known rwlock to benefit about staying on their own
cache line in order to avoid manual frobbing but using
struct rwlock_padalign.

Reviewed by:	alc, jimharris
2012-11-03 23:03:14 +00:00
adrian
5b01d738b3 Drop this from 500 to 128, to save a little space on memory constrained
platforms.
2012-11-02 05:23:05 +00:00
adrian
8acc9b7705 Free the dma map -after- it's checked, not before. Or you'll be
potentially referencing already-freed memory.
2012-11-02 05:22:32 +00:00
jmallett
d082d2f2c5 Don't disable PCIe just because the host is not a PCI host; the latter flag
only applies to non-PCIe systems.  If PCIe is in target mode, it will simply
and gracefully fail to attach of its own accord.
2012-11-01 20:39:39 +00:00
jmallett
62321d8c39 Fix longstanding misprint. 2012-10-31 04:44:32 +00:00
jmallett
edb74bf530 If the CF physical base is 0, attach no CF devices. This fixes a warning
about a 0 passed to cvmx_phys_to_ptr on systems without a CF interface,
such as the RSYS4GBE.
2012-10-31 04:23:36 +00:00
jmallett
8b95820a21 Actually check board type rather than using a specialized octeon_is_simulation
function.
2012-10-30 06:36:14 +00:00
jmallett
5db705b6a7 Remove oct_read64 and oct_write64 and use their equivalents from the Simple
Executive, which are used everywhere else in the Octeon port.  While here,
remove other unused things from octeon_pcmap_regs.h.
2012-10-30 06:29:17 +00:00
jmallett
cb4217a037 Remove stale declarations. 2012-10-30 06:19:46 +00:00
jmallett
1729e10b37 Speed feature tests and initialize helper configuration that some CPUs require. 2012-10-30 06:07:30 +00:00
jmallett
7c53bf7ecd Add a sysctl to change the LED display. 2012-10-29 07:06:23 +00:00
jmallett
dc7f834036 Wrap some long lines and display board serial numbers at boot. 2012-10-29 02:10:20 +00:00
jmallett
d209784979 Use Simple Executive LED display routines, which correctly use the LED base
address passed from the bootloader, rather than using a hard-coded value.

Make FreeBSD announce itself on the LED display similar to other kernels.

Remove uses of the previous LED routines, which were under-used and only used
in drivers for what seem like debugging purposes, despite those drivers being
widely-tested.

Remove several inlines for accessing memory that duplicate other functions
which are now used instead, as they are now entirely unused.
2012-10-29 00:51:53 +00:00
jmallett
8f92bb074b Add missing return that broke 8-bit CF support in refactoring in r222671.
Tested on a Cavium CN5860-EVB-NIC4.  This was broken for over a year.
2012-10-27 23:36:41 +00:00
alc
1ff1c1a2d1 Eliminate a redundant TLB invalidation from pmap_pv_reclaim(). 2012-10-27 22:43:30 +00:00
jmallett
af24b41220 Add support for Radisys as a vendor of Octeon hardware. Add some preliminary
support for what their boot loader refers to as the "RSYS4GBE", of which there
are two instances ("Data Processing Blocks") on the Radisys ATCA-7220.
2012-10-26 00:08:50 +00:00
jmallett
06f94170ed Don't attach if the bootloader has not indicated that we're a PCI host. This
fixes booting on systems which are PCI targets.
2012-10-26 00:04:05 +00:00
thompsa
afe2d7631c Fix spelling of NFSCL option. 2012-10-23 22:58:25 +00:00
imp
ac417b1e9c Turns out the nvram env was common, so move it back up to get PB92 working. 2012-10-23 19:17:43 +00:00
imp
a049a3abe6 Add RT305x specific devices here. 2012-10-23 15:25:48 +00:00
andre
060f9b0155 Remove ZERO_COPY_SOCKETS from kernel configuration as the current
COW based approach is not safe and should not be used in production.
2012-10-22 15:04:23 +00:00
eadler
3f7a414911 remove duplicate semicolons where possible.
Approved by:	cperciva
MFC after:	1 week
2012-10-22 03:00:37 +00:00
attilio
85c1a64cec Disconnect non-MPSAFE NTFS from the build in preparation for dropping
GIANT from VFS. This code is particulary broken and fragile and other
in-kernel implementations around, found in other operating systems,
don't really seem clean and solid enough to be imported at all.
If someone wants to reconsider in-kernel NTFS implementation for
inclusion again, a fair effort for completely fixing and cleaning it
up is expected.

In the while NTFS regular users can use FUSE interface and ntfs-3g
port to work with their NTFS partitions.

This is not targeted for MFC.
2012-10-17 11:30:00 +00:00
alc
5b3318cf9e Correct an error in pmap_pv_reclaim(). It can legitimately encounter
wired mappings.  If it does, it should just skip them.
2012-10-14 03:40:08 +00:00
attilio
6997194551 Add an unified macro to deny ability from the compiler to reorder
instruction loads/stores at its will.
The macro __compiler_membar() is currently supported for both gcc and
clang, but kernel compilation will fail otherwise.

Reviewed by:	bde, kib
Discussed with:	dim, theraven
MFC after:	2 weeks
2012-10-09 14:32:30 +00:00
alc
65071837b0 Optimize the TLB invalidations performed by pmap_protect(). Use the new
range-based invalidation function instead of performing per-page
invalidations.  Don't bother invalidating mappings that don't have PTE_D
set, since they don't allow write access.
2012-10-07 18:07:45 +00:00
alc
0806d64a58 In general pmap implementations do not set the wired attribute on
the temporary mappings that are used to implement operations like
pmap_zero_page().  There is no reason for the MIPS pmap to deviate
from that practice.
2012-10-06 19:33:52 +00:00
alc
78ade40ed1 Correct two pessimizations in pmap_extract_and_hold(). Test the PTE for
having PTE_RO set instead of PTE_D.  This avoids some unnecessary failures
by pmap_extract_and_hold() that will have to be handled by a call to
vm_fault_hold().  Testing the PTE for both being non-zero and having PTE_V
set is redundant.  The latter suffices.
2012-10-06 19:05:50 +00:00
alc
9f7ae26674 Eliminate a stale and a duplicated comment. 2012-10-05 04:35:20 +00:00
alc
e19854ff7c Reimplement pmap_qremove() using the new TLB invalidation function for
efficiently invalidating address ranges.
2012-10-03 05:42:15 +00:00
alc
8eccaae22c Introduce a new TLB invalidation function for efficiently invalidating
address ranges, and use this function in pmap_remove().

Tested by:	jchandra
2012-10-02 07:14:22 +00:00
hselasky
c081610de9 Inherit USB mode from RootHUB port where the USB device is connected.
Only RootHUB ports can be dual mode. Disallow OTG ports on external HUBs.
This simplifies some checks in the USB controller drivers.

MFC after:	1 week
2012-10-01 05:42:43 +00:00
alc
55f6ff40ed Eliminate a stale comment. It describes another use case for the pmap in
Mach that doesn't exist in FreeBSD.
2012-09-28 05:30:59 +00:00
ed
123cfec6ca Prefer __containerof() above member2struct().
The first does proper checking of the argument types, while the latter
does not.
2012-09-15 19:28:54 +00:00
alc
2bc702613a Simplify pmap_unmapdev(). Since kmem_free() eventually calls pmap_remove(),
pmap_unmapdev()'s own direct efforts to destroy the page table entries are
redundant, so eliminate them.

Don't set PTE_W on the page table entry in pmap_kenter{,_attr}() on MIPS.
Setting PTE_W on MIPS is inconsistent with the implementation of this
function on other architectures.  Moreover, PTE_W should not be set, unless
the pmap's wired mapping count is incremented, which pmap_kenter{,_attr}()
doesn't do.

MFC after:	10 days
2012-09-10 16:11:29 +00:00
attilio
8dece93b14 userret() already checks for td_locks when INVARIANTS is enabled, so
there is no need to check if Giant is acquired after it.

Reviewed by:	kib
MFC after:	1 week
2012-09-08 18:27:11 +00:00
alc
c069e61b00 pmap_remove:
Avoid re-walking the page table from the root for every PTE examined.

  Tidy up some of pmap_remove()'s helper functions.

pmap_enter:

  Set PV_TABLE_REF whenever the physical page being mapped is managed, not
  just when it is writeable.

  Only call pmap_update_page() when the old mapping was valid.  If there was
  no prior valid mapping, then pmap_update_page() serves no useful purpose.
  However, it will interrupt every processor that has the pmap active.

pmap_enter_quick_locked:

  Always set PTE_RO.

pmap_emulate_modified:

  Don't set PV_TABLE_REF.

  Eliminate a nonsensical comment.
2012-09-08 17:43:20 +00:00
alc
9cfbfbb356 Eliminate unnecessary NULL checks. 2012-09-07 06:12:28 +00:00
jhb
0bc0a2586c Dynamically allocate the S/G lists passed to callback routines rather than
allocating them on the stack of various bus_dmamap_load*() functions.  The
S/G lists are stored in the DMA tags.  This matches the implementation on
all other platforms.

Discussed with:	scottl, gibbs
Tested by:	stas (arm@)
2012-09-06 20:16:59 +00:00
brooks
a949f3567e Don't hardcode paths to MFS_IMAGE in the kernel config. When they don't
exist they don't cause "make tinderbox" to fail.

Reported by:	jhb
2012-09-05 15:55:51 +00:00
alc
b1adba8ac6 Rename {_,}pmap_unwire_pte_hold() to {_,}pmap_unwire_ptp() and update the
comment describing them.  Both the function names and the comment had grown
stale.  Quite some time has passed since these pmap implementations last
used the page's hold count to track the number of valid mapping within a
page table page.  Also, returning TRUE from pmap_unwire_ptp() rather than
_pmap_unwire_ptp() eliminates a few instructions from callers like
pmap_enter_quick_locked() where pmap_unwire_ptp()'s return value is used
directly by a conditional statement.
2012-09-05 06:02:54 +00:00