Commit Graph

172952 Commits

Author SHA1 Message Date
Grzegorz Bernacki
d65cdf4b9d Add support for Armada XP A0.
- Add functions to calculate clocks instead using hardcoded values
- Update reset and timers functions
- Update number of interrupts
- Change name of platform from db88f78100 to db78460
- Correct DRAM size and PCI IRQ routing in dts file.

Obtained from:	Semihalf
2012-09-14 09:55:19 +00:00
Grzegorz Bernacki
68b7bd0469 If virtual addresses are not set use one to one mapping.
Do not map memory and IO space at address 0.

Obtained from: Semihalf
2012-09-14 09:45:13 +00:00
Grzegorz Bernacki
f3d01034bc Support identification of new PJ4B cores.
Obtained from:	Semihalf
2012-09-14 09:38:54 +00:00
Grzegorz Bernacki
2c99056488 Add fdt_get_unit() function.
Obtained from:	Semihalf
2012-09-14 09:36:35 +00:00
Grzegorz Bernacki
2f0da24b47 Set busaddr and bussize to 0 when fdt_get_range() fails.
Obtained from:	Semihalf
2012-09-14 09:33:35 +00:00
Hans Petter Selasky
db18ca3677 Add basic USB support to Raspberry PI target. 2012-09-14 08:11:59 +00:00
Hans Petter Selasky
b792f659e3 DWC OTG improvements. Implement full support for SPLIT transactions, in other
words FULL/LOW speed devices through HIGH speed HUBs. Improve support for
suspend and resume in host mode.
2012-09-14 07:52:57 +00:00
Tim Kientzle
181abccb96 The MBR data is not necessarily aligned. This is a problem on ARM. 2012-09-14 05:24:06 +00:00
Eitan Adler
ebce2fe6d3 Belatedly add myself
MFC after:	3 days
2012-09-14 01:23:28 +00:00
Jung-uk Kim
d902fa0fa4 Do not change owner, group, or mode when package database directory and
its contents are created with pkg_add(1).  It may happen when the packing
list contains @owner, @group, or @mode.

Reported by:	Donald Bostrom (dbostrom at niksun dot com)
Reviewed by:	portmgr (bapt)
2012-09-14 00:19:06 +00:00
Attilio Rao
0a15e5d30d Remove all the checks on curthread != NULL with the exception of some MD
trap checks (eg. printtrap()).

Generally this check is not needed anymore, as there is not a legitimate
case where curthread != NULL, after pcpu 0 area has been properly
initialized.

Reviewed by:	bde, jhb
MFC after:	1 week
2012-09-13 22:26:22 +00:00
John Baldwin
60149b5cce - Denote PCI-e endpoints that support FLR.
- Make parsing of PCI-e extended capabilities assume that future version
  numbers are backwards compatible.
- Add new AER error descriptions.
- Add descriptions for more PCI-e extended capabilities.

MFC after:	1 week
2012-09-13 19:08:31 +00:00
John Baldwin
2cfd0c4638 - Add some registers defined in PCI 3.0 including new AER bits.
- Add constants for the rest of the fields in the PCI-express device
  capability and control registers.
- Tweak some of the recently added PCI-e capability constants (always
  use hex for offsets in config space, and include a shortened
  version of the relevant register in the name of field constants).

MFC after:	1 week
2012-09-13 19:05:24 +00:00
Adrian Chadd
9b967f5d12 Don't use AR_PHY_MODE to setup half/quarter rate.
I'm not sure where in the deep, distant past I found the AR_PHY_MODE
registers for half/quarter rate mode, but unfortunately that doesn't
seem to work "right" for non-AR9280 chips.

Specifically:

* don't touch AR_PHY_MODE
* set the PLL bits when configuring half/quarter rate

I've verified this on the AR9280 (5ghz fast clock) and the AR5416.

The AR9280 works in both half/quarter rate; the AR5416 unfortunately
only currently works at half rate.  It fails to calibrate on quarter rate.
2012-09-13 18:24:13 +00:00
Eitan Adler
2ab4fdc460 Remove scripts and tools which only functioned when src was using CVS
Approved by:	cperciva
MFC after:	1 week
2012-09-13 17:49:11 +00:00
Joel Dahl
09c024e1a1 Minor mdoc fix. 2012-09-13 16:59:20 +00:00
Brooks Davis
9215d178a4 Introduce a new make variable COMPILER_TYPE that specifies what
type of compiler is being used (currently clang or gcc).  COMPILER_TYPE
is set in the new bsd.compiler.mk file based on the value of the CC
variable or, should it prove informative, by running ${CC} --version
and examining the output.

