From owner-freebsd-arch@freebsd.org Mon May 8 18:33:47 2017 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3A76D63C23 for ; Mon, 8 May 2017 18:33:47 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp.infotel.ru (corp.infotel.ru [195.170.219.3]) by mx1.freebsd.org (Postfix) with ESMTP id 519E61F47 for ; Mon, 8 May 2017 18:33:46 +0000 (UTC) (envelope-from vladimir@kondratyev.su) Received: from corp (corp.infotel.ru [195.170.219.3]) by corp.infotel.ru (Postfix) with ESMTP id C583E1B882 for ; Mon, 8 May 2017 21:33:38 +0300 (MSK) X-Virus-Scanned: amavisd-new at corp.infotel.ru Received: from corp.infotel.ru ([195.170.219.3]) by corp (corp.infotel.ru [195.170.219.3]) (amavisd-new, port 10024) with ESMTP id 6K-anMc9zx41 for ; Mon, 8 May 2017 21:33:37 +0300 (MSK) Received: from mail.cicgroup.ru (unknown [195.170.219.74]) by corp.infotel.ru (Postfix) with ESMTP id C2AE61B87C for ; Mon, 8 May 2017 21:33:37 +0300 (MSK) Received: from mail.cicgroup.ru (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTP id E7D70574ABD for ; Mon, 8 May 2017 21:33:36 +0300 (MSK) X-Virus-Scanned: amavisd-new at cicgroup.ru Received: from mail.cicgroup.ru ([127.0.0.1]) by mail.cicgroup.ru (mail.cicgroup.ru [127.0.0.1]) (amavisd-new, port 10024) with SMTP id gNKNKmKYjVwM for ; Mon, 8 May 2017 21:33:34 +0300 (MSK) Received: from localhost (localhost [127.0.0.1]) by mail.cicgroup.ru (Postfix) with ESMTPA id 63D58574A91 for ; Mon, 8 May 2017 21:33:34 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 08 May 2017 21:33:34 +0300 From: Vladimir Kondratyev To: freebsd-arch@freebsd.org Subject: psm(4) & atkbdc(4) locking Message-ID: X-Sender: vladimir@kondratyev.su User-Agent: Roundcube Webmail/1.2.2 X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 May 2017 18:33:47 -0000 Hi All In order to implement evdev support in psm(4) driver I`m going to add mutexes to psm and atkbdc drivers and mark psm interrupt and cdev handlers MPSAFE. Atkbd(4) is depending on Giant like before. Locking of these drivers seems to be low-hanging fruit as spl() calls are still in place but it has not occurred. Does someone know why it is not done yet? For reasons other than "Nobody took care of it"? Any hidden traps? Patches can be found here: https://reviews.freebsd.org/D10263 (atkbdc, serialize hw registers access) https://reviews.freebsd.org/D10264 (psm, serialize softc access, mark interrupt and cdev handlers MPSAFE) -- WBR Vladimir Kondratyev