CVS commit: [netbsd-8] src/sys/arch/arm/arm32

2020-02-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Feb 25 19:20:43 UTC 2020

Modified Files:
src/sys/arch/arm/arm32 [netbsd-8]: bus_dma.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #1510):

sys/arch/arm/arm32/bus_dma.c: revision 1.119
sys/arch/arm/arm32/bus_dma.c: revision 1.120

Make sure to convey a failure to the calling function
Likely fix for PR kern/54999, but that was a one-off panic.
 -
Fix previous for non-_ARM32_NEED_BUS_DMA_BOUNCE builds


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.98.8.1 src/sys/arch/arm/arm32/bus_dma.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/arch/arm/arm32

2019-04-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Apr 23 18:26:22 UTC 2019

Modified Files:
src/sys/arch/arm/arm32 [netbsd-8]: pmap.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1246):

sys/arch/arm/arm32/pmap.c: revision 1.373 (via patch)

Fix a deadlock between the pool and pmap codes:

- cpu0 grabs the kernel lock (e.g. from a non-MPSAFE interrupt) and
  calls pool_get().
- cpu1 does a pool_get() on the same pool from MPSAFE code, which needs a
  pool_page_alloc(), which ends up in pmap_extract_coherency().

So cpu0 holds the kernel_lock and wants the pool lock. cpu1 holds the pool
lock and wants the kernel_lock in pmap_extract_coherency().

The pmap code should not rely on kernel_lock. Intead make the
pmap_kernel()->pm_obj_lock a IPL_VM lock and use it as pmap lock
(thus dropping the pmap test pmap_{acquire,release}_pmap_lock()).

This needs to be a IPL_VM because unlike user pmaps, this can be locked
from interrupt context.

Add a IPL_NONE lock for pmap_growkernel(). We can't use
pmap_kernel()->pm_obj_lock here because pmap_grow_map() may sleep.

Make pmap_lock (which may be locked with pm_obj_lock held) a IPL_VM
lock in all case.
reorder a few things to not call pool_get()/pool_put() (which may sleep)
with pm_obj_lock held.

Patch initially posted to port-arm@ on April 19, improved patch (per
suggestions from Nick Hudson and Jason Thorpe) on April 21.


To generate a diff of this commit:
cvs rdiff -u -r1.349.2.2 -r1.349.2.3 src/sys/arch/arm/arm32/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/arch/arm/arm32

2019-04-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Apr 23 18:22:37 UTC 2019

Modified Files:
src/sys/arch/arm/arm32 [netbsd-8]: pmap.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1245):

sys/arch/arm/arm32/pmap.c: revision 1.372

Don't try to aquire/release the pmap lock when in ddb.

Avoids a deadlock when entering ddb, or on "mach cpu n" ddb command
(the pmap lock may already be held by another CPU, which is halted when
entering ddb).

Posted to port-arm@ on April 19.


To generate a diff of this commit:
cvs rdiff -u -r1.349.2.1 -r1.349.2.2 src/sys/arch/arm/arm32/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [netbsd-8] src/sys/arch/arm/arm32

2017-10-24 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Oct 24 09:12:07 UTC 2017

Modified Files:
src/sys/arch/arm/arm32 [netbsd-8]: vm_machdep.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #315):
sys/arch/arm/arm32/vm_machdep.c: 1.71-1.72
In vmapbuf use pmap_enter(pmap_kernel(), ...) and not pmap_kenter_pa as the
former handles multiple mappings for VIPT AND VIVT correctly whereas the latter
doesn't work for VIVT. PR port-shark/52102
>From skrll@. Tested by martin@ and me.
--
Fix eva argument to pmap_remove and passed prot bits in flags for
pmap_enter, i.e. fix previous.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.70.10.1 src/sys/arch/arm/arm32/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.