diff options
author | alc <alc@FreeBSD.org> | 2003-11-16 23:40:06 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-11-16 23:40:06 +0000 |
commit | aea6af995e43dee967b6d512c56585ec6be872ad (patch) | |
tree | 0b5e45e83bef0c49aa2e3500449fabecdd8cfdc7 /sys | |
parent | 7aa5c2497a67b36cc05ec3c76dca0423b69c9400 (diff) | |
download | FreeBSD-src-aea6af995e43dee967b6d512c56585ec6be872ad.zip FreeBSD-src-aea6af995e43dee967b6d512c56585ec6be872ad.tar.gz |
- Remove unnecessary synchronization from sf_buf_init(). (There is only
one active CPU when sf_buf_init() is performed.)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/vm_machdep.c | 2 | ||||
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 2 | ||||
-rw-r--r-- | sys/ia64/ia64/vm_machdep.c | 2 | ||||
-rw-r--r-- | sys/powerpc/aim/vm_machdep.c | 2 | ||||
-rw-r--r-- | sys/powerpc/powerpc/vm_machdep.c | 2 | ||||
-rw-r--r-- | sys/sparc64/sparc64/vm_machdep.c | 2 |
7 files changed, 0 insertions, 14 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c index 3518880..071400e 100644 --- a/sys/alpha/alpha/vm_machdep.c +++ b/sys/alpha/alpha/vm_machdep.c @@ -395,14 +395,12 @@ sf_buf_init(void *arg) int i; mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); - mtx_lock(&sf_freelist.sf_lock); SLIST_INIT(&sf_freelist.sf_head); sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, M_NOWAIT | M_ZERO); for (i = 0; i < nsfbufs; i++) SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list); sf_buf_alloc_want = 0; - mtx_unlock(&sf_freelist.sf_lock); } /* diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index 7ddf920..9b6bc1f 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -375,14 +375,12 @@ sf_buf_init(void *arg) int i; mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); - mtx_lock(&sf_freelist.sf_lock); SLIST_INIT(&sf_freelist.sf_head); sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, M_NOWAIT | M_ZERO); for (i = 0; i < nsfbufs; i++) SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list); sf_buf_alloc_want = 0; - mtx_unlock(&sf_freelist.sf_lock); } /* diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 7542af6..19e3b39 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -576,7 +576,6 @@ sf_buf_init(void *arg) int i; mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); - mtx_lock(&sf_freelist.sf_lock); SLIST_INIT(&sf_freelist.sf_head); sf_base = kmem_alloc_nofault(kernel_map, nsfbufs * PAGE_SIZE); sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, @@ -586,7 +585,6 @@ sf_buf_init(void *arg) SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list); } sf_buf_alloc_want = 0; - mtx_unlock(&sf_freelist.sf_lock); } /* diff --git a/sys/ia64/ia64/vm_machdep.c b/sys/ia64/ia64/vm_machdep.c index fa4c9be..e6d51ca 100644 --- a/sys/ia64/ia64/vm_machdep.c +++ b/sys/ia64/ia64/vm_machdep.c @@ -334,14 +334,12 @@ sf_buf_init(void *arg) int i; mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); - mtx_lock(&sf_freelist.sf_lock); SLIST_INIT(&sf_freelist.sf_head); sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, M_NOWAIT | M_ZERO); for (i = 0; i < nsfbufs; i++) SLIST_INSERT_HEAD(&sf_freelist.sf_head, sf_bufs+i, free_list); sf_buf_alloc_want = 0; - mtx_unlock(&sf_freelist.sf_lock); } /* diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c index a53a03e..5293ed3 100644 --- a/sys/powerpc/aim/vm_machdep.c +++ b/sys/powerpc/aim/vm_machdep.c @@ -246,7 +246,6 @@ sf_buf_init(void *arg) int i; mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); - mtx_lock(&sf_freelist.sf_lock); SLIST_INIT(&sf_freelist.sf_head); sf_base = kmem_alloc_nofault(kernel_map, nsfbufs * PAGE_SIZE); sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, @@ -256,7 +255,6 @@ sf_buf_init(void *arg) SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list); } sf_buf_alloc_want = 0; - mtx_unlock(&sf_freelist.sf_lock); } /* diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index a53a03e..5293ed3 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -246,7 +246,6 @@ sf_buf_init(void *arg) int i; mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); - mtx_lock(&sf_freelist.sf_lock); SLIST_INIT(&sf_freelist.sf_head); sf_base = kmem_alloc_nofault(kernel_map, nsfbufs * PAGE_SIZE); sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, @@ -256,7 +255,6 @@ sf_buf_init(void *arg) SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list); } sf_buf_alloc_want = 0; - mtx_unlock(&sf_freelist.sf_lock); } /* diff --git a/sys/sparc64/sparc64/vm_machdep.c b/sys/sparc64/sparc64/vm_machdep.c index 23bd29e..e29b48a 100644 --- a/sys/sparc64/sparc64/vm_machdep.c +++ b/sys/sparc64/sparc64/vm_machdep.c @@ -373,7 +373,6 @@ sf_buf_init(void *arg) int i; mtx_init(&sf_freelist.sf_lock, "sf_bufs list lock", NULL, MTX_DEF); - mtx_lock(&sf_freelist.sf_lock); SLIST_INIT(&sf_freelist.sf_head); sf_base = kmem_alloc_nofault(kernel_map, nsfbufs * PAGE_SIZE); sf_bufs = malloc(nsfbufs * sizeof(struct sf_buf), M_TEMP, @@ -383,7 +382,6 @@ sf_buf_init(void *arg) SLIST_INSERT_HEAD(&sf_freelist.sf_head, &sf_bufs[i], free_list); } sf_buf_alloc_want = 0; - mtx_unlock(&sf_freelist.sf_lock); } /* |