Re: CVS commit: src/sys/arch/arm/arm32

2020-11-21 Thread Rin Okuyama

Excellent! Thank you so much for finding out and fixing this!

Full ATF successfully completed for Raspberry Pi 2b, which formerly
crashed due to "anon != NULL && anon->an_ref != 0" panic.

Now, ATF is running on Cubietruck and Raspberry Pi Zero W.

Thanks,
rin

On 2020/11/22 4:44, Nick Hudson wrote:

Module Name:src
Committed By:   skrll
Date:   Sat Nov 21 19:44:52 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: cpuswitch.S

Log Message:
Ensure that r5 contains curlwp before DO_AST_AND_RESTORE_ALIGNMENT_FAULTS
in lwp_trampoline as required by the move to make ASTs operate per-LWP
rather than per-CPU.

Thanks to martin@ for bisecting the amap corruption he was seeing and
testing this fix.


To generate a diff of this commit:
cvs rdiff -u -r1.103 -r1.104 src/sys/arch/arm/arm32/cpuswitch.S

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


Re: CVS commit: src/sys/arch/arm/arm32

2020-02-22 Thread Nick Hudson

On 21/02/2020 23:27, Maya Rashish wrote:
[...]


Index: src/sys/arch/arm/arm32/bus_dma.c
diff -u src/sys/arch/arm/arm32/bus_dma.c:1.118 
src/sys/arch/arm/arm32/bus_dma.c:1.119
--- src/sys/arch/arm/arm32/bus_dma.c:1.118  Tue Nov  5 10:21:31 2019
+++ src/sys/arch/arm/arm32/bus_dma.cFri Feb 21 23:27:06 2020

[...]


@@ -404,7 +404,7 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_
  #ifdef DEBUG_DMA
printf("dmamap_create:map=%p\n", map);
  #endif/* DEBUG_DMA */
-   return 0;
+   return error;
  }

  /*



This isn't correct for the case where _ARM32_NEED_BUS_DMA_BOUNCE isn't
defined.

I'll fix it.

Nick


Re: CVS commit: src/sys/arch/arm/arm32

2018-07-17 Thread Joerg Sonnenberger
On Tue, Jul 17, 2018 at 05:29:07AM +, Martin Husemann wrote:
> Module Name:  src
> Committed By: martin
> Date: Tue Jul 17 05:29:07 UTC 2018
> 
> Modified Files:
>   src/sys/arch/arm/arm32: bus_dma.c
> 
> Log Message:
> Revert previous and cast to u_quad_t instead (t is for ptrdiff_t and off_t
> does not match that on all arm)

Please do not use *quad_t.

Joerg


Re: CVS commit: src/sys/arch/arm/arm32

2016-07-15 Thread coypu
On Fri, Jul 15, 2016 at 05:59:46AM +, Nick Hudson wrote:
> +
> +bool
> +mm_md_page_color(paddr_t pa, int *colorp)
> +{
> + *colorp = atop(pa & arm_cache_prefer_mask);
> +
> + return arm_cache_prefer_mask ? false : true;
> +}
> 

arm_cache_prefer_mask only exists for armv6/armv7 now


Re: CVS commit: src/sys/arch/arm/arm32

2016-07-15 Thread coypu
On Fri, Jul 15, 2016 at 05:59:46AM +, Nick Hudson wrote:
> Module Name:  src
> Committed By: skrll
> Date: Fri Jul 15 05:59:46 UTC 2016
> 
> Modified Files:
>   src/sys/arch/arm/arm32: arm32_machdep.c
> 
> Log Message:
> Provide a mm_md_page_color and fix some kernel builds
> 
> 

Seems it broke the rest of them.
I can build with this diff, but I don't know if it is correct.
Index: arm32_machdep.c
===
RCS file: /cvsroot/src/sys/arch/arm/arm32/arm32_machdep.c,v
retrieving revision 1.111
diff -u -r1.111 arm32_machdep.c
--- arm32_machdep.c 15 Jul 2016 05:59:46 -  1.111
+++ arm32_machdep.c 15 Jul 2016 19:31:34 -
@@ -746,11 +746,3 @@
return rv;
 }
 #endif
-
-bool
-mm_md_page_color(paddr_t pa, int *colorp)
-{
-   *colorp = atop(pa & arm_cache_prefer_mask);
-
-   return arm_cache_prefer_mask ? false : true;
-}
Index: pmap.c
===
RCS file: /cvsroot/src/sys/arch/arm/arm32/pmap.c,v
retrieving revision 1.335
diff -u -r1.335 pmap.c
--- pmap.c  14 Jul 2016 15:51:41 -  1.335
+++ pmap.c  15 Jul 2016 19:31:37 -
@@ -519,6 +519,13 @@
 vaddr_t pmap_directlimit;
 #endif
 
+static inline bool
+mm_md_page_color(paddr_t pa, int *colorp)
+{
+   *colorp = atop(pa & arm_cache_prefer_mask);
+
+   return arm_cache_prefer_mask ? false : true;
+}
 /*
  * Misc. locking data structures
  */
