linux-stable/arch
Markos Chandras 13b7ea6377 MIPS: malta: Fix GIC interrupt offsets
The GIC interrupt offsets are calculated based on the value of NR_CPUS.
However, this is wrong because NR_CPUS may or may not contain the real
number of the actual cpus present in the system. We fix that by using
the 'nr_cpu_ids' variable which contains the real number of cpus in
the system. Previously, an MT core (eg with 8 VPEs) will fail to boot if
NR_CPUS was > 8 with the following errors:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at kernel/irq/chip.c:670 __irq_set_handler+0x15c/0x164()
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W    3.12.0-rc5-00087-gced5633 5
Stack : 00000006 00000004 00000000 00000000 00000000 00000000 807a4f36 00000053
          807a0000 00000000 80173218 80565aa8 00000000 00000000 00000000 0000000
          00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000
          00000000 00000000 00000000 8054fd00 8054fd94 80500514 805657a7 8016eb4
          807a0000 80500514 00000000 00000000 80565aa8 8079a5d8 80565766 8054fd0
          ...
Call Trace:
[<801098c0>] show_stack+0x64/0x7c
[<8049c6b0>] dump_stack+0x64/0x84
[<8012efc4>] warn_slowpath_common+0x84/0xb4
[<8012f00c>] warn_slowpath_null+0x18/0x24
[<80173218>] __irq_set_handler+0x15c/0x164
[<80587cf4>] arch_init_ipiirq+0x2c/0x3c
[<805880c8>] arch_init_irq+0x3c4/0x4bc
[<80588e28>] init_IRQ+0x3c/0x50
[<805847e8>] start_kernel+0x230/0x3d8

---[ end trace 4eaa2a86a8e2da26 ]---

This is now fixed and the Malta board can boot with any NR_CPUS value
which also helps supporting more processors in a single kernel binary.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/6091/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2013-10-30 15:43:18 +01:00
..
alpha Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
arc ARC: Ignore ptrace SETREGSET request for synthetic register "stop_pc" 2013-10-12 12:00:36 +05:30
arm ARM: SoC fixes for 3.12-rc 2013-10-25 11:49:23 +01:00
arm64 arm64: Remove duplicate DEBUG_STACK_USAGE config 2013-10-02 18:03:26 +01:00
avr32 avr32: cast syscall_return to silence compiler warning 2013-09-30 08:42:01 +02:00
blackfin Merge branch 'genirq' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2013-09-13 07:31:38 -07:00
c6x Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
cris Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
frv Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
h8300 Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
hexagon Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
ia64 Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
m32r Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
m68k Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
metag Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
microblaze Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
mips MIPS: malta: Fix GIC interrupt offsets 2013-10-30 15:43:18 +01:00
mn10300 Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
openrisc openrisc: clean-up prom.h 2013-09-24 21:12:27 -05:00
parisc parisc: Do not crash 64bit SMP kernels on machines with >= 4GB RAM 2013-10-27 15:58:44 +01:00
powerpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-10-23 07:47:42 +01:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2013-10-23 08:10:25 +01:00
score Score: Modify the Makefile of Score, remove -mlong-calls for compiling 2013-09-26 03:46:03 +08:00
sh Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
sparc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-10-23 07:47:42 +01:00
tile arch: tile: re-use kbasename() helper 2013-09-30 10:34:46 -04:00
um Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
unicore32 Remove GENERIC_HARDIRQ config option 2013-09-13 15:09:52 +02:00
x86 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-10-23 07:47:42 +01:00
xtensa Xtensa patchset for v3.12 2013-09-13 10:57:48 -07:00
.gitignore
Kconfig mutex: replace CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX with simple ifdef 2013-09-28 12:46:21 +02:00