summaryrefslogtreecommitdiffstats
path: root/sys/arch/hppa/dev (follow)
Commit message (Collapse)AuthorAgeFilesLines
* spellingjsg2021-03-111-3/+3
|
* timecounting: use C99-style initialization for all timecounter structscheloha2021-02-231-2/+9
| | | | | | | | | | | | | | | | | | The timecounter struct is large and I think it may change in the future. Changing it later will be easier if we use C99-style initialization for all timecounter structs. It also makes reading the code a bit easier. For reasons I cannot explain, switching to C99-style initialization sometimes changes the hash of the resulting object file, even though the resulting struct should be the same. So there is a binary change here, but only sometimes. No behavior should change in either case. I can't compile-test this everywhere but I have been staring at the diff for days now and I'm relatively confident this will not break compilation. Fingers crossed. ok gnezdo@
* Add support for timeconting in userland.pirofti2020-07-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
* dev/rndvar.h no longer has statistical interfaces (removed during variousderaadt2020-05-291-2/+1
| | | | | | conversion steps). it only contains kernel prototypes for 4 interfaces, all of which legitimately belong in sys/systm.h, which are already included by all enqueue_randomness() users.
* Use the same inittodr()/resettodr() implementation as onkettenis2020-05-011-64/+39
| | | | | | | | amd64/arm64/armv7/i386/sparc64 and move it to the end of machdep.c. Rework the actual implementation for the MC14818 compatible RTC into something that can be used as a todr_handle just like on amd64. ok mpi@
* lcd(4/hppa): timeout_add(9) -> timeout_add_usec(9)cheloha2020-03-061-2/+2
| | | | | | Tested by kettenis@. ok kettenis@
* hppa: gsckbc(4), power(4): tsleep(9) -> tsleep_nsec(9); ok kn@ visa@cheloha2019-10-121-3/+3
|
* Relax the way irqs are assigned. This diff does:kettenis2018-05-145-125/+93
| | | | | | | | | | | | | | | | | | | | | | | - dynamic allocation of interrupts for dino(4) and gsc(4) - only mention irq locators for devices which use interrupts. - for gsc(4), this actually postpones interrupt allocation until gsc(4) attaches, so asp(4)/lasi(4)/wax(4) won't route the interrupt yet, but the gsc(4) child will take care of this. - remove the irq locator for the drivers which do not need a fixed assignment. siop and moongoose could benefit from this but don't work at the moment so this is left as an exercize to future kernel hackers. A side effect from this is that we do not need multiple sti(4) attachment lines, so PCI sti(4) devices will now attach as sti0 rather than sti2. With this diff, multiple dino(4) devices attached to the same parent will use different interrupt sources, and more than two dino(4) devices can attach. Tested on 715/75 (old-gen using asp), 715/100/XC (new-gen using lasi), B132L+, B180L, C240, B2000, C3650. From miod@
* Remove almost unused `flags' argument of suser().mpi2018-02-191-2/+2
| | | | | | | 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@
* move mem.c to hppa directory like every other arch.tedu2016-08-191-411/+0
| | | | | | (probably landed in dev because it has support for this viper thing, but i like consistency for the /dev/null parts.) ok kettenis
* bring the light of ansi to a few more filestedu2016-08-011-38/+12
|
* Replace mountroothook_establish(9) by config_mountroot(9) a narrower APImpi2015-12-111-6/+6
| | | | | | similar to config_defer(9). ok mikeb@, deraadt@
* sizes for free(), when known; ok semariederaadt2015-09-081-2/+2
|
* Fix a free of an uninitialized variable in an error path.mlarkin2015-08-121-5/+3
| | | | | | ok miod@ found by Maxime Villard / Brainy Code Scanner. thanks.
* Convert to uiomove().miod2015-02-101-9/+9
| | | | ok guenther@
* First step towards making uiomove() take a size_t size argument:miod2015-02-101-4/+4
| | | | | | | - rename uiomove() to uiomovei() and update all its users. - introduce uiomove(), which is similar to uiomovei() but with a size_t. - rewrite uiomovei() as an uiomove() wrapper. ok kettenis@
* Replace some malloc(n*size,...) calls with mallocarray().doug2014-12-091-2/+2
| | | | ok tedu@ deraadt@
* Replace a plethora of historical protection options with justderaadt2014-11-161-2/+2
| | | | | | | PROT_NONE, PROT_READ, PROT_WRITE, and PROT_EXEC from mman.h. PROT_MASK is introduced as the one true way of extracting those bits. Remove UVM_ADV_* wrapper, using the standard names. ok doug guenther kettenis
* Another uvm_km_valloc(9) -> km_alloc(9) conversion.kettenis2014-10-251-2/+2
|
* remove an unused file that is a duplicate of arch/hppa/gsc/mongoose_gsc.cjsg2014-10-081-95/+0
| | | | ok miod@
* Fix format strings in STIDEBUG code.miod2014-08-301-2/+2
|
* zap trailing newlines; "go for it" deraadtokan2014-07-161-2/+1
|
* One missing boot -> prsignal(initprocess) conversionmiod2014-07-131-2/+2
|
* reboot(9): Shutdown system by signaling init(8) from kernel where appropriateuebayasi2014-07-121-3/+4
| | | | | | | | | | | | | Some ports watch temperature in MD and try to shutdown system, when overheated, by calling directly (re)boot(9). Change this to signal init(8) from kernel, as acpi(4) and acpitz(4) do, which has been more tested. This also helps to clarify design that ``clean shutdown must be always started by init(8)''. Note that SIGUSR2 causes init(8) to call reboot(2) with RB_POWERDOWN, as acpi(4) etc. already does. It is reasonable, pointed out by kettenis@, considering system is overheated and immediate reboot may be dangerous. OK deraadt@ miod@
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-122-5/+5
| | | | after discussions with beck deraadt kettenis.
* boot(9), reboot(9): Migrate MD callers of boot(9) to reboot(9)uebayasi2014-07-121-2/+2
| | | | | | | | | | | | | | | I have found that some ports call boot(9) from machine-dependent code to reboot system. These should be changed to either: - Sending signal to init(8) to trigger it to shutdown system cleanly, like acpi(4) does, in cases where found problems don't prevent system from working immediately, or - Just doing panic(9) if the situation is severely broken. For now, just rewrite boot() to reboot(). Actual fixes follow. Discussed with & OK from kettenis@
* Less <uvm/uvm.h>mpi2014-04-082-5/+3
|
* It's been a quarter century: we can assume volatile is present with that name.guenther2014-03-294-11/+11
| | | | ok dlg@ mpi@ deraadt@
* Use extent_alloc_with_descr(9) and add a mutex to protect the extent.kettenis2014-02-081-11/+17
| | | | This should make bus_dmamap_load(9) and bus_dmamap_unload(9) "mpsafe".
* Initialize ci_randseed better using arc4random() + a trick. Remove thederaadt2014-01-191-2/+3
| | | | | libkern srandom() API since it is not suitable for this use. ok kettenis miod
* 1 << 31 cleanup. Eitan Adler pointed out that there has been aderaadt2013-11-261-3/+3
| | | | | resurrection of the bad idiom in the tree. sufficient review by miod, kettenis, tedu
* Fix a bad case of htole64() being used instead of htole32() when setting upmiod2012-02-251-3/+3
| | | | | | pci configuration space accesses to allow proper recovery from failure, causing the measure not to have any effect and the system to freeze hard. Fixes use of pcidump -x on B1000, and probably more systems.
* %b format strings take the value before the bitname string, not the othermiod2011-09-191-2/+2
| | | | way around.
* Compile in serial console settings support if any com(4) device is includedkettenis2011-08-161-3/+3
| | | | | | in the kernel, not only when com @ gsc is there. ok miod@
* Fix counting of interrupts for devices that attach to elroy(4). Sharedkettenis2011-05-011-11/+12
| | | | | | | | interrupts would be counted double, once for the interrupting device and once for the device at the head of the chain. The handlers would run properly though. Avoid this by giving each device its own interrupt counter instead of using the counter provided by the generic interrupt handling code for the head of the chain.
* Stop calling shared interrupt handlers as soon as one of them return 1kettenis2011-04-231-7/+6
| | | | | | | | | (positive interrupt was for me), like we do on other architectures. This is done here, at the elroy(4) driver level, since this is where shared PCI interrupts are handled. We could do something similar for dino(4) but this optimization is probably not very relevant there. ok deraadt@
* Do not use NULL in integer comparisons. No functional change.miod2011-04-071-2/+2
| | | | ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
* Spinning up secondary CPUs on an MP kernel results in PDC output on thejsing2011-01-231-7/+16
| | | | | | | system LCD. Move LCD initialisation to a mountroot hook in order to avoid PDC output after initialisation. Committing on behalf of kettenis@
* Check in resettodr() if inittodr() has been called, otherwise we end upjasper2011-01-091-1/+10
| | | | | | | | | | resetting the clock when we don't need to. Found out with booting hppa64 kernels, and the problem also exists on hppa when booting with '-a' and hitting 'exit' when asked for the root filesystem. help & ok jsing@ also ok kettenis@ (who suggested naming the variable like amd64/i386 to prevent creating yet another variant of this code)
* - remove unused headers wrapped in #if defined(DDB)jasper2011-01-051-8/+1
| | | | ok jsing@ kettenis@
* Make need_resched() call cpu_unidle() such that we wake up a process running onkettenis2011-01-021-1/+14
| | | | | | another CPU. ok miod@
* Move setting cpu_hzticks to the clock initialization function, likejasper2011-01-011-1/+3
| | | | | | other ports (e.g. hppa64) do. ok jsing@ kettenis@
* Only store bus/dev/func numbers when the corresponding pointer argumentkettenis2011-01-012-8/+14
| | | | isn't NULL.
* Implement cpu_unidle() for MP kernels.jsing2010-12-301-1/+8
| | | | ok kettenis@
* Kill pmap_phys_address(), and force every driver's mmap() routine to returnmiod2010-12-261-2/+2
| | | | | | | a physical address [more precisely, something suitable to pass to pmap_enter()'sphysical address argument]. This allows MI drivers to implement mmap() routines without having to know about the pmap_phys_address() implementation and #ifdef obfuscation.
* Introduce a new pci routine, pci_conf_size(), which returns the size of amiod2010-12-042-4/+18
| | | | | | | given pcitag_t configuration address space. Currently, all pci controllers will return the usual 0x100 bytes of PCI configuration space, but this will eventually change on PCIe-capable controlers. ok kettenis@
* remove unused offset argument to rbus functionsjsg2010-09-222-4/+4
| | | | ok krw@ kettenis@
* Get rid of evcount's support for arranging counters in a treematthew2010-09-201-2/+2
| | | | | | | hierarchy. Everything attached to a single root node anyway, so at best we had a bush. "i think it is good" deraadt@
* No "\n" needed at the end of panic() strings.krw2010-08-072-4/+4
| | | | | | | Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
* ANSIfykettenis2010-08-011-6/+4
|