#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
298068 |
|
15-Apr-2016 |
andrew |
Rename ARM_INTRNG and MIPS_INTRNG to INTRNG. This will help with machine independent code that needs to know about INTRNG such as PCI drivers.
Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation
|
#
297539 |
|
04-Apr-2016 |
skra |
Remove FDT specific parts from INTRNG. Change its interface to make it universal.
(1) New struct intr_map_data is defined as a container for arbitrary description of an interrupt used by a device. Typically, an interrupt number and configuration relevant to an interrupt controller is encoded in such description. However, any additional information may be encoded too like a set of cpus on which an interrupt should be enabled or vendor specific data needed for setup of an interrupt in controller. The struct intr_map_data itself is meant to be opaque for INTRNG.
(2) An intr_map_irq() function is created which takes an interrupt controller identification and struct intr_map_data as arguments and returns global interrupt number which identifies an interrupt.
(3) A set of functions to be used by bus drivers is created as well as a corresponding set of methods for interrupt controller drivers. These sets take both struct resource and struct intr_map_data as one of the arguments. There is a goal to keep struct intr_map_data in struct resource, however, this way a final solution is not limited to that.
(4) Other small changes are done to reflect new situation.
This is only first step aiming to create stable interface for interrupt controller drivers. Thus, some temporary solution is taken. Interrupt descriptions for devices are stored in INTRNG and two specific mapping function are created to be temporary used by bus drivers. That's why the struct intr_map_data is not opaque for INTRNG now. This temporary solution will be replaced by final one in next step.
Differential Revision: https://reviews.freebsd.org/D5730
|
#
297230 |
|
24-Mar-2016 |
skra |
Generalize IPI support for ARM intrng and use it for interrupt controller IPI provider.
New struct intr_ipi is defined which keeps all info about an IPI: its name, counter, send and dispatch methods. Generic intr_ipi_setup(), intr_ipi_send() and intr_ipi_dispatch() functions are implemented.
An IPI provider must implement two functions: (1) an intr_ipi_send_t function which is able to send an IPI, (2) a setup function which initializes itself for an IPI and calls intr_ipi_setup() with appropriate arguments.
Differential Revision: https://reviews.freebsd.org/D5700
|
#
296138 |
|
27-Feb-2016 |
skra |
Move IPI related parts back to (ARM) machine specific file now, when the interrupt framework is also going to be used by another (MIPS) architecture. IPI implementations may vary much across different architectures.
An IPI implementation should still define INTR_IPI_COUNT and use intr_ipi_setup_counters() to setup IPI counters which are inside of intrcnt[] and intrnames[] arrays. Those are used for sysctl and ddb. Then, intr_ipi_increment_count() should be used to increment obtained counter.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D5459
|
#
295459 |
|
10-Feb-2016 |
adrian |
Break out the shared bits of the arm intrng definitions into sys/intr.h; leave the machine dependent bits in sys/arm/.
This is in preparation for MIPS INTRNG work.
Submitted by: Stanislav Galabov <sgalabov@gmail.com>
|
#
292426 |
|
18-Dec-2015 |
adrian |
[intrng] Migrate the intrng code from sys/arm/arm to sys/kern/subr_intr.c.
The ci20 port (by kan@) is going to reuse almost all of the intrng code since the SoC in question looks suspiciously like someone took an ARM SoC design and replaced the ARM core with a MIPS core.
* migrate out the code; * rename ARM_ -> INTR_; * rename arm_ -> intr_; * move the interrupt flush routine from intr.c / intrng.c into arm/machdep_intr.c - removing the code duplication and removing the ARM specific bits from here.
Thanks to the Star Wars: The Force Awakens premiere line for allowing me a couple hours of quiet time to finish the universe builds.
Tested:
* make universe
TODO:
* The structure definitions in subr_intr.c still includes machine/intr.h which requires one duplicates all of the intrng definitions in the platform code (which kan has done, and I think we don't have to.)
Instead I should break out the generic things (function declarations, common intr structures, etc) into a separate header.
* Kan has requested I make the PIC based IPI stuff optional.
|
#
289548 |
|
18-Oct-2015 |
ian |
Only decode fdt data which belongs to the GIC controller.
The interrupts-extended property is a list of controller-specific interrupt tuples for more than one controller. The decode routine of every PIC gets called in the pre-INTRNG code (nexus doesn't know which device instance belongs to which fdt node), so the GIC code has to check each FDT node it is asked to decode to ensure it is the owner.
Because in the pre-INTRNG world there can only be one instance of a GIC, it's safe to cache the results of a positive lookup in a static variable to avoid the expensive lookups on subsequent calls.
Submitted by: Svatopluk Kraus <onwahe@gmail.com> Differential Revision: https://reviews.freebsd.org/D2345
|
#
289529 |
|
18-Oct-2015 |
ian |
Import ARM_INTRNG, the "next generation" interrupt architecture for arm and armv6 architecures. The primary enhancement over the old design is support for hierarchical interrupt controllers (such as a gpio driver which can receive interrupts from a root PIC and act as a PIC itself for clients interested in handling a change of gpio pin state as an interrupt). The new code also provides an infrastructure for mapping interrupts described in metadata in the form of a "controller reference plus interrupt number" tuple into the simple "0-n" flat numeric space understood by rman and the bus resource mechanisms.
Use of the new code is enabled by setting the ARM_INTRNG option, and by making a few simple changes to the platform's support code. In addition each existing PIC driver needs changes to be ready for INTRNG; this commit contains the changes for the arm/gic driver, which most armv6 SoCs use, but it does not enable the new code yet on any platform.
This project has been many years in the making, starting as a GSoC project by Jakub Klama (jceel@) in 2012. That didn't get committed right away and the source base evolved out from under it to some degree. In 2014 I rebased the diffs to then -current and did some enhancements in the area of mapping interrupt numbers and storing associated fdt data, then the project went cold again for a while. Eventually Svata Kraus took that work in progress and did another big round of work on it, removing most of the remaining rough edges. Finally I took that and made one more pass through it, mostly disabling the "INTR_SOLO" feature for now, pending further design discussions on how to most efficiently dispatch a pending interrupt through more than one layer of PIC. The current code with the INTR_SOLO feature disabled uses approximate 100 extra cpu cycles for each cascaded PIC the interrupt has to be passed to, so what's left to do is about efficiency, not correct operation.
Differential Revision: https://reviews.freebsd.org/D2047
|
#
289522 |
|
18-Oct-2015 |
ian |
Rename arm_init_secondary_ic() -> arm_pic_init_secondary(). The latter is the name the function will have when the new ARM_INTRNG code is integrated, and doing this rename first will make it easier to toggle the new interrupt handling code on/off with a config option for debugging.
|
#
280824 |
|
29-Mar-2015 |
andrew |
Remove arm1136 support. We don't have any configs that use it, and I don't expect us to add support for any more arm11 SoCs.
|
#
276984 |
|
11-Jan-2015 |
andrew |
Rename gic_init_secondary to arm_init_secondary_ic to help with the merge of the arm_intrng project branch.
|
#
276032 |
|
21-Dec-2014 |
andrew |
Pull out the fdt mapping code into intr.c. The arm_intrng branch also defines this function allowing the mapping method to change when we move to it.
|
#
271601 |
|
14-Sep-2014 |
ian |
Add a common routine for parsing FDT data describing an ARM GIC interrupt.
In the fdt data we've written for ourselves, the interrupt properties for GIC interrupts have just been a bare interrupt number. In standard data that conforms to the published bindings, GIC interrupt properties contain 3-tuples that describe the interrupt as shared vs private, the interrupt number within the shared/private address space, and configuration info such as level vs edge triggered.
The new gic_decode_fdt() function parses both types of data, based on the #interrupt-cells property. Previously, each platform implemented a decode routine and put a pointer to it into fdt_pic_table. Now they can just list this function in their table instead if they use arm/gic.c.
|
#
270884 |
|
31-Aug-2014 |
br |
GIC (Cortex A's interrupt controller) supports up to 1020 IRQs.
|
#
266621 |
|
24-May-2014 |
ian |
Eliminate one of the causes of spurious interrupts on armv6. The arm weak memory ordering model allows writes to different devices to complete out of order, leading to a situation where the write that clears an interrupt source at a device can complete after a write that unmasks and EOIs the interrupt at the interrupt controller, leading to a spurious re-interrupt.
This adds a generic barrier function specific to the needs of interrupt controllers, and calls that function from the GIC and TI AINTC controllers. There may still be other soc-specific controllers that need to make the call.
Reviewed by: cognet, Svatopluk Kraus <onwahe@gmail.com> MFC after: 3 days
|
#
260375 |
|
06-Jan-2014 |
andreast |
Fix arm build.
Reviewed by: ian, zbb
|
#
260161 |
|
01-Jan-2014 |
zbb |
Add polarity and level support to ARM GIC
Add suport for setting triggering level and polarity in GIC. New function pointer was added to nexus which corresponds to the function which sets level/sense in the hardware (GIC).
Submitted by: Wojciech Macek <wma@semihalf.com> Obtained from: Semihalf
|
#
259640 |
|
19-Dec-2013 |
ganbold |
Add identification and necessary type checks for Krait CPU cores. Krait CPU is used in Qualcomm Snapdragon S4 and Snapdragon 400/600/800 SoCs and has architectural similarities to ARM Cortex-A15. As for development boards IFC6400 series embedded boards from Inforce Computing uses Snapdragon S4 Pro/APQ8064.
Approved by: stas (mentor)
|
#
252362 |
|
28-Jun-2013 |
ray |
Bump max number of IRQs for Cortex-Ax family to cover Exynos5 requirement.
Submitted by: Ruslan Bukin <br@bsdpad.com>
|
#
245637 |
|
18-Jan-2013 |
ian |
Eliminate the need for an intermediate array of indices into the arrays of interrupt counts and names, by making the names into an array of fixed-length strings that can be directly indexed. This eliminates extra memory accesses on every interrupt to increment the counts.
As a side effect, it also fixes a bug that would corrupt the names data if a name was longer than MAXCOMLEN, which led to incorrect vmstat -i output.
Approved by: cognet (mentor)
|
#
244480 |
|
20-Dec-2012 |
gonzo |
Replace generic ARM11 option with more specific support for ARM1136 and ARM1176
Submitted by: Daisuke Aoyama <aoyama at peach.ne.jp> Obtained from: NetBSD
|
#
240492 |
|
14-Sep-2012 |
gber |
Add support for MSI in interrupt controlller.
MSI are implemented via software interrupt. PCIe cards will write into software interrupt register which will cause inbound shared interrupt which will be interpreted as a MSI.
Obtained from: Marvell, Semihalf
|
#
240488 |
|
14-Sep-2012 |
gber |
Add support for Armada XP A0.
- Add functions to calculate clocks instead using hardcoded values - Update reset and timers functions - Update number of interrupts - Change name of platform from db88f78100 to db78460 - Correct DRAM size and PCI IRQ routing in dts file.
Obtained from: Semihalf
|
#
239688 |
|
25-Aug-2012 |
gonzo |
ARM11 might have more then 32 interrupts, e.g. BCM2835: 72 interrupts
|
#
239268 |
|
15-Aug-2012 |
gonzo |
Merging projects/armv6, part 1
Cummulative patch of changes that are not vendor-specific: - ARMv6 and ARMv7 architecture support - ARM SMP support - VFP/Neon support - ARM Generic Interrupt Controller driver - Simplification of startup code for all platforms
|
#
236992 |
|
13-Jun-2012 |
imp |
trim trailing whitespace
|
#
193847 |
|
09-Jun-2009 |
marcel |
Pass the previously returned IRQ back to arm_get_next_irq() so that the implementation can guarantee forward progress in the event of a stuck interrupt or interrupt storm. This is especially critical for fast interrupt handlers, as they can cause a hard hang in that case. When first called, arm_get_next_irq() is passed -1.
Obtained from: Juniper Networks, Inc.
|
#
186352 |
|
20-Dec-2008 |
sam |
Merge support for Gateworks Cambria boards: o add support for IXP435 cpu's (e.g. 64 irq's) o add support for Cambria-specific devices: npe, led's (front panel and octal latch), ehci, mcu, ide cf o redo memory mapping for xscale/ixp4xx boards: previously memory was assumed aliased to 0x10000000 but this appears to be true only for ixp425 systems and breaks operation on others; rework so memory is assumed to start at 0 o rework NPE configuration support to use NPE id's instead of port #'s; these changes also rename the associated MAC's to follow the NPE's they are attached to o update npe firmware to latest rev (same license) and update default fw imageid's to match; in particular this adds NPE-A and crypto support o re-style NPE fw handling code and add a console msg identifying the attributes of the loaded fw o fix numerous problems with handling failures during npe setup o fix npe rx q setup; need to spin waiting for mailbox responses during early boot stages as qmgr interrupts are not delivered; this fixes the problem where all 8 traffic classifications were not tied to the rx q (and eliminates the console msg "remember to fix rx q setup") o add DELAY to npe MII wait logic for IXP435 o strip down builtin phys->virt address translation table in resource handling to just those resources that require it and add a console msg to alert people when this (kludge) table needs to be extended o purge a bunch of dead netbsd-ism's o cleanup avila led driver o add Cambria support to boot2 and rework code for better multi-board support
Notes: 1. NPE-A doesn't work and causes NPE-C to stop working; it is disabled in the hints 2. USB isn't working yet; controller communicates ok but device discovery fails 3. Cambria support must be configured separately from IXP425 boards; multi-board support is TBD
Sponsored by: Hobnob, Gateworks (board donation) Reviewed by: imp
|
#
183840 |
|
13-Oct-2008 |
raj |
Introduce basic support for Marvell families of system-on-chip ARM devices:
* Orion - 88F5181 - 88F5182 - 88F5281
* Kirkwood - 88F6281
* Discovery - MV78100
The above families of SOCs are built around CPU cores compliant with ARMv5TE instruction set architecture definition. They share a number of integrated peripherals. This commit brings support for the following basic elements:
* GPIO * Interrupt controller * L1, L2 cache * Timers, watchdog, RTC * TWSI (I2C) * UART
Other peripherals drivers will be introduced separately.
Reviewed by: imp, marcel, stass (Thanks guys!) Obtained from: Marvell, Semihalf
|
#
182933 |
|
11-Sep-2008 |
raj |
ARM interrupts improvements.
- Fix nexus_setup_intr() abuse of setting up multiple IRQs in one go. Calling arm_setup_irqhandler() in loop is bogus, as there's just one cookie given from the caller and it is overwritten in each iteration so that only the last handler's cookie value prevails.
- Proper intr masking/unmasking handling: the IRQ source is masked at PIC level only after the last handler has been removed from the list.
Reviewed by: cognet, imp, sam, stass Obtained from: Grzegorz Bernacki gjb ! semihalf dot com
|
#
179595 |
|
06-Jun-2008 |
benno |
Support for the XScale PXA255 SoC as found on the Gumstix Basix and Connex boards. This is enough to net-boot to multiuser.
Also supported is the SMSC LAN91C111 parts used on the netCF, netDUO and netMMC add-on boards.
I'll be putting some instructions on how to boot this on the Gumstix boards online soon.
This is still fairly rough and will be refined over time but I felt it was better to get this out there where other people can help out.
|
#
178366 |
|
20-Apr-2008 |
cognet |
On the AT91, we need to write on the EOI register after we handle an interrupt. So, add a new function pointer, arm_post_filter, which defaults to NULL, and which will be used as the post_filter arg for intr_event_create(). Set it properly for the AT91, so that it boots again.
Reported by: hps
|
#
170827 |
|
16-Jun-2007 |
cognet |
The iop34x has 128 interrupts.
|
#
166901 |
|
23-Feb-2007 |
piso |
o break newbus api: add a new argument of type driver_filter_t to bus_setup_intr()
o add an int return code to all fast handlers
o retire INTR_FAST/IH_FAST
For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current
Reviewed by: many Approved by: re@
|
#
147166 |
|
09-Jun-2005 |
cognet |
- MFp4: modify slightly the arm intr API, there's arm CPUs with more than 32 interrupts. - Implement teardown methods where appropriate.
|
#
141820 |
|
13-Feb-2005 |
cognet |
Define NIRQ to 64 for CPU_ARM9, because Cirrus Logic EP93XX cores provides 64 irqs. This should be re-thought later.
|
#
139735 |
|
05-Jan-2005 |
imp |
Start all license statements with /*-
|
#
135650 |
|
23-Sep-2004 |
cognet |
Add new functions to know which irqs are pending, and to mask and unmask interrupts, as these are CPU specific. If the interrupt handler is not marked as INTR_FAST, don't unmask the interrupt until it as been serviced.
|
#
129198 |
|
14-May-2004 |
cognet |
Import FreeBSD/arm kernel bits. It only supports sa1110 (on simics) right now, but xscale support should come soon. Some of the initial work has been provided by : Stephane Potvin <sepotvin at videotron.ca> Most of this comes from NetBSD.
|