linux/arch/mips
Huacai Chen 300459d558 MIPS: Loongson 3: Add Loongson-3 SMP support
IPI registers of Loongson-3 include IPI_SET, IPI_CLEAR, IPI_STATUS,
IPI_EN and IPI_MAILBOX_BUF. Each bit of IPI_STATUS indicate a type of
IPI and IPI_EN indicate whether the IPI is enabled. The sender write 1
to IPI_SET bits generate IPIs in IPI_STATUS, and receiver write 1 to
bits of IPI_CLEAR to clear IPIs. IPI_MAILBOX_BUF are used to deliver
more information about IPIs.

Why we change code in arch/mips/loongson/common/setup.c?

If without this change, when SMP configured, system cannot boot since
it hang at printk() in cgroup_init_early(). The root cause is:

console_trylock()
  \-->down_trylock(&console_sem)
    \-->raw_spin_unlock_irqrestore(&sem->lock, flags)
      \-->_raw_spin_unlock_irqrestore()(SMP/UP have different versions)
        \-->__raw_spin_unlock_irqrestore()  (following is the SMP case)
          \-->do_raw_spin_unlock()
            \-->arch_spin_unlock()
              \-->nudge_writes()
                \-->mb()
                  \-->wbflush()
                    \-->__wbflush()

In previous code __wbflush() is initialized in plat_mem_setup(), but
cgroup_init_early() is called before plat_mem_setup(). Therefore, In
this patch we make changes to avoid boot failure.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Hongliang Tao <taohl@lemote.com>
Signed-off-by: Hua Yan <yanh@lemote.com>
Tested-by: Alex Smith <alex.smith@imgtec.com>
Reviewed-by: Alex Smith <alex.smith@imgtec.com>
Cc: John Crispin <john@phrozen.org>
Cc: Steven J. Hill <Steven.Hill@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Patchwork: https://patchwork.linux-mips.org/patch/6638
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2014-03-31 18:17:12 +02:00
..
alchemy MIPS: Alchemy: pata_platform for DB1200 2014-03-26 23:09:21 +01:00
ar7 MIPS: Restore init.h usage to arch/mips/ar7/time.c 2014-03-26 23:09:23 +01:00
ath79 mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
bcm47xx MIPS: BCM47XX: Add new file for device specific workarounds 2014-03-31 18:17:12 +02:00
bcm63xx MIPS: Use current_cpu_type() instead of c->cputype 2014-03-31 18:17:12 +02:00
boot mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
cavium-octeon mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
cobalt
configs MIPS: Add defconfig for Malta SMVP with EVA 2014-03-26 23:09:22 +01:00
dec
emma
fw mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
include MIPS: Loongson 3: Add Loongson-3 SMP support 2014-03-31 18:17:12 +02:00
jazz
jz4740 mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
kernel MIPS: Loongson: Add basic Loongson-3 CPU support 2014-03-31 18:17:12 +02:00
kvm mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
lantiq mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
lasat mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
lib MIPS: lib: csum_partial: Add EVA support 2014-03-26 23:09:17 +01:00
loongson MIPS: Loongson 3: Add Loongson-3 SMP support 2014-03-31 18:17:12 +02:00
loongson1
math-emu MIPS: Clear upper bits of FP registers on emulator writes 2014-03-26 23:09:10 +01:00
mm MIPS: Loongson: Add basic Loongson-3 CPU support 2014-03-31 18:17:12 +02:00
mti-malta MIPS: Malta: Fix CONFIG_BLK_DEV_IDE vestiges. 2014-03-31 18:17:12 +02:00
mti-sead3 MIPS: SEAD3: Don't use module_init in non-modular sead3-mtd.c code 2014-03-31 18:17:12 +02:00
netlogic Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
oprofile MIPS: Add support for the M5150 processor 2014-03-26 23:09:22 +01:00
pci MIPS: Loongson 3: Add HT-linked PCI support 2014-03-31 18:17:12 +02:00
pmcs-msp71xx MIPS: introduce MIPS_L1_CACHE_SHIFT_<N> 2014-01-24 22:39:55 +01:00
pnx833x
power
ralink Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2014-01-30 17:20:32 -08:00
rb532
sgi-ip22
sgi-ip27 mips: delete non-required instances of include <linux/init.h> 2014-01-24 22:39:56 +01:00
sgi-ip32
sibyte
sni
txx9
vr41xx
Kbuild
Kbuild.platforms
Kconfig MIPS: Loongson: Add Loongson-3 Kconfig options 2014-03-31 18:17:12 +02:00
Kconfig.debug
Makefile MIPS: Add MSA register definitions & access 2014-03-26 23:09:10 +01:00