summaryrefslogtreecommitdiff
path: root/sys/arch/sgi/hpc
AgeCommit message (Collapse)Author
2018-02-14prune files.* entries that refer to files not in treeJonathan Gray
ok krw@ mpi@
2017-12-30Delete unnecessary <sys/file.h> includesPhilip Guenther
ok millert@ krw@
2017-04-30Rename Debugger() into db_enter().Martin Pieuchot
Using a name with the 'db_' prefix makes it invisible from the dynamic profiler. ok deraadt@, kettenis@, visa@
2017-04-30Unifdef KGDB.Martin Pieuchot
It doesn't compile und hasn't been working during the last decade. ok kettenis@, deraadt@
2017-03-08Fix logic in the driver preventing it to receive broadcast framesMartin Pieuchot
before configuring an address. Make dhclient(8) work on sq(4). Problem reported by Frank Scheiner, diff from miod@
2017-01-22move counting if_opackets next to counting if_obytes in if_enqueue.David Gwynne
this means packets are consistently counted in one place, unlike the many and various ways that drivers thought they should do it. ok mpi@ deraadt@
2016-11-29m_free() and m_freem() test for NULL. Simplify callers which had their ownJonathan Gray
NULL tests. ok mpi@
2016-08-31regenJeremie Courreges-Anglas
Reminded by miod
2016-06-05Use the new input functions of wsmouse in mouse and touchscreen drivers.Ulf Brosziewski
ok stsp@ kettenis@
2016-04-13G/C IFQ_SET_READY().Martin Pieuchot
2015-12-10comment typommcc
2015-12-08No trailers has been the default and only option for 20 years, yet someTed Unangst
drivers still set IFF_NOTRAILERS while others do not. Remove all usage of the flag from the drivers which in ancient times used it (and the modern drivers which blindly copied it from those drivers of yore). suggested by guenther. ok mpi
2015-11-25replace IFF_OACTIVE manipulation with mpsafe operations.David Gwynne
there are two things shared between the network stack and drivers in the send path: the send queue and the IFF_OACTIVE flag. the send queue is now protected by a mutex. this diff makes the oactive functionality mpsafe too. IFF_OACTIVE is part of if_flags. there are two problems with that. firstly, if_flags is a short and we dont have any MI atomic operations to manipulate a short. secondly, while we could make the IFF_OACTIVE operates mpsafe, all changes to other flags would have to be made safe at the same time, otherwise a read-modify-write cycle on their updates could clobber the oactive change. instead, this moves the oactive mark into struct ifqueue and provides an API for changing it. there's ifq_set_oactive, ifq_clr_oactive, and ifq_is_oactive. these are modelled on ifsq_set_oactive, ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd. this diff includes changes to all the drivers manipulating IFF_OACTIVE to now use the ifsq_{set,clr_is}_oactive API too. ok kettenis@ mpi@ jmatthew@ deraadt@
2015-11-24You only need <net/if_dl.h> if you're using LLADDR() or a sockaddr_dl.Martin Pieuchot
2015-11-24The only network driver needing <net/if_types.h> is upl(4) for IFT_OTHER.Martin Pieuchot
2015-11-21error: too many arguments to function 'ifq_deq_begin'David Gwynne
found by deraadt@
2015-11-20shuffle struct ifqueue so in flight mbufs are protected by a mutex.David Gwynne
the code is refactored so the IFQ macros call newly implemented ifq functions. the ifq code is split so each discipline (priq and hfsc in our case) is an opaque set of operations that the common ifq code can call. the common code does the locking, accounting (ifq_len manipulation), and freeing of the mbuf if the disciplines enqueue function rejects it. theyre kind of like bufqs in the block layer with their fifo and nscan disciplines. the new api also supports atomic switching of disciplines at runtime. the hfsc setup in pf_ioctl.c has been tweaked to build a complete hfsc_if structure which it attaches to the send queue in a single operation, rather than attaching to the interface up front and building up a list of queues. the send queue is now mutexed, which raises the expectation that packets can be enqueued or purged on one cpu while another cpu is dequeueing them in a driver for transmission. a lot of drivers use IFQ_POLL to peek at an mbuf and attempt to fit it on the ring before committing to it with a later IFQ_DEQUEUE operation. if the mbuf gets freed in between the POLL and DEQUEUE operations, fireworks will ensue. to avoid this, the ifq api introduces ifq_deq_begin, ifq_deq_rollback, and ifq_deq_commit. ifq_deq_begin allows a driver to take the ifq mutex and get a reference to the mbuf they wish to try and tx. if there's space, they can ifq_deq_commit it to remove the mbuf and release the mutex. if there's no space, ifq_deq_rollback simply releases the mutex. this api was developed to make updating the drivers using IFQ_POLL easy, instead of having to do significant semantic changes to avoid POLL that we cannot test on all the hardware. the common code has been tested pretty hard, and all the driver modifications are straightforward except for de(4). if that breaks it can be dealt with later. ok mpi@ jmatthew@
2015-10-25arp_ifinit() is no longer needed.Martin Pieuchot
2015-09-18Go back to the previous approach when managing individual HPC DMA descriptors:Miod Vallat
provide again an optional storage for a copy of the descriptor in the `sync' (fetch) function, and use the returned address afterwards. On IP22 systems (in the broader sense of the term, thus IP20/IP22/IP24), descriptors will remain in uncached memory and no local copies need to be made. On IP28 systems, descriptors will remain in cached memory (so as to avoid switching to `slow mode'), but a local copy will be performed with the necessary cache eviction work, so that speculative code execution on R10000 will not touch the real descriptor. With this in place, all the explicit descriptor cache operations in if_sq, some of them being redundant or operating on the wrong number of descriptors, can be removed, with the HPC DMA wrappers taking care of doing the right thing. Tested on IP22 and IP28. IP26 still unhappy but no worse than before.
2015-09-14Fix more ifmedia64 fallout in the kernel. It's hiding everywhere...Stefan Sperling
2015-09-05Give up trying to map DMA descriptor in uncached memory on ECC flavours of theMiod Vallat
IP22 motherboard (IP26, IP28). Instead, do not ask for a BUS_DMA_COHERENT mapping, but perform explicit cache operations. This removes the need for the memory controller to switch between `fast' and `slow' mode every time a DMA descriptor is updated. Tested on IP22 and IP28.
2015-06-24Increment if_ipackets in if_input().Martin Pieuchot
Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
2015-05-24Follow the recent pckbc@isa changes and always establish all the necessaryMiod Vallat
interrupts at pckbc attach time, and get rid of the `intr_establish' pckbc callback. Tested on hppa (gsckbc) and sgi (pckbc@hpc); not tested on sparc64 (pckbc@ebus) but this attachment was already behaving this way and its intr_establish callback was an empty function.
2015-05-11Remove all audio format conversion code from the kernel (btw holdingAlexandre Ratchov
the kernel_lock), as we already do better conversions in user-mode. Yet, no need for every single driver to fiddle with the conversion code as they are done transparently by common MI code. With help from armani and miod, support from mpi ok armani@
2015-05-04Print irq informations in pckbc_set_inputhandler().Martin Pieuchot
ok miod@
2015-03-29Convert to if_input(), tested by miod@ and sebastia@.Martin Pieuchot
2014-12-22unifdef INETTed Unangst
2014-12-07Avoid extra space in dmesgMiod Vallat
2014-12-07Probe the keyboard for its dip switches also if it is the console keyboard,Miod Vallat
so that we can select the proper layout automagically and have it apply even at UKC time.
2014-10-11Check for the `oscillator failure' condition, and do not register as a reliableMiod Vallat
time source in that case.
2014-08-27Remove redundant setting of if_mtu which ether_ifattach() alreadyBrad Smith
takes care of. ok dlg@
2014-07-22<netinet/in_systm.h> is no longer needed.Martin Pieuchot
2014-07-11It's init as a process that's special, not init's original thread.Philip Guenther
Remember initprocess instead of initproc. ok matthew@ blambert@
2014-06-27Standardize xfer byte counts to ssize_t rather than a mix of size_t and intMiod Vallat
(we need to make them signed to spot controller overruns), and fix format strings accordingly. While there, make sure every runtime printf is prefixed by either the complete target information, if available, or at least the driver name with the proper instance number - supported systems with > 1 wdsc are quite common.
2014-05-22RegenMiod Vallat
2014-05-22Yet another evil awk script (not perl, I'm not in LibreSSL mode at the moment)Miod Vallat
to convert the PS/2 keyboard layouts to SGI serial keyboard layouts. Only the subset of layouts known to have existed (as listed in IRIX's <sys/kbd.h> header) get converted, and specific flavours (iopener, dec LK) are ignored as well. `nodead' flavours, when existing, are preserved.
2014-05-22Extend the keyboard communication routines to be able to work in polling mode;Miod Vallat
use this to read the DIP switches from the keyboard at attach time. Change the state machine to allow for a `DIP switch prefix' scan code to be received while we are not attempting to read the DIP switches, for the `international' key (not found in regular us layouts, documented is the `GERlessthan' key in sgi's keyboard(7) manual page) will return the aforementioned scancode, instead of the one documented in the manual. Thanks to sebastia@ for lending me his german layout keyboard.
2014-05-19Format string fixes and removal of -Wno-format for sgi. Based upon anMiod Vallat
initial diff from jasper@
2014-04-18rename wd33c93 to wd33c93ctrl (but keep the filenames as is) so we canJasper Lievisse Adriaanse
add attributes to it later; as wd33c93 is not a valid device name. ok miod@
2014-01-26Attempt to make user changes of keyboard layout a bit more `sticky' on wsmuxMiod Vallat
kernels: - keyboard drivers will now tell wskbd if the keyboard layout they ask for is a default value, or a value they are 100% sure of (either because your kernel has a XXXKBD_LAYOUT option, or because the driver can tell the keyboard layout, e.g. by the country code on USB keyboards which provide it, such as Sun's) - when attaching a keyboard with a non-default layout, the layout will become the default layout of the mux for new keyboard attachments if the mux doesn't have a layout set already. - when changing the keyboard layout of a particular keyboard with an ioctl (i.e. using kbd(8) or wsconsctl(8)), the layout will become the default layout of the mux for new keyboard attachments. ok mpi@
2013-11-04Convert wskbd_set_mixervolume() to use a task internally instead ofMartin Pieuchot
being called in a workq. ok kettenis@
2013-10-21Fix lies in comments, and apply some KNF and unused or duplicate prototypeMiod Vallat
removals.
2013-09-28Correctly probe for the Ethernet chip on HPC 1.5 expansion boards. Gets rid ofMiod Vallat
false sq positives ("sq not configured" since rejected by the sq driver) in dmesg, for SCSI HPC boards.
2013-08-17Most network drivers include netinet/in_var.h, but apparently theyAlexander Bluhm
don't have to. Remove these include line also from the sgi/hpc driver which I have forgotten in my last commit. test jsing@
2013-05-18fix cut'n'paste abuse in "can't happen" error messageMiod Vallat
2013-04-21Unify the zs tty driver.Sebastian Reitenbach
Most of the hard work by mpi@, who provided the initial diff. Fixes for sparc from myself. Tested on sgi and sparc myself. Compiles and detects zstty on my powerbook, compile tested on sparc64 by me. Real testing with zs device on sparc64 by miod@ who also gave a lot of help and feedback. ok miod@, mpi@
2012-10-03Don't include <mips64/archtype.h> unless you really need it.Miod Vallat
2012-09-29Handle the coprocessor 0 cause and status registers as a 64 bit value now,Miod Vallat
as some odd mips designs need moro than 32 bits in there. This causes a lot of mechanical changes everywhere getsr() is used.
2012-09-29Proide a mips_sync() macro to wrap asm("sync"), and replace gazillions ofMiod Vallat
such statements with it.
2012-05-28The link state code does not work correctly on Indigo (IP20) and E++ GIO boardsMiod Vallat
and will report the link being down too aggressively. Better to always report the link as up - these systems and boards are single media only so it won't harm much. Unbreaks dhcp in the installer on these interfaces; found the hard way by sebastia@