@@ -7945,3 +7952,4 @@
 #endif
 }
 #endif /* __HAVE_MM_MD_DIRECT_MAPPED_PHYS */
+


Re: CVS commit: src/sys/arch/arm/arm32

2014-04-02 Thread Hisashi T Fujinaka

On Wed, 2 Apr 2014, Matt Thomas wrote:


Module Name:src
Committed By:   matt
Date:   Wed Apr  2 14:05:54 UTC 2014

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Init the page_lock to IPL_VM iff VIPT  arm_cache_prefer_mask != 0 otherwise
use IPL_NONE.  Don't bother with page_lock for KMPAGEs.


To generate a diff of this commit:
cvs rdiff -u -r1.277 -r1.278 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.


This won't build without DIAGNOSITC defined. In map_kremove_pg() you use
omd without defining it otherwise.

--
Hisashi T Fujinaka - ht...@twofifty.com
BSEE(6/86) + BSChem(3/95) + BAEnglish(8/95) + MSCS(8/03) + $2.50 = latte


Re: CVS commit: src/sys/arch/arm/arm32

2009-12-03 Thread Masao Uebayashi
I spoke too early.  I still see problems.  I'll post this to port-arm@ after
sorting out things.

Masao

-- 
Masao Uebayashi / Tombi Inc. / Tel: +81-90-9141-4635


Re: CVS commit: src/sys/arch/arm/arm32

2009-11-30 Thread Rafal Boni
On Sat, Nov 28, 2009 at 11:44:45AM +, Steve Woodford wrote:
 Module Name:  src
 Committed By: scw
 Date: Sat Nov 28 11:44:45 UTC 2009
 
 Modified Files:
   src/sys/arch/arm/arm32: pmap.c
 
 Log Message:
 Apply some band-aid to pmap_activate() for PR kern/41058:
 
 There's a corner case here which can leave turds in the cache as
 reported in kern/41058. They're probably left over during tear-down and
 switching away from an exiting process. Until the root cause is identified
 and fixed, zap the cache when switching pmaps. This will result in a few
 unnecessary cache flushes, but that's better than silently corrupting data.
 
 Also remove an extraneous return statement in pmap_page_protect() which
 crept in during the matt-armv6 merge.

Hmm, this reminds me of port-arm/38950, where we were seeing hangs on exit
due to some don't-need-to-do-full-context-switch optimizations.  Could the
two issues be related?  I haven't looked at this issue, but I did do a bunch
of analysis for port-arm/38950, there's a fair bit of background there.

--rafal

-- 
  Time is an illusion; lunchtime, doubly so. |/\/\|   Rafal Boni
   -- Ford Prefect   |\/\/|  ra...@pobox.com