summaryrefslogtreecommitdiffstats
path: root/sys/arm
Commit message (Collapse)AuthorAgeFilesLines
* Commit the support for removing cpumask_t and replacing it directly withattilio2011-05-053-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno
* Change rman_manage_region() to actually honor the rm_start and rm_endjhb2011-04-291-2/+2
| | | | | | | | | | constraints on the rman and reject attempts to manage a region that is out of range. - Fix various places that set rm_end incorrectly (to ~0 or ~0u instead of ~0ul). - To preserve existing behavior, change rman_init() to set rm_start and rm_end to allow managing the full range (0 to ~0ul) if they are not set by the caller when rman_init() is called.
* Fix build of this kernel config. The ath(4) bits need the 11n frame formatjhb2011-04-291-1/+1
| | | | | | even though ar5416 isn't enabled. Reviewed by: adrian
* Add the watchdogs patting during the (shutdown time) disk syncing andattilio2011-04-282-0/+16
| | | | | | | | | | | | | | | | disk dumping. With the option SW_WATCHDOG on, these operations are doomed to let watchdog fire, fi they take too long. I implemented the stubs this way because I really want wdog_kern_* KPI to not be dependant by SW_WATCHDOG being on (and really, the option only enables watchdog activation in hardclock) and also avoid to call them when not necessary (avoiding not-volountary watchdog activations). Sponsored by: Sandvine Incorporated Discussed with: emaste, des MFC after: 2 weeks
* - Add shim to simplify migration to the CAM-based ATA. For each new adaXmav2011-04-263-0/+3
| | | | | | | | | device in /dev/ create symbolic link with adY name, trying to mimic old ATA numbering. Imitation is not complete, but should be enough in most cases to mount file systems without touching /etc/fstab. - To know what behavior to mimic, restore ATA_STATIC_ID option in cases where it was present before. - Add some more details to UPDATING.
* Typo fixcognet2011-04-251-1/+1
|
* Switch the GENERIC kernels for all architectures to the new CAM-based ATAmav2011-04-249-30/+29
| | | | | | | | | | | | | stack. It means that all legacy ATA drivers are disabled and replaced by respective CAM drivers. If you are using ATA device names in /etc/fstab or other places, make sure to update them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX -> saY, where 'Y's are the sequential numbers for each type in order of detection, unless configured otherwise with tunables, see cam(4)). ataraid(4) functionality is now supported by the RAID GEOM class. To use it you can load geom_raid kernel module and use graid(8) tool for management. Instead of /dev/arX device names, use /dev/raid/rX.
* Call init_param1() much earlier, so that msgbufsize is non-zero when we wantpluknet2011-04-191-2/+3
| | | | | | | to map and use the msgbuf. Reviewed by: cognet MFC after: 1 week
* Delete mistakenly added sys/files.ts7800philip2011-04-181-0/+80
| | | | | | | | | Add mistakenly forgotten sys/arm/conf/TS7800 Not sure how this happened. Apologies for the repo-churn. Submitted by: glebius Pointy hat to: philip
* Add basic support for the Marvell Orion TS-7800.philip2011-04-152-0/+19
| | | | Submitted by: Kristof Provost <kristof -at- freebsd.org>
* We don't need to call EOWRITE4(sc, EHCI_USBINTR, 0) directly from each EHCIhselasky2011-04-121-2/+2
| | | | | | | | bus driver at detach, hence ehci_detach() does exactly this since r199718. Submitted by: Luiz Otavio O Souza MFC after: 7 days Approved by: thompsa (mentor)
* - Correct EHCI interrupt disabling at detach.hselasky2011-04-031-1/+1
| | | | | | Submitted by: Luiz Otavio O Souza MFC after: 7 days Approved by: thompsa (mentor)
* Break out the ath PCI logic into a separate device/module.adrian2011-03-312-2/+4
| | | | | | | | | Introduce the AHB glue for Atheros embedded systems. Right now it's hard-coded for the AR9130 chip whose support isn't yet in this HAL; it'll be added in a subsequent commit. Kernel configuration files now need both 'ath' and 'ath_pci' devices; both modules need to be loaded for the ath device to work.
* Fix mv_gpio_in() for pin numbers that occupy bits 8-31 in GPIO registers.marcel2011-03-161-1/+1
| | | | | | The compiler will truncate the 32-bit return value of mv_gpio_value_get() to match the 8-bit return value of mv_gpio_in(). A conditional expression is used to have mv_gpio_in() always return 0 or 1 instead.
* Make get_cyclecount(9) little bit more useful where binuptime(9) is used.jkim2011-03-141-1/+1
|
* Extend struct sysvec with new method sv_schedtail, which is used for andchagin2011-03-081-0/+1
| | | | | | | | | | | | | | | explicit process at fork trampoline path instead of eventhadler(schedtail) invocation for each child process. Remove eventhandler(schedtail) code and change linux ABI to use newly added sysvec method. While here replace explicit comparing of module sysentvec structure with the newly created process sysentvec to detect the linux ABI. Discussed with: kib MFC after: 2 Week
* Continue to introduce Capsicum capability mode:rwatson2011-03-011-0/+21
| | | | | | | | | | | | White list sysarch calls allowed in capability mode; arguably, there should be some link between the capability mode model and the privilege model here. Sysarch is a morass similar to ioctl, in many senses. Submitted by: anderson Discussed with: benl, kris, pjd Sponsored by: Google, Inc. Obtained from: Capsicum Project MFC after: 3 months
* Add a real dependency on the microcode.obrien2011-02-251-1/+1
| | | | | | | Now when one does 'make kernel ; make kernel' the second invocation only does: `kernel.ko' is up to date. rather than reproduce all the binary microcode files and relink the kernel. [continuation of r212429]
* Get myself a brain, move the call to init_param1() before the first use incognet2011-02-213-6/+9
| | | | | | | at91_machdep.c, and do it for the files I forgot the first time Reported by: andrew Submitted by: pluknet
* Fix typos - remove duplicate "the".brucec2011-02-211-1/+1
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Fix the R_ARM_ABS32 relocation implementation. The memory addressmarcel2011-02-171-3/+1
| | | | | | | contains the addend that we need to include. Obtained from: Juniper Networks. Fixed by: Santhanakrishnan Balraj <sbalraj@juniper.net>
* Remove pmap fields that are either unused or not fully implemented.alc2011-02-171-2/+0
| | | | Discussed with: kib
* Oops, wasn't supposed to commit this.cognet2011-02-131-1/+1
|
* Call init_param1() much earlier, so that msgbufsize is non-zero when we wantcognet2011-02-136-13/+18
| | | | to map and use the msgbuf.
* Whitespace tweak.jhb2011-02-091-1/+1
|
* In arm_get_next_irq(), use the last IRQ argument in order to preventmarcel2011-02-081-11/+23
| | | | | | | | a hard hang due to an interrupt storm or stuck interrupt pin. We return the next IRQ that is larger than the last one returned and in doing so give all interrupts a fair chance of being handled. Consequently, we're able to break into the kernel debugger in such an event.
* o Make sure to mask off timer1 interrupts. It's not necessarilymarcel2011-02-081-1/+2
| | | | | | | | | masked-off by the firmware. o In DELAY(). Make sure we have an inner-loop body that the compiler cannot eliminate. While timing does not have to be perfect, the loops must be there to have at least some notion of delay. Obtained from: Juniper Networks
* Remove use_high from the softc and simply check the number of GPIOmarcel2011-02-071-7/+3
| | | | | | pins to determine whether there's a high register set or not. This allows platform_gpio_init() to work without duplicating the work done in the attach method.
* unbreak mutlicast hash creation for the second time.ticso2011-02-071-2/+12
| | | | at91_emac hardware is *not* using ether_crc32_be algorithm!
* phys_addr is a PA not a VA so declare it as a vm_paddr_t not a vm_offset_t.imp2011-02-051-1/+1
|
* Make md_tp a register_t not a void *. This will keep us fromimp2011-02-053-6/+6
| | | | | | | accidentally dereferencng it and might be one fewer things to change if arm64 happens... Submitted by: rwatson's question on irc...
* The FDT describes the host controller directly. There's no need tomarcel2011-02-031-17/+10
| | | | | | | | get properties from the parent. The parent is in fact the FDT bus itself and will therefore not have the properties we're looking for. Sponsored by: Juniper Networks
* Accept r1 as having the metadata pointer argument if r0 is 0.marcel2011-02-031-4/+10
| | | | | | This provides backward compatibility with Juniper loaders. Sponsored by: Juniper Networks
* Put the general logic for being a CPU hog into a new functionmdf2011-02-021-2/+1
| | | | | | | | | | should_yield(). Use this in various places. Encapsulate the common case of check-and-yield into a new function maybe_yield(). Change several checks for a magic number of iterations to use should_yield() instead. MFC after: 1 week
* Introduce macro FDT_MAP_IRQ to map from an interrupt controller andmarcel2011-01-291-0/+3
| | | | | interrupt pin pair to a global IRQ number. When multiple PICs exist on a board, the interrupt pin alone is not unique.
* Move the load address of the kernel to the start of KVA as theandrew2011-01-291-4/+4
| | | | | | s3c24x0 copy of initarm expects the kernel to be loaded there. Approved by: imp (mentor)
* Fix r217688. We need to call init_param1() before we use msgbufsize,marcel2011-01-221-1/+3
| | | | now that the size of the message buffer is a tunable.
* Fix backtraces by defining ksym_start & ksym_end if DDB ismarcel2011-01-221-0/+8
| | | | | | | | defined. The kernel linker doesn't deal with symbols of type NOTYPE and typically gives the wrong symbol ($a) for local symbols. Obtained from: Juniper Networks, Inc.
* Make MSGBUF_SIZE kernel option a loader tunable kern.msgbufsize.pluknet2011-01-219-36/+21
| | | | | | | Submitted by: perryh pluto.rain.com (previous version) Reviewed by: jhb Approved by: kib (mentor) Tested by: universe
* For architectures not using direct map , and requiring real KVA page forkib2011-01-181-1/+1
| | | | | | | | | | | | | | sf buf allocation, use wakeup() instead of wakeup_one() to notify sf buffer waiters about free buffer. sf_buf_alloc() calls msleep(PCATCH) when SFB_CATCH flag was given, and for simultaneous wakeup and signal delivery, msleep() returns EINTR/ERESTART despite the thread was selected for wakeup_one(). As result, we loose a wakeup, and some other waiter will not be woken up. Reported and tested by: az Reviewed by: alc, jhb MFC after: 1 week
* Remove empty dev_mem_md_init() stubs.jkim2011-01-171-5/+0
|
* Add reader/writer lock around mem_range_attr_get() and mem_range_attr_set().jkim2011-01-172-1/+6
| | | | | | | | | Compile sys/dev/mem/memutil.c for all supported platforms and remove now unnecessary dev_mem_md_init(). Consistently define mem_range_softc from mem.c for all platforms. Add missing #include guards for machine/memdev.h and sys/memrange.h. Clean up some nearby style(9) nits. MFC after: 1 month
* Don't re-use MODINFOMD_BOOTINFO as MODINFOMD_DTBP. It breaksmarcel2011-01-111-1/+2
| | | | | compatibility without any means for the kernel to work with an older loader.
* Remove unneeded includes of <sys/linker_set.h>. Other headers that usejhb2011-01-112-2/+0
| | | | | | it internally contain nested includes. Reviewed by: bde
* Move repeated MAXSLP definition from machine/vmparam.h to sys/vmmeter.h.kib2011-01-091-1/+0
| | | | | | | Update the outdated comments describing MAXSLP and the process selection algorithm for swap out. Comments wording and reviewed by: alc
* On mixed 32/64 bit architectures (mips, powerpc) use __LP64__ rather thantijl2011-01-081-2/+2
| | | | | | | | | | | | | architecture macros (__mips_n64, __powerpc64__) when 64 bit types (and corresponding macros) are different from 32 bit. [1] Correct the type of INT64_MIN, INT64_MAX and UINT64_MAX. Define (U)INTMAX_C as an alias for (U)INT64_C matching the type definition for (u)intmax_t. Do this on all architectures for consistency. Suggested by: bde [1] Approved by: kib (mentor)
* On 32 bit architectures define (u)int64_t as (unsigned) long long insteadtijl2011-01-081-6/+6
| | | | | | | | | | | | | | | | of (unsigned) int __attribute__((__mode__(__DI__))). This aligns better with macros such as (U)INT64_C, (U)INT64_MAX, etc. which assume (u)int64_t has type (unsigned) long long. The mode attribute was used because long long wasn't standardised until C99. Nowadays compilers should support long long and use of the mode attribute is discouraged according to GCC Internals documentation. The type definition has to be marked with __extension__ to support compilation with "-std=c89 -pedantic". Discussed with: bde Approved by: kib (mentor)
* Fix types of some values in machine/_limits.h.tijl2011-01-081-3/+1
| | | | | | | | | | | | | | | | | On some architectures UCHAR_MAX and USHRT_MAX had type unsigned int. However, lacking integer suffixes for types smaller than int, their type should correspond to that of an object of type unsigned char (or short) when used in an expression with objects of type int. In that case unsigned char (short) are promoted to int (i.e. signed) so the type of UCHAR_MAX and USHRT_MAX should also be int. Where MIN/MAX constants implicitly have the correct type the suffix has been removed. While here, correct some comments. Reviewed by: bde Approved by: kib (mentor)
* Remove unused support for 64 bit long on 32 bit architectures.tijl2011-01-071-11/+0
| | | | | | | | It was used mainly to discover and fix some 64-bit portability problems before 64-bit arches were widely available. Discussed with: bde Approved by: kib (mentor)
* Add AT_STACKPROT elf aux vector. Will be used to inform rtld about thekib2011-01-071-1/+2
| | | | initial stack protection set by the kernel image activator.
OpenPOWER on IntegriCloud