- Use the proper bitmask tests for an IPI in the bitmap handler on amd64
and i386.
- Don't test against idle priority, just the idle thread in the IPI_PREEMPT
handlers.
allocated. This makes 'bus_free_resource()' safe to use in 6.x and also
fixes an issue with the recent PCI MSI code MFCs that caused them to never
update the MSI config registers.
Reported by: gallatin (MSI breakage)
- sync linuxulator:
* de-COMPAT_43-ify:
+ socket related ioctl's
This differs from -current, as the kernel ABI is different
(kern_bind() and kern_connect() free the struct sockaddr on -stable
themself, so two calls to free() are not included in this MFC).
* bug-/compatibility-fixes
* ioctl TIOCGPTN
* 1 style(9)-fix
Tested by: "Arno J. Klaassen" <arno@heho.snv.jussieu.fr>
AP cpus. This changes a guaranteed triple-fault (silent reset) into
something that has a chance to work. Apparently, the NMI handler uses
this stack too.
- Add a new nexus hook: nexus_add_irq() to ask the nexus driver to add an
IRQ to its irq_rman. The MSI code uses this when it creates new
interrupt sources to let the nexus know about newly valid IRQs.
Previously the msi_alloc() and msix_alloc() passed some extra stuff
back to the nexus methods which then added the IRQs. This approach is
a bit cleaner.
- Change the MSI sx lock to a mutex. If we need to create new sources,
drop the lock, create the required number of sources, then get the lock
and try the allocation again.
- Simplify the amount of work that has be done for each architecture by
pushing more of the truly MI code down into the PCI bus driver.
- Don't bind MSI-X indicies to IRQs so that we can allow a driver to map
multiple MSI-X messages into a single IRQ when handling a message
shortage.
Note that as with the previous MSI MFC, this does not yet include the
'pci_remap_msix()' function.
- linuxulator mmap handling
- memleak fixes
- extend linux errno mapping
- handle address space limits for linux processes
- sync linprocfs (/proc/sys/... part)
Compile tested by: scf (i386, as part of a mega-MFC-patch)
Tested by: Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)
- don't limit number of syscalls to 255
- handle more socket options
- bug-/compatibility-fixes to linux
* file related (includes fixes which prevent creation of strange files
which can only be removed with a fsck)
* make ping work
* ...
- add devfs to the file system type handling/translation
Compile tested by: scf (i386, as part of a mega-MFC-patch)
Tested by: Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)
- some linuxulator style(9) fixes
- add datatypes and definitions in preparation of further commits
- use one (l_sigval) of the new datatypes on amd64 and get rid of a now unused
include (this may or may not fix some signal handling issues on amd64) [1]
- convert some unconditional debug handling into the common linuxulator way
- use some more appropriate format string types in some debug printf's
- convert signal validation into a macro
Except for [1] on amd64 there is no visible change to a normal user.
Tested by: scf (i386), Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)
- easy linuxulator style(9) fixes (easy = hand removal of non-style code
change sections in a full diff)
Tested by: scf (i386), Arno J. Klaassen <arno@heho.snv.jussieu.fr> (amd64)
amd64 including:
- Add 32-bit wrappers for thr_new(), thr_suspend(), and the umtx system
calls.
- Add support to amd64 for constructing thread upcalls for 32-bit
processes.
- Leave %fs and %gs alone in the signal trampoline for 32-bit processes on
amd64.
- Add 'casuword32()' to amd64 and ia64.
Tested by: emaste
a 64-bit process exec'd by a 32-bit process doesn't end up with 32-bit
limits.
This doesn't break the ABI as neither of the 32-bit ABIs (COMPAT_LINUX32
and COMPAT_IA32) are buildable as modules on 6.x/amd64 and none of the
other ABIs use this hook.
Avoid unnecessary differences between the amd64 and i386
format strings.
MFC Revision 1.577 of pmap.c:
Use a different bitmask for superpages' base address so that it
doesn't conflict with the PG_PDE_PAT bit.
Remove stale KSE code.
MFC Revision 1.551:
In general, bits in the page directory entry (PDE) and the page table
entry (PTE) have the same meaning. The exception to this rule is the
eighth bit (0x080). It is the PS bit in a PDE and the PAT bit in a
PTE. This change avoids the possibility that pmap_enter() confuses a
PAT bit with a PS bit, avoiding a panic().
Eliminate a diagnostic printf() from the i386 pmap_enter() that serves
no current purpose.
MFC Revision 1.559:
Eliminate a comment that became stale after revision 1.540.
MFC Revision 1.575:
Finish the PG_NX support at the pmap level.
MFC Revision 1.582:
Eliminate the misuse of PG_FRAME to truncate a virtual address
to a virtual page boundary.
Acquiring smp_ipi_mtx on every call to pmap_invalidate_*() is wasteful.
For example, during a buildworld more than half of the calls do not
generate an IPI because the only TLB entry invalidated is on the calling
processor. This revision pushes down the acquisition and release of
smp_ipi_mtx into smp_tlb_shootdown() and smp_targeted_tlb_shootdown() and
instead uses sched_pin() and sched_unpin() in pmap_invalidate_*() so that
thread migration doesn't lead to a missed TLB invalidation.
Replace diagnostic printf()s by assertions. Use consistent style
for similar assertions.
MFC Revision 1.540
Introduce pmap_try_insert_pv_entry().
Use pmap_try_insert_pv_entry() in pmap_copy() instead of
pmap_insert_entry().
Eliminate the explicit low-memory checks in pmap_copy().
MFC Revision 1.544
Retire pmap_track_modified().
MFC Revision 1.555
Introduce the function pmap_enter_object().
MFC Revision 1.558 (in part)
Change pmap_enter_quick_locked() to fail rather than wait if it is
unable to allocate a page table page. Similarly, change
pmap_enter_quick_locked() to call pmap_try_insert_pv_entry() rather
than pmap_insert_entry().
Add an assertion that the object containing m_start is locked in
pmap_enter_object(). Remove a similar assertion from
pmap_enter_quick_locked() because that function no longer accesses
the containing object.
Remove a stale comment.
- New pmap_mapdev_attr() function for amd64 and i386.
- pmap_mapdev() on i386 and amd64 uses UC now rather than WB.
- New pmap_mapbios()/pmap_unmapbios() functions to map firmware tables.
- New pmap_change_attr() function for amd64 and i386.
- Bump __FreeBSD_version.
- Try to use the reset control register (I/O port 0xcf9) and the fast a20
and init register (I/O port 0x92) if the keyboard reset fails.
- Fix the triple fault to actually work when PGE is enabled.
Invalidate all TLBs and page structure caches that may reference a page
for page walk acceleration before releasing it to the free list.
This is required for CPUs implementing page structure caches as described
in the Intel application note:
"TLBs, Paging-Structure Caches, and Their Invalidation"
(Document Number: 317080-001)
Rounding addr upwards to next 2M boundary in pmap_growkernel() could
cause addr to become 0, resulting in an early return without populating
the last PDE.