Ralf Baechle
4ff3fccd86
MIPS: Remove __strlen_user().
...
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:45:00 +01:00
Rafał Miłecki
e5810fa0c1
MIPS: BCM47XX: Initialize bcma bus later (with mm available)
...
Initializaion with memory allocator available will be much simpler, this
will allow cleanup in the bcma code.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com >
Acked-by: Hauke Mehrtens <hauke@hauke-m.de >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8234/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:45:00 +01:00
Rafał Miłecki
a59da8fb3b
MIPS: BCM47XX: Move SPROM fallback code into sprom.c
...
This is some general cleanup as well as preparing sprom.c to become a
standalone driver. We will need this for bcm53xx ARM arch support.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com >
Acked-by: Hauke Mehrtens <hauke@hauke-m.de >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8232/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:59 +01:00
Rafał Miłecki
7177efc5b0
MIPS: BCM47XX: Make bcma init NVRAM instead of bcm47xx polling it
...
This drops ssb/bcma dependency and will allow us to make it a standalone
driver.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: Hauke Mehrtens <hauke@hauke-m.de >
Patchwork: https://patchwork.linux-mips.org/patch/8233/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:59 +01:00
Rafał Miłecki
21400f252a
MIPS: BCM47XX: Make ssb init NVRAM instead of bcm47xx polling it
...
This makes NVRAM code less bcm47xx/ssb specific allowing it to become a
standalone driver in the future. A similar patch for bcma will follow
when it's ready.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com >
Acked-by: Hauke Mehrtens <hauke@hauke-m.de >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7612/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:59 +01:00
Rafał Miłecki
8d602dd0f9
MIPS: BCM47XX: Get rid of calls to KSEG1ADDR
...
We should be using ioremap_nocache helper which handles remaps in a
smarter way.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: Hauke Mehrtens <hauke@hauke-m.de >
Patchwork: http://patchwork.linux-mips.org/patch/7611/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:59 +01:00
Andrew Bresticker
4060bbe993
MIPS: Move gic.h to include/linux/irqchip/mips-gic.h
...
Now that the MIPS GIC irqchip lives in drivers/irqchip/, move
its header over to include/linux/irqchip/.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Cc: Daniel Lezcano <daniel.lezcano@linaro.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: John Crispin <blogic@openwrt.org >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8129/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:59 +01:00
Andrew Bresticker
5f68fea09e
irqchip: mips-gic: Use proper iomem accessors
...
Get rid of the ugly GICREAD/GICWRITE/GICBIS macros and use proper
iomem accessors instead. Since the GIC registers are not directly
accessed outside of the GIC driver any more, make gic_base static
and move all the GIC register manipulation macros out of gic.h,
converting them to static inline functions.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Cc: Daniel Lezcano <daniel.lezcano@linaro.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: John Crispin <blogic@openwrt.org >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8127/
Patchwork: https://patchwork.linux-mips.org/patch/8229/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:58 +01:00
Andrew Bresticker
609ead041b
MIPS: Malta: Stop using GIC REG macros
...
Stop using the REG macros from gic.h and instead use proper iomem
accessors.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Cc: Daniel Lezcano <daniel.lezcano@linaro.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: John Crispin <blogic@openwrt.org >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8126/
Patchwork: https://patchwork.linux-mips.org/patch/8227/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:58 +01:00
Andrew Bresticker
327b8c89d4
MIPS: SEAD3: Stop using GIC REG macros
...
Stop using the REG macros from gic.h and instead use proper iomem
accessors.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Cc: Daniel Lezcano <daniel.lezcano@linaro.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: John Crispin <blogic@openwrt.org >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8125/
Patchwork: https://patchwork.linux-mips.org/patch/8228/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:58 +01:00
Andrew Bresticker
387904ff84
irqchip: mips-gic: Export function to read counter width
...
Export the function gic_get_count_width to read the width of
the GIC global counter from GIC_SH_CONFIG. Update the GIC
clocksource driver to use this new function.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Cc: Daniel Lezcano <daniel.lezcano@linaro.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: John Crispin <blogic@openwrt.org >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8124/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:57 +01:00
Andrew Bresticker
7d9ad5d8c3
MIPS: Malta: Use gic_read_count() to read GIC timer
...
Instead of reading the GIC registers directly, use the interface the GIC
driver already exposes for reading the global timer. Also get rid of
the unnecessary #ifdefs.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Cc: Daniel Lezcano <daniel.lezcano@linaro.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: John Crispin <blogic@openwrt.org >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8123/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:57 +01:00
Andrew Bresticker
a393d93059
MIPS: SEAD3: Use generic plat_irq_dispatch
...
The generic plat_irq_dispatch provided in irq_cpu.c is sufficient for
dispatching interrupts on SEAD-3 in legacy and vectored interrupt modes.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7822/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:57 +01:00
Andrew Bresticker
4203d644e0
MIPS: Malta: Use generic plat_irq_dispatch
...
The generic plat_irq_dispatch provided in irq_cpu.c is sufficient for
dispatching interrupts on Malta in legacy and vectored interrupt modes.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7821/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:57 +01:00
Andrew Bresticker
3263d085ab
irqchip: mips-gic: Remove unnecessary globals
...
Now that all GIC interrupt routing and handling logic is in the GIC
driver itself, un-export variables/functions which are no longer used
outside the GIC driver. This also allows us to remove gic_compare_int
and combine gic_get_int_mask with gic_get_int since these interfaces
are no longer used.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Acked-by: Jason Cooper <jason@lakedaemon.net >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7820/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:57 +01:00
Andrew Bresticker
e9de688dac
irqchip: mips-gic: Support local interrupts
...
The MIPS GIC supports 7 local interrupts, 2 of which are the GIC
local watchdog and count/compare timer. The remainder are CPU
interrupts which may optionally be re-routed through the GIC.
GIC hardware IRQs 0-6 are now used for local interrupts while
hardware IRQs 7+ are used for external (shared) interrupts.
Note that the 5 CPU interrupts may not be re-routable through
the GIC. In that case mapping will fail and the vectors reported
in C0_IntCtl should be used instead. gic_get_c0_compare_int() and
gic_get_c0_perfcount_int() will return the correct IRQ number to
use for the C0 timer and perfcounter interrupts based on the
routability of those interrupts through the GIC.
A separate irq_chip, with callbacks that mask/unmask the local
interrupt on all CPUs, is used for the C0 timer and performance
counter interrupts since all other platforms do not use the percpu
IRQ API for those interrupts.
Malta, SEAD-3, and the GIC clockevent driver have been updated
to use local interrupts and the R4K clockevent driver has been
updated to poll for C0 timer interrupts through the GIC when
the GIC is present.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Acked-by: Jason Cooper <jason@lakedaemon.net >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7819/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:56 +01:00
Andrew Bresticker
4a6a3ea392
irqchip: mips-gic: Use separate edge/level irq_chips
...
GIC edge-triggered interrupts must be acknowledged by clearing the edge
detector via a write to GIC_SH_WEDGE. Create a separate edge-triggered
irq_chip with the appropriate irq_ack() callback. This also allows us
to get rid of gic_irq_flags.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Acked-by: Jason Cooper <jason@lakedaemon.net >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7818/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:56 +01:00
Andrew Bresticker
fbd552417b
irqchip: mips-gic: Probe for number of external interrupts
...
Instead of requiring platforms to define the correct GIC_NUM_INTRS,
use the value reported in GIC_SH_CONFIG.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Acked-by: Jason Cooper <jason@lakedaemon.net >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7817/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:56 +01:00
Andrew Bresticker
18743d2781
irqchip: mips-gic: Stop using per-platform mapping tables
...
Now that the GIC properly uses IRQ domains, kill off the per-platform
routing tables that were used to make the GIC appear transparent.
This includes:
- removing the mapping tables and the support for applying them,
- moving GIC IPI support to the GIC driver,
- properly routing the i8259 through the GIC on Malta, and
- updating IRQ assignments on SEAD-3 when the GIC is present.
Platforms no longer will pass an interrupt mapping table to gic_init.
Instead, they will pass the CPU interrupt vector (2 - 7) that they
expect the GIC to route interrupts to. Note that in EIC mode this
value is ignored and all GIC interrupts are routed to EIC vector 1.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Acked-by: Jason Cooper <jason@lakedaemon.net >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7816/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:56 +01:00
Andrew Bresticker
c49581a4df
irqchip: mips-gic: Use IRQ domains
...
Use a simple IRQ domain for the MIPS GIC. Remove the gic_platform_init
callback as it's no longer necessary for it to set the irqchip.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Acked-by: Jason Cooper <jason@lakedaemon.net >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7811/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:55 +01:00
Andrew Bresticker
95150ae8b3
irqchip: mips-gic: Implement irq_set_type callback
...
Implement an irq_set_type callback for the GIC which is used to set
the polarity and trigger type of GIC interrupts.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Acked-by: Jason Cooper <jason@lakedaemon.net >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7810/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:55 +01:00
Andrew Bresticker
5561c9e467
irqchip: mips-gic: Remove platform irq_ack/irq_eoi callbacks
...
There's no need for platforms to have their own GIC irq_ack/irq_eoi
callbacks. irq_ack need only clear the GIC's edge detector on
edge-triggered interrupts and there's no need at all for irq_eoi.
Also get rid of the mask_ack callback since it's not necessary either.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Acked-by: Jason Cooper <jason@lakedaemon.net >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7809/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:55 +01:00
Andrew Bresticker
8a19b8f194
MIPS: Move GIC to drivers/irqchip/
...
Move GIC irqchip support to drivers/irqchip/ and rename the Kconfig
option from IRQ_GIC to MIPS_GIC to avoid confusion with the ARM GIC.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Acked-by: Jason Cooper <jason@lakedaemon.net >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7812/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:54 +01:00
Andrew Bresticker
8635233ca5
MIPS: Move MIPS_GIC_IRQ_BASE into platform irq.h
...
Define a generic MIPS_GIC_IRQ_BASE which should be suitable for all
current boards in <mach-generic/irq.h>.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7808/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:54 +01:00
Andrew Bresticker
aa827b748d
MIPS: Malta: Move MSC01 interrupt base
...
The GIC on Malta boards supports a total of 47 interrupts (40 shared
and 7 local) and is assigned a base of 24. This overlaps with the
MSC01 interrupt assignments which have a base of 64, so move the MSC01
interrupt base back a bit to give the GIC some room.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7815/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:54 +01:00
Andrew Bresticker
dfc94d1b21
MIPS: sead3: Do not overlap CPU/GIC IRQ ranges
...
In preparation for GIC IRQ domain support, assign a GIC IRQ base
that does not overlap with the CPU IRQs.
Note that this breaks SEAD-3 when the GIC is in EIC mode, though
I'm not convinced it was working before either. It will be fixed
in the following patches.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7813/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:54 +01:00
Andrew Bresticker
d8725fddfd
MIPS: SEAD3: Remove sead3-serial.c
...
It's a duplicate of sead3-platform.c and is not even compiled.
Remove it before we start fixing up IRQ assignments.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7807/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:53 +01:00
Andrew Bresticker
a67b3cf1af
MIPS: Remove gic_{enable,disable}_interrupt()
...
Nothing calls gic_{enable,disable}_interrupt() any more.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7806/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:53 +01:00
Andrew Bresticker
ff1e29ade4
MIPS: smp-cps: Enable all hardware interrupts on secondary CPUs
...
Currently interrupt vectors 2 and 5 are left disabled on secondary CPUs.
Since systems using CPS must also have a GIC, which is responsible for
routing all external interrupts and can map them to any hardware interrupt
vector, enable the remaining vectors. The two software interrupt vectors
are left disabled since they are not used with CPS.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7803/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:53 +01:00
Andrew Bresticker
a669efc4a3
MIPS: Add hook to get C0 performance counter interrupt
...
The hardware perf event driver and oprofile interpret the global
cp0_perfcount_irq differently: in the hardware perf event driver
it is an offset from MIPS_CPU_IRQ_BASE and in oprofile it is the
actual IRQ number. This still works most of the time since
MIPS_CPU_IRQ_BASE is usually 0, but is clearly wrong. Since the
performance counter interrupt may vary from platform to platform
like the C0 timer interrupt, add the optional get_c0_perfcount_int
hook which returns the IRQ number of the performance counter.
The hook should return < 0 if the performance counter interrupt is
shared with the timer. If the hook is not present, the CPU vector
reported in C0_IntCtl (cp0_perfcount_irq) is used.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7805/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:53 +01:00
Andrew Bresticker
079a460176
MIPS: i8259: Use IRQ domains
...
Create a legacy IRQ domain for the 16 i8259 interrupts.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7804/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:52 +01:00
Andrew Bresticker
f64e55dcbf
MIPS: Set vint handler when mapping CPU interrupts
...
When mapping an interrupt in the CPU IRQ domain, set the vint handler
for that interrupt if the CPU uses vectored interrupt handling.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7802/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:52 +01:00
Andrew Bresticker
85f7cdacbb
MIPS: Provide a generic plat_irq_dispatch
...
For platforms which boot with device-tree or have correctly chained
all external interrupt controllers, a generic plat_irq_dispatch() can
be used. Implement a plat_irq_dispatch() which simply handles all the
pending interrupts as reported by C0_Cause.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7801/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:52 +01:00
Andrew Bresticker
afe8dc2547
MIPS: Rename mips_cpu_intc_init() -> mips_cpu_irq_of_init()
...
mips_cpu_intc_init() is used for DT-based initialization of the CPU
IRQ domain. Give it a more appropriate name.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7800/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:52 +01:00
Andrew Bresticker
0f84c30535
MIPS: Always use IRQ domains for CPU IRQs
...
Use an IRQ domain for the 8 CPU IRQs in both the DT and non-DT cases.
Signed-off-by: Andrew Bresticker <abrestic@chromium.org >
Reviewed-by: Qais Yousef <qais.yousef@imgtec.com >
Tested-by: Qais Yousef <qais.yousef@imgtec.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Jason Cooper <jason@lakedaemon.net >
Cc: Andrew Bresticker <abrestic@chromium.org >
Cc: Jeffrey Deans <jeffrey.deans@imgtec.com >
Cc: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <paul.burton@imgtec.com >
Cc: Qais Yousef <qais.yousef@imgtec.com >
Cc: Jonas Gorski <jogo@openwrt.org >
Cc: John Crispin <blogic@openwrt.org >
Cc: David Daney <ddaney.cavm@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7799/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:51 +01:00
Markos Chandras
97f4ad29da
MIPS: cpu: Add 'noftlb' kernel command line option to disable the FTLB
...
Add new 'noftlb' kernel command line option to disable the FTLB.
Since the kernel command line is not available when probing and
enabling the CPU features in cpu_probe(), we let the kernel configure
the FTLB during the config4 decode operation and we disable the FTLB later
on, once the command line has become available to us. This should have
no negative effects since FTLB isn't used so early in the boot process.
FTLB increases the effective TLB size leading to less TLB misses. However,
sometimes it's useful to be able to disable it when debugging memory related
core features or other hardware components.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/7586/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:51 +01:00
Joe Perches
7178d2cdd9
mips: Convert pr_warning to pr_warn
...
Use the much more common pr_warn instead of pr_warning
with the goal of removing pr_warning eventually.
Other miscellanea:
o Coalesce formats
o Realign arguments
Signed-off-by: Joe Perches <joe@perches.com >
Cc: linux-mips <linux-mips@linux-mips.org >
Cc: LKML <linux-kernel@vger.kernel.org >
Patchwork: https://patchwork.linux-mips.org/patch/7935/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:51 +01:00
Sergey Ryazanov
e5067c718b
MIPS: pci-rt3883: Remove odd locking in PCI config space access code
...
Caller (generic PCI code) already do proper locking so no need to add
another one here. Local PCI read/write functions are never called
simultaneously, also they do not require synchronization with the PCI
controller ops, since they are used before the controller registration.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com >
Cc: Linux MIPS <linux-mips@linux-mips.org >
Cc: Gabor Juhos <juhosg@openwrt.org >
Patchwork: https://patchwork.linux-mips.org/patch/7603/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:50 +01:00
Sergey Ryazanov
490a0ece6c
MIPS: pci-ar7{1x, 24}x: remove odd locking in PCI config space access code
...
Caller (generic PCI code) already do proper locking so no need to add
another one here.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com >
Cc: Linux MIPS <linux-mips@linux-mips.org >
Cc: Gabor Juhos <juhosg@openwrt.org >
Patchwork: https://patchwork.linux-mips.org/patch/7602/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:50 +01:00
Sergey Ryazanov
c4a305374b
MIPS: MSP71xx: remove odd locking in PCI config space access code
...
Caller (generic PCI code) already do proper locking so no need to add
another one here.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com >
Cc: Linux MIPS <linux-mips@linux-mips.org >
Patchwork: https://patchwork.linux-mips.org/patch/7601/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:50 +01:00
Sergey Ryazanov
6ff9c2fcfa
MIPS: NILE4: Remove odd locking in PCI config space access code
...
Caller (generic PCI code) already do proper locking so no need to add
another one here.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com >
Cc: Linux MIPS <linux-mips@linux-mips.org >
Patchwork: https://patchwork.linux-mips.org/patch/7600/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:49 +01:00
Eunbong Song
856839b768
MIPS: Add arch_trigger_all_cpu_backtrace() function
...
Currently, arch_trigger_all_cpu_backtrace() is defined in only x86 and
sparc which have an NMI. But in case of softlockup, it could be possible
to dump backtrace of all cpus. and this could be helpful for debugging.
for example, if system has 2 cpus.
CPU 0 CPU 1
acquire read_lock()
try to do write_lock()
,,,
missing read_unlock()
In this case, softlockup will occur becasuse CPU 0 does not call
read_unlock(). And dump_stack() print only backtrace for "CPU 0". If
CPU1's backtrace is printed it's very helpful.
[ralf@linux-mips.org: Fixed whitespace and formatting issues.]
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8200/
2014-11-24 07:44:49 +01:00
Ralf Baechle
635c990706
MIPS: Remove useless parentheses
...
Based on the spatch
@@
expression e;
@@
- return (e);
+ return e;
with heavy hand editing because some of the changes are either whitespace
or identation only or result in excessivly long lines.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:49 +01:00
Steven J. Hill
b4da18b371
MIPS: Fix address type used for early memory detection.
...
In 'early_parse_mem' the data type used for the start
and size of a memory region specified on the command line
is incorrect. If 64-bit addressing is used, the value
gets truncated.
Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8456/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:07 +01:00
Markos Chandras
9e2b53725a
MIPS: Kconfig: Don't allow both microMIPS and SmartMIPS to be selected.
...
microMIPS and SmartMIPS can't be used together. This fixes the
following build problem:
Warning: the 32-bit microMIPS architecture does not support the `smartmips' extension
arch/mips/kernel/entry.S:90: Error: unrecognized opcode `mtlhx $24'
[...]
arch/mips/kernel/entry.S:109: Error: unrecognized opcode `mtlhx $24'
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7421/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:07 +01:00
Markos Chandras
76cff82943
MIPS: kernel: cps-vec: Set ISA level to mips32r2 for the MIPS MT ASE
...
Fixes the following build warnings:
arch/mips/kernel/cps-vec.S: Assembler messages:
arch/mips/kernel/cps-vec.S:228: Warning: the `mt' extension requires
MIPS32 revision 2 or greater
[...]
arch/mips/kernel/cps-vec.S: Assembler messages:
arch/mips/kernel/cps-vec.S:345: Warning: the `mt' extension requires
MIPS32 revision 2 or greater
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com >
Cc: Paul Burton <Paul.Burton@imgtec.com >
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7355/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:06 +01:00
Florian Fainelli
3964917c6b
MIPS: Netlogic: handle modular AHCI builds
...
Commits a951440971
("MIPS: Netlogic: Support for XLP3XX on-chip SATA")
and fedfcb1137
("MIPS: Netlogic: XLP9XX on-chip SATA support") added
ahci-init and ahci-init-xlp2 as objects to build when CONFIG_SATA_AHCI
is enabled.
If CONFIG_SATA_AHCI is made modular, these two files will also get built
as modules (obj-m), which will result in the following linking failure:
ERROR: "nlm_set_pic_extra_ack" [arch/mips/netlogic/xlp/ahci-init.ko]
undefined!
ERROR: "nlm_io_base" [arch/mips/netlogic/xlp/ahci-init.ko] undefined!
ERROR: "nlm_nodes" [arch/mips/netlogic/xlp/ahci-init-xlp2.ko] undefined!
ERROR: "nlm_set_pic_extra_ack"
[arch/mips/netlogic/xlp/ahci-init-xlp2.ko] undefined!
ERROR: "xlp_socdev_to_node" [arch/mips/netlogic/xlp/ahci-init-xlp2.ko]
undefined!
ERROR: "nlm_io_base" [arch/mips/netlogic/xlp/ahci-init-xlp2.ko]
undefined!
Just check whether CONFIG_SATA_AHCI is defined for this build, and if
that is the case, add these objects to the list of built-in object
files.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: ganesanr@broadcom.com
Cc: jchandra@broadcom.com
Patchwork: https://patchwork.linux-mips.org/patch/7855/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:06 +01:00
Florian Fainelli
717ce64639
MIPS: Netlogic: handle modular USB case
...
Commit 1004165f34
("MIPS: Netlogic: USB support for XLP") and then
commit 9eac3591e7
("MIPS: Netlogic: Add support for USB on XLP2xx")
added usb-init and usb-init-xlp2 as objects to build when CONFIG_USB is
enabled.
If CONFIG_USB is made modular, these two files will also get built as
modules (obj-m), which will result in the following linking failure:
ERROR: "nlm_io_base" [arch/mips/netlogic/xlp/usb-init.ko] undefined!
ERROR: "nlm_nodes" [arch/mips/netlogic/xlp/usb-init-xlp2.ko] undefined!
ERROR: "nlm_set_pic_extra_ack" [arch/mips/netlogic/xlp/usb-init-xlp2.ko]
undefined!
ERROR: "xlp_socdev_to_node" [arch/mips/netlogic/xlp/usb-init-xlp2.ko]
undefined!
ERROR: "nlm_io_base" [arch/mips/netlogic/xlp/usb-init-xlp2.ko]
undefined!
Just check whether CONFIG_USB is defined for this build, and if that is
the case, add these objects to the list of built-in object files.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com >
Cc: linux-mips@linux-mips.org
Cc: ganesanr@broadcom.com
Cc: jchandra@broadcom.com
Patchwork: https://patchwork.linux-mips.org/patch/7854/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:06 +01:00
Aaro Koskinen
26927f7649
MIPS: Loongson: Make platform serial setup always built-in.
...
If SERIAL_8250 is compiled as a module, the platform specific setup
for Loongson will be a module too, and it will not work very well.
At least on Loongson 3 it will trigger a build failure,
since loongson_sysconf is not exported to modules.
Fix by making the platform specific serial code always built-in.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi >
Reported-by: Ralf Baechle <ralf@linux-mips.org >
Cc: stable@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Huacai Chen <chenhc@lemote.com >
Cc: Markos Chandras <Markos.Chandras@imgtec.com >
Patchwork: https://patchwork.linux-mips.org/patch/8533/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:06 +01:00
Paul Burton
14fa12df1d
MIPS: fix EVA & non-SMP non-FPU FP context signal handling
...
The save_fp_context & restore_fp_context pointers were being assigned
to the wrong variables if either:
- The kernel is configured for UP & runs on a system without an FPU,
since b2ead52828
"MIPS: Move & rename
fpu_emulator_{save,restore}_context".
- The kernel is configured for EVA, since ca750649e0
"MIPS: kernel:
signal: Prevent save/restore FPU context in user memory".
This would lead to FP context being clobbered incorrectly when setting
up a sigcontext, then the garbage values being saved uselessly when
returning from the signal.
Fix by swapping the pointer assignments appropriately.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: stable@vger.kernel.org # v3.15+
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8230/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:44:06 +01:00