Author: raj
Date: Sun Mar  4 17:00:46 2012
New Revision: 232508
URL: http://svn.freebsd.org/changeset/base/232508

Log:
  MFC r228504, r228530.
  
  r228504:
   Make *intr{cnt,names} on ARM reside in data section, similar to other arches.
  
   sintrnames and sintrcnt are initialized with non-zero values, which were
   discarded by the .bss directive, so consumers like "vmstat -i" were not
   getting correct data.
  
   Submitted by:        Lukasz Plachno
   Obtained from:       Semihalf
  
  r228530:
   ARM pmap fixes:
  
   - Write Buffers have to be drained after write to Page Table even if caches
     are in write-through mode.
  
   - Make sure to sync PTE in pmap_zero_page_generic().
  
   Submitted by:        Michal Mazur
   Reviewed by: cognet
   Obtained from:       Semihalf

Modified:
  stable/9/sys/arm/arm/irq_dispatch.S
  stable/9/sys/arm/arm/pmap.c
  stable/9/sys/arm/include/pmap.h
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)
  stable/9/sys/i386/conf/XENHVM   (props changed)

Modified: stable/9/sys/arm/arm/irq_dispatch.S
==============================================================================
--- stable/9/sys/arm/arm/irq_dispatch.S Sun Mar  4 16:59:45 2012        
(r232507)
+++ stable/9/sys/arm/arm/irq_dispatch.S Sun Mar  4 17:00:46 2012        
(r232508)
@@ -98,10 +98,9 @@ ASENTRY_NP(irq_entry)
        PULLFRAMEFROMSVCANDEXIT
        movs    pc, lr                  /* Exit */
 
-       .bss
+       .data
        .align  0
 
-
        .global _C_LABEL(intrnames), _C_LABEL(sintrnames)
        .global _C_LABEL(intrcnt), _C_LABEL(sintrcnt)
 _C_LABEL(intrnames): 

Modified: stable/9/sys/arm/arm/pmap.c
==============================================================================
--- stable/9/sys/arm/arm/pmap.c Sun Mar  4 16:59:45 2012        (r232507)
+++ stable/9/sys/arm/arm/pmap.c Sun Mar  4 17:00:46 2012        (r232508)
@@ -4044,6 +4044,7 @@ pmap_zero_page_generic(vm_paddr_t phys, 
         * order to work without corruption when write-allocate is enabled.
         */
        *cdst_pte = L2_S_PROTO | phys | L2_S_PROT(PTE_KERNEL, VM_PROT_WRITE);
+       PTE_SYNC(cdst_pte);
        cpu_tlb_flushD_SE(cdstp);
        cpu_cpwait();
        if (off || size != PAGE_SIZE)

Modified: stable/9/sys/arm/include/pmap.h
==============================================================================
--- stable/9/sys/arm/include/pmap.h     Sun Mar  4 16:59:45 2012        
(r232507)
+++ stable/9/sys/arm/include/pmap.h     Sun Mar  4 17:00:46 2012        
(r232508)
@@ -382,7 +382,8 @@ do {                                                        
                \
        if (PMAP_NEEDS_PTE_SYNC) {                                      \
                cpu_dcache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\
                cpu_l2cache_wb_range((vm_offset_t)(pte), sizeof(pt_entry_t));\
-       }\
+       } else                                                          \
+               cpu_drain_writebuf();                                   \
 } while (/*CONSTCOND*/0)
 
 #define        PTE_SYNC_RANGE(pte, cnt)                                        
\
@@ -392,7 +393,8 @@ do {                                                        
                \
                    (cnt) << 2); /* * sizeof(pt_entry_t) */             \
                cpu_l2cache_wb_range((vm_offset_t)(pte),                \
                    (cnt) << 2); /* * sizeof(pt_entry_t) */             \
-       }                                                               \
+       } else                                                          \
+               cpu_drain_writebuf();                                   \
 } while (/*CONSTCOND*/0)
 
 extern pt_entry_t              pte_l1_s_cache_mode;
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to