Hi Matt, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.16-rc1 next-20180216] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Matt-Redfearn/MIPS-pm-cps-Block-system-suspend-when-a-JTAG-probe-is-present/20180218-082248 config: mips-64r6el_defconfig (attached as .config) compiler: mips64el-linux-gnuabi64-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=mips All errors (new ones prefixed by >>): arch/mips//kernel/pm-cps.c: In function 'cps_pm_power_notifier': >> arch/mips//kernel/pm-cps.c:693:14: error: 'CPC_Cx_STAT_CONF_EJTAG_PROBE_MSK' undeclared (first use in this function); did you mean 'CPC_Cx_STAT_CONF_EJTAG_PROBE'? if (stat & CPC_Cx_STAT_CONF_EJTAG_PROBE_MSK) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CPC_Cx_STAT_CONF_EJTAG_PROBE arch/mips//kernel/pm-cps.c:693:14: note: each undeclared identifier is reported only once for each function it appears in vim +693 arch/mips//kernel/pm-cps.c 673 674 #if defined(CONFIG_PM_SLEEP) 675 static int cps_pm_power_notifier(struct notifier_block *this, 676 unsigned long event, void *ptr) 677 { 678 unsigned int stat; 679 680 switch (event) { 681 case PM_SUSPEND_PREPARE: 682 stat = read_cpc_cl_stat_conf(); 683 /* 684 * If we're attempting to suspend the system and power down all 685 * of the cores, the JTAG detect bit indicates that the CPC will 686 * instead put the cores into clock-off state. In this state 687 * a connected debugger can cause the CPU to attempt 688 * interactions with the powered down system. At best this will 689 * fail. At worst, it can hang the NoC, requiring a hard reset. 690 * To avoid this, just block system suspend if a JTAG probe 691 * is detected. 692 */ > 693 if (stat & CPC_Cx_STAT_CONF_EJTAG_PROBE_MSK) { 694 pr_warn("JTAG probe is connected - abort suspend\n"); 695 return NOTIFY_BAD; 696 } 697 return NOTIFY_DONE; 698 default: 699 return NOTIFY_DONE; 700 } 701 } 702 #endif /* CONFIG_PM_SLEEP */ 703 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip