Commit Graph

171564 Commits

Author SHA1 Message Date
Hiroki Sato
f6c336fe66 Remove "prefer_source" address selection option. FreeBSD has had an
implementation of RFC 3484 for this purpose for a long time and "prefer_source"
was never implemented actually.  ND6_IFF_PREFER_SOURCE macro is left intact.
2012-07-09 06:21:46 +00:00
Mateusz Guzik
4fd85c4b5d Follow-up commit to r238220:
Pass only FEXEC (instead of FREAD|FEXEC) in fgetvp_exec. _fget has to check for
!FWRITE anyway and may as well know about FREAD.

Make _fget code a bit more readable by converting permission checking from if()
to switch(). Assert that correct permission flags are passed.

In collaboration with:	kib
Approved by:	trasz (mentor)
MFC after:	6 days
X-MFC: with r238220
2012-07-09 05:39:31 +00:00
Adrian Chadd
6a9f8e0a06 Add a debug category for RX EDMA. 2012-07-09 05:23:02 +00:00
Alexander V. Chernikov
30835e6d50 Finally fix lookup (account remaining '\0') and deletion
(provide valid key length for radix lookup).

Submitted by:    Ihor Kaharlichenko<madkinder at gmail.com>  (prev version)
Approved by:     kib(mentor)
MFC after:       3 days

Sponsored by:    Shtorm ISP
2012-07-08 21:13:04 +00:00
Konstantin Belousov
a4156419ca Avoid vm page queues lock leak after r238212.
Reported and tested by:	Michael Butler <imb protected-networks net>
Reviewed by:	alc
Pointy hat to:	kib
MFC after:	20 days
2012-07-08 18:04:26 +00:00
Marcel Moolenaar
0aa31a3393 Move PCPU initialization to a new function called cpu_pcpu_setup().
This makes it easier to add additional CPU or platform information
to the per-CPU structure without duplicated code.
2012-07-08 18:00:22 +00:00
Marcel Moolenaar
6d5cb58b5f Unleash the APs at SI_SUB_KICK_SCHEDULER so that we have them all
up and running to service interrupts. This is especially important
when the firmware has bound interrupts to CPUs, like for the SGI
Altix 350. We wake up APs at SI_SUB_CPU time and they sit and spin
until we unleash them, so there's nothing fundamentally different
from a MD perspective.
2012-07-08 17:43:25 +00:00
Nathan Whitehorn
eb90003fa8 After the binutils 2.17.50 import, the assembler supports AS_REL16
relocations.
2012-07-08 17:02:14 +00:00
Bjoern A. Zeeb
4018ea9a2b Implement handling of "atomic fragements" as outlined in
draft-gont-6man-ipv6-atomic-fragments to mitigate one class of
possible fragmentation-based attacks.

MFC after:	5 days
2012-07-08 15:30:24 +00:00
Andriy Gapon
029468d82c acpi_cpu: we are able to handle _CST change notifications...
so un-ifdef code that is supposed to tell ACPI platform about that

Tested by:	Taku YAMAMOTO <taku@tackymt.homeip.net>
MFC after:	2 weeks
2012-07-08 10:57:49 +00:00
Bjoern A. Zeeb
8dcc26febe As mentioned in the commit message of r237571 (copied from a prototype
patch of mine) also check if the 2nd in6_setscope() failed and return
the error in that case.

MFC after:	5 days
2012-07-08 08:49:37 +00:00
Eitan Adler
b71073c4bc Fix always 0 tautologly revealed by gcc46
Approved by:	cperciva
MFC after:	1 week
2012-07-08 00:52:54 +00:00
Mateusz Guzik
28a7f60741 Unbreak handling of descriptors opened with O_EXEC by fexecve(2).
While here return EBADF for descriptors opened for writing (previously it was ETXTBSY).

Add fgetvp_exec function which performs appropriate checks.

PR:		kern/169651
In collaboration with:	kib
Approved by:	trasz (mentor)
MFC after:	1 week
2012-07-08 00:51:38 +00:00
Edward Tomasz Napierala
7027e4dac4 Add trivial resize handling to gnop(8).
Reviewed by:	mav
Sponsored by:	FreeBSD Foundation
2012-07-07 22:22:13 +00:00
Edward Tomasz Napierala
74badfa6ba Add trivial resize handling to gmountver(8).
Reviewed by:	mav
Sponsored by:	FreeBSD Foundation
2012-07-07 22:20:47 +00:00
Edward Tomasz Napierala
c79ea20306 Make the da(4) driver notify GEOM about LUN size change.
Reviewed by:	mav
Sponsored by:	FreeBSD Foundation
2012-07-07 22:19:51 +00:00
Edward Tomasz Napierala
bc97ce36f7 Add disk_resize(), to make it possible for the disk drivers such as da(4)
to notify GEOM about LUN size change.

Reviewed by:	mav (earlier version)
Sponsored by:	FreeBSD Foundation
2012-07-07 21:28:31 +00:00
Edward Tomasz Napierala
dc604f0cf6 Make it possible to resize md(4) devices.
Reviewed by:	kib
Sponsored by:	FreeBSD Foundation
2012-07-07 20:32:21 +00:00
Jack F Vogel
fcc144ad4e Change the interface to the Energy Efficient Ethernet (EEE)
setting in the igb and em driver. This was necessitated by
a shared code change that I was given late in the game, a data
type changed from bool to int, in the last update I dealt with
it by a cast, but it was pointed out (thanks jhb) that there
was a potential problem with this. John suggested this safer
approach, and it is fine with me...

MFC after:2 days (to catch the 9.1 update)
2012-07-07 20:21:05 +00:00
Edward Tomasz Napierala
245899cc97 Add a new GEOM method, resize(), which is called after provider size changes.
Add a new routine, g_resize_provider(), to use to notify GEOM about provider
change.

Reviewed by:	mav
Sponsored by:	FreeBSD Foundation
2012-07-07 20:13:40 +00:00
Konstantin Belousov
48cc2fc774 Drop page queues mutex on each iteration of vm_pageout_scan over the
inactive queue, unless busy page is found.

Dropping the mutex often should allow the other lock acquires to
proceed without waiting for whole inactive scan to finish. On machines
with lot of physical memory scan often need to iterate a lot before it
finishes or finds a page which requires laundring, causing high
latency for other lock waiters.

Suggested and reviewed by:	alc
MFC after:	3 weeks
2012-07-07 19:39:08 +00:00
Eitan Adler
c288b54837 Add missing sleep stat increase
PR:		kern/168211
Submitted by:	linimon
Reviewed by:	alc
Approved by:	cperciva
MFC after:	3 days
2012-07-07 17:46:11 +00:00
Eitan Adler
7961b54a39 Add a description of the Spanish Dvorak keymap added in r235251
PR:		conf/160235
Submitted by:	gavin
Approved by:	cperciva
MFC after:	3 days
2012-07-07 17:35:34 +00:00
Eitan Adler
089d61ec12 Remove unneeded variable reported by gcc46 which stopped being used in
r234178.

Approved by:	cperciva
MFC after:	3 days
2012-07-07 17:25:36 +00:00
Eitan Adler
029b129de8 Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by:	cperciva
MFC after:	1 week
2012-07-07 17:20:52 +00:00
Eitan Adler
eb5f456981 Remove ancient vnconfig symlink
Submitted by:	ak
Approved by:	cperciva
MFC after:	1 week
2012-07-07 17:20:27 +00:00
Eitan Adler
d79661b9b8 Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by:	cperciva
MFC after:	1 week
2012-07-07 17:20:24 +00:00
Eitan Adler
3743101f93 Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Reviewed by:	scottl
Approved by:	cperciva
MFC after:	1 week
2012-07-07 17:17:43 +00:00
Eitan Adler
7f489a9679 Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by:	cperciva
MFC after:	1 week
2012-07-07 17:13:09 +00:00
Edward Tomasz Napierala
ad624005b3 Fix orphan() methods of several GEOM classes to not assume that there
is an error set on the provider.  With GEOM resizing, class can become
orphaned when it doesn't implement resize() method and the provider size
decreases.

