Author: kib Date: Sat Jan 24 12:51:15 2015 New Revision: 277643 URL: https://svnweb.freebsd.org/changeset/base/277643
Log: Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed for i386, and from the code inspection, nothing in the arm/mips/sparc64 implementations depends on it. Discussed with: imp, nwhitehorn Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/arm/arm/mem.c head/sys/dev/mem/memdev.c head/sys/i386/i386/mem.c head/sys/mips/mips/mem.c head/sys/sparc64/sparc64/mem.c Modified: head/sys/arm/arm/mem.c ============================================================================== --- head/sys/arm/arm/mem.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/arm/arm/mem.c Sat Jan 24 12:51:15 2015 (r277643) @@ -82,8 +82,6 @@ memrw(struct cdev *dev, struct uio *uio, int error = 0; vm_offset_t addr, eaddr; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { Modified: head/sys/dev/mem/memdev.c ============================================================================== --- head/sys/dev/mem/memdev.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/dev/mem/memdev.c Sat Jan 24 12:51:15 2015 (r277643) @@ -52,7 +52,7 @@ static struct cdev *memdev, *kmemdev; static struct cdevsw mem_cdevsw = { .d_version = D_VERSION, - .d_flags = D_MEM|D_NEEDGIANT, + .d_flags = D_MEM, .d_open = memopen, .d_read = memrw, .d_write = memrw, Modified: head/sys/i386/i386/mem.c ============================================================================== --- head/sys/i386/i386/mem.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/i386/i386/mem.c Sat Jan 24 12:51:15 2015 (r277643) @@ -86,10 +86,6 @@ memrw(struct cdev *dev, struct uio *uio, int error = 0; vm_offset_t addr; - /* XXX UPS Why ? */ - GIANT_REQUIRED; - - if (dev2unit(dev) != CDEV_MINOR_MEM && dev2unit(dev) != CDEV_MINOR_KMEM) return EIO; Modified: head/sys/mips/mips/mem.c ============================================================================== --- head/sys/mips/mips/mem.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/mips/mips/mem.c Sat Jan 24 12:51:15 2015 (r277643) @@ -85,8 +85,6 @@ memrw(struct cdev *dev, struct uio *uio, cnt = 0; error = 0; - GIANT_REQUIRED; - pmap_page_init(&m); while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; Modified: head/sys/sparc64/sparc64/mem.c ============================================================================== --- head/sys/sparc64/sparc64/mem.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/sparc64/sparc64/mem.c Sat Jan 24 12:51:15 2015 (r277643) @@ -99,8 +99,6 @@ memrw(struct cdev *dev, struct uio *uio, error = 0; ova = 0; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"