An error occurred fetching the project authors.
- 11 Feb, 2014 1 commit
-
-
Paul Gortmaker authored
Commit 446f6d06 ("powerpc/mpic: Properly set default triggers") breaks the mpc7447_hpc_defconfig as follows: CC arch/powerpc/sysdev/mpic.o arch/powerpc/sysdev/mpic.c: In function 'mpic_set_irq_type': arch/powerpc/sysdev/mpic.c:886:9: error: case label does not reduce to an integer constant arch/powerpc/sysdev/mpic.c:890:9: error: case label does not reduce to an integer constant arch/powerpc/sysdev/mpic.c:894:9: error: case label does not reduce to an integer constant arch/powerpc/sysdev/mpic.c:898:9: error: case label does not reduce to an integer constant Looking at the cpp output (gcc 4.7.3), I see: case mpic->hw_set[MPIC_IDX_VECPRI_SENSE_EDGE] | mpic->hw_set[MPIC_IDX_VECPRI_POLARITY_POSITIVE]: The pointer into an array appears because CONFIG_MPIC_WEIRD=y is set for this platform, thus enabling the following: ------------------- #ifdef CONFIG_MPIC_WEIRD static u32 mpic_infos[][MPIC_IDX_END] = { [0] = { /* Original OpenPIC compatible MPIC */ [...] #define MPIC_INFO(name) mpic->hw_set[MPIC_IDX_##name] #else /* CONFIG_MPIC_WEIRD */ #define MPIC_INFO(name) MPIC_##name #endif /* CONFIG_MPIC_WEIRD */ ------------------- Here we convert the case section to if/else if, and also add the equivalent of a default case to warn about unknown types. Boot tested on sbc8548, build tested on all defconfigs. Signed-off-by:
Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 11 Oct, 2013 1 commit
-
-
Scott Wood authored
Otherwise, we get a debug traceback due to the use of smp_processor_id() (or get_paca()) inside hard_smp_processor_id(). mpic_host_map() is just looking for a default CPU, so it doesn't matter if we migrate after getting the CPU ID. Signed-off-by:
Scott Wood <scottwood@freescale.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 10 Oct, 2013 1 commit
-
-
Rob Herring authored
When removing prom.h include by of.h, several OF headers will no longer be implicitly included. Add explicit includes of of_*.h as needed. Signed-off-by:
Rob Herring <rob.herring@calxeda.com> Acked-by:
Grant Likely <grant.likely@linaro.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Anatolij Gustschin <agust@denx.de> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Olof Johansson <olof@lixom.net> Cc: linuxppc-dev@lists.ozlabs.org
-
- 01 Jul, 2013 3 commits
-
-
Dongsheng.wang@freescale.com authored
Register a mpic subsystem at /sys/devices/system/ Signed-off-by:
Wang Dongsheng <dongsheng.wang@freescale.com> Signed-off-by:
Scott Wood <scottwood@freescale.com>
-
Dongsheng.wang@freescale.com authored
Add irq_set_wake support. Just add IRQF_NO_SUSPEND to desc->action->flag. So the wake up interrupt will not be disable in suspend_device_irqs. Signed-off-by:
Wang Dongsheng <dongsheng.wang@freescale.com> Signed-off-by:
Scott Wood <scottwood@freescale.com>
-
Hongtao Jia authored
MPIC version is useful information for both mpic_alloc() and mpic_init(). The patch provide an API to get MPIC version for reusing the code. Also, some other IP block may need MPIC version for their own use. The API for external use is also provided. Signed-off-by:
Jia Hongtao <hongtao.jia@freescale.com> Signed-off-by:
Li Yang <leoli@freescale.com> Signed-off-by:
Scott Wood <scottwood@freescale.com>
-
- 31 May, 2013 1 commit
-
-
chenhui zhao authored
For the mpic with a flag MPIC_SINGLE_DEST_CPU, only one bit should be set in interrupt destination registers. The code is applicable to 64-bit platforms as well as 32-bit. Signed-off-by:
Zhao Chenhui <chenhui.zhao@freescale.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 14 May, 2013 1 commit
-
-
Alexander Gordeev authored
Signed-off-by:
Alexander Gordeev <agordeev@redhat.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 06 May, 2013 1 commit
-
-
Benjamin Herrenschmidt authored
Some interrupt controllers refuse to map interrupts marked as "protected" by firwmare. Since we try to map everyting in the device-tree on some platforms, we end up with a lot of nasty WARN's in the boot log for what is a normal situation on those machines. This defines a specific return code (-EPERM) from the host map() callback which cause irqdomain to fail silently. MPIC is updated to return this when hitting a protected source printing only a single line message for diagnostic purposes. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 15 Feb, 2013 1 commit
-
-
Scott Wood authored
This will be used by the qemu-e500 platform, as the MPIC version (and thus whether we have coreint) depends on how QEMU is configured. Signed-off-by:
Scott Wood <scottwood@freescale.com> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org>
-
- 29 Jan, 2013 1 commit
-
-
Scott Wood authored
Previously we were setting an illegal configuration on mpc85xx MPICs if CONFIG_IRQ_ALL_CPUS is enabled (which for some reason it is in mpc85xx_smp_defconfig). Signed-off-by:
Scott Wood <scottwood@freescale.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 03 Jan, 2013 1 commit
-
-
Greg Kroah-Hartman authored
CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 12 Sep, 2012 2 commits
-
-
Varun Sethi authored
All SOC device error interrupts are muxed and delivered to the core as a single MPIC error interrupt. Currently all the device drivers requiring access to device errors have to register for the MPIC error interrupt as a shared interrupt. With this patch we add interrupt demuxing capability in the mpic driver, allowing device drivers to register for their individual error interrupts. This is achieved by handling error interrupts in a cascaded fashion. MPIC error interrupt is handled by the "error_int_handler", which subsequently demuxes it using the EISR and delivers it to the respective drivers. The error interrupt capability is dependent on the MPIC EIMR register, which was introduced in FSL MPIC version 4.1 (P4080 rev2). So, error interrupt demuxing capability is dependent on the MPIC version and can be used for versions >= 4.1. Signed-off-by:
Varun Sethi <Varun.Sethi@freescale.com> Signed-off-by:
Bogdan Hamciuc <bogdan.hamciuc@freescale.com> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org>
-
Varun Sethi authored
Previously, these interrupts would be mapped, but the offset calculation was broken, and only the first group was initialized. Signed-off-by:
Varun Sethi <Varun.Sethi@freescale.com> Signed-off-by:
Scott Wood <scottwood@freescale.com> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org>
-
- 23 Jul, 2012 1 commit
-
-
Benjamin Herrenschmidt authored
The current mpic code creates a linear revmap just big enough for all the sources, which happens to miss the IPIs and timers on some machines. This will in turn break when the irqdomain code loses the fallback of doing a linear search when the revmap fails (and really slows down IPIs otherwise). This happens for example on the U4 based Apple machines such as the dual core PowerMac G5s. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 10 Jul, 2012 1 commit
-
-
Varun Sethi authored
We should use the MPIC_LARG_VECTORS flag while intializing the MPIC. This prevents us from eating in to hardware vector number space (MSIs) while setting up internal sources. Signed-off-by:
Varun Sethi <Varun.Sethi@freescale.com> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org>
-
- 23 Apr, 2012 2 commits
-
-
Benjamin Herrenschmidt authored
This gets rid of the unused default senses array, and replaces the incorrect use of IRQ_TYPE_NONE with the new IRQ_TYPE_DEFAULT for the initial set_trigger() call when mapping an interrupt. This in turn makes us read the HW state and update the irq desc accordingly. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Benjamin Herrenschmidt authored
mpic_is_ipi() takes a virq and immediately converts it to a hw_irq. However, one of the two call sites calls it with a ... hw_irq. The other call site also happens to have the hw_irq at hand, so let's change it to just take that as an argument. Also change mpic_is_tm() for consistency. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 27 Feb, 2012 1 commit
-
-
Benjamin Herrenschmidt authored
When using a multi-ISU MPIC, we can interrupts up to isu_size * MPIC_MAX_ISU, not just isu_size, so allocate the right size reverse map. Without this, the code will constantly fallback to a linear search. Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 22 Feb, 2012 5 commits
-
-
Kyle Moffett authored
There are two separate flags controlling whether or not the MPIC is reset during initialization, which is completely unnecessary, and only one of them can be specified in the device tree. Also, most platforms in-tree right now do actually want to reset the MPIC during initialization anyways, which means lots of duplicate code passing the MPIC_WANTS_RESET flag. Fix all of the callers which currently do not pass the MPIC_WANTS_RESET flag to pass the MPIC_NO_RESET flag, then remove the MPIC_WANTS_RESET flag and make the code reset the MPIC by default. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
The FreeScale PowerQUICC-III-compatible (mpc85xx/mpc86xx) MPICs do not correctly report the number of hardware interrupt sources, so software needs to override the detected value with "256". To avoid needing to write custom board-specific code to detect that scenario, allow it to be easily overridden in the device-tree. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
The mpic->irq_count variable is only used as a software error-checking limit to determine whether or not an IRQ number is valid. In board code which does not manually specify an IRQ count to mpic_alloc(), i.e. 0, it is automatically detected from the number of ISUs and the ISU size. In practice, all hardware ends up with irq_count == num_sources, so all of the runtime checks on mpic->irq_count should just check the value of mpic->num_sources instead. When platform hardware does not correctly report the number of IRQs, which only happens on the MPC85xx/MPC86xx, the MPIC_BROKEN_FRR_NIRQS flag is used to override the detected value of num_sources with the manual irq_count parameter. Since there's no need to manually specify the number of IRQs except in this case, the extra flag can be eliminated and the test changed to "irq_count != 0". Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
The Freescale MPIC (and perhaps others in the future) is incapable of routing non-IPI interrupts to more than once CPU at a time. Currently all of the Freescale boards msut pass the MPIC_SINGLE_DEST_CPU flag to mpic_alloc(), but that information should really be present in the device-tree. Older board code can't rely on the device-tree having the property set, but newer platforms won't need it manually specified in the code. [BenH: Remove unrelated changes, folded in a different patch] Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
The mpic_alloc() function takes a "flags" parameter and assigns it into the mpic->flags variable fairly early on, but several later pieces of code detect various device-tree properties and save them into the "mpic->flags" variable (EG: "big-endian" => MPIC_BIG_ENDIAN). Unfortunately, a number of codepaths (including several which test the flag MPIC_BIG_ENDIAN!) test "flags" instead of "mpic->flags", and get wrong answers as a result. Consolidate the device-tree flag tests early in mpic_alloc() and change all of the checks after "mpic->flags" is init'ed to use "mpic->flags". [BenH: Fixed up use of mpic->node before it's initialized] Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 16 Feb, 2012 1 commit
-
-
Grant Likely authored
Each revmap type has different arguments for setting up the revmap. This patch splits up the generator functions so that each revmap type can do its own setup and the user doesn't need to keep track of how each revmap type handles the arguments. This patch also adds a host_data argument to the generators. There are cases where the host_data pointer will be needed before the function returns. ie. the legacy map calls the .map callback for each irq before returning. v2: - Add void *host_data argument to irq_domain_add_*() functions - fixed failure to compile - Moved IRQ_DOMAIN_MAP_* defines into irqdomain.c Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com> Tested-by:
Olof Johansson <olof@lixom.net>
-
- 14 Feb, 2012 1 commit
-
-
Grant Likely authored
This patch drops the powerpc-specific irq_host structures and uses the common irq_domain strucutres defined in linux/irqdomain.h. It also fixes all the users to use the new structure names. Renaming irq_host to irq_domain has been discussed for a long time, and this patch is a step in the process of generalizing the powerpc virq code to be usable by all architecture. An astute reader will notice that this patch actually removes the irq_host structure instead of renaming it. This is because the irq_domain structure already exists in include/linux/irqdomain.h and has the needed data members. Signed-off-by:
Grant Likely <grant.likely@secretlab.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com> Tested-by:
Olof Johansson <olof@lixom.net>
-
- 07 Dec, 2011 9 commits
-
-
Kyle Moffett authored
The Cell and PowerMac platforms use virtually identical cascaded-IRQ setup code, so just merge it into the core. Ideally this code would trigger automatically when an MPIC device-node specifies an "interrupts" property, perhaps even enabling MPIC_SECONDARY along the way. Unfortunately, Benjamin Herrenschmidt has had bad experiences in the past with the quality of Apple PowerMac device-trees, so to be safe we will only try to parse out an IRQ if the MPIC_SECONDARY flag is set by the caller. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
Store the node pointer in the MPIC during initialization so that all of the later operational code can just reuse the cached pointer. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
There's not really any reason to have this one-liner in a separate static inline function, given that all the other similar tests are already in the alloc_mpic() code. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
Don't open-code the OpenFirmware "dcr-reg" property lookup trying to map DCR resources. This makes the code a bit easier to read. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
It turns out that there are only 2 in-tree platforms which use MPICs which are not "primary": IBM Cell and PowerMac. To reduce the complexity of the typical board setup code, invert the MPIC_PRIMARY bit into MPIC_SECONDARY. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
Almost all PowerPC platforms use a standard "open-pic" device node so the mpic_alloc() function now accepts NULL for the device-node. This will cause it to perform a default search with of_find_matching_node(). Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
The MPIC code can already perform an automatic OF address translation step as part of mpic_alloc(), but several boards need to use that base address when they perform mpic_assign_isu(). The easiest solution is to save the computed physical address into the "struct mpic" for later use by the board code. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
All of the existing callers of mpic_alloc() pass in a non-NULL device-node pointer, so the checks for a NULL device-node may be removed. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
Kyle Moffett authored
Instead of using the open-coded "reg" property lookup and address translation in mpic_alloc(), directly call of_address_to_resource(). This includes various workarounds for special cases which the naive of_address_translate() does not. Afterwards it is possible to remove the copiously copy-pasted calls to of_address_translate() from the 85xx/86xx/powermac platforms. Signed-off-by:
Kyle Moffett <Kyle.D.Moffett@boeing.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Kumar Gala <galak@kernel.crashing.org> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 25 Nov, 2011 1 commit
-
-
Justin P. Mattock authored
The patch below removes an extra semicolon. Signed-off-by:
Justin P. Mattock <justinmattock@gmail.com> CC: linuxppc-dev@lists.ozlabs.org CC: Paul Mackerras <paulus@samba.org> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 08 Nov, 2011 1 commit
-
-
Yong Zhang authored
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled], We run all interrupt handlers with interrupts disabled and we even check and yell when an interrupt handler returns with interrupts enabled (see commit [b738a50a: genirq: Warn when handler enables interrupts]). So now this flag is a NOOP and can be removed. Signed-off-by:
Yong Zhang <yong.zhang0@gmail.com> Acked-by:
Arnd Bergmann <arnd@arndb.de> Acked-by:
Geoff Levand <geoff@infradead.org> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 03 Nov, 2011 1 commit
-
-
Matthew McClintock authored
This is listed as a requirement for Freescale CoreNet based devices (e.g p4080ds with MPIC v4.x) after issuing a core reset to properly clear pending interrupts. Signed-off-by:
Matthew McClintock <msm@freescale.com> Signed-off-by:
Kumar Gala <galak@kernel.crashing.org>
-
- 19 Sep, 2011 1 commit
-
-
Timur Tabi authored
There is one place in the MPIC driver that assumes that the cores are numbered from 0 to n-1. However, this is not true if the CPUs are not numbered sequentially. This can happen on a eight-core SOC where cores two and three are removed in the device tree. So instead of blindly looping, we iterate over the discovered CPUs and use the SMP ID as the index. This means that we no longer ask the MPIC how many CPUs there are, so we also delete mpic->num_cpus. We also catch if the number of CPUs in the SOC exceeds the number that the MPIC supports. This should never happen, of course, but it's good to be sure. Signed-off-by:
Timur Tabi <timur@freescale.com> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-
- 29 Jun, 2011 1 commit
-
-
Christian Dietrich authored
Since printk_ratelimit() shouldn't be used anymore (see comment in include/linux/printk.h), replace it with printk_ratelimited. Signed-off-by:
Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> Signed-off-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org>
-