To avoid negative performance impacts in the default case and correct
value for COMPILER_TYPE type is determined and passed in the environment
of submake instances while building world.

Replace adhoc attempts at determining the compiler type by examining
CC or MK_CLANG_IS_CC with checks of COMPILER_TYPE.  This eliminates
bootstrapping complications when first setting WITH_CLANG_IS_CC.

Sponsored by:	DARPA, AFRL
Reviewed by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>, imp, linimon
		(with some modifications post review)
MFC after:	2 weeks
2012-09-13 16:00:46 +00:00
John Baldwin
0f14f15b62 Ignore stop and continue signals sent to an exiting process. Stop signals
set p_xstat to the signal that triggered the stop, but p_xstat is also
used to hold the exit status of an exiting process.  Without this change,
a stop signal that arrived after a process was marked P_WEXIT but before
it was marked a zombie would overwrite the exit status with the stop signal
number.

Reviewed by:	kib
MFC after:	1 week
2012-09-13 15:51:18 +00:00
Eitan Adler
2bfb8a83f6 Define missing DEBUGOUT# macros. DEBUGOUT[45] are not yet used but are
being defined pre-emptively to avoid future build breakage

PR:		kern/168967
Submitted by:	fuzhli <fuzl@arraynetworks.com.cn>
Approved by:	cperciva
MFC after:	1 week
2012-09-13 14:40:24 +00:00
Alexander Motin
c89d2fbe18 Add global and per-module sysctls/tunables to enable/disable metadata taste.
That should help to handle some cases when disk has some RAID metadata that
should be ignored, especially during boot.

MFC after:	3 days
2012-09-13 13:27:09 +00:00
Konstantin Belousov
df3cbc41fa The deadfs VOPs for vop_ioctl and vop_bmap call itself recursively,
which is an elaborate way to cause kernel panic. Change the VOPs
implementation to return EBADF for a reclaimed vnode.

While the calls to vop_bmap should not reach deadfs, it is indeed
possible for vop_ioctl, because the VOP locking protocol is to pass
the vnode to VOP unlocked. The actual panic was observed when ioctl
was called on procfs filedescriptor which pointed to an exited
process.

Reported by:	zont
Tested by:	pho
MFC after:	1 week
2012-09-13 13:05:45 +00:00
Andrey Zonov
0cf7f1865b - Fix a typo in debug message.
Approved by:	kib (mentor)
MFC after:	3 days
2012-09-13 12:55:10 +00:00
Ivan Voras
ab013dbb49 Document the *_chroot, *_user, *_group and *_nice knobs for services started
by rcng.

Reviewed by:	wblock, dougb
2012-09-13 10:26:55 +00:00
Edwin Groothuis
3797824c98 MFV of 240454, tzdata2012f
- Pacific/Fiji will go into DST from 21 October 2012 till 20 January 2013.
- Fix offset for Pacific/Tokelau.
- Gaza and West Bank had DST from 29 March to 28 September 2012.
- Syria has DST from April till October
- Morocco had DST from April to September 2012 except for 20 July to 20 August.
- Cuba changed to DST from 1 April 2012 only.
- Haiti has DST between 8 March and 1 November in 2012.

Obtained from:	ftp://ftp.iana.org/tz/releases/
2012-09-13 10:17:01 +00:00
Konstantin Belousov
c5e3d0ab11 Rename the IVY_RNG option to RDRAND_RNG.
Based on submission by:	Arthur Mesh <arthurmesh@gmail.com>
MFC after:	2 weeks
2012-09-13 10:12:16 +00:00
Edwin Groothuis
5b333f5c3e Vendor import of tzdata2012f
- Pacific/Fiji will go into DST from 21 October 2012 till 20 January 2013.
- Fix offset for Pacific/Tokelau.
- Gaza and West Bank had DST from 29 March to 28 September 2012.
- Syria has DST from April till October
- Morocco had DST from April to September 2012 except for 20 July to 20 August.
- Cuba changed to DST from 1 April 2012 only.
- Haiti has DST between 8 March and 1 November in 2012.

Obtained from:	ftp://ftp.iana.org/tz/releases/
2012-09-13 10:11:40 +00:00
Navdeep Parhar
8a599c0859 Install interrupt handlers early, during attach, for the reason
explained in r239913 by jhb.

