Date: Tue, 16 Sep 2003 18:41:21 -0700 (PDT) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org 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 Message-ID: <200309170141.h8H1fLcR021831@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200309170141.h8H1fLcR021831>