Author: br
Date: Thu Jun 21 11:43:54 2018
New Revision: 335475
URL: https://svnweb.freebsd.org/changeset/base/335475

Log:
  Fix uma_zalloc_pcpu_arg() operation in case of !SMP build.
  
  Reviewed by:  mjg
  Sponsored by: DARPA, AFRL

Modified:
  head/sys/vm/uma_core.c

Modified: head/sys/vm/uma_core.c
==============================================================================
--- head/sys/vm/uma_core.c      Thu Jun 21 11:24:20 2018        (r335474)
+++ head/sys/vm/uma_core.c      Thu Jun 21 11:43:54 2018        (r335475)
@@ -2234,13 +2234,19 @@ void *
 uma_zalloc_pcpu_arg(uma_zone_t zone, void *udata, int flags)
 {
        void *item;
+#ifdef SMP
        int i;
 
        MPASS(zone->uz_flags & UMA_ZONE_PCPU);
+#endif
        item = uma_zalloc_arg(zone, udata, flags &~ M_ZERO);
        if (item != NULL && (flags & M_ZERO)) {
+#ifdef SMP
                CPU_FOREACH(i)
                        bzero(zpcpu_get_cpu(item, i), zone->uz_size);
+#else
+               bzero(item, zone->uz_size);
+#endif
        }
        return (item);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to