summaryrefslogtreecommitdiff
path: root/sys/arch/loongson
AgeCommit message (Collapse)Author
2014-09-26remove the last uses of -Wno-formatJonathan Gray
ok miod@ deraadt@ jsing@
2014-09-26Use correct format specifiers in various loongson machine dependent code.Joel Sing
Makes a loongson kernel buildable without -Wno-format. ok miod@ jsg@
2014-09-20Use config_suspend_all(9).Mark Kettenis
ok mpi@, uebayasi@, dlg@
2014-09-13Replace all queue *_END macro calls except CIRCLEQ_END with NULL.Doug Hogan
CIRCLEQ_* is deprecated and not called in the tree. The other queue types have *_END macros which were added for symmetry with CIRCLEQ_END. They are defined as NULL. There's no reason to keep the other *_END macro calls. ok millert@
2014-08-20unlink crypto(4) pseudo device from the architecture dependant characterMike Belopuhov
device tables and kernel config files. ok deraadt
2014-07-21boot(9): Reduce annoying style diffsMasao Uebayashi
- Always use either: ((x & RB_XXX) != 0) or ((x & RB_XXX) == 0) in boolean context (mostly if (x), or x ? y : z) - prom_halt() in alpha is confirmed to take int as boolean Converted by coccinelle. No functional change intended.
2014-07-20look up correct dev_t. This matters for the case where a device isTheo de Raadt
underlying softraid. ok mlarkin
2014-07-20Support hibernating to softraid crypto volumes.Mike Larkin
much help and ok from deraadt@
2014-07-19Bring back pci_dopm, but disable it before powerdown.Paul Irofti
This fixes both the Lemote reboot issue and the USB issue on the Gdium's that miod@ spotted. Suggested by kettenis@, thanks! Okay miod@
2014-07-19Backout pci_dopm usage as it also breaks reboot on Lemote's.Paul Irofti
Noticed by matthieu@.
2014-07-16Do not set pci_dopm to 1 on the Gdium; if we do, rebooting puts the USB HCI inMiod Vallat
a state PMON doesn't expect, and can't recover from.
2014-07-13boot(9): Cosmetic changes to improve diff'ability.Masao Uebayashi
2014-07-13Cosmetic changes to reduce diffs.Masao Uebayashi
2014-07-13move putchar() into libsaJasper Lievisse Adriaanse
"sure" miod@
2014-07-12unify cnspeed()Jasper Lievisse Adriaanse
2014-07-12move getchar() into libsa where applicableJasper Lievisse Adriaanse
ok miod@
2014-07-12revert a few stragglers hiding outTed Unangst
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
2014-07-11boot(9): Undo curproc-overriding hacksMasao Uebayashi
Some (not all) boot(9) implementations have ancient hacks which overrides if (curproc == NULL). This was probably made in a hope to forcibly proceed various clean-shutdown related code, including VFS shutdown. Let's clarify that clean-shutdown needs process context; it is impossible to cleanly shutdown VFS from within e.g. a panic in SPL_HIGH. OK kettenis@
2014-07-11remove bthub remnantsTed Unangst
2014-07-11"It's not the years, honey; it's the mileage."Ted Unangst
bluetooth support doesn't work and isn't going anywhere. the current design is a dead end, and should not be the basis for any future support. general consensus says to whack it so as to not mislead the unwary.
2014-07-11Convert bus_dmamem_map(9) to km_alloc(9) in order to make it fail andMartin Pieuchot
not sleep if the allocator cannot obtain a lock when BUS_DMA_NOWAIT is specified. idea and inputs from kettenis@, ok miod@
2014-07-10Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting orMartin Pieuchot
rebooting a machine, like it is done in the hibernate case. At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in. ok deraadt@, uebayashi@
2014-07-10boot(9): Remove comments about RB_*, "cold", and savectx()Masao Uebayashi
Again remove slightly different comments to reduce diffs. These will be re-added once boot() become MI and its specification is clearly re-defined. OK miod@
2014-07-10boot(): Remove comments about RB_TIMEBAD to reduce diffsMasao Uebayashi
RB_TIMEBAD is documented well enough that the comment is not needed. sparc64 does slightly different and its comment is left with XXX. OK deraadt@ miod@
2014-07-10boot(): Unify declarationsMasao Uebayashi
OK deraadt@
2014-07-09Don't use the suspending kernel's VA mapping for the piglet. It's farMike Larkin
easier and much less error-prone to just identity map it in the resuming kernel as we have more control over the VA space layout there (otherwise we are at the mercy of the suspending kernel's placement of the piglet VA). This diff also increases the size of the piglet to 4 chunks, to avoid an overwrite issue seen in m2k14 where the start of the kernel text was overwritten with a bounced chunk before unpack.
2014-06-27Update list of .S depencies over assym.h.Miod Vallat
2014-06-16Enable PCI power management on Lemote.Paul Irofti
Remaining battery test results on Lemote after 30m in suspend: pci_dopm = 0: 82%, 68min pci_dopm = 1: 86%, 81min Suggested by deraadt@ Okay miod@, deraadt@
2014-05-31Revert previous diff setting cold to 1 on shutdown because it breaks machineMartin Pieuchot
with softraid(4) disks. softraid(4) is the last real consumer of the doshutdownhooks(9) API and it is not trivial to convert its hook to a DVACT_POWERDOWN handler since the latter does not allow to sleep.
2014-05-31Remove some unused code that we added at the 2013 Toronto hackathon butMike Larkin
don't need anymore.
2014-05-30Set cold to 1 before executing the DVACT_POWERDOWN handlers when halting orMartin Pieuchot
rebooting a machine, like it is done in the hibernate case. At least some USB host controller drivers rely on this to busy way instead of sleeping. Avoid a panic on macppc with an uhci(4) cardbus plugged in. ok deraadt@, uebayashi@
2014-05-24Provide bus_space_mmap()Miod Vallat
2009-12-11By popular demand and peer pressure, check-in work in progress work to supportMiod Vallat
the Yeelong Lemote mips-based netbook. Kernel bits only for now, needs polishing; most of this work done during h2k9 last month, although the porting effort started earlier this year.
2014-05-19There is no need to remember which usb(4) device is the child of an USBMartin Pieuchot
host controller because autoconf(9) already does it. Breakage reported by todd@
2014-04-07Enable upd(4) on archs where uhidev(4) is present, requested by mpi@.andre
2014-04-07Add axen(4) wherever axe(4) is.Brad Smith
ok mpi@ yuo@
2014-04-03Moar <uvm/uvm.h> -> <uvm/uvm_extern.h> love.Martin Pieuchot
2014-03-31Due the virtually indexed nature of the L1 instruction cache on most mipsMiod Vallat
processors, every time a new text page is mapped in a pmap, the L1 I$ is flushed for the va spanned by this page. Since we map pages of our binaries upon demand, as they get faulted in, but uvm_fault() tries to map the few neighbour pages, this can end up in a bunch of pmap_enter() calls in a row, for executable mappings. If the L1 I$ is small enough, this can cause the whole L1 I$ cache to be flushed several times. Change pmap_enter() to postpone these flushes by only registering the pending flushes, and have pmap_update() perform them. The cpu-specific cache code can then optimize this to avoid unnecessary operations. Tested on R4000SC, R4600SC, R5000SC, RM7000, R10000 with 4KB and 16KB page sizes (coherent and non-coherent designs), and Loongson 2F by mikeb@ and me. Should not affect anything on Octeon since there is no way to flush a subset of I$ anyway.
2014-03-31Change the order of operations during a suspend/resume cycle andMartin Pieuchot
call bufq_quiesce() after executing the DVACT_QUIESCE handlers. This should be safe since no disk nor controller drivers have such handler but it will allow us to detach sd(4) devices attached to a USB bus. Another benefit pointed out by kettenis@ is that drivers that need to read a firmware from the disk should be able to do it at resume time in a DVACT_WAKEUP handler. ok kettenis@, deraadt@
2014-03-29Update the loongson codebase to recognize the so-called `EFI-like' interfaceMiod Vallat
supposedly provided by newer PMON firmware (on Loongson 2Gq and Loongson 3A systems).
2014-03-29It's been a quarter century: we can assume volatile is present with that name.Philip Guenther
ok dlg@ mpi@ deraadt@
2014-03-27Remove dependency from wscons_machdep upon bonito. Instead of hardcoding bonitoMiod Vallat
as the northbridge, have the per-platform early setup code register functions providing access to the PCI configuration space, for the wscons code to walk the PCI space in search of a graphics board. No functional change yet.
2014-03-27Make sure the HIBERNATE pages get reserved regardless of the memory layout.Miod Vallat
2014-03-27Increase VM_PHYSSEG_MAX, necessary for systems with non-contiguous memoryMiod Vallat
(such as 2E and 3A systems).
2014-03-21Rename the symbolic constants for the pmap-specific vm_pag pg_flags fromMiod Vallat
PV_xxx to PGF_xxx for consistency (these are not stored in pvlist entries anymore since years). The PG_ prefix can't be used here because of name conflicts with <machine/pte.h> names, and I'd rather not rename the pte constants. No functional change. But it makes my life easier.
2014-03-13get rid of the assumption that the head of the alldevs list is theDavid Gwynne
"mainbus" device. this breaks when mpath is enabled because it attaches before mainbus and therefore takes the head position. have autoconf provide device_mainbus() which looks up mainbus_cd, and use that instead. discussed with deraadt who just wants mpath stuff to move forward despite there being many ways to shine this particular turd.
2014-03-10Support BUS_DMA_NOCACHE in bus_dma(9). Memory allocations done withMiod Vallat
BUS_DMA_NOCACHE (or BUS_DMA_COHERENT if the platform does not have coherent caches) will use PMAP_NOCACHE when invoking pmap_enter(), to avoid creating cached mappings, and then evicting them from the cache.
2014-01-06Use the dedicated BCD macros from sys/time.h instead of handrollingPaul Irofti
our own for the m41t8x clocks. Tested by me and jasper@. Okay jasper@, guenther@, deraadt@
2013-12-28crank the versionTheo de Raadt