[radeon-alex:amd-staging-drm-next 500/630] drivers/gpu/drm/etnaviv/etnaviv_dump.c:138:21: error: 'sched' undeclared; did you mean 'cred'?

kbuild test robot lkp at intel.com
Fri Dec 21 13:11:20 UTC 2018


Hi Sharat,

FYI, the error/warning still remains.

tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head:   7db9c45feec5ae730138e68b64eb945bd54891ca
commit: b411997efe8f34b22824461b118a6eacae232b9b [500/630] drm/scheduler: Add drm_sched_suspend/resume_timeout()
config: arm-multi_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout b411997efe8f34b22824461b118a6eacae232b9b
        # save the attached .config to linux build tree
        GCC_VERSION=7.2.0 make.cross ARCH=arm 

All errors (new ones prefixed by >>):

   In file included from include/linux/radix-tree.h:29:0,
                    from include/linux/idr.h:15,
                    from include/linux/kernfs.h:14,
                    from include/linux/sysfs.h:16,
                    from include/linux/kobject.h:20,
                    from include/linux/device.h:16,
                    from include/linux/devcoredump.h:23,
                    from drivers/gpu/drm/etnaviv/etnaviv_dump.c:6:
   drivers/gpu/drm/etnaviv/etnaviv_dump.c: In function 'etnaviv_core_dump':
>> drivers/gpu/drm/etnaviv/etnaviv_dump.c:138:21: error: 'sched' undeclared (first use in this function); did you mean 'cred'?
     spin_lock_irqsave(&sched->job_list_lock, flags);
                        ^
   include/linux/spinlock.h:241:34: note: in definition of macro 'raw_spin_lock_irqsave'
      flags = _raw_spin_lock_irqsave(lock); \
                                     ^~~~
   drivers/gpu/drm/etnaviv/etnaviv_dump.c:138:2: note: in expansion of macro 'spin_lock_irqsave'
     spin_lock_irqsave(&sched->job_list_lock, flags);
     ^~~~~~~~~~~~~~~~~
   drivers/gpu/drm/etnaviv/etnaviv_dump.c:138:21: note: each undeclared identifier is reported only once for each function it appears in
     spin_lock_irqsave(&sched->job_list_lock, flags);
                        ^
   include/linux/spinlock.h:241:34: note: in definition of macro 'raw_spin_lock_irqsave'
      flags = _raw_spin_lock_irqsave(lock); \
                                     ^~~~
   drivers/gpu/drm/etnaviv/etnaviv_dump.c:138:2: note: in expansion of macro 'spin_lock_irqsave'
     spin_lock_irqsave(&sched->job_list_lock, flags);
     ^~~~~~~~~~~~~~~~~

