southbridge/intel/i82801gx: Make compilation possible with CONFIG_SMM_TSEG

Without that fix, and with CONFIG_SMM_TSEG, we have:
  src/southbridge/intel/i82801gx/smihandler.c: In function 'southbridge_smi_sleep':
  src/southbridge/intel/i82801gx/smihandler.c:340:3: error: implicit declaration of function 'smi_release_lock' [-Werror=implicit-function-declaration]
  cc1: all warnings being treated as errors
  make: *** [build/southbridge/intel/i82801gx/smihandler.smm.o] Error 1

The fix is modelled after src/cpu/x86/smm/smihandler.c which
  ifdefs smi_release_lock().

Change-Id: Icdc6d039b34a1d95d0e607419bba2484d21abc5e
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
Reviewed-on: http://review.coreboot.org/3281
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Denis 'GNUtoo' Carikli 2013-05-24 03:37:01 +02:00 committed by Stefan Reinauer
parent 1b32a51e51
commit 20b6d91fd3
1 changed files with 2 additions and 0 deletions

View File

@ -333,12 +333,14 @@ static void southbridge_smi_sleep(unsigned int node, smm_state_save_area_t *stat
default: printk(BIOS_DEBUG, "SMI#: ERROR: SLP_TYP reserved\n"); break; default: printk(BIOS_DEBUG, "SMI#: ERROR: SLP_TYP reserved\n"); break;
} }
#if !CONFIG_SMM_TSEG
/* Unlock the SMI semaphore. We're currently in SMM, and the semaphore /* Unlock the SMI semaphore. We're currently in SMM, and the semaphore
* will never be unlocked because the next outl will switch off the CPU. * will never be unlocked because the next outl will switch off the CPU.
* This might open a small race between the smi_release_lock() and the outl() * This might open a small race between the smi_release_lock() and the outl()
* for other SMI handlers. Not sure if this could cause trouble. */ * for other SMI handlers. Not sure if this could cause trouble. */
if (slp_typ == 5) if (slp_typ == 5)
smi_release_lock(); smi_release_lock();
#endif
/* Write back to the SLP register to cause the originally intended /* Write back to the SLP register to cause the originally intended
* event again. We need to set BIT13 (SLP_EN) though to make the * event again. We need to set BIT13 (SLP_EN) though to make the