Reviewed by:	mav
Sponsored by:	FreeBSD Foundation
2012-07-07 17:09:44 +00:00
Eitan Adler
e43ecd2b15 Fix spelling
PR:		bin/167480
Submitted by:	zeising
Approved by:	cperciva
2012-07-07 17:05:55 +00:00
Andriy Gapon
987e5277f8 acpi_cpu_generic_cx_probe: for consistency set cpu_non_c3 here too
although by default only C1 is enabled (cx_lowest=0) and enabling deeper
states goes through acpi_cpu_set_cx_lowest which re-evaluates cpu_non_c3

MFC after:	2 weeks
2012-07-07 08:19:34 +00:00
Andriy Gapon
412ef22084 acpi_cpu_cx_list: there is no need to re-evaluate cpu_non_c3 here
cpu_non_c3 is already evaluated in acpi_cpu_cx_cst and in
acpi_cpu_set_cx_lowest.
Besides acpi_cpu_cx_list is not protected by any locking.

As a result also move setting of cpu_can_deep_sleep to more appropriate
places.

MFC after:	2 weeks
2012-07-07 08:12:51 +00:00
Andriy Gapon
56101001b2 acpi_cpu_cx_cst: consistently use cpu_cx_count during state enumeration
cpu_cx_count is an index into accepted states, while i is an index into
original _CST states

MFC after:	1 week
2012-07-07 07:59:14 +00:00
Marcel Moolenaar
373ca4ed22 Implement ia64_physmem_alloc() and use it consistently to get memory
before VM has been initialized. This includes:
1.  Replacing pmap_steal_memory(),
2.  Replace the handcrafted logic to allocate a naturally aligned VHPT,
3.  Properly allocate the DPCPU for the BSP.

Ad 3: Appending the DPCPU to kernend worked as long as we wouldn't
      cross into the next PBVM page. If we were to cross into the next
      page, then there wouldn't be a PTE entry on the page table for it
      and we would end up with a MCA following a page fault. As such,
      this commit fixes MCAs occasionally seen.
2012-07-07 05:17:43 +00:00
Warner Losh
8304b99a75 Create a generic way to support multiple boards within an
arm platform.  Add all the atmel boards to the ATMEL kernel for
testing purposes.  Until boot loader arg parsing of baord type
is done, this won't actually be able to do the runtime selection.
2012-07-07 05:02:39 +00:00
Warner Losh
51763c6303 Generalize this for loading the loader into the SPI. Plus trim about
100 bytes from the binary with silly tricks.  Hope to get this small
enough to run on the models that have 4k SRAM.  We are close compiled
for the at91rm9200, but still need to trim for the target.
2012-07-07 04:55:42 +00:00
Warner Losh
1d4fae3825 Allow other SOCs to be compiled in, first step. 2012-07-07 04:51:59 +00:00
Warner Losh
c4a9bff135 Strip out the useless junk. All we really care about is the text,
data and bss sections.  All the rest is needed for normal binaries,
but boot loaders aren't normal.
2012-07-07 04:49:53 +00:00
Tim Kientzle
fc4dff81bb Unbreak building WITH_ICONV=yes and new yacc. 2012-07-07 04:14:28 +00:00
Marcel Moolenaar
662d34aff2 Hide the creation of phys_avail behind an API to make it easier to do it
correctly. We now iterate the EFI memory descriptors once and collect all
the information in a single pass. This includes:
1.  The I/O port base address,
2.  The PAL memory region. Have the physmem API track this.
3.  Memory descriptors of memory we can't use, like bad memory, runtime
    services code & data, etc. Have the physmem API track these.
4.  memory descriptors of memory we can use or re-use, such as free
    memory, boot time services code & data, loader code & data, etc.
    These are added by the physmem API.

