summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
AgeCommit message (Collapse)Author
2015-09-28Oops. sparc64/disksubr.c was overlooked when all the other disksubr.c'sKenneth R Westerback
got 'disk_change = 1;' to keep the DUID cache up to date in Feb. 2011. Bad krw@. ok deraadt@
2015-09-27Use readdisksector() instead of manual buf initialization. sparc64Kenneth R Westerback
compiles and boots, so the identical sparc code must too! ok deraadt@
2015-09-27Store the target CPU in "struct intrhand" and use it in intr_barrier().Mark Kettenis
Also use it wherever we configure the hardware to direct interrupts to the right CPU.
2015-09-26lint is dead and C99 may be old enough to drive a car: delete LONGLONGPhilip Guenther
comments ok millert@
2015-09-19trivial "if(x) free(x)" replacement by "free(x)"Sebastien Marie
ok miod@
2015-09-15Fix overlapping memcpy found by Maxime Villard's Brainy Code Scanner.Mark Kettenis
2015-09-14unify free(NULL,size) behaviour by allowing passing NULLSebastien Marie
ok millert@ jasper@
2015-09-13Introduce intr_barrier(4), an interface that guarantees that an interruptMark Kettenis
handler that was running has finished. ok miod@, guenther@
2015-09-08sizes for free(); ok semarieTheo de Raadt
2015-09-02Make pmap_kenter_pa(9) and pmap_kremove(9) mpsafe. This required me toMark Kettenis
use atomic operations to operate on pm_stats.resident_count. Is it really necessary to keep track of that for the kernel pmap?
2015-08-30The pmap_pool pool will never be used in interrupt context, so pass theMark Kettenis
PR_WAITOK flag to pmap_init and pass NULL as the pool allocator.
2015-08-30Provide remaining arch with END() macro for setting calculated size onPhilip Guenther
symbols in ASM ok deraadt@ mpi@
2015-08-29_NLIST_DO_ELF is no longer needed: it's the only optionPhilip Guenther
ok deraadt@
2015-08-28Add support for switching CPUs in ddb on sparc64.Mark Kettenis
2015-08-28These days, we have two 4MB pages of read-only kernel memory.Mark Kettenis
2015-08-26Kill code that tries to handle 32-bit code that we're never going to use.Mark Kettenis
2015-07-23Missed file in *_data_offset -> *_data_blkno switch.Kenneth R Westerback
Found the hardway by benoit@.
2015-07-19Use DEV_BSIZE instead of 512 where appropriate. Use DL_SECTOBLK()Kenneth R Westerback
where appropriate. Noop for disks with 512-byte sectors. i.e. the only kind currently allowed in softraid volumes. But starts laying the groundwork to allow disks with other sector sizes. ok jsing@
2015-07-17remove obsolete INET kernel optionTed Unangst
2015-07-10Avoid calling pool_put(9) while holding a mutex here as well to prevent lockMark Kettenis
order problems.
2015-07-02introduce srp, which according to the manpage i wrote is short forDavid Gwynne
"shared reference pointers". srp allows concurrent access to a data structure by multiple cpus while avoiding interlocking cpu opcodes. it manages its own reference counts and the garbage collection of those data structure to avoid use after frees. internally srp is a twisted version of hazard pointers, which are a relative of RCU. jmatthew wrote the bulk of a hazard pointer implementation and changed bpf to use it to allow mpsafe access to bpfilters. however, at s2k15 we were trying to apply it to other data structures but the memory overhead of every hazard pointer would have blown out significantly in several uses cases. a bulk of our time at s2k15 was spent reworking hazard pointers into srp. this diff adds the srp api and adds the necessary metadata to struct cpuinfo on our MP architectures. srp on uniprocessor platforms has alternate code that is optimised because it knows there'll be no concurrent access to data by multiple cpus. srp is made available to the system via param.h, so it should be available everywhere in the kernel. the docs likely need improvement cos im too close to the implementation. ok mpi@
2015-06-25fix format string in MP_LOCKDEBUG codeDavid Gwynne
2015-06-24fauls -> faultsMiod Vallat
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-06-21Count transmitted packets.Mark Kettenis
2015-06-13When investigating an uninitialised variable in the armv7 resettodr()Jonathan Gray
miod pointed out that time_second should be compared to 1 not 0 in the md resettodr() functions as it is initialised to 1. ok miod@ deraadt@
2015-06-05These days p->p_addr will never be NULL.Mark Kettenis
ok deraadt@
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 support for ADPCM encoding which isn't used nowadays andAlexandre Ratchov
not available to programs anyway.
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-07add missing bracesJonathan Gray
ok miod@
2015-05-05emul_native is only used for kernel threads which can't dump core, soPhilip Guenther
delete coredump_trad(), uvm_coredump(), cpu_coredump(), struct md_coredump, and various #includes that are superfluous. This leaves compat_linux processes without a coredump callback. If that ability is desired, someone should update it to use coredump_elf32() and verify the results... ok kettenis@
2015-04-30Remove SIZE_MAX from limits.h. It was added years ago before weTodd C. Miller
had a proper stdint.h. No ports fallout. OK guenther@ miod@
2015-04-16Enable ualea(4) where we have uhub(4), these USB device lists cry forMartin Pieuchot
unification...
2015-04-13Now that if_input() set the receiving interface pointer on mbufs for usMartin Pieuchot
there's no need to do it in m_devget(9). Stop passing an ``ifp'' will help for upcoming interface pointer -> index conversion. While here remove unused ``ifp'' argument from m_clget(9) and kill two birds^W layer violations in one commit. ok henning@
2015-04-10Don't use pa_to_pvh() if we already have the page. Avoids an unused variableMark Kettenis
for non-DIAGNOSTIC kernels. ok deraadt@
2015-04-09Make the sparc64 pmap (more) mpsafe by protecting both the pmap itself and theMark Kettenis
pv lists with a mutex. Some minor code adjustments to prevent holding locks too long. This should make pmap_enter(9), pmap_remove(9) and pmap_page_protect(9) safe to use without holding the kernel lock.
2015-04-08I believe UVM is clean now and no managed pages should be in use anymoreMark Kettenis
when we call pmap_release(). Turn debug code into printf and remove the code that tried to mop up. Override Debugger() such that it inserts a trap instruction directly into the code such that we get useful backtraces. This way I don't need to worry about pmap_release() removing pv entries when making this pmap mpsafe.
2015-04-02Call if_input() without grabbing the kernel lock first.Mark Kettenis
2015-04-01Run most of the interrupt handler without holding the kernel lock.Mark Kettenis
2015-03-29Reject packets that are too large.Mark Kettenis
2015-03-24unwire lmc(4) and san(4).David Gwynne
they do "interesting" things with APIs i want to change, and i can't find any evidence anyone uses them anymore. instead of burning time on changes i cant test, ill take a chance that noone will miss them. no objections from anyone ok mpi@ deraadt@ henning@ sthen@
2015-03-21Make sure we reset all relevant state when resetting or stopping an interface.Mark Kettenis
Our reset function did not reset the ring and LDC map and our stop function did not reset the LDC channel state and the some of the ring state. Also make sure we clear IFF_OACTIVE whenever we re-establish a connection on the LDC channel. Finally, initialize the link state to LINK_STATE_DOWN such that interfaces that have not been configured yet, don't show up as active. This should improve the reliability of re-establishing network connections between domains after some sort of hickup considerably.
2015-03-21Only reconfigure LDC queues ipon reset instead of unconfiguring them first.Mark Kettenis
This makes sure the other side correctly sees the channel being reset.
2015-03-10Convert to if_input(), tested an ok kettenis@.Martin Pieuchot
2015-02-15Change pmap_remove_holes() to take a vmspace instead of a map as its argument.Miod Vallat
Use this on vax to correctly pick the end of the stack area now that the stackgap adjustment code will no longer guarantee it is a fixed location.
2015-02-11dlg@ said he had fixed sparc64, but I'm afraid this requires <sys/lock.h>Miod Vallat
2015-02-11dont need lockmgr locks here.David Gwynne
2015-02-11Eliminate sc_tx_cnt. Instead use an unsigned integer for sc_tx_prod andMark Kettenis
sc_tx_cont and let them wrap around. Make sure we don't fill the last descriptor on the ring such that we don't confuse a completely filled ring with a completely empty one. Also make sure we don't post the same descriptors twice.
2015-02-11this doesnt need anything sys/lock.h providesDavid Gwynne