summaryrefslogtreecommitdiff
path: root/sys/arch/octeon
AgeCommit message (Collapse)Author
2018-02-24Declare ci_ipl volatile to prevent the compiler from optimizingVisa Hankala
or reordering accesses to the variable. Assume that the assembler preserves the correct sequence of instructions, which allows the removal of the explicit noreorder/reorder toggles from the C code. With ci_ipl being volatile, drop mips_sync() calls that follow the accesses of the variable. The sync is redundant as a compiler barrier. In addition, the MIPS64 CPU designs should not need the sync for pipeline or write buffer control. According to miod@, the use of the instruction is a carryover from code targeting early MIPS designs that lack tight integration with the cache and write buffer. Discussed with and testing help from miod@. Tested on CN5020, CN6120, CN7130, CN7360, Loongson 2F and 3A1000, R4400, R8000, R10000 and R16000.
2018-02-18Inline hw_{get,set}curcpu() to streamline the machine code.Visa Hankala
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-23Always lock the kernel lock with non-MP-safe interrupt handlers.Visa Hankala
Suggested by kettenis@
2018-01-22Include <sys/mutex.h> instead of <machine/mutex.h>Martin Pieuchot
required by upcoming MI mutex change.
2018-01-18Fix the computation of `ncpusfound' on !MULTIPROCESSOR kernels so thatVisa Hankala
the value matches with the number of cores that GENERIC.MP uses. OK deraadt@, krw@, pirofti@
2018-01-16Fix bit.Visa Hankala
2018-01-16Fix return value.Visa Hankala
2018-01-11Add size for free.Visa Hankala
OK mpi@
2018-01-08Override membar_producer() for octeon.Visa Hankala
OK dlg@
2018-01-07Assume that direct-mapped addresses come from the xkphys segment.Visa Hankala
2018-01-07Add references to errata.Visa Hankala
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-27Make octeon_intr_establish() assume edge triggering with CIU3.Visa Hankala
This makes the API usable with edge triggered interrupt sources.
2017-12-27Ensure interrupt delivery is disabled when setting interruptVisa Hankala
delivery entry.
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-05Show board ID and revision in dmesg to ease the identificationVisa Hankala
of system model. The early boot code already prints them, but that output is not buffered and tends to be left out from dmesg submissions.
2017-12-05Drop cn30xxpow_intr_establish(), cn30xxpow_intr() and some otherVisa Hankala
unused code. POW interrupts are now handled in if_cnmac.c.
2017-11-26On wqe error, show also word2 and word3. Those might help in debugging.Visa Hankala
2017-11-26Initialize Rx subsystems before enabling the processing of incomingVisa Hankala
packets. Otherwise, a skosh of traffic may be handled using hardware default settings. One of the consequences is that packets can end up into a wrong POW group, causing a panic in cnmac_intr(). Panic reported by and testing help from Janne Johansson
2017-11-20Add the board ID of the Unifi Security Gateway PRO-4.Visa Hankala
Not tested with the hardware.
2017-11-20Fix the product code of the Unifi Security Gateway.Visa Hankala
Prompted by Justin Hibbits
2017-11-18Submit incoming packets to the network stack in batches like is doneVisa Hankala
in many other NIC drivers. This reduces submission overhead.
2017-11-18Move the packet input work requesting inside if_cnmac.c. This removesVisa Hankala
a layer of abstraction that would complicate upcoming changes.
2017-11-18Pass the software context as an argument to the interrupt handler.Visa Hankala
This is now possible because each port has a dedicated work queue interrupt.
2017-11-18Rename octeon_eth_* to cnmac_* for consistency with the driver's name.Visa Hankala
This also makes the code a bit less noisy to read.
2017-11-18Add the board ID for the Ubiquiti Unifi Security Gateway.Visa Hankala
From Justin Hibbits, thanks!
2017-11-09Synchronize command initiation, event wait, and interrupt handlingVisa Hankala
using a mutex. This lets octmmc_intr() run without the KERNEL_LOCK(). Tested on CN6120, CN7130 and CN7360.
2017-11-05Set the core's own group mask when scheduling work, to receive workVisa Hankala
from the intended group.
2017-11-05Handle failure.Visa Hankala
2017-11-05slight cleanupVisa Hankala
2017-11-05Add a function for getting the current core's hardware identifier.Visa Hankala
For now, the kernel does enforce one-to-one mapping between logical cpuids and hardware coreids, but the reliance on that should be removed eventually.
2017-11-05Remove unmaintained debug code.Visa Hankala
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-04Use the macro for cache line size.Visa Hankala
2017-11-04Check buffer size parameters at compile time.Visa Hankala
2017-11-04One macro for cache line size is enough.Visa Hankala
2017-11-03Remove alternative implementations of GMX CAM setup logicVisa Hankala
that have been disabled since r1.1.
2017-11-03Fix a stupid typo.Visa Hankala
2017-11-02Assign each cnmac(4) port its own input work group, and assignVisa Hankala
the interrupt processing of each work group to one of the available CPUs. This enables some parallelism in the early stages of packet Rx.
2017-11-01Add readiness to utilize LMTDMA operations.Visa Hankala
2017-11-01Fix the addressing of CVMSEG. The base address already points toVisa Hankala
the correct address space for direct referencing. Previous code has worked because the address conversion has only set bits that are already on.
2017-10-24remove defines for ioctls the kernel doesn't recogniseJonathan Gray
ok mpi@
2017-10-16Utilize scatter/gather DMA with the newer MMC controller.Visa Hankala
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-23Fix controller locking so that it covers the DMA map and bounce buffer.Visa Hankala
Those are shared by SD/MMC buses.
2017-09-22Do not bounce if possible.Visa Hankala
2017-09-22Allocate a bounce buffer once during init and reuse it for DMA commands.Visa Hankala
This makes the system a bit harder to corner when paging to SD/MMC. In addition, limit the maximum DMA segment size to MAXPHYS.