summaryrefslogtreecommitdiffstats
path: root/sys/arm/cavium
Commit message (Collapse)AuthorAgeFilesLines
* MFC r307518:hselasky2016-11-072-12/+0
| | | | | | | | | | | | | | | | | | | | | Fix device delete child function. When detaching device trees parent devices must be detached prior to detaching its children. This is because parent devices can have pointers to the child devices in their softcs which are not invalidated by device_delete_child(). This can cause use after free issues and panic(). Device drivers implementing trees, must ensure its detach function detaches or deletes all its children before returning. While at it remove now redundant device_detach() calls before device_delete_child() and device_delete_children(), mostly in the USB controller drivers. Tested by: Jan Henrik Sylvester <me@janh.de> Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D8070
* Spaces->tab in comment.ian2016-05-231-1/+1
|
* Use the new(-ish) CP15_SCTLR macro to generate system control reg accessesian2016-05-231-2/+3
| | | | | | | | | where possible. In the places that doesn't work (multi-line inline asm, and places where the old armv4 cpufuncs mechanism is used), annotate the accesses with a comment that includes SCTLR. Now a grep -i sctlr can find all the system control register manipulations. No functional changes.
* sys/arm: Minor spelling fixes.pfg2016-05-041-1/+1
| | | | Only affects comments: no functional change.
* Move arm's devmap to some generic place, so it can be usedbr2016-04-261-3/+3
| | | | | | | | | by other architectures. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D6091 Sponsored by: DARPA, AFRL Sponsored by: HEIF5
* sys: use our roundup2/rounddown2() macros when param.h is available.pfg2016-04-211-3/+3
| | | | | | | | | | rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted.
* arm: for pointers replace 0 with NULL.pfg2016-04-151-3/+3
| | | | | | These are mostly cosmetical, no functional change. Found with devel/coccinelle.
* Fix the resource_list_print_type() calls to use uintmax_t.jhibbits2016-03-221-3/+3
| | | | Missed a bunch from r297000.
* Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.jhibbits2016-02-201-1/+1
| | | | | | | | | | | This simplifies checking for default resource range for bus_alloc_resource(), and improves readability. This is part of, and related to, the migration of rman_res_t from u_long to uintmax_t. Discussed with: jhb Suggested by: marcel
* Remove pd_prot and pd_cache members from struct arm_devmap_entry.skra2016-02-171-10/+0
| | | | | The struct is used for definition of static device mappings which should always have same protection and attributes.
* ARM: Consistently use cpu_setttb() instead of setttb().mmel2016-02-031-2/+2
| | | | Remove unused #define for drain_writebuf.
* Convert rman to use rman_res_t instead of u_longjhibbits2016-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: Migrate to using the semi-opaque type rman_res_t to specify rman resources. For now, this is still compatible with u_long. This is step one in migrating rman to use uintmax_t for resources instead of u_long. Going forward, this could feasibly be used to specify architecture-specific definitions of resource ranges, rather than baking a specific integer type into the API. This change has been broken out to facilitate MFC'ing drivers back to 10 without breaking ABI. Reviewed By: jhb Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5075
* Remove the arm KERNPHYSADDR option as it is no longer used. The makeandrew2015-12-221-1/+0
| | | | option is still in existance as it is used to build the trampoline code.
* Move more bus_space_* files to be built by files.arm. This leaves theandrew2015-11-211-1/+0
| | | | | | | definition in a file.* file under sys/arm/arm in the few cases we need it for non-fdt platforms. Sponsored by: ABT Systems Ltd
* Make kstack_pages a tunable on arm, x86, and powepc. On i386, thekib2015-08-101-2/+2
| | | | | | | | | | | | | | | | | | | initial thread stack is not adjusted by the tunable, the stack is allocated too early to get access to the kernel environment. See TD0_KSTACK_PAGES for the thread0 stack sizing on i386. The tunable was tested on x86 only. From the visual inspection, it seems that it might work on arm and powerpc. The arm USPACE_SVC_STACK_TOP and powerpc USPACE macros seems to be already incorrect for the threads with non-default kstack size. I only changed the macros to use variable instead of constant, since I cannot test. On arm64, mips and sparc64, some static data structures are sized by KSTACK_PAGES, so the tunable is disabled. Sponsored by: The FreeBSD Foundation MFC after: 2 week
* Fix KSTACK_PAGES issue when the default value was changed in KERNCONFzbb2015-07-161-0/+2
| | | | | | | | | | | | | | | | | | If KSTACK_PAGES was changed to anything alse than the default, the value from param.h was taken instead in some places and the value from KENRCONF in some others. This resulted in inconsistency which caused corruption in SMP envorinment. Ensure all places where KSTACK_PAGES are used the opt_kstack_pages.h is included. The file opt_kstack_pages.h could not be included in param.h because was breaking the toolchain compilation. Reviewed by: kib Obtained from: Semihalf Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3094
* Build the cpufunc_asm_* files based on the cpu type, not which config fileandrew2015-03-291-1/+0
| | | | we happen to be building.
* Remove the bootconfig parsing. We never used it and always passed either anandrew2015-03-291-1/+1
| | | | empty string or NULL to the setup functions that called into it.
* Use the base arm bus_space instead of an identical local copy.ian2015-01-212-112/+6
|
* For some reason, all the arm bus_space functions that work with uint16ian2015-01-211-8/+7
| | | | | values have armv4 in the name. There's nothing armv4-special about them, so just use the same sort of names as all the other functions.
* Add 64-bit DMA support in the XHCI controller driver.hselasky2015-01-052-0/+2
| | | | | | | - Fix some comments and whitespace while at it. MFC after: 1 month Submitted by: marius@
* Mechanically convert to if_inc_counter().glebius2014-09-191-3/+3
|
* Unify interrupts bit definition and usage. While here remove PSR_C_bit.andrew2014-09-101-1/+2
| | | | | | Submitted by: Svatopluk Kraus <onwahe at gmail.com>, Michal Meloun <meloun at miracle.cz> Differential Revision: https://reviews.freebsd.org/D754
* Fix various NIC drivers to properly cleanup static DMA resources.jhb2014-06-111-12/+20
| | | | | | | | | | | | | | | In particular, don't check the value of the bus_dma map against NULL to determine if either bus_dmamem_alloc() or bus_dmamap_load() succeeded. Instead, assume that bus_dmamap_load() succeeeded (and thus that bus_dmamap_unload() should be called) if the bus address for a resource is non-zero, and assume that bus_dmamem_alloc() succeeded (and thus that bus_dmamem_free() should be called) if the virtual address for a resource is not NULL. In many cases these bugs could result in leaks when a driver was detached. Reviewed by: yongari MFC after: 2 weeks
* When mapping device memory, use PTE_DEVICE rather than PTE_NOCACHE.ian2014-05-101-4/+4
| | | | | | On armv4 these are defined as synonyms right now, but it's a bit ambiguous what NOCACHE means (is buffering/write-combining also enabled or not?); this is a first step towards replacing PTE_NOCACHE with a less ambiguous name.
* Move sys/arm/econa to sys/arm/cavium/cns11xx.rpaulo2014-04-0715-0/+4757
OpenPOWER on IntegriCloud