vim +138 drivers/gpu/drm/etnaviv/etnaviv_dump.c

   > 6	#include <linux/devcoredump.h>
     7	#include "etnaviv_cmdbuf.h"
     8	#include "etnaviv_dump.h"
     9	#include "etnaviv_gem.h"
    10	#include "etnaviv_gpu.h"
    11	#include "etnaviv_mmu.h"
    12	#include "etnaviv_sched.h"
    13	#include "state.xml.h"
    14	#include "state_hi.xml.h"
    15	
    16	static bool etnaviv_dump_core = true;
    17	module_param_named(dump_core, etnaviv_dump_core, bool, 0600);
    18	
    19	struct core_dump_iterator {
    20		void *start;
    21		struct etnaviv_dump_object_header *hdr;
    22		void *data;
    23	};
    24	
    25	static const unsigned short etnaviv_dump_registers[] = {
    26		VIVS_HI_AXI_STATUS,
    27		VIVS_HI_CLOCK_CONTROL,
    28		VIVS_HI_IDLE_STATE,
    29		VIVS_HI_AXI_CONFIG,
    30		VIVS_HI_INTR_ENBL,
    31		VIVS_HI_CHIP_IDENTITY,
    32		VIVS_HI_CHIP_FEATURE,
    33		VIVS_HI_CHIP_MODEL,
    34		VIVS_HI_CHIP_REV,
    35		VIVS_HI_CHIP_DATE,
    36		VIVS_HI_CHIP_TIME,
    37		VIVS_HI_CHIP_MINOR_FEATURE_0,
    38		VIVS_HI_CACHE_CONTROL,
    39		VIVS_HI_AXI_CONTROL,
    40		VIVS_PM_POWER_CONTROLS,
    41		VIVS_PM_MODULE_CONTROLS,
    42		VIVS_PM_MODULE_STATUS,
    43		VIVS_PM_PULSE_EATER,
    44		VIVS_MC_MMU_FE_PAGE_TABLE,
    45		VIVS_MC_MMU_TX_PAGE_TABLE,
    46		VIVS_MC_MMU_PE_PAGE_TABLE,
    47		VIVS_MC_MMU_PEZ_PAGE_TABLE,
    48		VIVS_MC_MMU_RA_PAGE_TABLE,
    49		VIVS_MC_DEBUG_MEMORY,
    50		VIVS_MC_MEMORY_BASE_ADDR_RA,
    51		VIVS_MC_MEMORY_BASE_ADDR_FE,
    52		VIVS_MC_MEMORY_BASE_ADDR_TX,
    53		VIVS_MC_MEMORY_BASE_ADDR_PEZ,
    54		VIVS_MC_MEMORY_BASE_ADDR_PE,
    55		VIVS_MC_MEMORY_TIMING_CONTROL,
    56		VIVS_MC_BUS_CONFIG,
    57		VIVS_FE_DMA_STATUS,
    58		VIVS_FE_DMA_DEBUG_STATE,
    59		VIVS_FE_DMA_ADDRESS,
    60		VIVS_FE_DMA_LOW,
    61		VIVS_FE_DMA_HIGH,
    62		VIVS_FE_AUTO_FLUSH,
    63	};
    64	
    65	static void etnaviv_core_dump_header(struct core_dump_iterator *iter,
    66		u32 type, void *data_end)
    67	{
    68		struct etnaviv_dump_object_header *hdr = iter->hdr;
    69	
    70		hdr->magic = cpu_to_le32(ETDUMP_MAGIC);
    71		hdr->type = cpu_to_le32(type);
    72		hdr->file_offset = cpu_to_le32(iter->data - iter->start);
    73		hdr->file_size = cpu_to_le32(data_end - iter->data);
    74	
    75		iter->hdr++;
    76		iter->data += hdr->file_size;
    77	}
    78	
    79	static void etnaviv_core_dump_registers(struct core_dump_iterator *iter,
    80		struct etnaviv_gpu *gpu)
    81	{
    82		struct etnaviv_dump_registers *reg = iter->data;
    83		unsigned int i;
    84	
    85		for (i = 0; i < ARRAY_SIZE(etnaviv_dump_registers); i++, reg++) {
    86			reg->reg = etnaviv_dump_registers[i];
    87			reg->value = gpu_read(gpu, etnaviv_dump_registers[i]);
    88		}
    89	
    90		etnaviv_core_dump_header(iter, ETDUMP_BUF_REG, reg);
    91	}
    92	
    93	static void etnaviv_core_dump_mmu(struct core_dump_iterator *iter,
    94		struct etnaviv_gpu *gpu, size_t mmu_size)
    95	{
    96		etnaviv_iommu_dump(gpu->mmu, iter->data);
    97	
    98		etnaviv_core_dump_header(iter, ETDUMP_BUF_MMU, iter->data + mmu_size);
    99	}
   100	
   101	static void etnaviv_core_dump_mem(struct core_dump_iterator *iter, u32 type,
   102		void *ptr, size_t size, u64 iova)
   103	{
   104		memcpy(iter->data, ptr, size);
   105	
   106		iter->hdr->iova = cpu_to_le64(iova);
   107	
   108		etnaviv_core_dump_header(iter, type, iter->data + size);
   109	}
   110	
   111	void etnaviv_core_dump(struct etnaviv_gpu *gpu)
   112	{
   113		struct core_dump_iterator iter;
   114		struct etnaviv_vram_mapping *vram;
   115		struct etnaviv_gem_object *obj;
   116		struct etnaviv_gem_submit *submit;
   117		struct drm_sched_job *s_job;
   118		unsigned int n_obj, n_bomap_pages;
   119		size_t file_size, mmu_size;
   120		__le64 *bomap, *bomap_start;
   121		unsigned long flags;
   122	
   123		/* Only catch the first event, or when manually re-armed */
   124		if (!etnaviv_dump_core)
   125			return;
   126		etnaviv_dump_core = false;
   127	
   128		mmu_size = etnaviv_iommu_dump_size(gpu->mmu);
   129	
   130		/* We always dump registers, mmu, ring and end marker */
   131		n_obj = 4;
   132		n_bomap_pages = 0;
   133		file_size = ARRAY_SIZE(etnaviv_dump_registers) *
   134				sizeof(struct etnaviv_dump_registers) +
   135			    mmu_size + gpu->buffer.size;
   136	
   137		/* Add in the active command buffers */
 > 138		spin_lock_irqsave(&sched->job_list_lock, flags);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 44818 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20181221/36c74ba5/attachment-0001.gz>


More information about the dri-devel mailing list