From owner-cvs-all@FreeBSD.ORG Tue Sep 16 18:41:22 2003 Return-Path: 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 4ECAD16A4B3; Tue, 16 Sep 2003 18:41:22 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C969243FD7; Tue, 16 Sep 2003 18:41:21 -0700 (PDT) (envelope-from marcel@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h8H1fL0U021833; Tue, 16 Sep 2003 18:41:21 -0700 (PDT) (envelope-from marcel@repoman.freebsd.org) Received: (from marcel@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h8H1fLcR021831; Tue, 16 Sep 2003 18:41:21 -0700 (PDT) Message-Id: <200309170141.h8H1fLcR021831@repoman.freebsd.org> From: Marcel Moolenaar Date: Tue, 16 Sep 2003 18:41:21 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/uart uart_bus.h uart_core.c uart_dev_i8251.c uart_dev_ns8250.c uart_dev_sab82532.c uart_dev_z8530.c uart_if.m X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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, 17 Sep 2003 01:41:22 -0000 marcel 2003/09/16 18:41:21 PDT FreeBSD src repository Modified files: sys/dev/uart uart_bus.h uart_core.c uart_dev_i8251.c uart_dev_ns8250.c uart_dev_sab82532.c uart_dev_z8530.c uart_if.m Log: Add locking to the hardware drivers. I intended to figure out more precisely where locking would be needed before adding it, but it seems uart(4) draws slightly too much attention to have it without locking for too long. The lock added is a spinlock that protects access to the underlying hardware. As a first and obvious stab at this, each method of the hardware interface grabs the lock. Roughly speaking this serializes the methods. Exceptions are the probe, attach and detach methods. Revision Changes Path 1.3 +2 -0 src/sys/dev/uart/uart_bus.h 1.3 +2 -0 src/sys/dev/uart/uart_core.c 1.2 +33 -9 src/sys/dev/uart/uart_dev_i8251.c 1.4 +33 -9 src/sys/dev/uart/uart_dev_ns8250.c 1.3 +24 -4 src/sys/dev/uart/uart_dev_sab82532.c 1.3 +20 -5 src/sys/dev/uart/uart_dev_z8530.c 1.2 +3 -0 src/sys/dev/uart/uart_if.m