Since the PBVM page table and pages are in memory described as loader
data, inform the physmem API of chunks that need to be delated from the
available physical memory.

While here, remove Maxmem and replace it with the better named paddr_max.
Maxmem was defined as physmem, which is generally wrong. Now, paddr_max
is properly defined as the largesty physical address.

The upshot of all this is that:
1.  We properly determine realmem.
2.  We maximize physmem by re-using memory where possible.
3.  We remove complexity from ia64_init() in machdep.c.
4.  Remove confusion about realmem, physmem & Maxmem.

The new ia64_physmem_alloc() is to replace pmap_steal_memory() in pmap.c,
as well as replace the handcrafted allocation of the VHPT for the BSP in
pmap_bootstrap() in pmap.c. This is step 2 and addresses the manipulation
of phys_avail after it is being created.
2012-07-07 00:25:17 +00:00
Ed Maste
d5fb967ab2 Implement SIOCGIFMEDIA for if_tap(4)
Appease certain if_tap(4) consumers by providing simulated Ethernet
media status.

DragonFly commit 70d9a675bf5441cc854a843ead702d08928c37f3

Obtained from:  DragonFly BSD
2012-07-06 23:17:30 +00:00
David Chisnall
bb4317bf3c Restore the __collate_load_error global that was accidentally removed in the
xlocale refactoring.

MFC after:	1 week
2012-07-06 20:16:22 +00:00
Konstantin Belousov
9775776ce2 Add a source file needed for module linking.
MFC after:   4 days
2012-07-06 20:14:27 +00:00
Konstantin Belousov
5d10ef2096 Style.
Reviewed by:	alc (previous version)
MFC after:	1 week
2012-07-06 20:13:16 +00:00
Konstantin Belousov
f18d5bf44b Use assembler mnemonic instead of manually assembling, contination for r238142.
Reviewed by:	jhb
MFC after:	1 month
2012-07-06 20:11:58 +00:00
Pedro F. Giffuni
a880c5109e Merge a small update from NetBSD.
Feb 15 21:55:23 2009 - chared.c chared.h
pass lint on _LP64.

MFC after:	1 week
2012-07-06 19:30:50 +00:00
Ed Maste
f95a30bd6a Allow continuous packet transmission (via -t 0)
Also add a missing check for the cancel flag while waiting for the first
packet in receive mode.
2012-07-06 17:03:43 +00:00
Pedro F. Giffuni
dcb0dada6b Fix issue resizing bin/sh
This partially reverts some changes from r237448 that are causing
breakage when resizing under bin/sh .

Reverted changes from NetBSD are:

Mar 10 20:46:15 2009 - editline.3 read.c
make el_gets set the count to -1 on error to distinguish between EOF and
error.

Feb 19 15:20:22 2009 - read.c sig.c sig.h
reset and redraw on sigcont. From Anon Ymous.

Feb 15 21:24:13 2009
don't restart on EINTR, instead return NULL immediately. From Anon Ymous

PR:		169603
Reported by:	Peter Jeremy, David Shao
MFC after:	3 days
2012-07-06 16:43:56 +00:00
Marcel Moolenaar
e11379e9f8 agp.c:
Don't use Maxmem when the amount of memory is meant. Use realmem instead.
Maxmem is not only a MD variable, it represents the highest physical memory
address in use. On systems where memory is sparsely layed-out the highest
memory address and the amount of memory are not interchangeable. Scaling the
AGP aperture based on the actual amount of memory (= realmem) rather than
the available memory (= physmem) makes sure there's consistent behaviour
across architectures.

agp_i810.c:
While arguably the use of Maxmem can be considered correct, replace its use
with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, which
have a dense physical memory layout. Avoiding Maxmem here is done with an
eye on copy-n-paste behaviour in general and to avoid confusion caused by
using realmem in agp.c and Maxmem in agp_i810.c.

In both cases, remove the inclusion of md_var.h
2012-07-06 15:57:03 +00:00