msm: restart_7k: Move restart code out of pm2.c

We see a kernel panic when we reboot with recovery mode
from the UI. Though kernel prepares to stop the other
cores(cpu_relax), but in some race condition mpdecision kicks
in to wake up(CPU_UP_PREPARE) the other core, before we go
ahead for issuing pcom command from core-0 for restart and this
causes a BUG in stop machine code.

So to resolve this before we issue a PCOM_RESET_CHIP command from
core-0, we must ensure that IRQ and FIQ is disabled and also
map the user pages to 1:1 mapping so as to not have unpredictable
MMU errors or kernel panics.

Moving the code put of pm2.c as this code is more restart specific and
not related to power management code.

CRs-Fixed: 359879
Change-Id: If26fdf3a4dd1fb5ecc4c28859bfd68650ff4e747
Signed-off-by: Taniya Das <tdas@codeaurora.org>
5 files changed