From owner-freebsd-arch@freebsd.org Mon May 8 18:39:04 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 19276D63E8B for ; Mon, 8 May 2017 18:39:04 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BDD0A16F2 for ; Mon, 8 May 2017 18:39:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id f102so55450521ioi.2 for ; Mon, 08 May 2017 11:39:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=1IdFQODmytpB5aaEH+kz8LNe/Q2cM/B9T6GU+br1lZE=; b=G/FgTCn7nC5dioRJGgBSyDR8wc8J92gmT4EFtCzkkFXAFotkAbL80laGTcLYZnAJxu ni+5+yWH/r3EjddKpfdms45PvjfnX1IrR0AIuK900XKbGDpGQn6iN0We1E9RBYqujp73 MNRUHd5/LcOQvNRXYXyKK+jZhcyPsZNaq49gVV+ngC+9wtsJ7ICjJE4r0Sslxipwshn9 oxcq86fpDFRPOd8n3+k5Hyhsue66HlgUYANLoQfTPahRS7lhU6LhMLv/YrYCVIwMWKJz MTIT7uU2P0raEAn2bk5XVMdepZpqfnpxj1/n8gJXB2U6JGSAxH7LHJ5eLUGTkmAMKfmC pqIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=1IdFQODmytpB5aaEH+kz8LNe/Q2cM/B9T6GU+br1lZE=; b=E+BSWu2SVcvjB1JF8ohkba5zE+wLssKWCKh1ENe/XnMkWd4H/uf2s6HI22V644NOgu syImTcN/rvymWd/xOWjJxPI5TWU1NFGOb/m+Kv7rmY8PKTX7PE1+7znv7ldUq0VZjspN ymtN+obTqs0qUHPxPLKxe1kkc6OWRD3ydxpQeX9JpLkp5ntlmKusGYJKydXHCkbpxyKW u/C/u9upZkbAdbJ3d1Bn71ryoxclDnGZgdZqlBChvmdpvlPGmCMJdE8OeVP64gxh+u9W RqqI3HYOjlXggryvE8HqEfA/62DrmyoKzfe+sswD3yuV1X54rxcTz0JFB+jCTmMNpc3I zPmQ== X-Gm-Message-State: AN3rC/4qkocqESv+XZE3AwVlqrcap6CwqX6sy/H00C09YNQ3t4vnmXpk D052R1qaP28nelZOh5Pr4aMVoqTKXg== X-Received: by 10.107.188.69 with SMTP id m66mr26719924iof.148.1494268742964; Mon, 08 May 2017 11:39:02 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.126.6 with HTTP; Mon, 8 May 2017 11:39:02 -0700 (PDT) X-Originating-IP: [2607:fb10:7021:1::333f] In-Reply-To: References: From: Warner Losh Date: Mon, 8 May 2017 12:39:02 -0600 X-Google-Sender-Auth: nUP--lUujce5_qy6bStK30QQCxE Message-ID: Subject: Re: psm(4) & atkbdc(4) locking To: Vladimir Kondratyev Cc: "freebsd-arch@freebsd.org" Content-Type: text/plain; charset=UTF-8 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:39:04 -0000 On Mon, May 8, 2017 at 12:33 PM, Vladimir Kondratyev wrote: > 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? Working rock-solid reliably in ddb(4) is what tripped me up when I started down this path 10 years ago. Understanding all the rules for that was a bridge too far for me given the time I had for the project then. If you have that covered (I haven't looked at the diffs yet), you're golden. Warner > 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 > _______________________________________________ > freebsd-arch@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arch > To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"