From 17f6908e97cf7643a50a8493b139144ef848a1d3 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Thu, 1 Apr 2010 17:44:37 +0300 Subject: [PATCH] gpu: pvr: add option for extra debugging information MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This is basically a sed -i 's/\/CONFIG_PVR_DEBUG_EXTRA' *.[ch] . Currently a driver built in debug mode will only work together with the relevant PVR/OGLES user space libraries being built in debug mode too. This is becuase the ABI is different in debug and release build. This is not very flexible when one wants to only debug the kernel driver and not care about the user space part, let alone figuring out where to get the sources for that and rebuild it in debug mode too. Mark the current user space dependent debug code parts with a new CONFIG_PVR_DEBUG_EXTRA option instead of DEBUG, so that later we can selectively add back basic debugging facilities like debug traces and mark them with CONFIG_PVR_DEBUG. Signed-off-by: Imre Deak CC: Mark Underwood CC: Mark Riding Reviewed-by: Topi Pohjolainen Reviewed-by: Ville Syrjälä --- pvr/Kconfig | 9 +++++++++ pvr/bridged_pvr_bridge.c | 4 ++-- pvr/bridged_pvr_bridge.h | 2 +- pvr/bufferclass_example_linux.c | 2 +- pvr/event.c | 10 +++++----- pvr/handle.c | 8 ++++---- pvr/mm.h | 2 +- pvr/mmap.c | 4 ++-- pvr/module.c | 4 ++-- pvr/omaplfb.h | 2 +- pvr/osfunc.c | 6 +++--- pvr/pb.c | 2 +- pvr/proc.c | 4 ++-- pvr/pvr_debug.h | 2 +- pvr/pvrconfig.h | 2 +- pvr/ra.c | 15 ++++++++------- pvr/resman.c | 16 ++++++++-------- pvr/sgx_options.h | 2 +- pvr/sgxutils.c | 2 +- pvr/syslocal.h | 2 +- pvr/sysutils.c | 4 ++-- 21 files changed, 57 insertions(+), 47 deletions(-) diff --git a/pvr/Kconfig b/pvr/Kconfig index 2021d31..949911c 100644 --- a/pvr/Kconfig +++ b/pvr/Kconfig @@ -15,6 +15,15 @@ config PVR_TIMING bool "Timing" endchoice +config PVR_DEBUG_EXTRA + bool "Extra debugging info" + depends on PVR_DEBUG + help + This enables extra debugging facilities on top of what you + get with setting debug build type above. This effectively + changes the driver's ABI, so the user space clients using + the driver need to be built in debug mode as well. + config PVR_DEBUG_PDUMP tristate "PDUMP debug support" depends on PVR diff --git a/pvr/bridged_pvr_bridge.c b/pvr/bridged_pvr_bridge.c index fa1a371..2f20554 100644 --- a/pvr/bridged_pvr_bridge.c +++ b/pvr/bridged_pvr_bridge.c @@ -2464,7 +2464,7 @@ static int MMU_GetPDDevPAddrBW(u32 ui32BridgeID, int DummyBW(u32 ui32BridgeID, void *psBridgeIn, void *psBridgeOut, struct PVRSRV_PER_PROCESS_DATA *psPerProc) { -#if !defined(DEBUG) +#if !defined(CONFIG_PVR_DEBUG_EXTRA) PVR_UNREFERENCED_PARAMETER(ui32BridgeID); #endif PVR_UNREFERENCED_PARAMETER(psBridgeIn); @@ -2493,7 +2493,7 @@ void _SetDispatchTableEntry(u32 ui32Index, const char *pszIOCName, const char *pszFunctionName) { static u32 ui32PrevIndex = ~0UL; -#if !defined(DEBUG) +#if !defined(CONFIG_PVR_DEBUG_EXTRA) PVR_UNREFERENCED_PARAMETER(pszIOCName); #endif #if !defined(DEBUG_BRIDGE_KM_DISPATCH_TABLE) && !defined(DEBUG_BRIDGE_KM) diff --git a/pvr/bridged_pvr_bridge.h b/pvr/bridged_pvr_bridge.h index 7249802..1e35ff4 100644 --- a/pvr/bridged_pvr_bridge.h +++ b/pvr/bridged_pvr_bridge.h @@ -133,7 +133,7 @@ void _SetDispatchTableEntry(u32 ui32Index, #define DISPATCH_TABLE_GAP_THRESHOLD 5 -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) #define PVRSRV_BRIDGE_ASSERT_CMD(X, Y) PVR_ASSERT(X == PVRSRV_GET_BRIDGE_ID(Y)) #else #define PVRSRV_BRIDGE_ASSERT_CMD(X, Y) PVR_UNREFERENCED_PARAMETER(X) diff --git a/pvr/bufferclass_example_linux.c b/pvr/bufferclass_example_linux.c index bfb6ab6..924a27e 100644 --- a/pvr/bufferclass_example_linux.c +++ b/pvr/bufferclass_example_linux.c @@ -168,7 +168,7 @@ static int __init BC_Example_ModInit(void) goto ExitDisable; } -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) printk(KERN_ERR DRVNAME ": BC_Example_ModInit: major device %d\n", AssignedMajorNumber); #endif diff --git a/pvr/event.c b/pvr/event.c index 3dc4ab5..e1c2aee 100644 --- a/pvr/event.c +++ b/pvr/event.c @@ -62,7 +62,7 @@ struct PVRSRV_LINUX_EVENT_OBJECT_LIST { struct PVRSRV_LINUX_EVENT_OBJECT { atomic_t sTimeStamp; u32 ui32TimeStampPrevious; -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) unsigned ui32Stats; #endif wait_queue_head_t sWait; @@ -118,7 +118,7 @@ enum PVRSRV_ERROR LinuxEventObjectDelete(void *hOSEventObjectList, if (hOSEventObject) { struct PVRSRV_LINUX_EVENT_OBJECT *psLinuxEventObject = (struct PVRSRV_LINUX_EVENT_OBJECT *)hOSEventObject; -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) PVR_DPF(PVR_DBG_MESSAGE, "LinuxEventObjectListDelete: Event object waits: %lu", psLinuxEventObject->ui32Stats); @@ -144,7 +144,7 @@ static enum PVRSRV_ERROR LinuxEventObjectDeleteCallback(void *pvParam, list_del(&psLinuxEventObject->sList); write_unlock_bh(&psLinuxEventObjectList->sLock); -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) PVR_DPF(PVR_DBG_MESSAGE, "LinuxEventObjectDeleteCallback: Event object waits: %lu", psLinuxEventObject->ui32Stats); @@ -186,7 +186,7 @@ enum PVRSRV_ERROR LinuxEventObjectAdd(void *hOSEventObjectList, atomic_set(&psLinuxEventObject->sTimeStamp, 0); psLinuxEventObject->ui32TimeStampPrevious = 0; -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) psLinuxEventObject->ui32Stats = 0; #endif init_waitqueue_head(&psLinuxEventObject->sWait); @@ -254,7 +254,7 @@ enum PVRSRV_ERROR LinuxEventObjectWait(void *hOSEventObject, u32 ui32MSTimeout) (u32) schedule_timeout((s32) ui32TimeOutJiffies); pvr_lock(); -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) psLinuxEventObject->ui32Stats++; #endif diff --git a/pvr/handle.c b/pvr/handle.c index 77e28fc..3372c6a 100644 --- a/pvr/handle.c +++ b/pvr/handle.c @@ -29,7 +29,7 @@ #include "services_headers.h" #include "handle.h" -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA #define HANDLE_BLOCK_SIZE 1 #else #define HANDLE_BLOCK_SIZE 256 @@ -187,7 +187,7 @@ static inline IMG_BOOL HandleListIsEmpty(u32 ui32Index, bIsEmpty = (IMG_BOOL) (psList->ui32Next == ui32Index); -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA { IMG_BOOL bIsEmpty2; @@ -199,7 +199,7 @@ static inline IMG_BOOL HandleListIsEmpty(u32 ui32Index, return bIsEmpty; } -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA static inline IMG_BOOL NoChildren(struct PVRSRV_HANDLE_BASE *psBase, struct sHandle *psHandle) { @@ -1200,7 +1200,7 @@ static enum PVRSRV_ERROR PVRSRVHandleBatchCommitOrRelease( ui32IndexPlusOne = ui32NextIndexPlusOne; } -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA if (psBase->ui32TotalHandCountPreBatch != psBase->ui32TotalHandCount) { u32 ui32Delta = psBase->ui32TotalHandCount - diff --git a/pvr/mm.h b/pvr/mm.h index 9484363..777c49c 100644 --- a/pvr/mm.h +++ b/pvr/mm.h @@ -260,7 +260,7 @@ static inline enum LINUX_MEM_AREA_TYPE LinuxMemAreaRootType(struct LinuxMemArea const char *LinuxMemAreaTypeToString(enum LINUX_MEM_AREA_TYPE eMemAreaType); -#if defined(DEBUG) || defined(DEBUG_LINUX_MEM_AREAS) +#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(DEBUG_LINUX_MEM_AREAS) const char *HAPFlagsToString(u32 ui32Flags); #endif diff --git a/pvr/mmap.c b/pvr/mmap.c index 240d121..6bc58e1 100644 --- a/pvr/mmap.c +++ b/pvr/mmap.c @@ -118,7 +118,7 @@ static struct KV_OFFSET_STRUCT *CreateOffsetStruct(struct LinuxMemArea u32 ui32RealByteSize) { struct KV_OFFSET_STRUCT *psOffsetStruct; -#if defined(DEBUG) || defined(DEBUG_LINUX_MMAP_AREAS) +#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(DEBUG_LINUX_MMAP_AREAS) const char *pszName = LinuxMemAreaTypeToString(LinuxMemAreaRootType(psLinuxMemArea)); #endif @@ -714,7 +714,7 @@ unlock_and_return: enum PVRSRV_ERROR PVRMMapRegisterArea(struct LinuxMemArea *psLinuxMemArea) { enum PVRSRV_ERROR eError = PVRSRV_ERROR_GENERIC; -#if defined(DEBUG) || defined(DEBUG_LINUX_MMAP_AREAS) +#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(DEBUG_LINUX_MMAP_AREAS) const char *pszName = LinuxMemAreaTypeToString(LinuxMemAreaRootType(psLinuxMemArea)); #endif diff --git a/pvr/module.c b/pvr/module.c index 29062b2..3ba1aea 100644 --- a/pvr/module.c +++ b/pvr/module.c @@ -55,7 +55,7 @@ #define DRVNAME "pvrsrvkm" -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA static int debug = DBGPRIV_WARNING; #include module_param(debug, int, 0); @@ -218,7 +218,7 @@ static int __init pvr_init(void) pvr_init_lock(); -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA PVRDebugSetLevel(debug); #endif diff --git a/pvr/omaplfb.h b/pvr/omaplfb.h index fe4b2bb..34e7a6d 100644 --- a/pvr/omaplfb.h +++ b/pvr/omaplfb.h @@ -115,7 +115,7 @@ struct OMAPLFB_DEVINFO { #define OMAPLFB_PAGE_ROUNDUP(x) (((x) + OMAPLFB_PAGE_MASK) & OMAPLFB_PAGE_TRUNC) -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA #define DEBUG_PRINTK(x) printk x #else #define DEBUG_PRINTK(x) diff --git a/pvr/osfunc.c b/pvr/osfunc.c index c0d0ba7..907ccc6 100644 --- a/pvr/osfunc.c +++ b/pvr/osfunc.c @@ -1237,7 +1237,7 @@ struct sWrapMemInfo { struct IMG_SYS_PHYADDR *psPhysAddr; int iPageOffset; int iContiguous; -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) u32 ulStartAddr; u32 ulBeyondEndAddr; struct vm_area_struct *psVMArea; @@ -1384,7 +1384,7 @@ enum PVRSRV_ERROR OSAcquirePhysPageAddr(void *pvCPUVAddr, u32 ui32Bytes, } memset(psInfo, 0, sizeof(*psInfo)); -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) psInfo->ulStartAddr = ulStartAddrOrig; psInfo->ulBeyondEndAddr = ulBeyondEndAddrOrig; #endif @@ -1462,7 +1462,7 @@ enum PVRSRV_ERROR OSAcquirePhysPageAddr(void *pvCPUVAddr, u32 ui32Bytes, goto error_release_mmap_sem; } -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) psInfo->psVMArea = psVMArea; #endif diff --git a/pvr/pb.c b/pvr/pb.c index a614069..ffd8f69 100644 --- a/pvr/pb.c +++ b/pvr/pb.c @@ -232,7 +232,7 @@ static enum PVRSRV_ERROR SGXCleanupSharedPBDescCallback(void *pvParam, static enum PVRSRV_ERROR SGXCleanupSharedPBDescCreateLockCallback(void *pvParam, u32 ui32Param) { -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA struct PVRSRV_PER_PROCESS_DATA *psPerProc = (struct PVRSRV_PER_PROCESS_DATA *)pvParam; PVR_ASSERT(psPerProc == psPerProcCreateSharedPB); diff --git a/pvr/proc.c b/pvr/proc.c index 0ade0b9..613d3de 100644 --- a/pvr/proc.c +++ b/pvr/proc.c @@ -241,7 +241,7 @@ int CreateProcEntries(void) return -ENOMEM; } -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA if (CreateProcEntry ("debug_level", PVRDebugProcGetLevel, PVRDebugProcSetLevel, NULL)) { PVR_DPF(PVR_DBG_ERROR, @@ -301,7 +301,7 @@ void RemovePerProcessProcDir(struct PVRSRV_ENV_PER_PROCESS_DATA *psPerProc) void RemoveProcEntries(void) { -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA RemoveProcEntry("debug_level"); #endif RemoveProcEntry("queue"); diff --git a/pvr/pvr_debug.h b/pvr/pvr_debug.h index a47d718..23ebe65 100644 --- a/pvr/pvr_debug.h +++ b/pvr/pvr_debug.h @@ -52,7 +52,7 @@ #define PVR_DBG_CALLTRACE DBGPRIV_CALLTRACE #define PVR_DBG_ALLOC DBGPRIV_ALLOC -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) #define PVR_ASSERT(EXPR) \ do { \ diff --git a/pvr/pvrconfig.h b/pvr/pvrconfig.h index 54f8549..eeaa95e 100644 --- a/pvr/pvrconfig.h +++ b/pvr/pvrconfig.h @@ -17,7 +17,7 @@ # define NO_HARDWARE 1 #endif -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA # define DEBUG_LINUX_MEMORY_ALLOCATIONS 1 # define DEBUG_LINUX_MEM_AREAS 1 # define DEBUG_LINUX_MMAP_AREAS 1 diff --git a/pvr/ra.c b/pvr/ra.c index 4d002a6..4c71af1 100644 --- a/pvr/ra.c +++ b/pvr/ra.c @@ -73,7 +73,7 @@ struct RA_ARENA { #ifdef RA_STATS struct RA_STATISTICS sStatistics; #endif -#if defined(CONFIG_PROC_FS) && defined(DEBUG) +#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA) #define PROC_NAME_SIZE 32 char szProcInfoName[PROC_NAME_SIZE]; char szProcSegsName[PROC_NAME_SIZE]; @@ -81,14 +81,14 @@ struct RA_ARENA { #endif }; -#if defined(CONFIG_PROC_FS) && defined(DEBUG) +#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA) static int RA_DumpSegs(char *page, char **start, off_t off, int count, int *eof, void *data); static int RA_DumpInfo(char *page, char **start, off_t off, int count, int *eof, void *data); #endif -#if defined(CONFIG_PROC_FS) && defined(DEBUG) +#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA) static char *ReplaceSpaces(char *const pS) { char *pT; @@ -641,7 +641,7 @@ struct RA_ARENA *RA_Create(char *name, u32 base, size_t uSize, pArena->sStatistics.uExportCount = 0; #endif -#if defined(CONFIG_PROC_FS) && defined(DEBUG) +#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA) if (strcmp(pArena->name, "") != 0) { int ret; int (*pfnCreateProcEntry) (const char *, read_proc_t, @@ -732,7 +732,7 @@ void RA_Delete(struct RA_ARENA *pArena) pArena->sStatistics.uSpanCount--; #endif } -#if defined(CONFIG_PROC_FS) && defined(DEBUG) +#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA) { void (*pfnRemoveProcEntry) (const char *); @@ -924,7 +924,8 @@ IMG_BOOL RA_GetNextLiveSegment(void *hArena, return IMG_FALSE; } -#if (defined(CONFIG_PROC_FS) && defined(DEBUG)) || defined(RA_STATS) +#if (defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA)) || \ + defined(RA_STATS) static char *_BTType(int eType) { switch (eType) { @@ -968,7 +969,7 @@ void RA_Dump(struct RA_ARENA *pArena) } #endif -#if defined(CONFIG_PROC_FS) && defined(DEBUG) +#if defined(CONFIG_PROC_FS) && defined(CONFIG_PVR_DEBUG_EXTRA) static int RA_DumpSegs(char *page, char **start, off_t off, int count, int *eof, void *data) { diff --git a/pvr/resman.c b/pvr/resman.c index ccb1664..59e8a17 100644 --- a/pvr/resman.c +++ b/pvr/resman.c @@ -48,7 +48,7 @@ static DEFINE_SEMAPHORE(lock); #define RESMAN_SIGNATURE 0x12345678 struct RESMAN_ITEM { -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA u32 ui32Signature; #endif struct RESMAN_ITEM **ppsThis; @@ -64,7 +64,7 @@ struct RESMAN_ITEM { }; struct RESMAN_CONTEXT { -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA u32 ui32Signature; #endif struct RESMAN_CONTEXT **ppsThis; @@ -91,7 +91,7 @@ static int FreeResourceByCriteria(struct RESMAN_CONTEXT *psContext, u32 ui32Param, IMG_BOOL bExecuteCallback); -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA static void ValidateResList(struct RESMAN_LIST *psResList); #define VALIDATERESLIST() ValidateResList(gpsResList) #else @@ -144,7 +144,7 @@ enum PVRSRV_ERROR PVRSRVResManConnect(void *hPerProc, return eError; } -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA psResManContext->ui32Signature = RESMAN_SIGNATURE; #endif psResManContext->psResItemList = NULL; @@ -274,7 +274,7 @@ struct RESMAN_ITEM *ResManRegisterRes(struct RESMAN_CONTEXT *psResManContext, return (struct RESMAN_ITEM *)NULL; } -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA psNewResItem->ui32Signature = RESMAN_SIGNATURE; #endif psNewResItem->ui32ResType = ui32ResType; @@ -349,7 +349,7 @@ enum PVRSRV_ERROR ResManDissociateRes(struct RESMAN_ITEM *psResItem, PVR_DBG_BREAK; return PVRSRV_ERROR_INVALID_PARAMS; } -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA PVR_ASSERT(psResItem->ui32Signature == RESMAN_SIGNATURE); #endif @@ -385,7 +385,7 @@ enum PVRSRV_ERROR ResManFindResourceByPtr( PVR_DBG_BREAK; return PVRSRV_ERROR_INVALID_PARAMS; } -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA PVR_ASSERT(psItem->ui32Signature == RESMAN_SIGNATURE); #endif @@ -517,7 +517,7 @@ static int FreeResourceByCriteria(struct RESMAN_CONTEXT *psResManContext, return freed; } -#ifdef DEBUG +#ifdef CONFIG_PVR_DEBUG_EXTRA static void ValidateResList(struct RESMAN_LIST *psResList) { struct RESMAN_ITEM *psCurItem, **ppsThisItem; diff --git a/pvr/sgx_options.h b/pvr/sgx_options.h index ce59e49..67402fe 100644 --- a/pvr/sgx_options.h +++ b/pvr/sgx_options.h @@ -24,7 +24,7 @@ * ******************************************************************************/ -#if defined(DEBUG) || defined(INTERNAL_TEST) +#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(INTERNAL_TEST) #define DEBUG_SET_OFFSET OPTIONS_BIT0 #define OPTIONS_BIT0 0x1 #else diff --git a/pvr/sgxutils.c b/pvr/sgxutils.c index feb3504..5b04f04 100644 --- a/pvr/sgxutils.c +++ b/pvr/sgxutils.c @@ -703,7 +703,7 @@ enum PVRSRV_ERROR SGX2DQueryBlitsCompleteKM( PVR_DPF(PVR_DBG_ERROR, "SGX2DQueryBlitsCompleteKM: Timed out. Ops pending."); -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) { struct PVRSRV_SYNC_DATA *psSyncData = psSyncInfo->psSyncData; diff --git a/pvr/syslocal.h b/pvr/syslocal.h index de31046..0cda586 100644 --- a/pvr/syslocal.h +++ b/pvr/syslocal.h @@ -85,7 +85,7 @@ struct SYS_SPECIFIC_DATA { struct clk *psSGX_FCK; struct clk *psSGX_ICK; struct clk *psMPU_CK; -#if defined(DEBUG) || defined(TIMING) +#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(TIMING) struct clk *psGPT11_FCK; struct clk *psGPT11_ICK; void __iomem *gpt_base; diff --git a/pvr/sysutils.c b/pvr/sysutils.c index 5729b5a..52c2584 100644 --- a/pvr/sysutils.c +++ b/pvr/sysutils.c @@ -90,7 +90,7 @@ static int vdd2_post_func(struct notifier_block *n, unsigned long event, if (atomic_read(&gpsSysSpecificData->sSGXClocksEnabled) != 0 && gpsSysSpecificData->bSGXInitComplete) { -#if defined(DEBUG) +#if defined(CONFIG_PVR_DEBUG_EXTRA) unsigned long rate; rate = clk_get_rate(gpsSysSpecificData->psSGX_FCK); @@ -520,7 +520,7 @@ static void CleanupSgxClocks(struct SYS_DATA *psSysData) } } -#if defined(DEBUG) || defined(TIMING) +#if defined(CONFIG_PVR_DEBUG_EXTRA) || defined(TIMING) static inline u32 gpt_read_reg(struct SYS_DATA *psSysData, u32 reg) { struct SYS_SPECIFIC_DATA *psSysSpecData = psSysData->pvSysSpecificData; -- 2.39.5