gckMATH_ModuloInt: can be inlined, is used only in two places gcoDUMP: can be removed All gco functions can go, these are userspace. Same for gcm (not gcmk) gc_hal_profiler_internal.h, except for one #define TODO - Don't need the profileFileName (VIVANTE_PROFILER) and profileEnabled on _gckKERNEL. Used only by commands gcvHAL_GET_PROFILE_SETTING and gcvHAL_SET_PROFILE_SETTING, for the user space to store the profiling name and status inside the kernel. - Semaphores/queues: could simply use Linux built-in objects instead of an abstraction. - gckOS_QueryNeedCopy: can be replaced by TRUE or FALSE based on NO_USER_DIRECT_ACCESS_FROM_KERNEL Inlined? Doesn't need any of the argument validation - gcdNULL_DRIVER: not needed - Commented out code (#if 0) in gckCOMMAND_Commit /* Determine context entry and exit points. */ Bugs? --------- - Unnecessary check in context update Line 1419 in gckCONTEXT_Update: if (j >= Context->stateCount) Why? Seems wrong. ("more updates than states" ok, can't be logical) Optimization ---------------- Cache settings - gcdNONPAGED_MEMORY_CACHEABLE