MFC after:	1 week
2012-09-13 09:18:13 +00:00
Navdeep Parhar
57c60f98b8 Use native FreeBSD facilities everywhere except the shared code in common/
MFC after:	1 week
2012-09-13 09:10:10 +00:00
Navdeep Parhar
7851c3eee3 Allow cxgbe to be built into a kernel with "device cxgbe."
MFC after:	1 week
2012-09-13 09:01:52 +00:00
Ed Schouten
5b5d76847d Rename __member2struct() to __containerof().
Compared to __member2struct(), this macro has the following advantages:

- It ensures that the type of the pointer is compatible with the member
  field of the structure (or a void pointer).
- It works properly in combination with volatile and const, though
  unfortunately it drops these qualifiers from the returned value.

mdf@ proposed to add the container_of() macro, just like Linux has.
Eventually I decided against this, as <sys/param.h> is included all over
the place. It seems container_of() on Linux is specific to the kernel,
not userspace. I'd rather not pollute userspace with this.

I also thought about adding __container_of(), but this would have two
advantages. Xorg seems to already have a __container_of(), which is not
compatible with this version. Also, the underscore in the middle
conflicts with our existing macros (__offsetof, __rangeof, etc).

I'm changing member2struct() to use its old code, as the extra
strictness of this new macro conflicts with existing code (read: cxgb).

MFC after:	1 month
2012-09-13 08:13:01 +00:00
Adrian Chadd
03a51ef8f4 Enable fractional 5G mode on half/quarter rate channels.
Obtained from:	Linux ath9k
2012-09-13 07:25:41 +00:00
Adrian Chadd
77ffc4c1fc Flip on half/quarter rate support.
No, this isn't HT/5 and HT/10 support.  This is the 11a half/quarter
rate support primarily used by the 4.9GHz and GSM band regulatory
domains.

This is definitely a work in progress.

TODO:

* everything in the last commit;
* lots more interoperability testing with the AR5212 half/quarter rate
  support for the relevant chips;
* Do some interop testing on half/quarter rate support between _all_
  the 11n chips - AR5416, AR9160, AR9280 (and AR9285/AR9287 when 2GHz
  half/quarter rate support is coded up.)
2012-09-13 07:24:14 +00:00
Adrian Chadd
ce801478d2 Introduce an AR5416 flavour of the IFS and mac usec/timing configuration
used when running the chips in half/quarter rate.

This sets up some default parameters which are then overridden by the
driver (which manually configures things like slot timing at interface
start time.)

Although this is a copy-and-modify from the AR5212 HAL, I did peek
at the reference HAL and the ath9k driver to see what they did.
Ath9k in particular doesn't hard-code this - instead, their version
of ar5416InitUserSettings() does all of the relevant math.

TODO:

* do the math, not hard code things!
* fix the mac clock calculation for the AR9287; since it runs the
  MAC clock at a higher rate, requiring all the duration calculations
  to change;
* Do a whole lot more validation for half/quarter rates.

Obtained from:	Qualcomm Atheros, Linux ath9k
2012-09-13 07:22:40 +00:00
Adrian Chadd
41b53a9aaf Call the ar5212SetCoverageClass() function for now.
Some of the math is a little wrong thanks to clocks in 11a mode running
at 44MHz when in fast clock mode (rather than 40MHz, which the chips
before AR9280 ran 11a in).  That'll have to be addressed in a future commit.
2012-09-13 07:19:53 +00:00
Adrian Chadd
c19a7918f3 Add register defintions for the AR5416 TX/RX latency fields.
Obtained from:	Qualcomm Atheros
2012-09-13 07:17:58 +00:00
Adrian Chadd
1690edb32c Compensate for half/quarter rate differences in MAC clock speed.
This fixes the incorrect slot (and likely ACK/RTS timeout) values
which I see when enabling half/quarter rate support on the AR9280.

The resulting math matches the expected calculated default values.
2012-09-13 07:17:29 +00:00
Navdeep Parhar
8a7ba352b0 Update interface to firmware 1.6.2 and include the firmware in the driver.
Obtained from:	Chelsio
MFC after:	1 week
2012-09-13 06:32:52 +00:00
Alan Cox
0b35b54b4d Simplify the kernel pmap locking in pmap_enter_pv(). While I'm here, tidy
up the comments and whitespace.

