Commit Graph

150371 Commits

Author SHA1 Message Date
Marius Strobl
d07d09d79f MFC: r200938
- Don't check for a valid interrupt controller on every interrupt
  in intr_execute_handlers(). If we managed to get here without an
  associated interrupt controller we have way bigger problems.
  While at it predict stray vector interrupts as false as they are
  rather unlikely.
- Don't blindly call the clear function of an interrupt controller
  when adding a handler in inthand_add() as interrupt controllers
  like the one driven by upa(4) are auto-clearing and thus provide
  NULL instead.
2010-01-13 21:23:27 +00:00
Marius Strobl
74794d0d58 MFC: r200926
Recognize the NS16552 found in PCIe-based sun4u machines.
2010-01-13 21:21:29 +00:00
Marius Strobl
1f0040f79f MFC: r200925
- By re-arranging the code in OF_decode_addr() somewhat and accepting
  a bit of a detour we can just iterate through the banks array instead
  of having to calculate every offset. This change is inspired by the
  powerpc version of this function.
- Add support for the JBus to EBus bridges which hang off of nexus(4).
2010-01-13 21:19:46 +00:00
Marius Strobl
f07dd8aaa5 MFC: r200924
Style changes.
2010-01-13 21:17:45 +00:00
Marius Strobl
b740c16a21 MFC: r200923
- Add support for the IOMMUs of Fire JBus to PCIe and Oberon Uranus
  to PCIe bridges.
- Add support for talking the PROM mappings over to the kernel IOTSB
  just like we do with the kernel TSB in order to allow OFW drivers
  to continue to work.
- Change some members, parameters and variables to unsigned where
  more appropriate.
2010-01-13 21:16:07 +00:00
Marius Strobl
c05db9b041 MFC: r200922
Fix whitespace according to style(9).
2010-01-13 21:13:50 +00:00
Marius Strobl
bdb2fdd6af MFC: r200921
- Add quirk handling for ALi M5229, mainly setting the magic "force
  enable IDE I/O" bit which prevents data access traps with revision
  0xc8 in Fire-based machines when pci(4) enables PCIM_CMD_PORTEN.
- Like for sun4v also don't add the PCI side of host-PCIe bridges to
  the bus on sun4u as they don't have configuration space implement
  there either.
2010-01-13 21:12:27 +00:00
Marius Strobl
8677820407 MFC: r200920
- Sort the prototypes.
- Add macros to ease the access of device configuration space in
  ofw_pcibus_setup_device().
