summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/sio.c
Commit message (Collapse)AuthorAgeFilesLines
* Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere().jhibbits2016-02-271-6/+6
| | | | | | | | Most calls to bus_alloc_resource() use "anywhere" as the range, with a given count. Migrate these to use the new bus_alloc_resource_anywhere() API. Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D5370
* Pull in r267961 and r267973 again. Fix for issues reported will follow.hselasky2014-06-281-1/+1
|
* Revert r267961, r267973:gjb2014-06-271-1/+1
| | | | | | | | | | These changes prevent sysctl(8) from returning proper output, such as: 1) no output from sysctl(8) 2) erroneously returning ENOMEM with tools like truss(1) or uname(1) truss: can not get etype: Cannot allocate memory
* Extend the meaning of the CTLFLAG_TUN flag to automatically check ifhselasky2014-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | there is an environment variable which shall initialize the SYSCTL during early boot. This works for all SYSCTL types both statically and dynamically created ones, except for the SYSCTL NODE type and SYSCTLs which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to be used in the case a tunable sysctl has a custom initialisation function allowing the sysctl to still be marked as a tunable. The kernel SYSCTL API is mostly the same, with a few exceptions for some special operations like iterating childrens of a static/extern SYSCTL node. This operation should probably be made into a factored out common macro, hence some device drivers use this. The reason for changing the SYSCTL API was the need for a SYSCTL parent OID pointer and not only the SYSCTL parent OID list pointer in order to quickly generate the sysctl path. The motivation behind this patch is to avoid parameter loading cludges inside the OFED driver subsystem. Instead of adding special code to the OFED driver subsystem to post-load tunables into dynamically created sysctls, we generalize this in the kernel. Other changes: - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask" to "hw.pcic.intr_mask". - Removed redundant TUNABLE statements throughout the kernel. - Some minor code rewrites in connection to removing not needed TUNABLE statements. - Added a missing SYSCTL_DECL(). - Wrapped two very long lines. - Avoid malloc()/free() inside sysctl string handling, in case it is called to initialize a sysctl from a tunable, hence malloc()/free() is not ready when sysctls from the sysctl dataset are registered. - Bumped FreeBSD version to indicate SYSCTL API change. MFC after: 2 weeks Sponsored by: Mellanox Technologies
* kern cons: introduce infrastructure for console grabbing by kernelavg2011-12-171-0/+12
| | | | | | | | | | | | At the moment grab and ungrab methods of all console drivers are no-ops. Current intended meaning of the calls is that the kernel takes control of console input. In the future the semantics may be extended to mean that the calling thread takes full ownership of the console (e.g. console output from other threads could be suspended). Inspired by: bde MFC after: 2 months
* Follow up to r225203 refining break-to-debugger run-time configurationrwatson2011-08-271-1/+0
| | | | | | | | | | | | improvements: (1) Implement new model in previously missed at91 UART driver (2) Move BREAK_TO_DEBUGGER and ALT_BREAK_TO_DEBUGGER from opt_comconsole.h to opt_kdb.h (spotted by np) (3) Garbage collect now-unused opt_comconsole.h MFC after: 3 weeks Approved by: re (bz)
* Attempt to make break-to-debugger and alternative break-to-debugger morerwatson2011-08-261-23/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | accessible: (1) Always compile in support for breaking into the debugger if options KDB is present in the kernel. (2) Disable both by default, but allow them to be enabled via tunables and sysctls debug.kdb.break_to_debugger and debug.kdb.alt_break_to_debugger. (3) options BREAK_TO_DEBUGGER and options ALT_BREAK_TO_DEBUGGER continue to behave as before -- only now instead of compiling in break-to-debugger support, they change the default values of the above sysctls to enable those features by default. Current kernel configurations should, therefore, continue to behave as expected. (4) Migrate alternative break-to-debugger state machine logic out of individual device drivers into centralised KDB code. This has a number of upsides, but also one downside: it's now tricky to release sio spin locks when entering the debugger, so we don't. However, similar logic does not exist in other device drivers, including uart. (5) dcons requires some special handling; unlike other console types, it allows overriding KDB's own debugger selection, so we need a new interface to KDB to allow that to work. GENERIC kernels in -CURRENT will now support break-to-debugger as long as appropriate boot/run-time options are set, which should improve the debuggability of BETA kernels significantly. MFC after: 3 weeks Reviewed by: kib, nwhitehorn Approved by: re (bz)
* Based on discussions on the svn-src mailing list, rework r218195:mdf2011-02-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | - entirely eliminate some calls to uio_yeild() as being unnecessary, such as in a sysctl handler. - move should_yield() and maybe_yield() to kern_synch.c and move the prototypes from sys/uio.h to sys/proc.h - add a slightly more generic kern_yield() that can replace the functionality of uio_yield(). - replace source uses of uio_yield() with the functional equivalent, or in some cases do not change the thread priority when switching. - fix a logic inversion bug in vlrureclaim(), pointed out by bde@. - instead of using the per-cpu last switched ticks, use a per thread variable for should_yield(). With PREEMPTION, the only reasonable use of this is to determine if a lock has been held a long time and relinquish it. Without PREEMPTION, this is essentially the same as the per-cpu variable.
* - Cleanup i8251 related defines.nyan2008-09-071-34/+32
| | | | - Move i8255 related defines into a separate file.
* Expand kdb_alt_break a little, most commonly used with the optionpeter2008-05-041-4/+23
| | | | | | | | | | | | | | | | | | | ALT_BREAK_TO_DEBUGGER. In addition to "Enter ~ ctrl-B" (to enter the debugger), there is now "Enter ~ ctrl-P" (force panic) and "Enter ~ ctrl-R" (request clean reboot, ala ctrl-alt-del on syscons). We've used variations of this at work. The force panic sequence is best used with KDB_UNATTENDED for when you just want it to dump and get on with it. The reboot request is a safer way of getting into single user than a power cycle. eg: you've hosed the ability to log in (pam, rtld, etc). It gives init the reboot signal, which causes an orderly reboot. I've taken my best guess at what the !x86 and non-sio code changes should be. This also makes sio release its spinlock before calling KDB/DDB.
* Merged from sys/dev/sio/sio.c revision 1.472nyan2008-02-291-1/+1
| | | | Stop serial console and gdb serial port from getting all screwed up.
* Add a new 'why' argument to kdb_enter(), and a set of constants to userwatson2007-12-251-2/+4
| | | | | | | | | for that argument. This will allow DDB to detect the broad category of reason why the debugger has been entered, which it can use for the purposes of deciding which DDB script to run. Assign approximate why values to all current consumers of the kdb_enter() interface.
* Spelling fix for interupt -> interruptkevlo2007-10-121-1/+1
|
* In the function pc98_check_if_type for the non-8251 casemjacob2007-07-111-0/+4
| | | | | | | | make sure we initialize fileds in the iod that otherwise would have been initialized. Reviewed by: nate, ken, warner Approved by: re (ken)
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-5/+7
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* typo.nyan2006-05-271-2/+2
|
* Aling to new console and gdb_port semanticsphk2006-05-261-54/+14
|
* - Use bus_setup_intr() and bus_teardown_intr() to register device driverjhb2006-02-221-2/+2
| | | | | | | | | | interrupt handlers rather than BUS_SETUP_INTR() and BUS_TEARDOWN_INTR(). Uses of the BUS_*() versions in the implementation of foo_intr methods in bus drivers were not changed. Mostly this just means that some drivers might start printing diagnostic messages like [FAST] when appropriate as well as honoring mpsafenet=0. - Fix two more of the ppbus drivers' identify routines to function correctly in the mythical case of a machine with more than one ppbus.
* Merged from sys/dev/sio/sio.c revision 1.463.nyan2005-12-181-0/+1
|
* Catch up with new interrupt handling code.ru2005-10-261-2/+2
|
* Eliminate two unused arguments to ttycreate().phk2005-10-161-1/+1
|
* Use 'PC Card'nyan2005-09-301-2/+2
|
* Remove EPSON PC-386 note A/W/AE/WR support.nyan2005-09-141-8/+4
|
* Change a directory layout for pc98.nyan2005-05-101-1/+1
| | | | | | | | | - Move MD files into <arch>/<arch>. - Move bus dependent files into <arch>/<bus>. Rename some files to more suitable names. Repo-copied by: peter Discussed with: imp
* Merged from sys/dev/sio/sio.c revision 1.458.nyan2005-02-111-9/+5
|
* Merged from sys/dev/sio/sio.c revision 1.457.nyan2005-02-041-5/+9
|
* Merged from sys/dev/sio/sio.c (Use generic tty code).nyan2004-10-151-90/+45
|
* Use generic tty code instead of local stuff.phk2004-10-131-523/+107
| | | | NB: device names are now consistent: {cua,tty}d$(port)[.lock,.init]
* Merged from sys/dev/sio/sio.c: more tty related changes.nyan2004-09-201-9/+10
|
* Use tty->t_sc, ttyalloc() and lock/init termios from struct tty.phk2004-09-171-71/+57
|
* Merged from sys/dev/sio/sio.c revision 1.450.nyan2004-07-241-1/+2
|
* Preparation commit for the tty cleanups that will follow in the nearphk2004-07-151-2/+2
| | | | | | | | | future: rename ttyopen() -> tty_open() and ttyclose() -> tty_close(). We need the ttyopen() and ttyclose() for the new generic cdevsw functions for tty devices in order to have consistent naming.
* Introduce ttygone() which indicates that the hardware is detached.phk2004-07-111-38/+5
| | | | Move dtrwait logic to the generic TTY level.
* Update for the KDB framework. Sanitize the alpha console code now thatmarcel2004-07-101-208/+75
| | | | | | | | | | | | | | | | | | it's in the way even more. Basicly: remove all alpha specific console support from gfb(4), sio(4) and syscons(4). Rewrite the alpha console initialization to be identical to all other platforms. In a nutshell: call cninit(). The platform specific code now only sets or clears RB_SERIAL and thus automaticly causes the right console to be selected. sio.c: o Replace the remote GDB hacks and use the GDB debug port interface instead. o Make debugging code conditional upon KDB instead of DDB. o Call kdb_alt_break() instead of db_alt_break(). o Call kdb_enter() instead of breakpoint(). o Remove the ugly compatibility of using the console as the debug port.
* Merged from sys/dev/sio/sio.c revision 1.446.nyan2004-07-011-3/+2
|
* - Shorten the names for the TTY related swi interrupt handlers as thejhb2004-06-281-2/+2
| | | | | | | | 'tty:' prefix is largely redundant. - Fix the priority of the low-priority TTY SWIs that are hung off of the softclock thread. Submitted by: bde (2)
* Merged from sys/dev/sio/sio.c revision 1.444.nyan2004-06-281-1/+2
|
* Pick the hotchar out of the tty structure instead of caching privatephk2004-06-261-6/+5
| | | | | | | | copies. No current line disciplines have a dynamically changing hotchar, and expecting to receive anything sensible during a change in ldisc is insane so no locking of the hotchar field is necessary.
* Merged from sys/dev/sio/sio.c revision 1.442.nyan2004-06-261-163/+125
| | | | (Use generic support for modemcontrol and BREAK ioctls.)
* Remove the TIOCDCDTIMESTAMP option.phk2004-06-221-16/+0
| | | | | The RFC-2783 PPS-API (<sys/timepps.h>) provides better and more configurable service.
* Merged from sys/dev/sio/sio.c revisions 1.439 and 1.440.nyan2004-06-221-51/+115
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-161-12/+12
| | | | Bump __FreeBSD_version accordingly.
* Deorbit COMPAT_SUNOS.phk2004-06-111-2/+2
| | | | | We inherited this from the sparc32 port of BSD4.4-Lite1. We have neither a sparc32 port nor a SunOS4.x compatibility desire these days.
* Centralize the line discipline optimization determination in a functionphk2004-06-041-24/+4
| | | | | | | | | called ttyldoptim(). Use this function from all the relevant drivers. I belive no drivers finger linesw[] directly anymore, paving the way for locking and refcounting.
* Manual edits to change linesw[]-frobbing to ttyld_*() calls.phk2004-06-041-2/+2
|
* Machine generated patch which changes linedisc calls from accessingphk2004-06-041-11/+11
| | | | | | linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit.
* Make the remaining serial drivers call ttyioctl() rather than callingphk2004-06-041-8/+3
| | | | the linedisc directly.
* There is no need to explicitly call the stop function. In all likelyhoodphk2004-06-011-1/+0
| | | | ->l_close() did it and ttyclose certainly will.
* There is no need to explicitly call ttwakeup() and ttwwakeup() afterphk2004-06-011-2/+0
| | | | | ttyclose() has been called. It's already been done once by ttyclose, and probably once by the line-discipline too.
* ttyclose() increments t_gen. Remove redundant increments in drivers.phk2004-06-011-1/+0
|
OpenPOWER on IntegriCloud