Tested by:	cognet
2012-09-13 06:16:49 +00:00
Peter Grehan
60ff334285 No need to leak these into the includer's namespace.
Submitted by:	Bryan Venteicher bryanv at daemoninthecloset org
2012-09-13 00:42:56 +00:00
Peter Grehan
c44ef550e1 Relax requirement of certain mb()s
Submitted by:	Bryan Venteicher bryanv at daemoninthecloset org
2012-09-13 00:36:46 +00:00
Ed Schouten
e48063402c Correctness: use __member2struct() on the correct fields.
The prev-pointers point to the next-pointers of the previous element --
not the ENTRY structure. The next-pointers are stored in the ENTRY
structures first, so the code would already work correctly. Still, it is
more accurate to use the next-fields.

To prevent misuse of __member2struct() in the future, I've got a patch
that requires the pointer to be passed to this macro to be compatible
with the member of the structure. I'll commit this patch after I've
tested it properly.

MFC after:	1 month.
2012-09-12 22:54:11 +00:00
Ed Schouten
8f8f476390 Switch batch to an SLIST.
This code requires none of the features of LIST.
2012-09-12 22:16:31 +00:00
Attilio Rao
e3ae0dfe69 Improve check coverage about idle threads.
Idle threads are not allowed to acquire any lock but spinlocks.
Deny any attempt to do so by panicing at the locking operation
when INVARIANTS is on. Then, remove the check on blocking on a
turnstile.
The check in sleepqueues is left because they are not allowed to use
tsleep() either which could happen still.

Reviewed by:	bde, jhb, kib
MFC after:	1 week
2012-09-12 22:10:53 +00:00
Attilio Rao
faa1082aa2 Tweak the commit message in case of panic for sleeping from threads
with TDP_NOSLEEPING on.

The current message has no informations on the thread and wchan
involed, which may be useful in case where dumps have mangled dwarf
informations.

Reported by:    kib
Reviewed by:	bde, jhb, kib
MFC after:	1 week
2012-09-12 22:05:54 +00:00
Ed Schouten
4170b08388 Implement LIST_PREV().
Regular LISTs have been implemented in such a way that the prev-pointer
does not point to the previous element, but to the next-pointer stored
in the previous element. This is done to simplify LIST_REMOVE(). This
macro can be implemented without knowing the address of the list head.

Unfortunately this makes it harder to implement LIST_PREV(), which is
why this macro was never here. Still, it is possible to implement this
macro. If the prev-pointer points to the list head, we return NULL.
Otherwise we simply subtract the offset of the prev-pointer within the
structure.

It's not as efficient as traversing forward of course, but in practice
it shouldn't be that bad. In almost all use cases, people will want to
compare the value returned by LIST_PREV() against NULL, so an optimizing
compiler will not emit code that does more branching than TAILQs.

While there, make the code a bit more readable by introducing
__member2struct(). This makes STAILQ_LAST() far more readable.

MFC after:	1 month
2012-09-12 21:03:48 +00:00
Alexander Motin
a5174f1fb6 Make pxe device in lsdev really include device name, looking like this:
pxe0:    192.168.3.1:/storage/nfsroot/amd64
, instead of confusing and less useful:
      192.168.3.1:pxeboot
2012-09-12 21:00:37 +00:00
Jim Harris
7e2fcdff0b Remove some trailing whitespace. 2012-09-12 19:36:54 +00:00
Hans Petter Selasky
beefefd4b0 Fix TX FIFO sizes. Correct FIFO handling in Host mode. 2012-09-12 19:15:29 +00:00
Martin Matuska
4c5238d576 Merge recent zfs vendor changes, sync code and adjust userland DEBUG.
Illumos issued covered:
1884 Empty "used" field for zfs *space commands
3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument
     is zero
3028 zfs {group,user}space -n prints (null) instead of numeric GID/UID
3048 zfs {user,group}space [-s|-S] is broken
3049 zfs {user,group}space -t doesn't really filter the results
3060 zfs {user,group}space -H output isn't tab-delimited
3061 zfs {user,group}space -o doesn't use specified fields order
3064 usr/src/cmd/zpool/zpool_main.c misspells "successful"
3093 zfs {user,group}space's -i is noop
3098 zfs userspace/groupspace fail without saying why when run as non-root

References:
  https://www.illumos.org/issues/ + [issue_id]

Obtained from:	illumos (vendor/illumos, vendor/illumos-sys)
MFC after:	2 weeks
2012-09-12 18:05:43 +00:00
Ed Maste
6cbb6bbb77 According to a clarification at http://austingroupbugs.net/view.php?id=503
ptsname may set errno, so avoid saving and restoring errno across the
function.

PR:		standards/171572
2012-09-12 17:54:09 +00:00