2010-01-13 21:08:57 +00:00
Marius Strobl
778251c8a4 MFC: r200918
Add structures for OFW MSI/MSI-X support. These are identical for
both sun4u and sun4v.
2010-01-13 21:04:56 +00:00
Marius Strobl
f168880574 MFC: r200917
Hook ebus(4) and isa(4) up to the sun4v LINT build in order to
ensure that their compilation doesn't break as they are expected
to work as-is now (but aren't actually run-time tested).
2010-01-13 21:03:04 +00:00
Marius Strobl
7d0ba636c6 MFC: r200916
Remove devices which are/were only relevant for sun4u.
2010-01-13 20:59:36 +00:00
Marius Strobl
4cb21bdfca MFC: r200915
Don't probe the bq4802 variant found in Ultra 25 and 45 for now as
this chip isn't MC146818 compatible and requires different handlers
(but which I can't test due to lack of such hardware).
2010-01-13 20:51:21 +00:00
Marius Strobl
f71a779bb7 MFC: r200914
Don't use an out register to hold the vector number across the call
of the interrupt handler in intr_fast() as the handler might clobber
it (no in-tree handler currently does but an upcoming one will).
While at it, tidy the register usage in the interrupt counting code.
2010-01-13 20:40:49 +00:00
Marius Strobl
96642ec4ae MFC: r200880
- Correct an off-by-one error when calculating the end of a child
  range.
- Spell the PCI TLA in uppercase.
2010-01-13 20:35:27 +00:00
Marius Strobl
990824aa76 MFC: r200879
- Add support for the JBus to EBus bridges which hang off of nexus(4)
  and are found in sun4u and sun4v machines based on the Fire ASIC.
- Initialize the configuration space of the PCI to EBus variant the
  same way as OpenSolaris does.
2010-01-13 20:32:54 +00:00
Marius Strobl
4acf9b4548 MFC: r200878
- Add macros for the states of the interrupt clear registers.
- Change INTMAP_VEC() to take an INO as its second argument rather
  than an INR. The former is what I actually intended with this
  macro and how it's currently used.
2010-01-13 20:07:45 +00:00
Marius Strobl
b61d79e43e MFC: r200876
Make these constants unsigned which is more appropriate.
2010-01-13 20:05:32 +00:00
Marius Strobl
cd93dd27dd MFC: r200874
Enroll these drivers in multipass probing. The motivation behind this
is that the JBus to EBus bridges share the interrupt controller of a
sibling JBus to PCIe bridge (at least as far as the OFW device tree
is concerned, in reality they are part of the same chip) so we have to
probe and attach the latter first. That happens to be also the case
due to the fact that the JBus to PCIe bridges appear first in the OFW
device tree but it doesn't hurt to ensure the right order.
2010-01-13 20:03:24 +00:00
Marius Strobl
d9d6b39c57 MFC: r200815, r200816
Provide and consume missing module dependency information.
2010-01-13 19:59:13 +00:00
Marius Strobl
955990d26e MFC: 197164
Factor out the duplicated macro for the device type used in the
OFW device tree for PCI bridges and add a new one for PCI Express.
While at it, take advantage of the former for the rman(9) work-
around in jbusppm(4).
2010-01-13 19:55:51 +00:00
John Baldwin
8e42544da7 MFC 199607, 200797, 201270, 201669:
Use pthread_once() to initialize the thread-local storage for localtime()
and gmtime() and _once() to initialize gmt state rather than home-rolled
versions using pthread mutex locks.
2010-01-13 18:12:21 +00:00
John Baldwin
d46150d432 MFC 201215:
Add support for configuring vlan(4) interfaces as child devices similar to
wlan(4) interfaces.  vlan(4) interfaces are listed via a new 'vlans_<IF>'
variable.  If a vlan interface is a number, then that number is treated as
the vlan tag for the interface and the interface will be named '<IF>.<tag>'.
Otherwise, the vlan tag must be provided via a vlan parameter in a
'create_args_<vlan>' variable.

While I'm here, fix a few nits in rc.conf(5) and mention create_args_<IF> in
the description of cloned_interfaces.
2010-01-12 19:55:07 +00:00
John Baldwin
bd048c87c0 MFC 201202:
Use reallocf() to simplify some logic.
2010-01-12 18:47:40 +00:00
Brooks Davis
cb8922f4cb MFC r201444:
The size of credential messages is limited by CMGROUP_MAX rather than
  NGROUPS.
2010-01-12 07:33:33 +00:00
Brooks Davis
2a46409df5 MFC r201955:
Improve the comment about CMGROUP_MAX.
2010-01-12 06:14:24 +00:00
Brooks Davis
43ede8f5fe MFC r201954:
Update the comment on printing group membership to reflect that fact
  that each group the process is a member of is printed rather than
  an entry for each group the user could be a member of.
2010-01-12 06:11:36 +00:00
Brooks Davis
0e003a57ce MFC r201953:
Correct the explination text for the kern.ngroups.  It reflects the
  number of supplemental groups, not the total number of groups.
2010-01-12 06:09:56 +00:00
Brooks Davis
9600c47d52 MFC r201443:
Add vlan(4) to all GENERIC kernels.
2010-01-12 06:00:56 +00:00
Qing Li
4cc5ccf399 MFC r201544
An existing incomplete ARP entry would expire a subsequent
statically configured entry of the same host. This bug was
due to the expiration timer was not cancelled when installing
the static entry. Since there exist a potential race condition
with respect to timer cancellation, simply check for the
LLE_STATIC bit inside the expiration function instead of
cancelling the active timer.
2010-01-12 00:04:13 +00:00
Andrew Gallatin
a5905446f8 Sync mxge(4) with head:
r197391: Add support for TX throttling
r198250: Move mxge(4)'s NIC watchdog reset handler from
	 a callout to a taskqueue
r198303: Make mxge do a better job recovering from NIC h/w faults
r200845: Don't take the driver mutex in mxge_tick()
r201758: Remove extraneous semicolons
2010-01-11 20:32:51 +00:00
Rick Macklem
6049e7fcf7 MFC: r201029
When porting the experimental nfs subsystem to the FreeBSD8 krpc,
I added 3 functions that were already in the experimental client
under different names. This patch deletes the functions in the
experimental client and renames the calls to use the other set.
(This is just removal of duplicated code and does not fix any bug.)
2010-01-11 19:30:23 +00:00
John Baldwin
5e3b84c3d2 MFC 201522:
Expose the upper 256 ptys in the default devfs rules.  I should have updated
this when expanding the old pty(4) driver to use 512 ptys by default.  This
is more important for 7.x.
2010-01-11 18:42:29 +00:00
Konstantin Belousov
2d63cbda24 MFC r200770:
Remove VI_OBJDIRTY and make sure that OBJ_MIGHTBEDIRTY is set only for
vnode-backed vm objects.
2010-01-11 12:35:16 +00:00
Ruslan Ermilov
60ee8f1ae1 MFC: r200026,201801: Swap carp(4) log levels. 2010-01-11 12:32:06 +00:00
Christian Brueffer
811a80b4a4 MFC: r201538, r201539
Catch up with the VFS_VPTOFH(9) -> VOP_VPTOFH(9) repocopy that happened
almost three years ago in r166794.

Add a missing word.
2010-01-11 05:19:51 +00:00
Xin LI
0801667fe3 MFC r201143:
Apply OpenSolaris revision 8021:b8fe9660eb2d which brings our zpool
to version 14, making it possible for zpools created on OpenSolaris
2009.06 be used on FreeBSD.

PR:		kern/141800
Submitted by:	mm
Reviewed by:	pjd, trasz
Obtained from:	OpenSolaris onnv-gate
2010-01-11 02:31:00 +00:00
Marcel Moolenaar
1bb65f7e64 MFC rev 201269, 201373:
o   Revamp bus_space access functions (201269).
o   Change BUS_SPACE_MAXADDR from 2^32-1 to 2^64-1 (201373).
2010-01-10 23:51:02 +00:00
Jilles Tjoelker
86892d512c MFC r210428: sh: Add a regression test that tries out all arithmetic ops.
The gaps in the numbering sequence cannot really be avoided, as HEAD changes
are not necessarily merged in the same order as they are made (if they are
merged at all).
2010-01-10 16:58:12 +00:00
Fabien Thomas
40095a24ed MFC 201151:
Use VFS_{LOCK,UNLOCK}_GIANT() around the call to vrele().
2010-01-10 16:08:14 +00:00
Fabien Thomas
a267011a08 MFC 201023:
* Support the L1D_CACHE_LD event on Core2 processors.
 * Correct a group of typos: for Core2 programmable events, check
   user supplied umask values against the correct event descriptor
   field.
2010-01-10 16:04:32 +00:00
Fabien Thomas
cd56dc4253 MFC 201021:
Log process mappings for existing processes at PMC start time.
2010-01-10 16:00:00 +00:00
Konstantin Belousov
28f48c5ccc MFC r201743:
Give some information on SF_MNOWAIT flag.

MFC r201759 (by brueffer):
Fix a typo and bump date for the previous commit.

MFC r201760:
Further fix grammar.
2010-01-10 11:25:34 +00:00
Xin LI
f0c3103b9a MFC r201756:
Re-apply onnv-gate revisions 7994 and 8986 (corresponds to FreeBSD
revision 200726 and 200727).

Reviewed by:  mm@
2010-01-10 07:08:11 +00:00
Pyun YongHyeon
b7cf4e03b6 MFC r200693:
Make sure to enable Next Page bit for IP1001. Otherwise the PHY
  fails to re-establishe 1000baseT link after downgrading to
  10/100Mbps link.
2010-01-09 01:17:31 +00:00
Pyun YongHyeon
18c3b93957 MFC r200641,200676
r200641:
  Document newly added loader tunable and sysctl variables.
   o hw.vge.msi_disable
   o dev.vge.%d.int_holdoff
   o dev.vge.%d.rx_coal_pkt
   o dev.vge.%d.tx_coal_pkt

r200676:
  Document more VIA Velocity family controllers to vge(4). Previously
  it mentioned only VT6122. While I'm here remove the mention of
  VT3119 which seems to be VIA's internal model name and VT3119
  wouldn't be available to end users.

  Reviewed by:  brueffer
2010-01-09 00:36:28 +00:00
Christian Brueffer
1cb2c81c14 MFC: r201397
Add one more supported controller.
2010-01-09 00:27:23 +00:00
Pyun YongHyeon
50a44b8b9b MFC r200696,200740,200756,200758-200759,200972
r200696:
  Add rudimentary WOL support. While I'm here remove enabling
  busmastering/memory address in resume path. Bus driver will handle
  that.

r200740:
  Swap VGE_TXQTIMER and VGE_RXQTIMER register definition. Pending
  timer for Tx queue is at 0x3E.

r200756:
  Correct fragment bit definition in comments.

r200758:
  VT6130 datasheet was wrong. If VT6130 receive a jumbo frame the
  controller will split the jumbo frame into multiple RX buffers.
  However it seems the hardware always dma the frame to 8 bytes
  boundary for the split frames. Only the first part of the fragment
  can have 4 byte alignment and subsequent buffers should be 8 bytes
  aligned. Change RX buffer the alignment requirement to 8 bytes from
  4 bytes.

r200759:
  Disable jumbo frame support for PCIe VT6130/VT6132 controllers.
  Quite contrary to VT6130 datasheet which says it supports up to 8K
  jumbo frame, VT6130 does not seem to send jumbo frame that is
  larger than 4K in length. Trying to send a frame that is larger
  than 4K cause TX MAC hang.
  Even though it's possible to allow 4K jumbo frame for VT6130, I
  think it's meaningless to allow 4K jumbo frame. I'm not sure VT6132
  also has the same limitation but I guess it uses the same MAC of
  VT6130.

r200972:
  Remove wrong assertion.
2010-01-09 00:26:57 +00:00
Pyun YongHyeon
6f311c8682 MFC r200638:
Implement interrupt moderation scheme supported by VT61xx
  controllers. TX/RX interrupt mitigation is controlled by
  VGE_TXSUPPTHR and VGE_RXSUPPTHR register. These registers suppress
  generation of interrupts until the programmed frames counter equals
  to the registers. VT61xx also supports interrupt hold off timer
  register. If this interrupt hold off timer is active all interrupts
  would be disabled until the timer reaches to 0. The timer value is
  reloaded whenever VGE_ISR register written. The timer resolution is
  about 20us.

  Previously vge(4) used single shot timer to reduce Tx completion
  interrupts. This required VGE_CRS1 register access in Tx
  start/completion handler to rearm new timeout value and it did not
  show satisfactory result(more than 50k interrupts under load). Rx
  interrupts was not moderated at all such that vge(4) used to
  generate too many interrupts which in turn made polling(4) better
  approach under high network load.

  This change activates all interrupt moderation mechanism and
  initial values were tuned to generate interrupt less than 8k per
  second. That number of interrupts wouldn't add additional packet
  latencies compared to polling(4). These interrupt parameters could
  be changed with sysctl.
  dev.vge.%d.int_holdoff
  dev.vge.%d.rx_coal_pkt
  dev.vge.%d.tx_coal_pkt
  Interface has be brought down and up again before change take
  effect.

  With interrupt moderation there is no more need to loop in
  interrupt handler. This loop always added one more register access.
  While I'm here remove dead code which tried to implement subset of
  interrupt moderation.
2010-01-09 00:17:43 +00:00
Pyun YongHyeon
babaf83d9a MFC r200616-200617,200635,200639,200644
r200616:
  Add new flag VGE_FLAG_SUSPENDED to mark suspended state and
  remove suspended member in softc.

r200617:
  Add "Velocity" to probe message which will make it clearer which
  ethernet controller was recognized. VIA consistently calls
  "Velocity" family for gigabit ethernet controllers. For fast
  ethernet controllers they uses "Rhine" family(vr(4) controllers))
  and vr(4) already shows "Rhine" in probe message.

r200635:
  Remove unused VGE_ETHER_ALIGN definition.

r200639:
  Actually clear interrupts. Writing 0 has no effect.

r200644:
  Remove unused member variable of softc.
2010-01-09 00:12:59 +00:00
Pyun YongHyeon
2e04b85932 MFC 200615:
Add hardware MAC statistics support. This statistics could be
  extracted from dev.vge.%d.stats sysctl node.
2010-01-09 00:07:03 +00:00