From owner-p4-projects@FreeBSD.ORG Sun Jun 17 19:42:25 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 087741065673; Sun, 17 Jun 2012 19:42:24 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B13F9106566C for ; Sun, 17 Jun 2012 19:42:23 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 97FB68FC0A for ; Sun, 17 Jun 2012 19:42:23 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5HJgNCB093253 for ; Sun, 17 Jun 2012 19:42:23 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5HJgNoI093250 for perforce@freebsd.org; Sun, 17 Jun 2012 19:42:23 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sun, 17 Jun 2012 19:42:23 GMT Message-Id: <201206171942.q5HJgNoI093250@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213015 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Jun 2012 19:42:25 -0000 http://p4web.freebsd.org/@@213015?ac=10 Change 213015 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/17 19:42:06 Integrate CTSRD CheriBSD branch to merge further demo improvements from the FreeBSD/BERI branch. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/ctsrd/Makefile#2 integrate .. //depot/projects/ctsrd/cheribsd/src/ctsrd/pictview/pictview.c#2 integrate .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/Makefile#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/Makefile#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/boot-bottom.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/boot-top.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner00.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner01.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner02.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner03.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner04.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner05.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner06.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner07.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner08.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner09.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner10.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/spinner11.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/upgrade-bottom.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/images/upgrade-top.png#1 branch .. //depot/projects/ctsrd/cheribsd/src/ctsrd/spinner/spinner.c#1 branch Differences ... ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/Makefile#2 (text+ko) ==== @@ -1,7 +1,8 @@ .include SUBDIR= flashit \ - pictview + pictview \ + spinner .include ==== //depot/projects/ctsrd/cheribsd/src/ctsrd/pictview/pictview.c#2 (text+ko) ==== @@ -42,390 +42,15 @@ #include -#if DIKE -// endian.h not available in Linux? -// #include -#include -#define PNG_DEBUG 3 -#include - -// file descriptors for MTL control and display regions -static int ctrlfd; -static int dispfd; -static int textfd; -static int fademode=0; -volatile static u_int32_t *pfbp; -volatile static u_int16_t *tfbp; -volatile static u_int32_t *mtlctrl; -// frame buffer dimensions -static const int fb_height = 480; -static const int fb_width = 800; - -// fade timing (for crude timing loop) -static const int fb_cross_fade_time = 500; - -// number of lines in the line pattern -static const int num_lines_pattern = 600; -#endif - // send keyboard output to stdout by default static int kbdfd = 0; u_int32_t *fb_buf; -#if DIKE - - -/***************************************************************************** - * hack around endian issue - * TODO: replace with endian library call (but not present in Linux?) - *****************************************************************************/ - -u_int32_t -endian_swap(u_int32_t lend) -{ - u_int32_t bend; - bend = lend & 0xff; - bend = bend<<8; - lend = lend>>8; - - bend |= lend & 0xff; - bend = bend<<8; - lend = lend>>8; - - bend |= lend & 0xff; - bend = bend<<8; - lend = lend>>8; - - bend |= lend & 0xff; - return bend; -} - - - -/***************************************************************************** - * sample touch input - *****************************************************************************/ - -static int touch_x0=0; -static int touch_y0=0; -static int touch_x1=0; -static int touch_y1=0; -static int touch_gesture=0; -static int touch_count=0; -volatile static int touch_tmp=0; - -void -multitouch_pole(void) -{ - /* - int j; - for(j=3; j<8; j++) - touch_tmp += pfbp[j]; // provoke cache line flush - */ - int t_x0 = endian_swap(mtlctrl[3]); - if(t_x0>=0) { // new touch info available - touch_x0 = t_x0; - touch_y0 = endian_swap(mtlctrl[4]); - touch_x1 = endian_swap(mtlctrl[5]); - touch_y1 = endian_swap(mtlctrl[6]); - // note that this final read dequeues - touch_gesture = endian_swap(mtlctrl[7]); - touch_count = touch_gesture>>8; - if(touch_count<0) touch_count=0; // hack - touch_gesture &= 0xff; - } - // else - // t_x0 = mtlctrl[7]; // clear any -1s from FIFO? -} - - -// filter out short lived touch releases -void -multitouch_filter(void) -{ - int j; - multitouch_pole(); - for(j=30000; (j>0) && (touch_count==0); j--) - multitouch_pole(); -} - -// wait for touch release -void -multitouch_release_event(void) -{ - do { - // multitouch_filter(); - multitouch_pole(); - } while(touch_count!=0); -} - - -/***************************************************************************** - * frame buffer routines - * TODO: put in seperate library - *****************************************************************************/ - -void -fb_init(void) -{ - ctrlfd = open("/dev/mtl_reg0", O_RDWR | O_NONBLOCK); - if(ctrlfd < 0) - err(1, "open mtl_reg0"); - - mtlctrl = mmap(NULL, 0x20, PROT_READ | PROT_WRITE, MAP_SHARED, ctrlfd, 0); - if (mtlctrl == MAP_FAILED) - err(1, "mmap mtl_reg0"); - - dispfd = open("/dev/mtl_pixel0", O_RDWR | O_NONBLOCK); - if(dispfd < 0) - err(1, "open mtl_pixel0"); - pfbp = mmap(NULL, 0x177000, PROT_READ | PROT_WRITE, MAP_SHARED, dispfd, 0); - if (pfbp == MAP_FAILED) - err(1, "mmap mtl_pixel0"); - - textfd = open("/dev/mtl_text0", O_RDWR | O_NONBLOCK); - if(textfd < 0) - err(1, "open mtl_text0"); - tfbp = mmap(NULL, 100*40*2, PROT_READ | PROT_WRITE, MAP_SHARED, textfd, 0); - if (tfbp == MAP_FAILED) - err(1, "mmap mtl_text0"); -} - - -inline u_int32_t -fb_colour(int r, int g, int b) -{ - return ((r&0xff)<<8) | ((g&0xff)<<16) | ((b&0xff)<<24); -} - - -inline void -fb_putpixel(int px, int py, int colour) -{ - pfbp[px+py*fb_width] = colour; -} - - -void -fb_fill(int col) -{ - int addr; - for(addr=0; addr<(fb_height*fb_width); addr++) - pfbp[addr] = col; -} - - -void -fb_blend(int blend_text_bg, int blend_text_fg, int blend_pixel, int wash) -{ - mtlctrl[0] = - ((blend_text_bg & 0xff)<<24) | - ((blend_text_fg & 0xff)<<16) | - ((blend_pixel & 0xff)<<8) | - // to avoid a red screen colour wash "attack" indicator from being - // removed, preserve the "wash" value: - //wash; - mtlctrl[0] & 0xff; - // to try the dark red "attack" indicator: - //4; -} - - -void -fb_text_cursor(int x, int y) -{ - mtlctrl[1] = ((y&0xff)<<24) | ((x)<<16); -} - - -// fade the pixel framebuffer to black using the MTL hardware alpha blending -void -fb_fade2off(void) -{ - int b,t; - if(fademode==0) - fb_blend(255,255,255,0); - else - for(b=0; b<256; b++) - for(t=fb_cross_fade_time; t>0; t--) - fb_blend(b,b,255,0); - fademode=0; -} - - -// fade the pixel framebuffer from black using the MTL hardware alpha blending -void -fb_fade2on(void) -{ - int b,t; - if(fademode==1) - fb_blend(0,0,255,0); - else - for(b=0; b<256; b++) - for(t=fb_cross_fade_time; t>0; t--) - fb_blend(255-b,255-b,255,0); - fademode=1; -} - - -void -fb_fade2text(int textbg_alpha) -{ - int b, t; - if(fademode==2) - fb_blend(255,255,0,0); - else - for(b=0; b<256; b++) - for(t=fb_cross_fade_time; t>0; t--) - fb_blend((b>1; - y=dxabs>>1; - px=x1; - py=y1; - - if((x1==x2) && (y1==y2)) - fb_putpixel(x1,y1,colour); - else if (dxabs>=dyabs) { /* the line is more horizontal than vertical */ - for(i=0;i=dxabs) { - y-=dxabs; - py+=sdy; - } - px+=sdx; - fb_putpixel(px,py,colour); - } - } else { /* the line is more vertical than horizontal */ - for(i=0;i=dyabs) { - x-=dyabs; - px+=sdx; - } - py+=sdy; - fb_putpixel(px,py,colour); - } - } -} - -/***************************************************************************** - * some test pattern generators, etc. - *****************************************************************************/ - -/* -void line_pattern() -{ - int x0buf[num_lines_pattern]; - int y0buf[num_lines_pattern]; - int x1buf[num_lines_pattern]; - int y1buf[num_lines_pattern]; - int j; - int x0=10; - int y0=10; - int dx0=3; - int dy0=3; - int x1=200; - int y1=200; - int dx1=2; - int dy1=-2; - const int on_colour = 0xffffffff; // white - const int off_colour = 0xff<<24; // blue - for(j=0; j=num_lines_pattern) j=0; - x0=x0+dx0; if((x0>=fb_width) || (x0<0)) { x0=x0-2*dx0; dx0=-dx0; } - y0=y0+dy0; if((y0>=fb_height) || (y0<0)) { y0=y0-2*dy0; dy0=-dy0; } - x1=x1+dx1; if((x1>=fb_width) || (x1<0)) { x1=x1-2*dx1; dx1=-dx1; } - y1=y1+dy1; if((y1>=fb_height) || (y1<0)) { y1=y1-2*dy1; dy1=-dy1; } - // fb_refresh(); - } -} -*/ - - /* -void -stripy_pixels_fast() -{ - // write stripes to pixel buffer - u_int32_t fb[fb_height][fb_width]; - int x,y,r,g,b; - for(y=0; y>1); - fb_putpixel(x,y,fb_colour(r,g,b)); - } - } -} -*/ - - -/* -void -flash_colours() -{ - int j, r, g, b; - for(j=0; j<8; j++) { - r = (j & 0x1)==0 ? 0 : 0xff; - g = (j & 0x2)==0 ? 0 : 0xff; - b = (j & 0x4)==0 ? 0 : 0xff; - fb_fill(fb_colour(r,g,b)); - } -} -*/ -#endif /* DIKE */ - - -void pen_drawing_clear_screen(void) { int x0,y0; @@ -490,113 +115,6 @@ } -#if DIKE -/***************************************************************************** - * PNG image loader - *****************************************************************************/ - -void -read_png_file(char* file_name, u_int32_t* imgbuf, int maxwidth, int maxheight) -{ - unsigned char header[8]; // 8 is the maximum size that can be checked - size_t tmp; - int x,y; - - int width, height, rowbytes; - png_byte colour_type; - png_byte bit_depth; - - png_structp png_ptr; - png_infop info_ptr; - int number_of_passes; - png_bytep * row_pointers; - int bppx; // bytes per pixel - - /* open file and test for it being a png */ - FILE *fp = fopen(file_name, "rb"); - if (!fp) - err(1,"fopen - failed to read from %s",file_name); - tmp=fread(header, 1, 8, fp); - if (png_sig_cmp(header, 0, 8)) - err(1,"file $s not PNG", file_name); - - png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - if (!png_ptr) - err(1,"png_create_read_struct failed"); - - info_ptr = png_create_info_struct(png_ptr); - if (!info_ptr) - err(1,"png_create_info_struct failed"); - - if (setjmp(png_jmpbuf(png_ptr))) - err(1,"Error during init_io"); - - png_init_io(png_ptr, fp); - png_set_sig_bytes(png_ptr, 8); - - png_read_info(png_ptr, info_ptr); - - width = png_get_image_width(png_ptr, info_ptr); - height = png_get_image_height(png_ptr, info_ptr); - colour_type = png_get_color_type(png_ptr, info_ptr); - bit_depth = png_get_bit_depth(png_ptr, info_ptr); - - //printf("image=%s, width=%1d, height=%1d, colour_type=%1d, bit_depth=%1d\n", - // file_name, width, height, colour_type, bit_depth); - - if((colour_type != PNG_COLOR_TYPE_RGB) && (colour_type != 6)) - err(1,"colour type is not RGB - panic!"); - if(bit_depth != 8) - err(1,"bit depth is not 8 - panic!"); - - number_of_passes = png_set_interlace_handling(png_ptr); - png_read_update_info(png_ptr, info_ptr); - - /* read file */ - if (setjmp(png_jmpbuf(png_ptr))) - err(1,"Error during read_image"); - - row_pointers = (png_bytep*) malloc(sizeof(png_bytep) * height); - - if (bit_depth == 16) - rowbytes = width*8; - else - rowbytes = width*4; - - for (y=0; ymaxheight) height=maxheight; - if(width>maxwidth) width=maxwidth; - - bppx = 3; - if(colour_type==6) - bppx = 4; - for (y=0; y Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60E9D1065675; Mon, 18 Jun 2012 09:33:40 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D0CF106566C for ; Mon, 18 Jun 2012 09:33:40 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 051428FC08 for ; Mon, 18 Jun 2012 09:33:40 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5I9Xdl3059251 for ; Mon, 18 Jun 2012 09:33:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5I9XdOk059248 for perforce@freebsd.org; Mon, 18 Jun 2012 09:33:39 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 18 Jun 2012 09:33:39 GMT Message-Id: <201206180933.q5I9XdOk059248@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213057 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 09:33:40 -0000 http://p4web.freebsd.org/@@213057?ac=10 Change 213057 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/18 09:32:59 Remove XXX comments about pipeline issues with CP2 forwarding; we believe these to be fixed in hardware, so nops were removed. Let the comments catch up. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2.h#7 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2.h#7 (text+ko) ==== @@ -178,15 +178,6 @@ * * XXXRW: C macros are named after capability field names -- hence OTYPE * rather than TYPE. Possibly this is a bug. - * - * XXXRW: There is currently no forwarding of general-purpose register - * operands into capability manipulation instructions. We therefore have to - * take care to nop several times after possible loads of values that will be - * immediately passed into them. - * - * XXXRW: We also space all capability instructions with several nops on - * either side in order to ensure they don't follow through the pipeline too - * closely. */ #define CP2_CR_MOVE(crn_to, crn_from) do { \ if ((crn_to) == 0) \ From owner-p4-projects@FreeBSD.ORG Mon Jun 18 14:41:34 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE9EC1065673; Mon, 18 Jun 2012 14:41:33 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98A4B106566B for ; Mon, 18 Jun 2012 14:41:33 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 7A09E8FC0C for ; Mon, 18 Jun 2012 14:41:33 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5IEfX4v024601 for ; Mon, 18 Jun 2012 14:41:33 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5IEfXxD024598 for perforce@freebsd.org; Mon, 18 Jun 2012 14:41:33 GMT (envelope-from jhb@freebsd.org) Date: Mon, 18 Jun 2012 14:41:33 GMT Message-Id: <201206181441.q5IEfXxD024598@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213070 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 14:41:34 -0000 http://p4web.freebsd.org/@@213070?ac=10 Change 213070 by jhb@jhb_jhbbsd on 2012/06/18 14:40:33 Rename vdetachbuf() to vrelbuf(). Affected files ... .. //depot/projects/fadvise/sys/kern/vfs_default.c#10 edit .. //depot/projects/fadvise/sys/kern/vfs_subr.c#13 edit .. //depot/projects/fadvise/sys/sys/vnode.h#9 edit .. //depot/projects/fadvise/sys/ufs/ffs/ffs_vnops.c#11 edit Differences ... ==== //depot/projects/fadvise/sys/kern/vfs_default.c#10 (text+ko) ==== @@ -1007,11 +1007,11 @@ break; case POSIX_FADV_DONTNEED: /* - * Flush any open FS buffers and then remove pages + * Release any clean FS buffers and then remove pages * from the backing VM object. Since the block size - * is FS-specific knowledge, the vdetachbuf() here is - * a bit heavy-handed as it flushes all buffers for - * the given vnode, not just the buffers covering the + * is FS-specific knowledge, the vrelbuf() here is a + * bit heavy-handed as it flushes all buffers for the + * given vnode, not just the buffers covering the * requested range. */ error = 0; @@ -1022,7 +1022,7 @@ VFS_UNLOCK_GIANT(vfslocked); break; } - vdetachbuf(vp, 0, 0, 0, 0); + vrelbuf(vp, 0, 0, 0, 0); if (vp->v_object != NULL) { start = trunc_page(ap->a_start); end = round_page(ap->a_end); ==== //depot/projects/fadvise/sys/kern/vfs_subr.c#13 (text+ko) ==== @@ -1320,14 +1320,13 @@ } /* - * Detach clean buffers for a range of blocks in a file from it's + * Release clean buffers for a range of blocks in a file from it's * backing pages. This does not invalidate the buffers like * flushbuflist(). If the range is specified as (0, 0), then all * clean buffers are detached. */ int -vdetachbuf(struct vnode *vp, daddr_t start, daddr_t end, int slpflag, - int slptimeo) +vrelbuf(struct vnode *vp, daddr_t start, daddr_t end, int slpflag, int slptimeo) { struct bufobj *bo; struct buf *bp, *nbp; @@ -1351,7 +1350,7 @@ } error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_SLEEPFAIL | LK_INTERLOCK, BO_MTX(bo), - "detachbuf", slpflag, slptimeo); + "relbuf", slpflag, slptimeo); if (error == ENOLCK) { BO_LOCK(bo); goto restart; ==== //depot/projects/fadvise/sys/sys/vnode.h#9 (text+ko) ==== @@ -626,7 +626,7 @@ struct ucred *cred, int *privused); void vattr_null(struct vattr *vap); int vcount(struct vnode *vp); -int vdetachbuf(struct vnode *vp, daddr_t start, daddr_t end, int slpflag, +int vrelbuf(struct vnode *vp, daddr_t start, daddr_t end, int slpflag, int slptimeo); void vdrop(struct vnode *); void vdropl(struct vnode *); ==== //depot/projects/fadvise/sys/ufs/ffs/ffs_vnops.c#11 (text+ko) ==== @@ -471,7 +471,7 @@ VOP_UNLOCK(vp, 0); return (0); } - vdetachbuf(vp, lblkno(fs, start), lblkno(fs, end), 0, 0); + vrelbuf(vp, lblkno(fs, start), lblkno(fs, end), 0, 0); if (vp->v_object != NULL) { start = trunc_page(start); end = round_page(end); From owner-p4-projects@FreeBSD.ORG Mon Jun 18 19:50:59 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 591091065673; Mon, 18 Jun 2012 19:50:58 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ACAC1065679 for ; Mon, 18 Jun 2012 19:50:58 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id E71018FC18 for ; Mon, 18 Jun 2012 19:50:57 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5IJovV0084909 for ; Mon, 18 Jun 2012 19:50:57 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5IJovRf084904 for perforce@freebsd.org; Mon, 18 Jun 2012 19:50:57 GMT (envelope-from jhb@freebsd.org) Date: Mon, 18 Jun 2012 19:50:57 GMT Message-Id: <201206181950.q5IJovRf084904@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213088 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 19:50:59 -0000 http://p4web.freebsd.org/@@213088?ac=10 Change 213088 by jhb@jhb_jhbbsd on 2012/06/18 19:50:53 More hacking. Affected files ... .. //depot/projects/fadvise/sys/vm/vm_page.c#9 edit .. //depot/projects/fadvise/sys/vm/vm_phys.c#7 edit .. //depot/projects/fadvise/sys/vm/vm_reserv.c#5 edit .. //depot/projects/fadvise/sys/vm/vm_reserv.h#4 edit Differences ... ==== //depot/projects/fadvise/sys/vm/vm_page.c#9 (text+ko) ==== @@ -1187,6 +1187,17 @@ m->flags ^= PG_CACHED | PG_FREE; KASSERT((m->flags & (PG_CACHED | PG_FREE)) == PG_FREE, ("vm_page_cache_free: page %p has inconsistent flags", m)); +#if 1 + if (vm_phys_unfree_page(m)) { + vm_phys_set_pool(VM_FREEPOOL_DEFAULT, m, 0); + vm_phys_free_pages(m, 0); +#if VM_NRESERVLEVEL > 0 + } else if (!vm_reserv_cache_free(m)) +#else + } else +#endif + panic("cache page is not free"); +#endif cnt.v_cache_count--; cnt.v_free_count++; } ==== //depot/projects/fadvise/sys/vm/vm_phys.c#7 (text+ko) ==== @@ -36,6 +36,8 @@ * virtual memory system. */ +#define CACHE_SEPARATE + #include __FBSDID("$FreeBSD: src/sys/vm/vm_phys.c,v 1.28 2012/05/12 20:42:56 kib Exp $"); @@ -133,6 +135,9 @@ static int vm_phys_uc_alloc_pages; SYSCTL_INT(_vm, OID_AUTO, phys_uc_alloc_pages, CTLFLAG_RD, &vm_phys_uc_alloc_pages, 0, ""); +static int vm_phys_uc_alloc_pages2; +SYSCTL_INT(_vm, OID_AUTO, phys_uc_alloc_pages2, CTLFLAG_RD, + &vm_phys_uc_alloc_pages2, 0, ""); static int vm_phys_uc_free_pages; SYSCTL_INT(_vm, OID_AUTO, phys_uc_free_pages, CTLFLAG_RD, &vm_phys_uc_free_pages, 0, ""); @@ -464,6 +469,11 @@ struct vm_freelist *alt; int domain, oind, pind; vm_page_t m; +#ifdef CACHE_SEPARATE + struct vm_phys_seg *seg; + vm_paddr_t pa; + vm_page_t m_next, m_buddy; +#endif KASSERT(flind < VM_NFREELIST, ("vm_phys_alloc_freelist_pages: freelist %d is out of range", flind)); @@ -514,11 +524,68 @@ } } +#ifdef CACHE_SEPARATE /* * XXX: If we get here, do deferred merging of cache pages * with pages from another pool to satisfy the request and - * try again. This may be quite hard to do. + * try again. This may be quite hard to do, and certainly + * not very efficient. */ + for (oind = order - 1; oind > 0; oind--) { + alt = (*vm_phys_lookup_lists[domain][flind])[VM_FREEPOOL_CACHE]; + TAILQ_FOREACH_SAFE(m, &alt[oind].pl, pageq, m_next) { + struct vm_freelist *fl2; + int newoind; + + seg = &vm_phys_segs[m->segind]; + pa = VM_PAGE_TO_PHYS(m); + newoind = oind; + do { + pa ^= ((vm_paddr_t)1 << (PAGE_SHIFT + newoind)); + if (pa < seg->start || pa >= seg->end) + break; + m_buddy = &seg->first_page[atop(pa - seg->start)]; + if (m_buddy->order != newoind) + break; + fl2 = (*seg->free_queues)[m_buddy->pool]; + /* + * Two same-sized buddies should not + * be on the 'alt[oind].pl' list. + */ + KASSERT(m_buddy != m_next, + ("identical buddies")); + TAILQ_REMOVE(&fl2[newoind].pl, m_buddy, pageq); + fl2[order].lcnt--; + m_buddy->order = VM_NFREEORDER; + if (m_buddy->pool != m->pool) { + if (m->pool == VM_FREEPOOL_CACHE) { + vm_phys_uc_alloc_pages2++; + vm_phys_set_pool(m_buddy->pool, + m, newoind); + } else { + if (m_buddy->pool == + VM_FREEPOOL_CACHE) + vm_phys_uc_alloc_pages2++; + vm_phys_set_pool(m->pool, + m_buddy, newoind); + } + } + newoind++; + pa &= ~(((vm_paddr_t)1 << (PAGE_SHIFT + newoind)) - 1); + m = &seg->first_page[atop(pa - seg->start)]; + } while (newoind < order); + m->order = newoind; + if (newoind == order) { + if (m->pool != pool) + vm_phys_set_pool(pool, m, order); + return (m); + } + fl2 = (*seg->free_queues)[m->pool]; + TAILQ_INSERT_TAIL(&fl2[newoind].pl, m, pageq); + fl2[newoind].lcnt++; + } + } +#endif return (NULL); } @@ -695,17 +762,18 @@ m_buddy = &seg->first_page[atop(pa - seg->start)]; if (m_buddy->order != order) break; +#ifdef CACHE_SEPARATE + if (m_buddy->pool != m->pool && + (m_buddy->pool == VM_FREEPOOL_CACHE || + m->pool == VM_FREEPOOL_CACHE)) + break; +#endif fl = (*seg->free_queues)[m_buddy->pool]; TAILQ_REMOVE(&fl[order].pl, m_buddy, pageq); fl[order].lcnt--; m_buddy->order = VM_NFREEORDER; if (m_buddy->pool != m->pool) { #if 1 -#if 1 - if (m_buddy->pool == VM_FREEPOOL_CACHE || - m->pool == VM_FREEPOOL_CACHE) - break; -#endif if (m_buddy->pool == VM_FREEPOOL_CACHE) vm_phys_uc_free_pages++; vm_phys_set_pool(m->pool, m_buddy, order); ==== //depot/projects/fadvise/sys/vm/vm_reserv.c#5 (text+ko) ==== @@ -640,6 +640,24 @@ } /* + * Note a cached page has been moved to free. Returns TRUE if this + * page belongs to a reservation. + * + * The free page queue lock must be held. + */ +boolean_t +vm_reserv_cache_free(vm_page_t m) +{ + vm_reserv_t rv; + + mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); + rv = vm_reserv_from_page(m); + if (rv->object == NULL) + return (FALSE); + return (TRUE); +} + +/* * Frees the given page if it belongs to a reservation. Returns TRUE if the * page is freed and FALSE otherwise. * ==== //depot/projects/fadvise/sys/vm/vm_reserv.h#4 (text+ko) ==== @@ -50,6 +50,7 @@ u_long alignment, vm_paddr_t boundary); vm_page_t vm_reserv_alloc_page(vm_object_t object, vm_pindex_t pindex); void vm_reserv_break_all(vm_object_t object); +boolean_t vm_reserv_cache_free(vm_page_t m); boolean_t vm_reserv_free_page(vm_page_t m); void vm_reserv_init(void); int vm_reserv_level_iffullpop(vm_page_t m); From owner-p4-projects@FreeBSD.ORG Mon Jun 18 21:13:51 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3CCD91065673; Mon, 18 Jun 2012 21:13:50 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4878106566C for ; Mon, 18 Jun 2012 21:13:49 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id CCAA58FC08 for ; Mon, 18 Jun 2012 21:13:49 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5ILDnp0003155 for ; Mon, 18 Jun 2012 21:13:49 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5ILDnct003148 for perforce@freebsd.org; Mon, 18 Jun 2012 21:13:49 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 18 Jun 2012 21:13:49 GMT Message-Id: <201206182113.q5ILDnct003148@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213095 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 21:13:51 -0000 http://p4web.freebsd.org/@@213095?ac=10 Change 213095 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/18 21:12:56 Propagate kernel config file renaming to reflect DE4-specificity of the sample configs from FreeBSD/BERI to FreeBSD/CHERI. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/CHERI_DE4_MDROOT#1 add .. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/CHERI_DE4_SDROOT#1 add .. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/CHERI_MDROOT#2 delete .. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/CHERI_SDROOT#2 delete Differences ... From owner-p4-projects@FreeBSD.ORG Mon Jun 18 21:19:21 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2C2FA1065672; Mon, 18 Jun 2012 21:19:21 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6B6E106566B for ; Mon, 18 Jun 2012 21:19:20 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id A6C7C8FC0C for ; Mon, 18 Jun 2012 21:19:20 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5ILJKc8003524 for ; Mon, 18 Jun 2012 21:19:20 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5ILJKNq003521 for perforce@freebsd.org; Mon, 18 Jun 2012 21:19:20 GMT (envelope-from brooks@freebsd.org) Date: Mon, 18 Jun 2012 21:19:20 GMT Message-Id: <201206182119.q5ILJKNq003521@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213096 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 21:19:21 -0000 http://p4web.freebsd.org/@@213096?ac=10 Change 213096 by brooks@brooks_ecr_current on 2012/06/18 21:18:38 Renumber the led devices to de4led_0 is LED0 etc. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/terasic/de4led/terasic_de4led.c#3 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/terasic/de4led/terasic_de4led.c#3 (text+ko) ==== @@ -63,56 +63,56 @@ } static void -led_1(void *arg, int onoff) +led_0(void *arg, int onoff) { led_update(arg, 0, onoff); } static void -led_2(void *arg, int onoff) +led_1(void *arg, int onoff) { led_update(arg, 1, onoff); } static void -led_3(void *arg, int onoff) +led_2(void *arg, int onoff) { led_update(arg, 2, onoff); } static void -led_4(void *arg, int onoff) +led_3(void *arg, int onoff) { led_update(arg, 3, onoff); } static void -led_5(void *arg, int onoff) +led_4(void *arg, int onoff) { led_update(arg, 4, onoff); } static void -led_6(void *arg, int onoff) +led_5(void *arg, int onoff) { led_update(arg, 5, onoff); } static void -led_7(void *arg, int onoff) +led_6(void *arg, int onoff) { led_update(arg, 6, onoff); } static void -led_8(void *arg, int onoff) +led_7(void *arg, int onoff) { led_update(arg, 7, onoff); @@ -135,14 +135,14 @@ /* * Register the LED array with led(4). */ - sc->tdl_leds[0] = led_create(led_1, sc, "de4led_1"); - sc->tdl_leds[1] = led_create(led_2, sc, "de4led_2"); - sc->tdl_leds[2] = led_create(led_3, sc, "de4led_3"); - sc->tdl_leds[3] = led_create(led_4, sc, "de4led_4"); - sc->tdl_leds[4] = led_create(led_5, sc, "de4led_5"); - sc->tdl_leds[5] = led_create(led_6, sc, "de4led_6"); - sc->tdl_leds[6] = led_create(led_7, sc, "de4led_7"); - sc->tdl_leds[7] = led_create(led_8, sc, "de4led_8"); + sc->tdl_leds[0] = led_create(led_0, sc, "de4led_0"); + sc->tdl_leds[1] = led_create(led_1, sc, "de4led_1"); + sc->tdl_leds[2] = led_create(led_2, sc, "de4led_2"); + sc->tdl_leds[3] = led_create(led_3, sc, "de4led_3"); + sc->tdl_leds[4] = led_create(led_4, sc, "de4led_4"); + sc->tdl_leds[5] = led_create(led_5, sc, "de4led_5"); + sc->tdl_leds[6] = led_create(led_6, sc, "de4led_6"); + sc->tdl_leds[7] = led_create(led_7, sc, "de4led_7"); } void From owner-p4-projects@FreeBSD.ORG Mon Jun 18 22:41:07 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B9F41065672; Mon, 18 Jun 2012 22:41:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B131C106566C for ; Mon, 18 Jun 2012 22:41:06 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 987D78FC0C for ; Mon, 18 Jun 2012 22:41:06 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5IMf6pb020253 for ; Mon, 18 Jun 2012 22:41:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5IMf6M3020250 for perforce@freebsd.org; Mon, 18 Jun 2012 22:41:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 18 Jun 2012 22:41:06 GMT Message-Id: <201206182241.q5IMf6M3020250@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213103 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jun 2012 22:41:07 -0000 http://p4web.freebsd.org/@@213103?ac=10 Change 213103 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/18 22:40:01 Annotate a bug in FreeBSD/mips in-kernel stack walking: pcb_regs is used instead of pcb_context. However, if I drop in pcb_context, then I get a crash walking kernel stacks, so the existing stack walker appears inadequately robust. Rather than fix these bugs now, make a note for later. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/mips/stack_machdep.c#2 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/mips/stack_machdep.c#2 (text+ko) ==== @@ -57,6 +57,7 @@ stack_zero(st); + /* XXXRW: appears to be inadequately robust? */ for (;;) { stacksize = 0; if (pc <= (u_register_t)(intptr_t)btext) @@ -137,6 +138,7 @@ if (TD_IS_RUNNING(td)) panic("stack_save_td: running"); + /* XXXRW: Should be pcb_context? */ pc = td->td_pcb->pcb_regs.pc; sp = td->td_pcb->pcb_regs.sp; stack_capture(st, pc, sp); @@ -150,6 +152,7 @@ if (curthread == NULL) panic("stack_save: curthread == NULL)"); + /* XXXRW: Should be pcb_context? */ pc = curthread->td_pcb->pcb_regs.pc; sp = curthread->td_pcb->pcb_regs.sp; stack_capture(st, pc, sp); From owner-p4-projects@FreeBSD.ORG Tue Jun 19 00:29:35 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 28F9D1065672; Tue, 19 Jun 2012 00:29:35 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4531106566B for ; Tue, 19 Jun 2012 00:29:34 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id BCC858FC1F for ; Tue, 19 Jun 2012 00:29:34 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5J0TY9N041527 for ; Tue, 19 Jun 2012 00:29:34 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5J0TY7n041524 for perforce@freebsd.org; Tue, 19 Jun 2012 00:29:34 GMT (envelope-from brooks@freebsd.org) Date: Tue, 19 Jun 2012 00:29:34 GMT Message-Id: <201206190029.q5J0TY7n041524@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213107 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 00:29:35 -0000 http://p4web.freebsd.org/@@213107?ac=10 Change 213107 by brooks@brooks_ecr_current on 2012/06/19 00:28:56 Allow non-PAGE_SIZE sized and aligned regions as long as they are smaller than a page. This allows us to provide trivial access to things like the buttons and switches bytes. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/avgen/altera_avgen.c#4 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/avgen/altera_avgen.c#4 (text+ko) ==== @@ -382,16 +382,18 @@ device_printf(dev, "couldn't map memory\n"); return (ENXIO); } - if (rman_get_size(sc->avg_res) % PAGE_SIZE != 0) { - device_printf(dev, - "memory region not even multiple of page size\n"); - error = ENXIO; - goto error; - } - if (rman_get_start(sc->avg_res) % PAGE_SIZE != 0) { - device_printf(dev, "memory region not page-aligned\n"); - error = ENXIO; - goto error; + if (rman_get_size(sc->avg_res) >= PAGE_SIZE) { + if (rman_get_size(sc->avg_res) % PAGE_SIZE != 0) { + device_printf(dev, + "memory region not even multiple of page size\n"); + error = ENXIO; + goto error; + } + if (rman_get_start(sc->avg_res) % PAGE_SIZE != 0) { + device_printf(dev, "memory region not page-aligned\n"); + error = ENXIO; + goto error; + } } /* Device node allocation. */ From owner-p4-projects@FreeBSD.ORG Tue Jun 19 00:30:39 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D0881065673; Tue, 19 Jun 2012 00:30:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E97FB1065670 for ; Tue, 19 Jun 2012 00:30:38 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id D33158FC1A for ; Tue, 19 Jun 2012 00:30:38 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5J0Ucho041685 for ; Tue, 19 Jun 2012 00:30:38 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5J0Uc06041681 for perforce@freebsd.org; Tue, 19 Jun 2012 00:30:38 GMT (envelope-from brooks@freebsd.org) Date: Tue, 19 Jun 2012 00:30:38 GMT Message-Id: <201206190030.q5J0Uc06041681@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213108 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 00:30:39 -0000 http://p4web.freebsd.org/@@213108?ac=10 Change 213108 by brooks@brooks_ecr_current on 2012/06/19 00:30:10 Add a de4bsw device to access buttons and switches from userspace. A real GPIO interface probably makes more sense, but this was easy. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#8 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#8 (text+ko) ==== @@ -62,6 +62,17 @@ #hint.altera_avgen.0.devname="de4flash" # +# Expose the DE4 buttons and switches via an Avalon "generic" device. +# +hint.altera_avgen.0.at="nexus0" +hint.altera_avgen.0.maddr=0x7f009000 +hint.altera_avgen.0.msize=2 +hint.altera_avgen.0.width=1 +hint.altera_avgen.0.fileio="rw" +hint.altera_avgen.0.mmapio="rwx" +hint.altera_avgen.0.devname="de4bsw" + +# # General Intel StrataFlash driver # hint.isf.0.at="nexus0" From owner-p4-projects@FreeBSD.ORG Tue Jun 19 00:32:48 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A30CB1065673; Tue, 19 Jun 2012 00:32:47 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 57A9A106564A for ; Tue, 19 Jun 2012 00:32:47 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 40DD08FC16 for ; Tue, 19 Jun 2012 00:32:47 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5J0Wl7D043201 for ; Tue, 19 Jun 2012 00:32:47 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5J0Wk3m043196 for perforce@freebsd.org; Tue, 19 Jun 2012 00:32:46 GMT (envelope-from brooks@freebsd.org) Date: Tue, 19 Jun 2012 00:32:46 GMT Message-Id: <201206190032.q5J0Wk3m043196@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213109 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 00:32:48 -0000 http://p4web.freebsd.org/@@213109?ac=10 Change 213109 by brooks@brooks_ecr_current on 2012/06/19 00:32:18 Add a simple script to light and shut off each LED in turn. Affected files ... .. //depot/projects/ctsrd/beribsd/src/ctsrd/Makefile#4 edit .. //depot/projects/ctsrd/beribsd/src/ctsrd/cycle_led/Makefile#1 add .. //depot/projects/ctsrd/beribsd/src/ctsrd/cycle_led/cycle_led.sh#1 add Differences ... ==== //depot/projects/ctsrd/beribsd/src/ctsrd/Makefile#4 (text+ko) ==== @@ -1,6 +1,7 @@ .include -SUBDIR= flashit \ +SUBDIR= cycle_led \ + flashit \ pictview \ spinner From owner-p4-projects@FreeBSD.ORG Tue Jun 19 08:01:04 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4869D1065672; Tue, 19 Jun 2012 08:01:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A5CA5106564A; Tue, 19 Jun 2012 08:01:02 +0000 (UTC) (envelope-from robert.watson@cl.cam.ac.uk) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 7EA368FC08; Tue, 19 Jun 2012 08:01:02 +0000 (UTC) Received: from [192.168.2.111] (host86-182-204-28.range86-182.btcentralplus.com [86.182.204.28]) by cyrus.watson.org (Postfix) with ESMTPSA id 742DE46B88; Tue, 19 Jun 2012 04:01:01 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: "Robert N. M. Watson" In-Reply-To: <201206190029.q5J0TY7n041524@skunkworks.freebsd.org> Date: Tue, 19 Jun 2012 09:00:59 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <034862BE-2DD0-490B-9ADC-283C684B8047@cl.cam.ac.uk> References: <201206190029.q5J0TY7n041524@skunkworks.freebsd.org> To: Brooks Davis X-Mailer: Apple Mail (2.1257) Cc: Perforce Change Reviews Subject: Re: PERFORCE change 213107 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 08:01:04 -0000 On 19 Jun 2012, at 01:29, Brooks Davis wrote: > Change 213107 by brooks@brooks_ecr_current on 2012/06/19 00:28:56 >=20 > Allow non-PAGE_SIZE sized and aligned regions as long as they = are > smaller than a page. This allows us to provide trivial access = to things > like the buttons and switches bytes. For the regular read(2)/write(2) interface, non-page-aligned and -sized = regions are fine, but for mmap(2) they are problematic. Perhaps we = should allow them only if mmap(2) access isn't requested in the = device.hints configuration -- or at least device_printf() a warning = about mmap(2) being disallowed? Robert= From owner-p4-projects@FreeBSD.ORG Tue Jun 19 10:22:03 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C64F1065670; Tue, 19 Jun 2012 10:22:02 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DEB62106564A for ; Tue, 19 Jun 2012 10:22:01 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id C06398FC15 for ; Tue, 19 Jun 2012 10:22:01 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5JAM14J060948 for ; Tue, 19 Jun 2012 10:22:01 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5JAM1bi060942 for perforce@freebsd.org; Tue, 19 Jun 2012 10:22:01 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 19 Jun 2012 10:22:01 GMT Message-Id: <201206191022.q5JAM1bi060942@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213130 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 10:22:03 -0000 http://p4web.freebsd.org/@@213130?ac=10 Change 213130 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/19 10:20:58 Checkpoint CHERI CP2 userspace context management for FreeBSD/CHERI: 1. Introduce two new header files, cp2asm.h and cp2reg.h, appropriate for inclusion from both assembly and C files. 2. Centralise previously distributed definitions of CHERI_EXCEPTION_ENTER() and CHERI_EXCEPTION_RETURN() in cp2asm.h. 3. For now, maintain only a userspace cp2frame, not a kernel one, so remove nascent kernel frame from struct pcb. 4. Add new SAVE_CP2_CONTEXT() and RESTORE_CP2_CONTEXT() routines to save and restore userspace CP2 registers in the pcb. 5. Save and restore CP2 state for userspace-sourced system calls and interrupts that fire during usersapce execution. Also restore userspace CP2 state when returning from fork_trampoline(). With this change, the skeleton is in place to support capability-aware userspace programs. Refinement will undoubtably be required, and the object capability invocation exception handler is currently unimplemented in this cut. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2.c#6 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2.h#8 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2asm.h#1 add .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2reg.h#1 add .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/pcb.h#3 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/exception.S#4 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/genassym.c#2 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/swtch.S#5 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2.c#6 (text+ko) ==== @@ -465,7 +465,7 @@ { struct cp2_frame *cfp; - cfp = &td->td_pcb->pcb_ucp2frame; + cfp = &td->td_pcb->pcb_cp2frame; cp2_capability_load(CHERI_CR_CT0, &cp2_user_template); cp2_capability_store(CHERI_CR_CT0, &cfp->cf_c0); cp2_capability_store(CHERI_CR_CT0, &cfp->cf_c1); ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2.h#8 (text+ko) ==== @@ -33,55 +33,9 @@ #include /* CTASSERT */ -/* - * CHERI ISA-defined constants for capabilities. - * - * XXXRW: CHERI_UNSEALED is not currently considered part of the perms word, - * but perhaps it should be. - */ -#define CHERI_PERM_EXECUTE 0x0001 -#define CHERI_PERM_STORE_CAPABILITY 0x0002 -#define CHERI_PERM_LOAD_CAPABILITY 0x0004 -#define CHERI_PERM_STORE 0x0008 -#define CHERI_PERM_LOAD 0x0010 -#define CHERI_PERM_STORE_EPHEMERAL_CAPABILITY 0x0020 -#define CHERI_PERM_SEAL 0x0040 -#define CHERI_PERM_SET_TYPE 0x0080 -#define CHERI_PERM_RESERVED0 0x0100 -#define CHERI_PERM_RESERVED1 0x0200 -#define CHERI_PERM_ACCESS_TSC 0x0400 -#define CHERI_PERM_ACCESS_KCC 0x0800 -#define CHERI_PERM_ACCESS_KDC 0x1000 -#define CHERI_PERM_ACCESS_EPCC 0x2000 -#define CHERI_PERM_NON_EPHEMERAL 0x4000 -#define CHERI_UNSEALED 0x8000 - -/* - * XXXRW: Should this include CHERI_UNSEALED? - */ -#define CHERI_PERM_ALL \ - (CHERI_PERM_EXECUTE | CHERI_PERM_STORE_CAPABILITY | \ - CHERI_PERM_LOAD_CAPABILITY | CHERI_PERM_STORE | \ - CHERI_PERM_STORE_EPHEMERAL_CAPABILITY | CHERI_PERM_SEAL | \ - CHERI_PERM_SET_TYPE | CHERI_PERM_RESERVED0 | \ - CHERI_PERM_RESERVED1 | CHERI_PERM_ACCESS_TSC | \ - CHERI_PERM_ACCESS_KCC | CHERI_PERM_ACCESS_KDC | \ - CHERI_PERM_ACCESS_EPCC | CHERI_PERM_NON_EPHEMERAL) +#include /* - * A blend of hardware and software allocation of capability registers. - */ -#define CHERI_CR_C0 0 /* MIPS fetch/load/store capability. */ -#define CHERI_CR_CT0 10 /* CT0: temporary capability. */ -#define CHERI_CR_UDC 25 /* SC0: user data capability. */ -#define CHERI_CR_KT0 26 /* KT0: temporary kernel capability. */ -#define CHERI_CR_KT1 27 /* KT1: temporary kernel capability. */ -#define CHERI_CR_TSC 28 /* TSC: trusted stack capability. */ -#define CHERI_CR_KCC 29 /* KCC: kernel code capability. */ -#define CHERI_CR_KDC 30 /* KDC: kernel data capability. */ -#define CHERI_CR_EPCC 31 /* EPCC: exception program counter cap. */ - -/* * Canonical C-language representation of a capability. */ #define CAPABILITY_SIZE 32 @@ -101,6 +55,8 @@ * Register frame to be preserved on context switching -- very similar to * struct mips_frame. As with mips_frame, the order of save/restore is very * important for both reasons of correctness and security. + * + * Must match the register offset definitions (CHERI_*_OFF) in cp2reg.h. */ struct cp2_frame { /* c0 has special properties for MIPS load/store instructions. */ ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/pcb.h#3 (text+ko) ==== @@ -55,12 +55,9 @@ { struct trapframe pcb_regs; /* saved CPU and registers */ #ifdef CPU_CHERI - struct cp2_frame pcb_ucp2frame; + struct cp2_frame pcb_cp2frame; /* Userspace capabilities. */ #endif __register_t pcb_context[14]; /* kernel context for resume */ -#ifdef CPU_CHERI - struct cp2_frame pcb_cp2frame; -#endif void *pcb_onfault; /* for copyin/copyout faults */ register_t pcb_tpc; }; ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/exception.S#4 (text+ko) ==== @@ -62,6 +62,11 @@ #include #include +#ifdef CPU_CHERI +#include +#include +#endif + #include "opt_cputype.h" #include "assym.s" @@ -73,42 +78,8 @@ */ #define INTRCNT_COUNT 128 -#ifdef CPU_CHERI -/* - * When entering an exception handler, conditionally save the default user - * data capability. Then install the kernel's default data capability. The - * caller provides a temporary register to use for the purposes of querying - * CP0 SR to determine whether the target is userspace or the kernel. - */ -#define CHERI_EXCEPTION_ENTER(reg) \ - mfc0 reg, MIPS_COP_0_STATUS; \ - andi reg, reg, SR_KSU_USER; \ - beq reg, $0, 64f; \ - nop; \ - cmove $c25, $c0; \ -64: \ - cmove $c0, $c30; /* - * When returning from an exception, conditionally restore the default user - * data capability. The caller provides a temporary register to use for the - * purposes of querying CP0 SR to determine whether the target is userspace - * or the kernel. - */ -#define CHERI_EXCEPTION_RETURN(reg) \ - mfc0 reg, MIPS_COP_0_STATUS; \ - andi reg, reg, SR_KSU_USER; \ - beq reg, $0, 65f; \ - nop; \ - cmove $c0, $c25; \ -65: -#else -#define CHERI_EXCEPTION_ENTER(reg) -#define CHERI_EXCEPTION_RETURN(reg) -#endif - - -/* *---------------------------------------------------------------------------- * * MipsTLBMiss -- @@ -124,7 +95,9 @@ VECTOR(MipsTLBMiss, unknown) .set push .set noat +#ifdef CPU_CHERI CHERI_EXCEPTION_ENTER(k0) +#endif j MipsDoTLBMiss MFC0 k0, MIPS_COP_0_BAD_VADDR # get the fault address .set pop @@ -178,7 +151,9 @@ COP0_SYNC tlbwr #1a: write to tlb HAZARD_DELAY +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret #1f: retUrn from exception 1: j MipsTLBMissException #20: kernel exception @@ -197,7 +172,9 @@ * Find out what mode we came from and jump to the proper handler. */ .set noat +#ifdef CPU_CHERI CHERI_EXCEPTION_ENTER(k0) +#endif mfc0 k0, MIPS_COP_0_STATUS # Get the status register mfc0 k1, MIPS_COP_0_CAUSE # Get the cause register value. and k0, k0, SR_KSU_USER # test for user mode @@ -427,7 +404,9 @@ RESTORE_CPU # v0 contains the return address. sync +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret .set at END(MipsKernGenException) @@ -504,6 +483,9 @@ SAVE_U_PCB_REG(a1, CAUSE, k1) SAVE_U_PCB_REG(a2, BADVADDR, k1) SAVE_U_PCB_REG(a3, PC, k1) +#ifdef CPU_CHERI + SAVE_CP2_CONTEXT(t0, k1) +#endif REG_S a3, CALLFRAME_RA(sp) # for debugging PTR_LA gp, _C_LABEL(_gp) # switch to kernel GP # Turn off fpu and enter kernel mode @@ -553,6 +535,9 @@ or a1, a1, a0 SAVE_U_PCB_REG(a1, SR, k1) +#ifdef CPU_CHERI + RESTORE_CP2_CONTEXT(t0, k1) +#endif RESTORE_U_PCB_REG(t0, MULLO, k1) RESTORE_U_PCB_REG(t1, MULHI, k1) mtlo t0 @@ -594,7 +579,9 @@ mtc0 k0, MIPS_COP_0_STATUS # still exception level ITLBNOPFIX sync +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret .set at END(MipsUserGenException) @@ -687,7 +674,9 @@ REG_L v0, CALLFRAME_RA + KERN_REG_SIZE(sp) RESTORE_CPU # v0 contains the return address. sync +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret .set at END(MipsKernIntr) @@ -764,6 +753,9 @@ SAVE_U_PCB_REG(a0, SR, k1) SAVE_U_PCB_REG(a1, CAUSE, k1) SAVE_U_PCB_REG(a3, PC, k1) # PC in a3, note used later! +#ifdef CPU_CHERI + SAVE_CP2_CONTEXT(t0, k1) +#endif PTR_SUBU sp, k1, CALLFRAME_SIZ # switch to kernel SP PTR_LA gp, _C_LABEL(_gp) # switch to kernel GP @@ -822,6 +814,9 @@ or a1, a1, a0 SAVE_U_PCB_REG(a1, SR, k1) +#ifdef CPU_CHERI + RESTORE_CP2_CONTEXT(t0, k1) +#endif RESTORE_U_PCB_REG(s0, S0, k1) RESTORE_U_PCB_REG(s1, S1, k1) RESTORE_U_PCB_REG(s2, S2, k1) @@ -863,7 +858,9 @@ mtc0 k0, MIPS_COP_0_STATUS # SR with EXL set. ITLBNOPFIX sync +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret .set at END(MipsUserIntr) @@ -959,13 +956,17 @@ bltz k0, tlb_insert_random nop tlbwi +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret ssnop tlb_insert_random: tlbwr +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret ssnop @@ -1097,7 +1098,9 @@ COP0_SYNC tlbwr # write to tlb HAZARD_DELAY +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret # return from exception .set at END(MipsTLBMissException) @@ -1250,7 +1253,9 @@ */ .text VECTOR(MipsCache, unknown) +#ifdef CPU_CHERI CHERI_EXCEPTION_ENTER(k0) +#endif PTR_LA k0, _C_LABEL(MipsCacheException) li k1, MIPS_KSEG0_PHYS_MASK and k0, k1 @@ -1283,7 +1288,9 @@ mtc0 k0, MIPS_COP_0_STATUS # restore status COP0_SYNC +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret MSG("cache error @ EPC 0x%x CachErr 0x%x"); ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/genassym.c#2 (text+ko) ==== @@ -78,6 +78,9 @@ ASSYM(TF_REG_SR, offsetof(struct trapframe, sr)); ASSYM(U_PCB_REGS, offsetof(struct pcb, pcb_regs.zero)); +#ifdef CPU_CHERI +ASSYM(U_PCB_CP2FRAME, offsetof(struct pcb, pcb_cp2frame.cf_c0)); +#endif ASSYM(U_PCB_CONTEXT, offsetof(struct pcb, pcb_context)); ASSYM(U_PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); ASSYM(U_PCB_FPREGS, offsetof(struct pcb, pcb_regs.f0)); ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/swtch.S#5 (text+ko) ==== @@ -64,6 +64,11 @@ #include #include +#ifdef CPU_CHERI +#include +#include +#endif + #include "assym.s" .set noreorder # Noreorder is default style! @@ -92,40 +97,6 @@ #define RESTORE_U_PCB_CONTEXT(reg, offs, base) \ REG_L reg, U_PCB_CONTEXT + (SZREG * offs) (base) -#ifdef CPU_CHERI -/* - * When entering an exception handler, conditionally save the default user - * data capability. Then install the kernel's default data capability. The - * caller provides a temporary register to use for the purposes of querying - * CP0 SR to determine whether the target is userspace or the kernel. - */ -#define CHERI_EXCEPTION_ENTER(reg) \ - mfc0 reg, MIPS_COP_0_STATUS; \ - andi reg, reg, SR_KSU_USER; \ - beq reg, $0, 64f; \ - nop; \ - cmove $c25, $c0; \ -64: \ - cmove $c0, $c30; - -/* - * When returning from an exception, conditionally restore the default user - * data capability. The caller provides a temporary register to use for the - * purposes of querying CP0 SR to determine whether the target is userspace - * or the kernel. - */ -#define CHERI_EXCEPTION_RETURN(reg) \ - mfc0 reg, MIPS_COP_0_STATUS; \ - andi reg, reg, SR_KSU_USER; \ - beq reg, $0, 65f; \ - nop; \ - cmove $c0, $c25; \ -65: -#else -#define CHERI_EXCEPTION_ENTER(reg) -#define CHERI_EXCEPTION_RETURN(reg) -#endif - /* * Setup for and return to user. */ @@ -150,6 +121,9 @@ GET_CPU_PCPU(k1) PTR_L k1, PC_CURPCB(k1) +#ifdef CPU_CHERI + RESTORE_CP2_CONTEXT(t0, k1) +#endif RESTORE_U_PCB_REG(t0, MULLO, k1) RESTORE_U_PCB_REG(t1, MULHI, k1) mtlo t0 @@ -195,7 +169,9 @@ mtc0 k0, MIPS_COP_0_STATUS # switch to user mode (when eret...) HAZARD_DELAY sync +#ifdef CPU_CHERI CHERI_EXCEPTION_RETURN(k0) +#endif eret .set at END(fork_trampoline) From owner-p4-projects@FreeBSD.ORG Tue Jun 19 11:03:38 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 21EA11065676; Tue, 19 Jun 2012 11:03:37 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A9E561065675 for ; Tue, 19 Jun 2012 11:03:36 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 8B4528FC0A for ; Tue, 19 Jun 2012 11:03:36 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5JB3aHQ070397 for ; Tue, 19 Jun 2012 11:03:36 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5JB3as7070394 for perforce@freebsd.org; Tue, 19 Jun 2012 11:03:36 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 19 Jun 2012 11:03:36 GMT Message-Id: <201206191103.q5JB3as7070394@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213136 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 11:03:38 -0000 http://p4web.freebsd.org/@@213136?ac=10 Change 213136 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/19 11:03:23 Shift CHERI headers from sys/mips/cheri to sys/mips/include making them a bit more accessible. Rename them to cheri*.h from cp2*.h as well. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2.c#7 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2.h#9 delete .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2asm.h#2 delete .. //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2reg.h#2 delete .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheri.h#1 add .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheriasm.h#1 branch .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cherireg.h#1 branch .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/pcb.h#4 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/proc.h#4 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/exception.S#5 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/pm_machdep.c#4 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/swtch.S#6 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/cheri/cp2.c#7 (text+ko) ==== @@ -32,9 +32,8 @@ #include #include -#include - -#include +#include +#include /* * Beginnings of a programming interface for explicitly managing capability ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/pcb.h#4 (text+ko) ==== @@ -45,7 +45,7 @@ #include #ifdef CPU_CHERI -#include +#include #endif /* ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/proc.h#4 (text+ko) ==== @@ -40,7 +40,7 @@ #define _MACHINE_PROC_H_ #ifdef CPU_CHERI -#include +#include #endif #ifdef CPU_CNMIPS #include ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/exception.S#5 (text+ko) ==== @@ -63,8 +63,8 @@ #include #ifdef CPU_CHERI -#include -#include +#include +#include #endif #include "opt_cputype.h" ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/pm_machdep.c#4 (text+ko) ==== @@ -70,7 +70,7 @@ #include #ifdef CPU_CHERI -#include +#include #endif #define UCONTEXT_MAGIC 0xACEDBADE ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/swtch.S#6 (text+ko) ==== @@ -65,8 +65,8 @@ #include #ifdef CPU_CHERI -#include -#include +#include +#include #endif #include "assym.s" From owner-p4-projects@FreeBSD.ORG Tue Jun 19 15:54:57 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5416D1065675; Tue, 19 Jun 2012 15:54:57 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA1891065670 for ; Tue, 19 Jun 2012 15:54:56 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id A0EB98FC17 for ; Tue, 19 Jun 2012 15:54:56 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5JFsuPA032210 for ; Tue, 19 Jun 2012 15:54:56 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5JFsuab032207 for perforce@freebsd.org; Tue, 19 Jun 2012 15:54:56 GMT (envelope-from brooks@freebsd.org) Date: Tue, 19 Jun 2012 15:54:56 GMT Message-Id: <201206191554.q5JFsuab032207@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213147 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 15:54:57 -0000 http://p4web.freebsd.org/@@213147?ac=10 Change 213147 by brooks@brooks_ecr_current on 2012/06/19 15:54:00 Only setup read access to buttons and switches. Don't setup mmap, it doesn't make sense for non-PAGE_SIZE data. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#9 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_DE4.hints#9 (text+ko) ==== @@ -68,8 +68,7 @@ hint.altera_avgen.0.maddr=0x7f009000 hint.altera_avgen.0.msize=2 hint.altera_avgen.0.width=1 -hint.altera_avgen.0.fileio="rw" -hint.altera_avgen.0.mmapio="rwx" +hint.altera_avgen.0.fileio="r" hint.altera_avgen.0.devname="de4bsw" # From owner-p4-projects@FreeBSD.ORG Tue Jun 19 15:57:09 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CC56B1065673; Tue, 19 Jun 2012 15:57:08 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8E7E61065670 for ; Tue, 19 Jun 2012 15:57:08 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 765158FC19 for ; Tue, 19 Jun 2012 15:57:08 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5JFv8ch032521 for ; Tue, 19 Jun 2012 15:57:08 GMT (envelope-from brooks@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5JFv8Cr032517 for perforce@freebsd.org; Tue, 19 Jun 2012 15:57:08 GMT (envelope-from brooks@freebsd.org) Date: Tue, 19 Jun 2012 15:57:08 GMT Message-Id: <201206191557.q5JFv8Cr032517@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to brooks@freebsd.org using -f From: Brooks Davis To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213148 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 15:57:09 -0000 http://p4web.freebsd.org/@@213148?ac=10 Change 213148 by brooks@brooks_ecr_current on 2012/06/19 15:56:12 Do reject non-PAGE_SIZE aligned and sized regions if mmap is to be configured. Requested by: rwatson Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/dev/altera/avgen/altera_avgen.c#5 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/sys/dev/altera/avgen/altera_avgen.c#5 (text+ko) ==== @@ -382,7 +382,7 @@ device_printf(dev, "couldn't map memory\n"); return (ENXIO); } - if (rman_get_size(sc->avg_res) >= PAGE_SIZE) { + if (rman_get_size(sc->avg_res) >= PAGE_SIZE || str_mmapio != NULL) { if (rman_get_size(sc->avg_res) % PAGE_SIZE != 0) { device_printf(dev, "memory region not even multiple of page size\n"); From owner-p4-projects@FreeBSD.ORG Tue Jun 19 16:04:48 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9B8FC106568F; Tue, 19 Jun 2012 16:04:48 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DC071065686 for ; Tue, 19 Jun 2012 16:04:48 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 445B98FC19 for ; Tue, 19 Jun 2012 16:04:48 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5JG4mOl035105 for ; Tue, 19 Jun 2012 16:04:48 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5JG4mgb035102 for perforce@freebsd.org; Tue, 19 Jun 2012 16:04:48 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 19 Jun 2012 16:04:48 GMT Message-Id: <201206191604.q5JG4mgb035102@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213149 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jun 2012 16:04:49 -0000 http://p4web.freebsd.org/@@213149?ac=10 Change 213149 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/19 16:04:11 Tidy up of CHERI headers as we begin to create userspace BSD parts that use CHERI features (e.g., test tools): - Update header guards for renamed CHERI header files. - Protect kernel-specific definitions (and also CTASSERT()s) from userspace in CHERI headers. - Don't allow cheriasm.h to be usd from userspace as we don't currently need it there. Perhaps we will someday. Affected files ... .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheri.h#2 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheriasm.h#2 edit .. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cherireg.h#2 edit Differences ... ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheri.h#2 (text+ko) ==== @@ -28,10 +28,12 @@ * SUCH DAMAGE. */ -#ifndef _MIPS_CHERI_CP2_H_ -#define _MIPS_CHERI_CP2_H_ +#ifndef _MIPS_INCLUDE_CHERI_H_ +#define _MIPS_INCLUDE_CHERI_H_ +#ifdef _KERNEL #include /* CTASSERT */ +#endif #include @@ -49,7 +51,9 @@ uint64_t c_base; uint64_t c_length; } __packed __aligned(CAPABILITY_SIZE); +#ifdef _KERNEL CTASSERT(sizeof(struct capability) == CAPABILITY_SIZE); +#endif /* * Register frame to be preserved on context switching -- very similar to @@ -58,6 +62,7 @@ * * Must match the register offset definitions (CHERI_*_OFF) in cp2reg.h. */ +#ifdef _KERNEL struct cp2_frame { /* c0 has special properties for MIPS load/store instructions. */ struct capability cf_c0; @@ -86,6 +91,7 @@ struct capability cf_pcc; }; CTASSERT(sizeof(struct cp2_frame) == (28 * CAPABILITY_SIZE)); +#endif /* * CP2 capability register manipulation macros. @@ -318,9 +324,13 @@ void cp2_capability_set_upriv(struct capability *cp); void cp2_capability_set_null(struct capability *cp); +#ifdef _KERNEL +/* + * Kernel-specific CHERI context management functions. + */ void cp2_context_copy(struct cp2_frame *cf_destp, struct cp2_frame *cf_srcp); - void cheri_exec_setregs(struct thread *td); +#endif -#endif /* _MIPS_CHERI_CP2_H_ */ +#endif /* _MIPS_INCLUDE_CHERI_H_ */ ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cheriasm.h#2 (text+ko) ==== @@ -28,8 +28,12 @@ * SUCH DAMAGE. */ -#ifndef _MIPS_CHERI_CP2ASM_H_ -#define _MIPS_CHERI_CP2ASM_H_ +#ifndef _MIPS_INCLUDE_CHERIASM_H_ +#define _MIPS_INCLUDE_CHERIASM_H_ + +#ifndef _KERNEL +#error "no user-serviceable parts inside" +#endif /* * Assembly code to be used in CHERI exception handling and context switching. @@ -147,4 +151,4 @@ RESTORE_U_PCB_CP2REG(treg, $c25, CHERI_CR_UDC_OFF, base); \ RESTORE_U_PCB_CP2REG(treg, $c28, CHERI_CR_TSC_OFF, base) -#endif /* _MIPS_CHERI_CP2ASM_H_ */ +#endif /* _MIPS_INCLUDE_CHERIASM_H_ */ ==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/cherireg.h#2 (text+ko) ==== @@ -28,8 +28,8 @@ * SUCH DAMAGE. */ -#ifndef _MIPS_CHERI_CP2REG_H_ -#define _MIPS_CHERI_CP2REG_H_ +#ifndef _MIPS_INCLUDE_CHERIREG_H_ +#define _MIPS_INCLUDE_CHERIREG_H_ /* * CHERI ISA-defined constants for capabilities -- suitable for inclusion from @@ -139,4 +139,4 @@ #define CHERI_CR_TSC_OFF 26 #define CHERI_CR_PC_OFF 27 -#endif /* _MIPS_CHERI_CP2REG_H_ */ +#endif /* _MIPS_INCLUDE_CHERIREG_H_ */ From owner-p4-projects@FreeBSD.ORG Thu Jun 21 18:43:10 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DA5BE1065674; Thu, 21 Jun 2012 18:43:09 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 87B14106566B for ; Thu, 21 Jun 2012 18:43:09 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 6E8338FC1A for ; Thu, 21 Jun 2012 18:43:09 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5LIh9w0065966 for ; Thu, 21 Jun 2012 18:43:09 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5LIgwK0065959 for perforce@freebsd.org; Thu, 21 Jun 2012 18:42:58 GMT (envelope-from jhb@freebsd.org) Date: Thu, 21 Jun 2012 18:42:58 GMT Message-Id: <201206211842.q5LIgwK0065959@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213248 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2012 18:43:10 -0000 http://p4web.freebsd.org/@@213248?ac=10 Change 213248 by jhb@jhb_jhbbsd on 2012/06/21 18:42:37 IFC @213247 Affected files ... .. //depot/projects/smpng/share/man/man9/rmlock.9#6 integrate .. //depot/projects/smpng/share/man/man9/rwlock.9#3 integrate .. //depot/projects/smpng/sys/amd64/acpica/acpi_switch.S#7 delete .. //depot/projects/smpng/sys/amd64/acpica/acpi_wakecode.S#10 integrate .. //depot/projects/smpng/sys/amd64/acpica/acpi_wakeup.c#23 delete .. //depot/projects/smpng/sys/amd64/amd64/cpu_switch.S#33 integrate .. //depot/projects/smpng/sys/amd64/amd64/genassym.c#37 integrate .. //depot/projects/smpng/sys/amd64/amd64/mp_machdep.c#82 integrate .. //depot/projects/smpng/sys/amd64/amd64/pmap.c#122 integrate .. //depot/projects/smpng/sys/amd64/amd64/trap.c#87 integrate .. //depot/projects/smpng/sys/amd64/conf/GENERIC#101 integrate .. //depot/projects/smpng/sys/amd64/include/pcb.h#24 integrate .. //depot/projects/smpng/sys/amd64/include/pmap.h#42 integrate .. //depot/projects/smpng/sys/amd64/include/smp.h#28 integrate .. //depot/projects/smpng/sys/arm/arm/bcopyinout_xscale.S#7 integrate .. //depot/projects/smpng/sys/arm/arm/bootconfig.c#3 integrate .. //depot/projects/smpng/sys/arm/arm/busdma_machdep.c#37 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc.c#24 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm.S#5 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_arm10.S#3 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_arm11.S#2 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_arm7tdmi.S#4 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_arm8.S#4 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_arm9.S#6 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_armv4.S#4 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_armv5.S#2 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_sa1.S#4 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_xscale.S#5 integrate .. //depot/projects/smpng/sys/arm/arm/cpufunc_asm_xscale_c3.S#2 integrate .. //depot/projects/smpng/sys/arm/arm/db_disasm.c#3 integrate .. //depot/projects/smpng/sys/arm/arm/db_interface.c#9 integrate .. //depot/projects/smpng/sys/arm/arm/db_trace.c#20 integrate .. //depot/projects/smpng/sys/arm/arm/disassem.c#3 integrate .. //depot/projects/smpng/sys/arm/arm/dump_machdep.c#10 integrate .. //depot/projects/smpng/sys/arm/arm/elf_trampoline.c#27 integrate .. //depot/projects/smpng/sys/arm/arm/exception.S#7 integrate .. //depot/projects/smpng/sys/arm/arm/gdb_machdep.c#4 integrate .. //depot/projects/smpng/sys/arm/arm/in_cksum.c#8 integrate .. //depot/projects/smpng/sys/arm/arm/intr.c#23 integrate .. //depot/projects/smpng/sys/arm/arm/irq_dispatch.S#8 integrate .. //depot/projects/smpng/sys/arm/arm/machdep.c#39 integrate .. //depot/projects/smpng/sys/arm/arm/mem.c#9 integrate .. //depot/projects/smpng/sys/arm/arm/nexus.c#17 integrate .. //depot/projects/smpng/sys/arm/arm/pmap.c#68 integrate .. //depot/projects/smpng/sys/arm/arm/support.S#15 integrate .. //depot/projects/smpng/sys/arm/arm/swtch.S#20 integrate .. //depot/projects/smpng/sys/arm/arm/sys_machdep.c#9 integrate .. //depot/projects/smpng/sys/arm/arm/trap.c#34 integrate .. //depot/projects/smpng/sys/arm/arm/undefined.c#18 integrate .. //depot/projects/smpng/sys/arm/arm/vectors.S#3 integrate .. //depot/projects/smpng/sys/arm/arm/vm_machdep.c#38 integrate .. //depot/projects/smpng/sys/arm/at91/at91.c#24 integrate .. //depot/projects/smpng/sys/arm/at91/at91_machdep.c#10 integrate .. //depot/projects/smpng/sys/arm/at91/at91_mci.c#17 integrate .. //depot/projects/smpng/sys/arm/at91/at91_pio.c#11 integrate .. //depot/projects/smpng/sys/arm/at91/at91_pio_rm9200.h#3 integrate .. //depot/projects/smpng/sys/arm/at91/at91_pit.c#4 integrate .. //depot/projects/smpng/sys/arm/at91/at91_pitreg.h#2 integrate .. //depot/projects/smpng/sys/arm/at91/at91_pmc.c#13 integrate .. //depot/projects/smpng/sys/arm/at91/at91_pmcvar.h#4 integrate .. //depot/projects/smpng/sys/arm/at91/at91_reset.S#3 integrate .. //depot/projects/smpng/sys/arm/at91/at91_rst.c#3 integrate .. //depot/projects/smpng/sys/arm/at91/at91_spi.c#12 integrate .. //depot/projects/smpng/sys/arm/at91/at91_ssc.c#8 integrate .. //depot/projects/smpng/sys/arm/at91/at91_st.c#13 integrate .. //depot/projects/smpng/sys/arm/at91/at91_wdtreg.h#2 integrate .. //depot/projects/smpng/sys/arm/at91/at91reg.h#3 integrate .. //depot/projects/smpng/sys/arm/at91/at91rm9200.c#3 integrate .. //depot/projects/smpng/sys/arm/at91/at91rm92reg.h#10 integrate .. //depot/projects/smpng/sys/arm/at91/at91sam9260.c#3 integrate .. //depot/projects/smpng/sys/arm/at91/at91sam9260reg.h#3 integrate .. //depot/projects/smpng/sys/arm/at91/at91sam9g20.c#2 integrate .. //depot/projects/smpng/sys/arm/at91/at91sam9g20reg.h#4 integrate .. //depot/projects/smpng/sys/arm/at91/at91var.h#6 integrate .. //depot/projects/smpng/sys/arm/at91/board_qila9g20.c#2 integrate .. //depot/projects/smpng/sys/arm/at91/board_sam9g20ek.c#3 integrate .. //depot/projects/smpng/sys/arm/at91/files.at91#11 integrate .. //depot/projects/smpng/sys/arm/at91/files.at91sam9#4 delete .. //depot/projects/smpng/sys/arm/at91/if_macb.c#4 integrate .. //depot/projects/smpng/sys/arm/at91/std.at91#6 integrate .. //depot/projects/smpng/sys/arm/at91/std.at91sam9#4 integrate .. //depot/projects/smpng/sys/arm/at91/uart_cpu_at91rm9200usart.c#9 integrate .. //depot/projects/smpng/sys/arm/conf/AVILA#26 integrate .. //depot/projects/smpng/sys/arm/conf/BWCT#13 integrate .. //depot/projects/smpng/sys/arm/conf/CAMBRIA#18 integrate .. //depot/projects/smpng/sys/arm/conf/CNS11XXNAS#4 integrate .. //depot/projects/smpng/sys/arm/conf/CRB#11 integrate .. //depot/projects/smpng/sys/arm/conf/EP80219#15 integrate .. //depot/projects/smpng/sys/arm/conf/GUMSTIX#9 integrate .. //depot/projects/smpng/sys/arm/conf/GUMSTIX-QEMU#2 integrate .. //depot/projects/smpng/sys/arm/conf/HL200#15 integrate .. //depot/projects/smpng/sys/arm/conf/HL201#4 integrate .. //depot/projects/smpng/sys/arm/conf/IQ31244#24 integrate .. //depot/projects/smpng/sys/arm/conf/KB920X#23 integrate .. //depot/projects/smpng/sys/arm/conf/LN2410SBC#5 integrate .. //depot/projects/smpng/sys/arm/conf/NSLU#11 integrate .. //depot/projects/smpng/sys/arm/conf/QILA9G20#4 integrate .. //depot/projects/smpng/sys/arm/conf/QILA9G20.hints#2 integrate .. //depot/projects/smpng/sys/arm/conf/SAM9G20EK#4 integrate .. //depot/projects/smpng/sys/arm/conf/SAM9G20EK.hints#2 integrate .. //depot/projects/smpng/sys/arm/conf/SIMICS#20 integrate .. //depot/projects/smpng/sys/arm/econa/econa_machdep.c#4 integrate .. //depot/projects/smpng/sys/arm/include/armreg.h#11 integrate .. //depot/projects/smpng/sys/arm/include/asmacros.h#9 integrate .. //depot/projects/smpng/sys/arm/include/atags.h#1 branch .. //depot/projects/smpng/sys/arm/include/atomic.h#33 integrate .. //depot/projects/smpng/sys/arm/include/blockio.h#2 integrate .. //depot/projects/smpng/sys/arm/include/cpufunc.h#18 integrate .. //depot/projects/smpng/sys/arm/include/elf.h#12 integrate .. //depot/projects/smpng/sys/arm/include/endian.h#16 integrate .. //depot/projects/smpng/sys/arm/include/fdt.h#5 integrate .. //depot/projects/smpng/sys/arm/include/fp.h#3 integrate .. //depot/projects/smpng/sys/arm/include/frame.h#5 integrate .. //depot/projects/smpng/sys/arm/include/ieee.h#4 integrate .. //depot/projects/smpng/sys/arm/include/in_cksum.h#6 integrate .. //depot/projects/smpng/sys/arm/include/intr.h#13 integrate .. //depot/projects/smpng/sys/arm/include/katelib.h#3 integrate .. //depot/projects/smpng/sys/arm/include/machdep.h#4 integrate .. //depot/projects/smpng/sys/arm/include/param.h#17 integrate .. //depot/projects/smpng/sys/arm/include/pmap.h#36 integrate .. //depot/projects/smpng/sys/arm/include/pmc_mdep.h#6 integrate .. //depot/projects/smpng/sys/arm/include/profile.h#8 integrate .. //depot/projects/smpng/sys/arm/include/pte.h#5 integrate .. //depot/projects/smpng/sys/arm/include/resource.h#4 integrate .. //depot/projects/smpng/sys/arm/include/stack.h#2 integrate .. //depot/projects/smpng/sys/arm/include/vmparam.h#17 integrate .. //depot/projects/smpng/sys/arm/mv/mv_machdep.c#17 integrate .. //depot/projects/smpng/sys/arm/mv/mvwin.h#5 integrate .. //depot/projects/smpng/sys/arm/mv/std.mv#2 integrate .. //depot/projects/smpng/sys/arm/s3c2xx0/s3c2410reg.h#2 integrate .. //depot/projects/smpng/sys/arm/s3c2xx0/s3c2440reg.h#2 integrate .. //depot/projects/smpng/sys/arm/s3c2xx0/s3c24x0.c#3 integrate .. //depot/projects/smpng/sys/arm/s3c2xx0/s3c24x0_machdep.c#5 integrate .. //depot/projects/smpng/sys/arm/s3c2xx0/s3c24x0reg.h#3 integrate .. //depot/projects/smpng/sys/arm/sa11x0/assabet_machdep.c#26 integrate .. //depot/projects/smpng/sys/arm/sa11x0/sa11x0.c#12 integrate .. //depot/projects/smpng/sys/arm/sa11x0/sa11x0_gpioreg.h#3 integrate .. //depot/projects/smpng/sys/arm/sa11x0/sa11x0_io_asm.S#3 integrate .. //depot/projects/smpng/sys/arm/sa11x0/sa11x0_irq.S#7 integrate .. //depot/projects/smpng/sys/arm/sa11x0/sa11x0_ost.c#10 integrate .. //depot/projects/smpng/sys/arm/sa11x0/sa11x0_ostreg.h#3 integrate .. //depot/projects/smpng/sys/arm/sa11x0/sa11x0_var.h#5 integrate .. //depot/projects/smpng/sys/arm/sa11x0/uart_dev_sa1110.c#8 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/ep80219_machdep.c#13 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321.c#9 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321_aau.c#5 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321_dma.c#4 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321_intr.h#4 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321_pci.c#14 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321_space.c#7 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321_timer.c#14 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/i80321reg.h#4 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/iq31244_7seg.c#4 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/iq31244_machdep.c#32 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/iq80321.c#16 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/obio.c#6 integrate .. //depot/projects/smpng/sys/arm/xscale/i8134x/crb_machdep.c#11 integrate .. //depot/projects/smpng/sys/arm/xscale/i8134x/i81342.c#4 integrate .. //depot/projects/smpng/sys/arm/xscale/i8134x/i81342_mcu.c#3 integrate .. //depot/projects/smpng/sys/arm/xscale/i8134x/i81342_pci.c#4 integrate .. //depot/projects/smpng/sys/arm/xscale/i8134x/i81342_space.c#2 integrate .. //depot/projects/smpng/sys/arm/xscale/i8134x/i81342reg.h#2 integrate .. //depot/projects/smpng/sys/arm/xscale/i8134x/iq81342_7seg.c#3 integrate .. //depot/projects/smpng/sys/arm/xscale/i8134x/obio.c#2 integrate .. //depot/projects/smpng/sys/arm/xscale/i8134x/uart_cpu_i81342.c#2 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/avila_ata.c#9 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/avila_gpio.c#4 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/avila_machdep.c#17 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/cambria_exp_space.c#2 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/if_npe.c#19 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/if_npereg.h#3 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425.c#17 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425_iic.c#7 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425_npe.c#9 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425_npereg.h#3 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425_pci.c#10 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425_pci_space.c#2 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425_qmgr.c#8 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425_qmgr.h#3 integrate .. //depot/projects/smpng/sys/arm/xscale/ixp425/ixp425reg.h#9 integrate .. //depot/projects/smpng/sys/arm/xscale/pxa/if_smc_smi.c#2 integrate .. //depot/projects/smpng/sys/arm/xscale/pxa/pxa_machdep.c#6 integrate .. //depot/projects/smpng/sys/arm/xscale/pxa/pxareg.h#2 integrate .. //depot/projects/smpng/sys/boot/common/load_elf.c#22 integrate .. //depot/projects/smpng/sys/boot/common/load_elf_obj.c#6 integrate .. //depot/projects/smpng/sys/boot/ofw/libofw/ofw_disk.c#14 integrate .. //depot/projects/smpng/sys/boot/sparc64/loader/main.c#36 integrate .. //depot/projects/smpng/sys/boot/zfs/zfsimpl.c#16 integrate .. //depot/projects/smpng/sys/cam/ata/ata_da.c#18 integrate .. //depot/projects/smpng/sys/cam/ata/ata_pmp.c#8 integrate .. //depot/projects/smpng/sys/cam/ata/ata_xpt.c#17 integrate .. //depot/projects/smpng/sys/cam/cam.h#9 integrate .. //depot/projects/smpng/sys/cam/cam_debug.h#5 integrate .. //depot/projects/smpng/sys/cam/cam_periph.c#47 integrate .. //depot/projects/smpng/sys/cam/cam_periph.h#13 integrate .. //depot/projects/smpng/sys/cam/cam_xpt.c#81 integrate .. //depot/projects/smpng/sys/cam/cam_xpt.h#12 integrate .. //depot/projects/smpng/sys/cam/cam_xpt_periph.h#7 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_all.c#37 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_all.h#23 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_cd.c#52 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_da.c#104 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_enc.c#2 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_pass.c#30 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_pt.c#21 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_sa.c#41 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_target.c#33 integrate .. //depot/projects/smpng/sys/cam/scsi/scsi_xpt.c#12 integrate .. //depot/projects/smpng/sys/cddl/boot/zfs/zfsimpl.h#11 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/common/nvpair/fnvpair.c#1 branch .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c#1 branch .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h#1 branch .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c#5 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/Makefile.files#5 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c#21 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c#1 branch .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c#10 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c#2 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c#13 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c#12 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c#6 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c#7 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c#11 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c#6 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c#11 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c#5 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c#8 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c#3 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c#3 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c#11 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c#7 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c#9 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/bptree.h#1 branch .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h#11 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_traverse.h#5 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h#8 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h#8 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_scan.h#2 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h#9 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa_impl.h#9 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev.h#8 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h#8 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap.h#5 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfeature.h#1 branch .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h#11 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c#11 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c#6 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c#5 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c#7 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c#1 branch .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c#22 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c#21 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c#16 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h#9 integrate .. //depot/projects/smpng/sys/cddl/contrib/opensolaris/uts/common/sys/nvpair.h#4 integrate .. //depot/projects/smpng/sys/conf/NOTES#198 integrate .. //depot/projects/smpng/sys/conf/files#278 integrate .. //depot/projects/smpng/sys/conf/files.amd64#90 integrate .. //depot/projects/smpng/sys/conf/files.i386#149 integrate .. //depot/projects/smpng/sys/conf/kern.post.mk#72 integrate .. //depot/projects/smpng/sys/conf/options#195 integrate .. //depot/projects/smpng/sys/conf/options.arm#28 integrate .. //depot/projects/smpng/sys/contrib/pf/net/pf.c#48 integrate .. //depot/projects/smpng/sys/contrib/rdma/krping/krping.c#3 integrate .. //depot/projects/smpng/sys/contrib/rdma/krping/krping.h#2 integrate .. //depot/projects/smpng/sys/contrib/rdma/krping/krping_dev.c#2 integrate .. //depot/projects/smpng/sys/contrib/rdma/rdma_addr.c#4 integrate .. //depot/projects/smpng/sys/contrib/rdma/rdma_cache.c#2 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_video.c#19 integrate .. //depot/projects/smpng/sys/dev/acpica/acpivar.h#85 integrate .. //depot/projects/smpng/sys/dev/ae/if_ae.c#15 integrate .. //depot/projects/smpng/sys/dev/ahci/ahci.c#24 integrate .. //depot/projects/smpng/sys/dev/aic7xxx/aicasm/Makefile#19 integrate .. //depot/projects/smpng/sys/dev/ata/ata-all.c#114 integrate .. //depot/projects/smpng/sys/dev/ata/chipsets/ata-ite.c#7 integrate .. //depot/projects/smpng/sys/dev/ath/ath_hal/ah_desc.h#8 integrate .. //depot/projects/smpng/sys/dev/ath/ath_hal/ah_internal.h#19 integrate .. //depot/projects/smpng/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c#7 integrate .. //depot/projects/smpng/sys/dev/ath/ath_hal/ar9002/ar9287_reset.c#2 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath.c#101 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath_debug.c#5 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath_misc.h#4 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath_rx.c#2 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath_sysctl.c#8 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath_tx.c#6 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath_tx.h#4 integrate .. //depot/projects/smpng/sys/dev/ath/if_ath_tx_ht.c#7 integrate .. //depot/projects/smpng/sys/dev/ath/if_athioctl.h#27 integrate .. //depot/projects/smpng/sys/dev/ath/if_athvar.h#59 integrate .. //depot/projects/smpng/sys/dev/bge/if_bgereg.h#71 integrate .. //depot/projects/smpng/sys/dev/cxgb/common/cxgb_ctl_defs.h#4 integrate .. //depot/projects/smpng/sys/dev/cxgb/cxgb_adapter.h#26 integrate .. //depot/projects/smpng/sys/dev/cxgb/cxgb_main.c#41 integrate .. //depot/projects/smpng/sys/dev/cxgb/cxgb_offload.c#6 delete .. //depot/projects/smpng/sys/dev/cxgb/cxgb_offload.h#7 integrate .. //depot/projects/smpng/sys/dev/cxgb/cxgb_osdep.h#14 integrate .. //depot/projects/smpng/sys/dev/cxgb/cxgb_sge.c#35 integrate .. //depot/projects/smpng/sys/dev/cxgb/sys/mvec.h#10 integrate .. //depot/projects/smpng/sys/dev/cxgb/t3cdev.h#4 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c#12 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.h#2 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.c#7 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cm.h#2 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_cq.c#3 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_dbg.c#3 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ev.c#3 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.c#3 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_hal.h#2 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_ib_intfc.h#1 branch .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_mem.c#3 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c#3 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.h#2 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_qp.c#4 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c#4 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_user.h#2 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_wr.h#2 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/toecore/cxgb_toedev.h#4 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/toecore/toedev.c#4 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c#21 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_cpl_socket.c#12 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_ddp.c#9 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_defs.h#6 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_l2t.c#5 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_l2t.h#4 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_listen.c#6 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_t3_ddp.h#5 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_tcp.h#3 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.c#4 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_tcp_offload.h#3 delete .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_toepcb.h#5 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_tom.c#9 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_tom.h#4 integrate .. //depot/projects/smpng/sys/dev/cxgb/ulp/tom/cxgb_tom_sysctl.c#8 delete .. //depot/projects/smpng/sys/dev/cxgbe/adapter.h#6 integrate .. //depot/projects/smpng/sys/dev/cxgbe/common/t4_hw.c#4 integrate .. //depot/projects/smpng/sys/dev/cxgbe/offload.h#5 integrate .. //depot/projects/smpng/sys/dev/cxgbe/t4_l2t.c#3 integrate .. //depot/projects/smpng/sys/dev/cxgbe/t4_l2t.h#3 integrate .. //depot/projects/smpng/sys/dev/cxgbe/t4_main.c#7 integrate .. //depot/projects/smpng/sys/dev/cxgbe/t4_sge.c#6 integrate .. //depot/projects/smpng/sys/dev/cxgbe/tom/t4_connect.c#1 branch .. //depot/projects/smpng/sys/dev/cxgbe/tom/t4_cpl_io.c#1 branch .. //depot/projects/smpng/sys/dev/cxgbe/tom/t4_listen.c#1 branch .. //depot/projects/smpng/sys/dev/cxgbe/tom/t4_tom.c#1 branch .. //depot/projects/smpng/sys/dev/cxgbe/tom/t4_tom.h#1 branch .. //depot/projects/smpng/sys/dev/cxgbe/tom/t4_tom_l2t.c#1 branch .. //depot/projects/smpng/sys/dev/cxgbe/tom/t4_tom_l2t.h#1 branch .. //depot/projects/smpng/sys/dev/drm2/i915/i915_gem.c#2 integrate .. //depot/projects/smpng/sys/dev/fb/fbreg.h#19 integrate .. //depot/projects/smpng/sys/dev/filemon/filemon.c#1 branch .. //depot/projects/smpng/sys/dev/filemon/filemon.h#1 branch .. //depot/projects/smpng/sys/dev/filemon/filemon_lock.c#1 branch .. //depot/projects/smpng/sys/dev/filemon/filemon_wrapper.c#1 branch .. //depot/projects/smpng/sys/dev/flash/at45d.c#5 integrate .. //depot/projects/smpng/sys/dev/hptrr/hptrr_osm_bsd.c#9 integrate .. //depot/projects/smpng/sys/dev/hwpmc/hwpmc_arm.c#6 integrate .. //depot/projects/smpng/sys/dev/hwpmc/hwpmc_intel.c#10 integrate .. //depot/projects/smpng/sys/dev/isp/isp.c#69 integrate .. //depot/projects/smpng/sys/dev/isp/isp_freebsd.h#52 integrate .. //depot/projects/smpng/sys/dev/isp/isp_pci.c#68 integrate .. //depot/projects/smpng/sys/dev/isp/ispmbox.h#31 integrate .. //depot/projects/smpng/sys/dev/isp/ispreg.h#14 integrate .. //depot/projects/smpng/sys/dev/isp/ispvar.h#46 integrate .. //depot/projects/smpng/sys/dev/ispfw/asm_2400.h#4 integrate .. //depot/projects/smpng/sys/dev/ispfw/asm_2500.h#3 integrate .. //depot/projects/smpng/sys/dev/ixgbe/ixgbe.c#30 integrate .. //depot/projects/smpng/sys/dev/jme/if_jme.c#14 integrate .. //depot/projects/smpng/sys/dev/mvs/mvs.c#10 integrate .. //depot/projects/smpng/sys/dev/mvs/mvs.h#4 integrate .. //depot/projects/smpng/sys/dev/mvs/mvs_soc.c#6 integrate .. //depot/projects/smpng/sys/dev/pci/pci_pci.c#49 integrate .. //depot/projects/smpng/sys/dev/puc/puc_cfg.h#2 integrate .. //depot/projects/smpng/sys/dev/puc/pucdata.c#59 integrate .. //depot/projects/smpng/sys/dev/siis/siis.c#19 integrate .. //depot/projects/smpng/sys/dev/sym/sym_conf.h#5 integrate .. //depot/projects/smpng/sys/dev/sym/sym_hipd.c#40 integrate .. //depot/projects/smpng/sys/dev/usb/quirk/usb_quirk.c#24 integrate .. //depot/projects/smpng/sys/dev/usb/serial/uftdi.c#24 integrate .. //depot/projects/smpng/sys/dev/usb/serial/uftdi_reg.h#2 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#173 integrate .. //depot/projects/smpng/sys/dev/viawd/viawd.c#2 integrate .. //depot/projects/smpng/sys/dev/xen/balloon/balloon.c#9 integrate .. //depot/projects/smpng/sys/fs/nfsclient/nfs_clbio.c#16 integrate .. //depot/projects/smpng/sys/fs/nfsclient/nfs_clnode.c#15 integrate .. //depot/projects/smpng/sys/fs/nfsclient/nfs_clvfsops.c#19 integrate .. //depot/projects/smpng/sys/geom/multipath/g_multipath.c#13 integrate .. //depot/projects/smpng/sys/geom/part/g_part_gpt.c#24 integrate .. //depot/projects/smpng/sys/i386/acpica/acpi_wakecode.S#12 integrate .. //depot/projects/smpng/sys/i386/acpica/acpi_wakeup.c#45 delete .. //depot/projects/smpng/sys/i386/conf/GENERIC#131 integrate .. //depot/projects/smpng/sys/i386/conf/XEN#14 integrate .. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#142 integrate .. //depot/projects/smpng/sys/i386/i386/swtch.s#36 integrate .. //depot/projects/smpng/sys/i386/include/pcb.h#19 integrate .. //depot/projects/smpng/sys/i386/include/pmap.h#59 integrate .. //depot/projects/smpng/sys/i386/include/smp.h#36 integrate .. //depot/projects/smpng/sys/ia64/include/pmap.h#34 integrate .. //depot/projects/smpng/sys/kern/kern_descrip.c#141 integrate .. //depot/projects/smpng/sys/kern/kern_event.c#67 integrate .. //depot/projects/smpng/sys/kern/kern_fork.c#137 integrate .. //depot/projects/smpng/sys/kern/subr_smp.c#73 integrate .. //depot/projects/smpng/sys/kern/subr_trap.c#104 integrate .. //depot/projects/smpng/sys/kern/sys_capability.c#6 integrate .. //depot/projects/smpng/sys/kern/sys_generic.c#71 integrate .. //depot/projects/smpng/sys/kern/sys_procdesc.c#2 integrate .. //depot/projects/smpng/sys/kern/tty.c#109 integrate .. //depot/projects/smpng/sys/kern/uipc_syscalls.c#139 integrate .. //depot/projects/smpng/sys/kern/uipc_usrreq.c#99 integrate .. //depot/projects/smpng/sys/kern/vfs_default.c#75 integrate .. //depot/projects/smpng/sys/kern/vfs_syscalls.c#168 integrate .. //depot/projects/smpng/sys/kern/vfs_vnops.c#112 integrate .. //depot/projects/smpng/sys/libkern/iconv.c#17 integrate .. //depot/projects/smpng/sys/mips/include/pmap.h#24 integrate .. //depot/projects/smpng/sys/mips/rmi/rootfs_list.txt#2 integrate .. //depot/projects/smpng/sys/modules/Makefile#189 integrate .. //depot/projects/smpng/sys/modules/cxgb/Makefile#9 integrate .. //depot/projects/smpng/sys/modules/cxgb/cxgb/Makefile#12 integrate .. //depot/projects/smpng/sys/modules/cxgb/iw_cxgb/Makefile#6 integrate .. //depot/projects/smpng/sys/modules/cxgb/toecore/Makefile#4 delete .. //depot/projects/smpng/sys/modules/cxgb/tom/Makefile#6 integrate .. //depot/projects/smpng/sys/modules/cxgbe/Makefile#4 integrate .. //depot/projects/smpng/sys/modules/cxgbe/tom/Makefile#1 branch .. //depot/projects/smpng/sys/modules/filemon/Makefile#1 branch .. //depot/projects/smpng/sys/modules/rdma/krping/Makefile#2 integrate .. //depot/projects/smpng/sys/modules/toecore/Makefile#1 branch .. //depot/projects/smpng/sys/modules/zfs/Makefile#19 integrate .. //depot/projects/smpng/sys/net/bpf.c#103 integrate .. //depot/projects/smpng/sys/net/if.h#53 integrate .. //depot/projects/smpng/sys/net/if_bridge.c#72 integrate .. //depot/projects/smpng/sys/net/if_gif.c#61 integrate .. //depot/projects/smpng/sys/net/if_tap.c#58 integrate .. //depot/projects/smpng/sys/net/if_var.h#81 integrate .. //depot/projects/smpng/sys/net/if_vlan.c#80 integrate .. //depot/projects/smpng/sys/net80211/ieee80211_radiotap.c#4 integrate .. //depot/projects/smpng/sys/net80211/ieee80211_var.h#54 integrate .. //depot/projects/smpng/sys/netgraph/netflow/netflow.c#25 integrate .. //depot/projects/smpng/sys/netgraph/netflow/netflow_v9.c#3 integrate .. //depot/projects/smpng/sys/netgraph/netflow/ng_netflow.c#21 integrate .. //depot/projects/smpng/sys/netgraph/netflow/ng_netflow.h#13 integrate .. //depot/projects/smpng/sys/netinet/icmp_var.h#14 integrate .. //depot/projects/smpng/sys/netinet/if_ether.c#95 integrate .. //depot/projects/smpng/sys/netinet/if_ether.h#15 integrate .. //depot/projects/smpng/sys/netinet/in.c#79 integrate .. //depot/projects/smpng/sys/netinet/in.h#56 integrate .. //depot/projects/smpng/sys/netinet/in_pcb.c#113 integrate .. //depot/projects/smpng/sys/netinet/in_pcb.h#75 integrate .. //depot/projects/smpng/sys/netinet/ip_icmp.c#62 integrate .. //depot/projects/smpng/sys/netinet/ip_input.c#120 integrate .. //depot/projects/smpng/sys/netinet/ip_output.c#125 integrate .. //depot/projects/smpng/sys/netinet/ipfw/ip_fw_table.c#9 integrate .. //depot/projects/smpng/sys/netinet/libalias/libalias.3#8 integrate .. //depot/projects/smpng/sys/netinet/sctp_indata.c#43 integrate .. //depot/projects/smpng/sys/netinet/sctp_indata.h#15 integrate .. //depot/projects/smpng/sys/netinet/sctp_input.c#43 integrate .. //depot/projects/smpng/sys/netinet/sctp_input.h#10 integrate .. //depot/projects/smpng/sys/netinet/sctp_output.c#51 integrate .. //depot/projects/smpng/sys/netinet/sctp_output.h#20 integrate .. //depot/projects/smpng/sys/netinet/sctp_usrreq.c#45 integrate .. //depot/projects/smpng/sys/netinet/sctputil.c#52 integrate .. //depot/projects/smpng/sys/netinet/sctputil.h#26 integrate .. //depot/projects/smpng/sys/netinet/tcp_input.c#146 integrate .. //depot/projects/smpng/sys/netinet/tcp_offload.c#10 integrate .. //depot/projects/smpng/sys/netinet/tcp_offload.h#5 integrate .. //depot/projects/smpng/sys/netinet/tcp_output.c#78 integrate .. //depot/projects/smpng/sys/netinet/tcp_subr.c#135 integrate .. //depot/projects/smpng/sys/netinet/tcp_syncache.c#88 integrate .. //depot/projects/smpng/sys/netinet/tcp_syncache.h#10 integrate .. //depot/projects/smpng/sys/netinet/tcp_timer.c#59 integrate .. //depot/projects/smpng/sys/netinet/tcp_usrreq.c#94 integrate .. //depot/projects/smpng/sys/netinet/tcp_var.h#87 integrate .. //depot/projects/smpng/sys/netinet/toecore.c#1 branch .. //depot/projects/smpng/sys/netinet/toecore.h#1 branch .. //depot/projects/smpng/sys/netinet/toedev.h#4 delete .. //depot/projects/smpng/sys/netinet/udp_usrreq.c#107 integrate .. //depot/projects/smpng/sys/netinet6/in6.c#80 integrate .. //depot/projects/smpng/sys/netinet6/ip6_input.c#82 integrate .. //depot/projects/smpng/sys/netinet6/sctp6_usrreq.c#27 integrate .. //depot/projects/smpng/sys/netsmb/smb_dev.c#29 integrate .. //depot/projects/smpng/sys/ofed/drivers/infiniband/core/cma.c#4 integrate .. //depot/projects/smpng/sys/ofed/drivers/infiniband/core/iwcm.c#2 integrate .. //depot/projects/smpng/sys/ofed/include/linux/net.h#2 integrate .. //depot/projects/smpng/sys/ofed/include/net/netevent.h#2 integrate .. //depot/projects/smpng/sys/ofed/include/rdma/iw_cm.h#2 integrate .. //depot/projects/smpng/sys/powerpc/include/pmap.h#38 integrate .. //depot/projects/smpng/sys/sparc64/include/pmap.h#44 integrate .. //depot/projects/smpng/sys/sys/cdefs.h#51 integrate .. //depot/projects/smpng/sys/sys/file.h#37 integrate .. //depot/projects/smpng/sys/sys/filedesc.h#37 integrate .. //depot/projects/smpng/sys/sys/kernel.h#51 integrate .. //depot/projects/smpng/sys/sys/smp.h#29 integrate .. //depot/projects/smpng/sys/sys/vnode.h#121 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_softdep.c#94 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_vnops.c#74 integrate .. //depot/projects/smpng/sys/vm/pmap.h#41 integrate .. //depot/projects/smpng/sys/vm/swap_pager.c#93 integrate .. //depot/projects/smpng/sys/vm/vm_map.c#119 integrate .. //depot/projects/smpng/sys/vm/vm_page.c#127 integrate .. //depot/projects/smpng/sys/vm/vm_page.h#60 integrate .. //depot/projects/smpng/sys/vm/vm_pageout.c#89 integrate .. //depot/projects/smpng/sys/vm/vnode_pager.c#85 integrate .. //depot/projects/smpng/sys/x86/acpica/acpi_wakeup.c#1 branch Differences ... ==== //depot/projects/smpng/share/man/man9/rmlock.9#6 (text+ko) ==== @@ -23,10 +23,10 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man9/rmlock.9,v 1.8 2012/03/29 05:02:12 eadler Exp $ +.\" $FreeBSD: src/share/man/man9/rmlock.9,v 1.9 2012/06/08 21:30:35 jhb Exp $ .\" .\" Based on rwlock.9 man page -.Dd November 16, 2011 +.Dd June 8, 2012 .Dt RMLOCK 9 .Os .Sh NAME @@ -41,7 +41,7 @@ .Nm rm_wunlock , .Nm rm_wowned , .Nm RM_SYSINIT -.Nd kernel reader/writer lock optimized for mostly read access patterns +.Nd kernel reader/writer lock optimized for read-mostly access patterns .Sh SYNOPSIS .In sys/param.h .In sys/lock.h @@ -67,7 +67,7 @@ .In sys/kernel.h .Fn RM_SYSINIT "name" "struct rmlock *rm" "const char *desc" "int opts" .Sh DESCRIPTION -Mostly reader locks allow shared access to protected data by multiple threads, +Read-mostly locks allow shared access to protected data by multiple threads, or exclusive access by a single thread. The threads with shared access are known as .Em readers @@ -76,83 +76,82 @@ .Em writer since it can modify protected data. .Pp -Read mostly locks are designed to be efficient for locks almost exclusively +Read-mostly locks are designed to be efficient for locks almost exclusively used as reader locks and as such should be used for protecting data that rarely changes. -Acquiring an exclusive lock after the lock had been locked for shared access +Acquiring an exclusive lock after the lock has been locked for shared access is an expensive operation. .Pp -Although reader/writer locks look very similar to -.Xr sx 9 -locks, their usage pattern is different. -Reader/writer locks can be treated as mutexes (see -.Xr mutex 9 ) -with shared/exclusive semantics unless initialized with -.Dv RM_SLEEPABLE . +Normal read-mostly locks are similar to +.Xr rwlock 9 +locks and follow the same lock ordering rules as +.Xr rwlock 9 +locks. +Read-mostly locks have full priority propagation like mutexes. Unlike -.Xr sx 9 , -an -.Nm -can be locked while holding a non-spin mutex, and an -.Nm -cannot be held while sleeping, again unless initialized with -.Dv RM_SLEEPABLE . -The -.Nm -locks have full priority propagation like mutexes. -The +.Xr rwlock 9 , +read-mostly locks propagate priority to both readers and writers. +This is implemented via the .Va rm_priotracker -structure argument supplied in +structure argument supplied to .Fn rm_rlock and -.Fn rm_runlock -is used to keep track of the read owner(s). -Another important property is that shared holders of -.Nm -can recurse if the lock has been initialized with the -.Dv LO_RECURSABLE -option, however exclusive locks are not allowed to recurse. +.Fn rm_runlock . +Readers can recurse if the lock is initialized with the +.Dv RM_RECURSE +option; +however, writers are never allowed to recurse. +.Pp +Sleepable read-mostly locks are created by passing +.Dv RM_SLEEPABLE +to +.Fn rm_init_flags . +Unlike normal read-mostly locks, +sleepable read-mostly locks follow the same lock ordering rules as +.Xr sx 9 +locks. +Sleepable read-mostly locks do not propagate priority to writers, +but they do propagate priority to readers. +Writers are permitted to sleep while holding a read-mostly lock, +but readers are not. +Unlike other sleepable locks such as +.Xr sx 9 +locks, +readers must use try operations on other sleepable locks to avoid sleeping. .Ss Macros and Functions .Bl -tag -width indent .It Fn rm_init "struct rmlock *rm" "const char *name" -Initialize structure located at -.Fa rm -as mostly reader lock, described by -.Fa name . -The name description is used solely for debugging purposes. +Initialize the read-mostly lock +.Fa rm . +The +.Fa name +description is used solely for debugging purposes. This function must be called before any other operations on the lock. .It Fn rm_init_flags "struct rmlock *rm" "const char *name" "int opts" -Initialize the rm lock just like the -.Fn rm_init -function, but specifying a set of optional flags to alter the -behaviour of -.Fa rm , -through the +Similar to +.Fn rm_init , +initialize the read-mostly lock +.Fa rm +with a set of optional flags. +The .Fa opts -argument. -It contains one or more of the following flags: +arguments contains one or more of the following flags: .Bl -tag -width ".Dv RM_NOWITNESS" .It Dv RM_NOWITNESS Instruct .Xr witness 4 to ignore this lock. .It Dv RM_RECURSE -Allow threads to recursively acquire exclusive locks for +Allow threads to recursively acquire shared locks for .Fa rm . .It Dv RM_SLEEPABLE -Allow writers to sleep while holding the lock. -Readers must not sleep while holding the lock and can avoid to sleep on -taking the lock by using -.Fn rm_try_rlock -instead of -.Fn rm_rlock . +Create a sleepable read-mostly lock. .El .It Fn rm_rlock "struct rmlock *rm" "struct rm_priotracker* tracker" Lock .Fa rm -as a reader. -Using +as a reader using .Fa tracker to track read owners of a lock for priority propagation. This data structure is only used internally by @@ -161,28 +160,32 @@ .Fn rm_runlock has been called. This data structure can be allocated on the stack since -rmlocks cannot be held while sleeping. +readers cannot sleep. If any thread holds this lock exclusively, the current thread blocks, and its priority is propagated to the exclusive holder. If the lock was initialized with the -.Dv LO_RECURSABLE +.Dv RM_RECURSE option the .Fn rm_rlock -function can be called when the thread has already acquired reader +function can be called when the current thread has already acquired reader access on .Fa rm . -This is called -.Dq "recursing on a lock" . .It Fn rm_try_rlock "struct rmlock *rm" "struct rm_priotracker* tracker" Try to lock .Fa rm as a reader. .Fn rm_try_rlock will return 0 if the lock cannot be acquired immediately; -otherwise the lock will be acquired and a non-zero value will be returned. +otherwise, +the lock will be acquired and a non-zero value will be returned. Note that .Fn rm_try_rlock may fail even while the lock is not currently held by a writer. +If the lock was initialized with the +.Dv RM_RECURSE +option, +.Fn rm_try_rlock +will succeed if the current thread has already acquired reader access. .It Fn rm_wlock "struct rmlock *rm" Lock .Fa rm ==== //depot/projects/smpng/share/man/man9/rwlock.9#3 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/share/man/man9/rwlock.9,v 1.16 2011/11/16 21:51:17 pjd Exp $ +.\" $FreeBSD: src/share/man/man9/rwlock.9,v 1.17 2012/06/06 13:35:30 jhb Exp $ .\" .Dd November 16, 2011 .Dt RWLOCK 9 @@ -114,12 +114,10 @@ The .Nm locks have priority propagation like mutexes, but priority -can be propagated only to an exclusive holder. -This limitation comes from the fact that shared owners +can be propagated only to writers. +This limitation comes from the fact that readers are anonymous. -Another important property is that shared holders of -.Nm -can recurse, +Another important property is that readers can always recurse, and exclusive locks can be made recursive selectively. .Ss Macros and Functions .Bl -tag -width indent ==== //depot/projects/smpng/sys/amd64/acpica/acpi_wakecode.S#10 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/acpica/acpi_wakecode.S,v 1.13 2012/02/15 22:10:33 jkim Exp $ + * $FreeBSD: src/sys/amd64/acpica/acpi_wakecode.S,v 1.15 2012/06/13 22:53:56 jkim Exp $ */ #include @@ -219,10 +219,14 @@ mov $bootdata64 - bootgdt, %eax mov %ax, %ds - /* Restore arguments and return. */ - movq wakeup_kpml4 - wakeup_start(%rbx), %rdi - movq wakeup_ctx - wakeup_start(%rbx), %rsi - movq wakeup_retaddr - wakeup_start(%rbx), %rax + /* Restore arguments. */ + movq wakeup_pcb - wakeup_start(%rbx), %rdi + movq wakeup_ret - wakeup_start(%rbx), %rax + + /* Restore GDT. */ + lgdt wakeup_gdt - wakeup_start(%rbx) + + /* Jump to return address. */ jmp *%rax .data @@ -268,34 +272,11 @@ .long bootgdt - wakeup_start /* Offset plus %ds << 4 */ ALIGN_DATA -wakeup_retaddr: - .quad 0 -wakeup_kpml4: - .quad 0 - -wakeup_ctx: - .quad 0 wakeup_pcb: .quad 0 -wakeup_fpusave: +wakeup_ret: .quad 0 wakeup_gdt: .word 0 .quad 0 - - ALIGN_DATA -wakeup_efer: - .quad 0 -wakeup_star: - .quad 0 -wakeup_lstar: - .quad 0 -wakeup_cstar: - .quad 0 -wakeup_sfmask: - .quad 0 -wakeup_xsmask: - .quad 0 -wakeup_cpu: - .long 0 dummy: ==== //depot/projects/smpng/sys/amd64/amd64/cpu_switch.S#33 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.183 2012/02/27 17:28:22 jhb Exp $ + * $FreeBSD: src/sys/amd64/amd64/cpu_switch.S,v 1.186 2012/06/13 22:53:56 jkim Exp $ */ #include @@ -357,6 +357,30 @@ rdmsr movl %eax,PCB_KGSBASE(%rdi) movl %edx,PCB_KGSBASE+4(%rdi) + movl $MSR_EFER,%ecx + rdmsr + movl %eax,PCB_EFER(%rdi) + movl %edx,PCB_EFER+4(%rdi) + movl $MSR_STAR,%ecx + rdmsr + movl %eax,PCB_STAR(%rdi) + movl %edx,PCB_STAR+4(%rdi) + movl $MSR_LSTAR,%ecx + rdmsr + movl %eax,PCB_LSTAR(%rdi) + movl %edx,PCB_LSTAR+4(%rdi) + movl $MSR_CSTAR,%ecx + rdmsr + movl %eax,PCB_CSTAR(%rdi) + movl %edx,PCB_CSTAR+4(%rdi) + movl $MSR_SF_MASK,%ecx + rdmsr + movl %eax,PCB_SFMASK(%rdi) + movl %edx,PCB_SFMASK+4(%rdi) + movl xsave_mask,%eax + movl %eax,PCB_XSMASK(%rdi) + movl xsave_mask+4,%eax + movl %eax,PCB_XSMASK+4(%rdi) sgdt PCB_GDT(%rdi) sidt PCB_IDT(%rdi) @@ -370,6 +394,142 @@ END(savectx) /* + * resumectx(pcb) + * Resuming processor state from pcb. + */ +ENTRY(resumectx) + /* Switch to KPML4phys. */ + movq KPML4phys,%rax + movq %rax,%cr3 + + /* Force kernel segment registers. */ + movl $KDSEL,%eax + movw %ax,%ds + movw %ax,%es + movw %ax,%ss + movl $KUF32SEL,%eax + movw %ax,%fs + movl $KUG32SEL,%eax + movw %ax,%gs + + movl $MSR_FSBASE,%ecx + movl PCB_FSBASE(%rdi),%eax + movl 4 + PCB_FSBASE(%rdi),%edx + wrmsr + movl $MSR_GSBASE,%ecx + movl PCB_GSBASE(%rdi),%eax + movl 4 + PCB_GSBASE(%rdi),%edx + wrmsr + movl $MSR_KGSBASE,%ecx + movl PCB_KGSBASE(%rdi),%eax + movl 4 + PCB_KGSBASE(%rdi),%edx + wrmsr + + /* Restore EFER. */ + movl $MSR_EFER,%ecx + movl PCB_EFER(%rdi),%eax + wrmsr + + /* Restore fast syscall stuff. */ + movl $MSR_STAR,%ecx + movl PCB_STAR(%rdi),%eax + movl 4 + PCB_STAR(%rdi),%edx + wrmsr + movl $MSR_LSTAR,%ecx + movl PCB_LSTAR(%rdi),%eax + movl 4 + PCB_LSTAR(%rdi),%edx + wrmsr + movl $MSR_CSTAR,%ecx + movl PCB_CSTAR(%rdi),%eax + movl 4 + PCB_CSTAR(%rdi),%edx + wrmsr + movl $MSR_SF_MASK,%ecx + movl PCB_SFMASK(%rdi),%eax + wrmsr + + /* Restore CR0 except for FPU mode. */ + movq PCB_CR0(%rdi),%rax + andq $~(CR0_EM | CR0_TS),%rax + movq %rax,%cr0 + + /* Restore CR2, CR4 and CR3. */ + movq PCB_CR2(%rdi),%rax + movq %rax,%cr2 + movq PCB_CR4(%rdi),%rax + movq %rax,%cr4 + movq PCB_CR3(%rdi),%rax + movq %rax,%cr3 + + /* Restore descriptor tables. */ + lidt PCB_IDT(%rdi) + lldt PCB_LDT(%rdi) + +#define SDT_SYSTSS 9 +#define SDT_SYSBSY 11 + + /* Clear "task busy" bit and reload TR. */ + movq PCPU(TSS),%rax + andb $(~SDT_SYSBSY | SDT_SYSTSS),5(%rax) + movw PCB_TR(%rdi),%ax + ltr %ax + +#undef SDT_SYSTSS +#undef SDT_SYSBSY + + /* Restore debug registers. */ + movq PCB_DR0(%rdi),%rax + movq %rax,%dr0 + movq PCB_DR1(%rdi),%rax + movq %rax,%dr1 + movq PCB_DR2(%rdi),%rax + movq %rax,%dr2 + movq PCB_DR3(%rdi),%rax + movq %rax,%dr3 + movq PCB_DR6(%rdi),%rax + movq %rax,%dr6 + movq PCB_DR7(%rdi),%rax + movq %rax,%dr7 + + /* Restore FPU state. */ + fninit + movq PCB_FPUSUSPEND(%rdi),%rbx + movq PCB_XSMASK(%rdi),%rax + testq %rax,%rax + jz 1f + movq %rax,%rdx + shrq $32,%rdx + movl $XCR0,%ecx +/* xsetbv */ + .byte 0x0f, 0x01, 0xd1 +/* xrstor (%rbx) */ + .byte 0x0f, 0xae, 0x2b + jmp 2f +1: + fxrstor (%rbx) +2: + + /* Reload CR0. */ + movq PCB_CR0(%rdi),%rax + movq %rax,%cr0 + + /* Restore other callee saved registers. */ + movq PCB_R15(%rdi),%r15 + movq PCB_R14(%rdi),%r14 + movq PCB_R13(%rdi),%r13 + movq PCB_R12(%rdi),%r12 + movq PCB_RBP(%rdi),%rbp + movq PCB_RSP(%rdi),%rsp + movq PCB_RBX(%rdi),%rbx + + /* Restore return address. */ + movq PCB_RIP(%rdi),%rax + movq %rax,(%rsp) + + xorl %eax,%eax + ret +END(resumectx) + +/* * Wrapper around fpusave to care about TS0_CR. */ ENTRY(ctx_fpusave) ==== //depot/projects/smpng/sys/amd64/amd64/genassym.c#37 (text+ko) ==== @@ -33,7 +33,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Jun 22 12:45:08 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CA4071065673; Fri, 22 Jun 2012 12:45:07 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8C3D1106564A for ; Fri, 22 Jun 2012 12:45:07 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 6BC488FC18 for ; Fri, 22 Jun 2012 12:45:07 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5MCj7pZ082517 for ; Fri, 22 Jun 2012 12:45:07 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5MCj7Jb082514 for perforce@freebsd.org; Fri, 22 Jun 2012 12:45:07 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Fri, 22 Jun 2012 12:45:07 GMT Message-Id: <201206221245.q5MCj7Jb082514@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213289 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2012 12:45:08 -0000 http://p4web.freebsd.org/@@213289?ac=10 Change 213289 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/22 12:45:03 Add the CTSRD-local images directory to the mtree for /usr/share so that installworld auto-creates the directory in the target tree. Affected files ... .. //depot/projects/ctsrd/beribsd/src/etc/mtree/BSD.usr.dist#2 edit Differences ... ==== //depot/projects/ctsrd/beribsd/src/etc/mtree/BSD.usr.dist#2 (text+ko) ==== @@ -322,6 +322,8 @@ fortune .. .. + images + .. info .. i18n From owner-p4-projects@FreeBSD.ORG Sat Jun 23 00:16:50 2012 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AFDB11065673; Sat, 23 Jun 2012 00:16:49 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 669B4106564A for ; Sat, 23 Jun 2012 00:16:49 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [IPv6:2001:4f8:fff6::2d]) by mx1.freebsd.org (Postfix) with ESMTP id 4DE068FC12 for ; Sat, 23 Jun 2012 00:16:49 +0000 (UTC) Received: from skunkworks.freebsd.org (localhost [127.0.0.1]) by skunkworks.freebsd.org (8.14.4/8.14.4) with ESMTP id q5N0GnYx021312 for ; Sat, 23 Jun 2012 00:16:49 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.4/8.14.4/Submit) id q5N0GnAf021309 for perforce@freebsd.org; Sat, 23 Jun 2012 00:16:49 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Sat, 23 Jun 2012 00:16:49 GMT Message-Id: <201206230016.q5N0GnAf021309@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Precedence: bulk Cc: Subject: PERFORCE change 213315 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jun 2012 00:16:50 -0000 http://p4web.freebsd.org/@@213315?ac=10 Change 213315 by rwatson@rwatson_svr_ctsrd_mipsbuild on 2012/06/23 00:15:50 Introduce a new BERI_SIM kernel configuration for FreeBSD/beri, which includes neither tPad- nor DE4-specific devices (e.g., no touch screen and no Intel StrataFlash), while retaining devices accurately or usefully simulated in PISM, such as the Altera JTAG UART and Altera University Program SD Card IP core. Affected files ... .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_SIM.hints#1 add .. //depot/projects/ctsrd/beribsd/src/sys/mips/conf/BERI_SIM_MDROOT#1 add Differences ...