drm/amdkfd: don't set get_pipes_num() as inline
authorOded Gabbay <oded.gabbay@amd.com>
Tue, 17 Feb 2015 09:30:31 +0000 (11:30 +0200)
committerOded Gabbay <oded.gabbay@amd.com>
Mon, 23 Feb 2015 08:48:02 +0000 (10:48 +0200)
get_pipes_num() calls BUG_ON so we can't set it as inline because it produces a
warning as BUG_ON() uses static variables when it is expanded.

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h

index 1b58f331afee2cef66ddf1d78ea139b738b87088..910ff8ab9c9cfb018c6a18e8ae3126767b6e2580 100644 (file)
@@ -68,6 +68,12 @@ unsigned int get_first_pipe(struct device_queue_manager *dqm)
        return dqm->dev->shared_resources.first_compute_pipe;
 }
 
+unsigned int get_pipes_num(struct device_queue_manager *dqm)
+{
+       BUG_ON(!dqm || !dqm->dev);
+       return dqm->dev->shared_resources.compute_pipe_count;
+}
+
 static inline unsigned int get_pipes_num_cpsch(void)
 {
        return PIPE_PER_ME_CP_SCHEDULING;
index 386bd7df7c30104d11f6af2d499c8bda798e999d..488f51d19427a8273b672df18962a4dafe9feaf5 100644 (file)
@@ -164,6 +164,7 @@ void program_sh_mem_settings(struct device_queue_manager *dqm,
 int init_pipelines(struct device_queue_manager *dqm,
                unsigned int pipes_num, unsigned int first_pipe);
 unsigned int get_first_pipe(struct device_queue_manager *dqm);
+unsigned int get_pipes_num(struct device_queue_manager *dqm);
 
 extern inline unsigned int get_sh_mem_bases_32(struct kfd_process_device *pdd)
 {
@@ -176,10 +177,4 @@ get_sh_mem_bases_nybble_64(struct kfd_process_device *pdd)
        return (pdd->lds_base >> 60) & 0x0E;
 }
 
-extern inline unsigned int get_pipes_num(struct device_queue_manager *dqm)
-{
-       BUG_ON(!dqm || !dqm->dev);
-       return dqm->dev->shared_resources.compute_pipe_count;
-}
-
 #endif /* KFD_DEVICE_QUEUE_MANAGER_H_ */