From owner-cvs-all@FreeBSD.ORG Wed Nov 2 18:01:05 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E856C16A41F; Wed, 2 Nov 2005 18:01:05 +0000 (GMT) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75CF143D48; Wed, 2 Nov 2005 18:01:05 +0000 (GMT) (envelope-from wpaul@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id jA2I158A000119; Wed, 2 Nov 2005 18:01:05 GMT (envelope-from wpaul@repoman.freebsd.org) Received: (from wpaul@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id jA2I15Hn000118; Wed, 2 Nov 2005 18:01:05 GMT (envelope-from wpaul) Message-Id: <200511021801.jA2I15Hn000118@repoman.freebsd.org> From: Bill Paul Date: Wed, 2 Nov 2005 18:01:05 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/compat/ndis kern_ndis.c kern_windrv.c ndis_var.h subr_ndis.c subr_ntoskrnl.c winx32_wrap.S src/sys/dev/if_ndis if_ndis.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2005 18:01:06 -0000 wpaul 2005-11-02 18:01:05 UTC FreeBSD src repository Modified files: sys/compat/ndis kern_ndis.c kern_windrv.c ndis_var.h subr_ndis.c subr_ntoskrnl.c winx32_wrap.S sys/dev/if_ndis if_ndis.c Log: Tests with my dual Opteron system have shown that it's possible for code to start out on one CPU when thunking into Windows mode in ctxsw_utow(), and then be pre-empted and migrated to another CPU before thunking back to UNIX mode in ctxsw_wtou(). This is bad, because then we can end up looking at the wrong 'thread environment block' when trying to come back to UNIX mode. To avoid this, we now pin ourselves to the current CPU when thunking into Windows code. Few other cleanups, since I'm here: - Get rid of the ndis_isr(), ndis_enable_interrupt() and ndis_disable_interrupt() wrappers from kern_ndis.c and just invoke the miniport's methods directly in the interrupt handling routines in subr_ndis.c. We may as well lose the function call overhead, since we don't need to export these things outside of ndis.ko now anyway. - Remove call to ndis_enable_interrupt() from ndis_init() in if_ndis.c. We don't need to do it there anyway (the miniport init routine handles it, if needed). - Fix the logic in NdisWriteErrorLogEntry() a little. - Change some NDIS_STATUS_xxx codes in subr_ntoskrnl.c into STATUS_xxx codes. - Handle kthread_create() failure correctly in PsCreateSystemThread(). Revision Changes Path 1.91 +4 -66 src/sys/compat/ndis/kern_ndis.c 1.13 +7 -2 src/sys/compat/ndis/kern_windrv.c 1.45 +0 -3 src/sys/compat/ndis/ndis_var.h 1.99 +23 -16 src/sys/compat/ndis/subr_ndis.c 1.81 +13 -9 src/sys/compat/ndis/subr_ntoskrnl.c 1.4 +8 -0 src/sys/compat/ndis/winx32_wrap.S 1.113 +0 -3 src/sys/dev/if_ndis/if_ndis.c