summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
AgeCommit message (Collapse)Author
2018-02-19Convert sparc64 to MI mutex.Martin Pieuchot
ok dlg@
2018-02-19Remove almost unused `flags' argument of suser().Martin Pieuchot
The account flag `ASU' will no longer be set but that makes suser() mpsafe since it no longer mess with a per-process field. No objection from millert@, ok tedu@, bluhm@
2018-02-14prune files.* entries that refer to files not in treeJonathan Gray
ok krw@ mpi@
2018-02-09Check for the existence of /bsd before trying to back it up to /obsd.Theo Buehler
Fixes 'make install' when /bsd is not present for some reason. ok rob florian, "fine with me" deraadt
2018-01-27Sync the nam2blk entries with the bdevsw table, which is theChristian Weisgerber
definitive list of block devices supported on an architecture. ok kettenis@ deraadt@
2018-01-27Fix an interrupt storm issue in vnet(4) mpi@ managed to trigger on my T5220,Stefan Sperling
similar to the issue fixed in vldcp(4) recently. For good measure also fix it again in vldcp(4) in case the Rx channel is reset rather than goes down. My T5220 has been running fine with this change. ok kettenis@
2018-01-17In cbus(4) drivers, make it easier to identify which driver is doingStefan Sperling
debug printfs about LDC link state changes. No functional change. ok kettenis@
2018-01-13Define and use IPL_MPFLOOR in our common mutex implementation.Martin Pieuchot
ok kettenis@, visa@
2018-01-13In vldcp(8) fix a race between vldcpread() and vldcp_rx_intr() whichStefan Sperling
was overlooked by my previous fix. Keep SPL at TTY in vldcpread() while manipulating the rx queue head. Otherwise we could end up in a situation where: 1: vldcpread() reads rx_head 2: vldcpread() calls splx() 3: vldcp_rx_intr() fires, finds rx link is down, and sets rx_head = rx_tail 4: vlcdpread() resumes and sets rx_head to the value it read in step 1 -> same interrupt storm problem as described in my previous commit ok kettenis@ mpi@
2018-01-12Unify <machine/mutex.h> a bit further.Martin Pieuchot
`mtx_owner' becomes the first field of 'struct mutex' on i386/amd64/arm64. ok visa@
2018-01-06Fix an interrupt storm condition in vldcp(8) (sparc64).Stefan Sperling
If the Rx channel goes down with pending data on the ring, toss the pending data to ensure that the firmware's rx ring head index matches the rx ring tail index. Otherwise we trigger an interrupt storm since vldcpread() never consumes pending data while the channel is down, and the firmware keeps triggering the interrupt until all data on the ring is consumed. Interrupt storm observed and fix tested on a T5220 (which can now run ldom guests; without this fix starting ldomd would trigger the problem). ok kettenis@
2017-12-30Don't pull in <sys/file.h> just to get fcntl.hPhilip Guenther
ok deraadt@ krw@
2017-12-30Delete unnecessary <sys/file.h> includesPhilip Guenther
ok millert@ krw@
2017-12-22If we use the cookie-based interrupt API on sun4v, whe shouldn't put theMark Kettenis
interrupts in the lookup table. On machines like the Oracle T7-2 this would make the code believe that there is interrupt sharing, but since we bypass intr_list_handler() when using the cookie-based interrupt API, we wouldn't properly acknowledge the interrupt. This fixes the last remaining problem with interrupts on the Oracle T7-2.
2017-12-14fcntl(F_SETFL) invokes the FIONBIO and FIOASYNC ioctls internally, soPhilip Guenther
the memory devices (/dev/null, /dev/zero, etc) need to permit them. problem noted, tweak, and testing by jeremy@ ok deraadt@
2017-12-13report Oracle as the vendor is the produce starts with ORCL,David Gwynne
makes it consistent with reporting Sun or Fujitsu based on produce prefixes. ok kettenis@
2017-12-11In uvm Chuck decided backing store would not be allocated proactivelyTheo de Raadt
for blocks re-fetchable from the filesystem. However at reboot time, filesystems are unmounted, and since processes lack backing store they are killed. Since the scheduler is still running, in some cases init is killed... which drops us to ddb [noted by bluhm]. Solution is to convert filesystems to read-only [proposed by kettenis]. The tale follows: sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT() with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a copyin() late... so store the sizes in vfsconflist[] and move the copyin() to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is sharp and rusty especially wrt softdep, so fix some bugs adn add ~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help, so tie them to &dead_vnops. ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but this issue is seperate and will be dealt with in time. couple hundred reboots by bluhm and myself, advice from guenther and others at the hut
2017-12-11Use correct mask to derive portid from "reg" property in cpu_match.Mark Kettenis
Use cpu_myid() since it makes the coe more obvious.
2017-12-08Make sure we don't match (and attach) more than the maximum number ofMark Kettenis
supported CPUs.
2017-12-06Implement support for using interrupt cookies in vbus(4) and vpci(4) asMark Kettenis
introduced in version 3.0 of the Interrupt APIs group. This makes it possible boot OpenBSD on SPARC T7/M7 hardware (although there still may be issues with the onboard mpii(4) controller).
2017-12-05Handle 64-bit-address Memory Space.Mark Kettenis
2017-12-04Sadly the firmware on SPARC T7 machines omits the executable bit on mappingsMark Kettenis
that contain code, just like some sun4u machines. So add it for sun4v as well when entering the mappings into the kernel pmap.
2017-12-03Rename ci_number to ci_cpuid to match other archs.Martin Pieuchot
ok visa@, kettenis@, deraadt@
2017-11-19Remove lock_machdep.c from amd64, i386, mips64 and sparc64.Visa Hankala
The architectures have been using the MI mplock for a while. OK deraadt@, kettenis@
2017-11-04Since rev 1.502 of rc(8) it creates a /bsd.booted hard link. At theFlorian Obser
end of rc we call reorder_kernel which creates a /obsd hard link to the same kernel. In the past obsd was only created when doing a manual make install in the kernel sources. There is no need for two backup hard links during boot, rearange the kernel Makefiles to restore previous behaviour and thus stopping reorder_kernel from scribbling over /obsd. Makes muscle memory of some kernel developers work again: /obsd can serve as a known good kernel; and there was much rejoycing... Discussed at length with benno, rpe, phessler and tb at p2k17. Seems like a good idea to deraadt. OK benno, phessler, rpe, tb
2017-11-03use %lx to print the frame address if resolving of the symbol name failsJasper Lievisse Adriaanse
as discussed with and ok mpi@
2017-10-24Use "static inline" instead of "extern inline" for compatibility withMark Kettenis
proper C99 compilers. ok deraadt@, visa@, mpi@
2017-10-23Avoid clang format warning.Mark Kettenis
ok deraadt@
2017-10-17remove the remaining references to .depend files since nothing creates themChristian Weisgerber
any longer; ok espie@ deraadt@
2017-10-17Add a machine-independent implementation for the mplock.Visa Hankala
This reduces code duplication and makes it easier to instrument lock primitives. The MI mplock uses the ticket lock code that has been in use on amd64, i386 and sparc64. These are the architectures that now switch to the MI code. The lock_machdep.c files are unhooked from the build but not removed yet, in case something goes wrong. OK mpi@, kettenis@
2017-10-05Check the state value within the assert statement, do not set it.Alexander Bluhm
found with grep 'KASSERT.* = '; OK kettenis@
2017-09-28When option DDB_STRUCTINFO was removed from the kernel, too much fromPatrick Wildt
the kernel makefiles was removed which lead to C files not being re- compiled when a dependency changed. This can lead to panics in odd places and generally a broken system. ok deraadt@
2017-09-12Remove option DDB_STRUCTINFO. Now that ddb(4) is CTF aware, similarMartin Pieuchot
functionnalities are available in GENERIC. ok jasper@, deraadt@, guenther@, dlg@
2017-09-08If you use sys/param.h, you don't need sys/types.hTheo de Raadt
2017-09-05Move mutex, condvar, and thread-specific data routes, pthread_once, andPhilip Guenther
pthread_exit from libpthread to libc, along with low-level bits to support them. Major bump to both libc and libpthread. Requested by libressl team. Ports testing by naddy@ ok kettenis@
2017-08-28swap ualea for urngJasper Lievisse Adriaanse
2017-08-17Fix typo in comments: s/return/returns/ in "a function that never return."Tom Cosgrove
2017-08-12Use ctfstrip(1) by default to strip kernels.Martin Pieuchot
ok deraadt@, jasper@
2017-08-10With a CTF kernel, DDB's print command will now pretty-print symbols.Martin Pieuchot
Casting a type is not yet supported. ok kettenis@, jasper@
2017-08-07Return WSDISPLAY_TYPE_PCIVGA like we do on macppc.Mark Kettenis
Pointed out by jsg@
2017-07-22Fix the various SIGSEGV and SIGBUS scenarios to match what we do onMark Kettenis
amd64/arm64/armv7/i386. ok visa@, deraadt@
2017-07-18Stop automatically regenerating gap.o (and hence linking a new kernel)Theo Buehler
whenever make is issued. Only do this when there are actual source changes below /sys. This restores the behavior prior to the KARL implementation. Problem noticed and patiently explained by mpi implementation with a lot of help from espie ok mpi, espie, deraadt
2017-07-16Pass the linker from make environment to makegap.sh. This is (only)Visa Hankala
a partial solution to cross compiling the kernel with KARL. OK deraadt@ a while ago
2017-07-04Export our atomic definitions to userland instead of gcc builtins.Martin Pieuchot
ok kettenis@, dlg@
2017-06-29kill RCSID macros; discussed with millertTheo de Raadt
2017-06-29put SYSTEM_SWAP_DEP out of its misery, it died in 1997, along with config.oldMarc Espie
"go for it" deraadt@
2017-06-25dull dependency for copying makegap.sh to obj, so that installsTheo de Raadt
without src and comp work. That is what we've designed for, but since we always have src and comp on our systems it is so easy to slide... problem first noted by rpe.
2017-06-23Unbreak profiling assembly functions in userland by defining theMartin Pieuchot
correct prologue if compiled with -DPROF. ok deraadt@
2017-06-22Generate a gap.link script, and use that to generate gap.o. On multi-ABITheo de Raadt
architectures we must also link against a gapdummy.o to repair the ABI of the resulting .o file. Woe is me. Also repair install: target to update the linkkit & hash when a kernel is installed. ok rpe tb mlarkin and tested by others also
2017-06-13newbsd: target which re-links a kernel. We cannot use the bsd: targetTheo de Raadt
since it has source dependencies, and relinking doesn't have any. Also the bsd: target is created by config(8)... worked on with rpe.