diff --git a/include/lib/debugfs.h b/include/lib/debugfs.h index 941596278..1fdccb6ae 100644 --- a/include/lib/debugfs.h +++ b/include/lib/debugfs.h @@ -66,8 +66,8 @@ int debugfs_smc_setup(void); */ #define DEBUGFS_FID_VALUE (0x10U) -#define is_debugfs_fid(_fid) \ - (((_fid) & FUNCID_NUM_MASK) == DEBUGFS_FID_VALUE) +#define is_debugfs_fid(_fid) \ + (GET_SMC_NUM(_fid) == DEBUGFS_FID_VALUE) /* Function ID for accessing the debugfs interface from arm sip. @@ -76,7 +76,7 @@ int debugfs_smc_setup(void); #define DEBUGFS_FID_VALUE_DEPRECATED (0x30U) #define is_debugfs_fid_deprecated(_fid) \ - (((_fid) & FUNCID_NUM_MASK) == DEBUGFS_FID_VALUE_DEPRECATED) + (GET_SMC_NUM(_fid) == DEBUGFS_FID_VALUE_DEPRECATED) /* Error code for debugfs SMC interface failures */ diff --git a/include/lib/pmf/pmf.h b/include/lib/pmf/pmf.h index 38841d9d9..41bf7fc7d 100644 --- a/include/lib/pmf/pmf.h +++ b/include/lib/pmf/pmf.h @@ -44,7 +44,7 @@ #define PMF_FID_VALUE_DEPRECATED U(0x10) #define is_pmf_fid_deprecated(_fid) \ - (((_fid) & FUNCID_NUM_MASK) == PMF_FID_VALUE_DEPRECATED) + (GET_SMC_NUM(_fid) == PMF_FID_VALUE_DEPRECATED) /* * Defines for PMF SMC function ids used with Vendor-Specific @@ -64,7 +64,8 @@ * PMF calls from the SMC function ID. */ #define PMF_FID_VALUE U(0x20) -#define is_pmf_fid(_fid) (((_fid) & FUNCID_NUM_MASK) == PMF_FID_VALUE) +#define PMF_ID_MASK (FUNCID_NUM_MASK & ~(0xf)) +#define is_pmf_fid(_fid) ((GET_SMC_NUM(_fid) & PMF_ID_MASK) == PMF_FID_VALUE) /* Following are the supported PMF service IDs */ #define PMF_PSCI_STAT_SVC_ID 0