[radeon-alex:amd-staging-drm-next 324/336] htmldocs: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:533: warning: Function parameter or member 'adev' not described in 'for_each_amdgpu_vm_pt_leaf'

kbuild test robot lkp at intel.com
Fri Sep 14 00:57:06 UTC 2018


tree:   git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head:   bc29281af131ae8c02e05322e7fc72829ec555f0
commit: ed238ee1ef30254146a5811270d37ed1cc9826d1 [324/336] drm/amdgpu: add some VM PD/PT iterators v2
reproduce: make htmldocs

All warnings (new ones prefixed by >>):

   include/net/mac80211.h:977: warning: Function parameter or member 'control.rts_cts_rate_idx' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'control.use_rts' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'control.use_cts_prot' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'control.short_preamble' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'control.skip_table' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'control.jiffies' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'control.vif' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'control.hw_key' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'control.flags' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'control.enqueue_time' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'ack' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'ack.cookie' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'status.rates' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'status.ack_signal' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'status.ampdu_ack_len' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'status.ampdu_len' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'status.antenna' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'status.tx_time' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'status.is_valid_ack_signal' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'status.status_driver_data' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'driver_rates' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'pad' not described in 'ieee80211_tx_info'
   include/net/mac80211.h:977: warning: Function parameter or member 'rate_driver_data' not described in 'ieee80211_tx_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'rx_stats_avg' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'rx_stats_avg.signal' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'rx_stats_avg.chain_signal' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.filtered' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.retry_failed' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.retry_count' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.lost_packets' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.last_tdls_pkt_time' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.msdu_retries' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.msdu_failed' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.last_ack' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.last_ack_signal' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.ack_signal_filled' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'status_stats.avg_ack_signal' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'tx_stats.packets' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'tx_stats.bytes' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'tx_stats.last_rate' not described in 'sta_info'
   net/mac80211/sta_info.h:588: warning: Function parameter or member 'tx_stats.msdu' not described in 'sta_info'
   include/linux/mod_devicetable.h:763: warning: Function parameter or member 'driver_data' not described in 'typec_device_id'
   kernel/sched/fair.c:3371: warning: Function parameter or member 'flags' not described in 'attach_entity_load_avg'
   arch/x86/include/asm/atomic.h:84: warning: Excess function parameter 'i' description in 'arch_atomic_sub_and_test'
   arch/x86/include/asm/atomic.h:84: warning: Excess function parameter 'v' description in 'arch_atomic_sub_and_test'
   arch/x86/include/asm/atomic.h:96: warning: Excess function parameter 'v' description in 'arch_atomic_inc'
   arch/x86/include/asm/atomic.h:109: warning: Excess function parameter 'v' description in 'arch_atomic_dec'
   arch/x86/include/asm/atomic.h:124: warning: Excess function parameter 'v' description in 'arch_atomic_dec_and_test'
   arch/x86/include/asm/atomic.h:138: warning: Excess function parameter 'v' description in 'arch_atomic_inc_and_test'
   arch/x86/include/asm/atomic.h:153: warning: Excess function parameter 'i' description in 'arch_atomic_add_negative'
   arch/x86/include/asm/atomic.h:153: warning: Excess function parameter 'v' description in 'arch_atomic_add_negative'
   include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_excl.cb' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_excl.poll' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_excl.active' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_shared.cb' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_shared.poll' not described in 'dma_buf'
   include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_shared.active' not described in 'dma_buf'
   include/linux/dma-fence-array.h:54: warning: Function parameter or member 'work' not described in 'dma_fence_array'
   include/linux/gpio/driver.h:142: warning: Function parameter or member 'request_key' not described in 'gpio_irq_chip'
   include/linux/iio/hw-consumer.h:1: warning: no structured comments found
   include/linux/input/sparse-keymap.h:46: warning: Function parameter or member 'sw' not described in 'key_entry'
   drivers/pci/pci.c:218: warning: Excess function parameter 'p' description in 'pci_dev_str_match_path'
   include/linux/regulator/driver.h:227: warning: Function parameter or member 'resume' not described in 'regulator_ops'
   drivers/regulator/core.c:4479: warning: Excess function parameter 'state' description in 'regulator_suspend'
   arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw0' not described in 'irb'
   arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw1' not described in 'irb'
   arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw2' not described in 'irb'
   arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw3' not described in 'irb'
   arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.eadm' not described in 'irb'
   drivers/slimbus/stream.c:1: warning: no structured comments found
   drivers/target/target_core_device.c:1: warning: no structured comments found
   drivers/usb/dwc3/gadget.c:510: warning: Excess function parameter 'dwc' description in 'dwc3_gadget_start_config'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/bus.c:1: warning: no structured comments found
   drivers/usb/typec/bus.c:268: warning: Function parameter or member 'mode' not described in 'typec_match_altmode'
   drivers/usb/typec/class.c:1497: warning: Excess function parameter 'drvdata' description in 'typec_port_register_altmode'
   drivers/usb/typec/class.c:1: warning: no structured comments found
   include/linux/w1.h:281: warning: Function parameter or member 'of_match_table' not described in 'w1_family'
   fs/direct-io.c:257: warning: Excess function parameter 'offset' description in 'dio_complete'
   fs/file_table.c:1: warning: no structured comments found
   fs/libfs.c:477: warning: Excess function parameter 'available' description in 'simple_write_end'
   fs/posix_acl.c:646: warning: Function parameter or member 'inode' not described in 'posix_acl_update_mode'
   fs/posix_acl.c:646: warning: Function parameter or member 'mode_p' not described in 'posix_acl_update_mode'
   fs/posix_acl.c:646: warning: Function parameter or member 'acl' not described in 'posix_acl_update_mode'
   drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:183: warning: Function parameter or member 'blockable' not described in 'amdgpu_mn_read_lock'
   drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:254: warning: Function parameter or member 'blockable' not described in 'amdgpu_mn_invalidate_range_start_gfx'
   drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:302: warning: Function parameter or member 'blockable' not described in 'amdgpu_mn_invalidate_range_start_hsa'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:361: warning: cannot understand function prototype: 'struct amdgpu_vm_pt_cursor '
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:362: warning: cannot understand function prototype: 'struct amdgpu_vm_pt_cursor '
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:533: warning: Function parameter or member 'adev' not described in 'for_each_amdgpu_vm_pt_leaf'
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:533: warning: Function parameter or member 'vm' not described in 'for_each_amdgpu_vm_pt_leaf'
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:533: warning: Function parameter or member 'start' not described in 'for_each_amdgpu_vm_pt_leaf'
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:533: warning: Function parameter or member 'end' not described in 'for_each_amdgpu_vm_pt_leaf'
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:533: warning: Function parameter or member 'cursor' not described in 'for_each_amdgpu_vm_pt_leaf'
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:581: warning: Function parameter or member 'adev' not described in 'for_each_amdgpu_vm_pt_dfs_safe'
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:581: warning: Function parameter or member 'vm' not described in 'for_each_amdgpu_vm_pt_dfs_safe'
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:581: warning: Function parameter or member 'cursor' not described in 'for_each_amdgpu_vm_pt_dfs_safe'
>> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:581: warning: Function parameter or member 'entry' not described in 'for_each_amdgpu_vm_pt_dfs_safe'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:827: warning: Function parameter or member 'level' not described in 'amdgpu_vm_bo_param'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'params' not described in 'amdgpu_vm_update_func'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'bo' not described in 'amdgpu_vm_update_func'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'pe' not described in 'amdgpu_vm_update_func'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'addr' not described in 'amdgpu_vm_update_func'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'count' not described in 'amdgpu_vm_update_func'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'incr' not described in 'amdgpu_vm_update_func'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1352: warning: Function parameter or member 'flags' not described in 'amdgpu_vm_update_func'
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:3095: warning: Function parameter or member 'pasid' not described in 'amdgpu_vm_make_compute'
   include/drm/drm_drv.h:610: warning: Function parameter or member 'gem_prime_pin' not described in 'drm_driver'
   include/drm/drm_drv.h:610: warning: Function parameter or member 'gem_prime_unpin' not described in 'drm_driver'
   include/drm/drm_drv.h:610: warning: Function parameter or member 'gem_prime_res_obj' not described in 'drm_driver'
   include/drm/drm_drv.h:610: warning: Function parameter or member 'gem_prime_get_sg_table' not described in 'drm_driver'
   include/drm/drm_drv.h:610: warning: Function parameter or member 'gem_prime_import_sg_table' not described in 'drm_driver'
   include/drm/drm_drv.h:610: warning: Function parameter or member 'gem_prime_vmap' not described in 'drm_driver'
   include/drm/drm_drv.h:610: warning: Function parameter or member 'gem_prime_vunmap' not described in 'drm_driver'
   include/drm/drm_drv.h:610: warning: Function parameter or member 'gem_prime_mmap' not described in 'drm_driver'
   include/drm/drm_panel.h:98: warning: Function parameter or member 'link' not described in 'drm_panel'
   drivers/gpu/drm/i915/i915_vma.h:49: warning: cannot understand function prototype: 'struct i915_vma '
   drivers/gpu/drm/i915/i915_vma.h:1: warning: no structured comments found
   drivers/gpu/drm/i915/intel_guc_fwif.h:553: warning: cannot understand function prototype: 'struct guc_log_buffer_state '
   drivers/gpu/drm/i915/i915_trace.h:1: warning: no structured comments found
   include/linux/skbuff.h:860: warning: Function parameter or member 'dev_scratch' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'list' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'ip_defrag_offset' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'skb_mstamp' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member '__cloned_offset' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'head_frag' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member '__pkt_type_offset' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'encapsulation' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'encap_hdr_csum' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'csum_valid' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'csum_complete_sw' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'csum_level' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'inner_protocol_type' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'remcsum_offload' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'offload_fwd_mark' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'offload_mr_fwd_mark' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'sender_cpu' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'reserved_tailroom' not described in 'sk_buff'
   include/linux/skbuff.h:860: warning: Function parameter or member 'inner_ipproto' not described in 'sk_buff'
   include/net/sock.h:238: warning: Function parameter or member 'skc_addrpair' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_portpair' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_ipv6only' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_net_refcnt' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_v6_daddr' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_v6_rcv_saddr' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_cookie' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_listener' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_tw_dr' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_rcv_wnd' not described in 'sock_common'
   include/net/sock.h:238: warning: Function parameter or member 'skc_tw_rcv_nxt' not described in 'sock_common'
   include/net/sock.h:509: warning: Function parameter or member 'sk_backlog.rmem_alloc' not described in 'sock'
   include/net/sock.h:509: warning: Function parameter or member 'sk_backlog.len' not described in 'sock'
   include/net/sock.h:509: warning: Function parameter or member 'sk_backlog.head' not described in 'sock'
   include/net/sock.h:509: warning: Function parameter or member 'sk_backlog.tail' not described in 'sock'
   include/net/sock.h:509: warning: Function parameter or member 'sk_wq_raw' not described in 'sock'
   include/net/sock.h:509: warning: Function parameter or member 'tcp_rtx_queue' not described in 'sock'
   include/net/sock.h:509: warning: Function parameter or member 'sk_route_forced_caps' not described in 'sock'
   include/net/sock.h:509: warning: Function parameter or member 'sk_txtime_report_errors' not described in 'sock'
   include/net/sock.h:509: warning: Function parameter or member 'sk_validate_xmit_skb' not described in 'sock'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'adj_list.upper' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'adj_list.lower' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'gso_partial_features' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'switchdev_ops' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'l3mdev_ops' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'xfrmdev_ops' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'tlsdev_ops' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'name_assign_type' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'ieee802154_ptr' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'mpls_ptr' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'xdp_prog' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'gro_flush_timeout' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'nf_hooks_ingress' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member '____cacheline_aligned_in_smp' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'qdisc_hash' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'xps_cpus_map' not described in 'net_device'
   include/linux/netdevice.h:2018: warning: Function parameter or member 'xps_rxqs_map' not described in 'net_device'
   include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(advertising' not described in 'phylink_link_state'
   include/linux/phylink.h:56: warning: Function parameter or member '__ETHTOOL_DECLARE_LINK_MODE_MASK(lp_advertising' not described in 'phylink_link_state'
   sound/soc/soc-core.c:2918: warning: Excess function parameter 'legacy_dai_naming' description in 'snd_soc_register_dais'
   Documentation/admin-guide/cgroup-v2.rst:1485: WARNING: Block quote ends without a blank line; unexpected unindent.
   Documentation/admin-guide/cgroup-v2.rst:1487: WARNING: Block quote ends without a blank line; unexpected unindent.
   Documentation/admin-guide/cgroup-v2.rst:1488: WARNING: Block quote ends without a blank line; unexpected unindent.
   Documentation/core-api/boot-time-mm.rst:78: ERROR: Error in "kernel-doc" directive:
   unknown option: "nodocs".

vim +533 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

   357	
   358	/**
   359	 * amdgpu_vm_pt_cursor - state for for_each_amdgpu_vm_pt
   360	 */
 > 361	struct amdgpu_vm_pt_cursor {
 > 362		uint64_t pfn;
   363		struct amdgpu_vm_pt *parent;
   364		struct amdgpu_vm_pt *entry;
   365		unsigned level;
   366	};
   367	
   368	/**
   369	 * amdgpu_vm_pt_start - start PD/PT walk
   370	 *
   371	 * @adev: amdgpu_device pointer
   372	 * @vm: amdgpu_vm structure
   373	 * @start: start address of the walk
   374	 * @cursor: state to initialize
   375	 *
   376	 * Initialize a amdgpu_vm_pt_cursor to start a walk.
   377	 */
   378	static void amdgpu_vm_pt_start(struct amdgpu_device *adev,
   379				       struct amdgpu_vm *vm, uint64_t start,
   380				       struct amdgpu_vm_pt_cursor *cursor)
   381	{
   382		cursor->pfn = start;
   383		cursor->parent = NULL;
   384		cursor->entry = &vm->root;
   385		cursor->level = adev->vm_manager.root_level;
   386	}
   387	
   388	/**
   389	 * amdgpu_vm_pt_descendant - go to child node
   390	 *
   391	 * @adev: amdgpu_device pointer
   392	 * @cursor: current state
   393	 *
   394	 * Walk to the child node of the current node.
   395	 * Returns:
   396	 * True if the walk was possible, false otherwise.
   397	 */
   398	static bool amdgpu_vm_pt_descendant(struct amdgpu_device *adev,
   399					    struct amdgpu_vm_pt_cursor *cursor)
   400	{
   401		unsigned num_entries, shift, idx;
   402	
   403		if (!cursor->entry->entries)
   404			return false;
   405	
   406		BUG_ON(!cursor->entry->base.bo);
   407		num_entries = amdgpu_vm_num_entries(adev, cursor->level);
   408		shift = amdgpu_vm_level_shift(adev, cursor->level);
   409	
   410		++cursor->level;
   411		idx = (cursor->pfn >> shift) % num_entries;
   412		cursor->parent = cursor->entry;
   413		cursor->entry = &cursor->entry->entries[idx];
   414		return true;
   415	}
   416	
   417	/**
   418	 * amdgpu_vm_pt_sibling - go to sibling node
   419	 *
   420	 * @adev: amdgpu_device pointer
   421	 * @cursor: current state
   422	 *
   423	 * Walk to the sibling node of the current node.
   424	 * Returns:
   425	 * True if the walk was possible, false otherwise.
   426	 */
   427	static bool amdgpu_vm_pt_sibling(struct amdgpu_device *adev,
   428					 struct amdgpu_vm_pt_cursor *cursor)
   429	{
   430		unsigned shift, num_entries;
   431	
   432		/* Root doesn't have a sibling */
   433		if (!cursor->parent)
   434			return false;
   435	
   436		/* Go to our parents and see if we got a sibling */
   437		shift = amdgpu_vm_level_shift(adev, cursor->level - 1);
   438		num_entries = amdgpu_vm_num_entries(adev, cursor->level - 1);
   439	
   440		if (cursor->entry == &cursor->parent->entries[num_entries - 1])
   441			return false;
   442	
   443		cursor->pfn += 1ULL << shift;
   444		cursor->pfn &= ~((1ULL << shift) - 1);
   445		++cursor->entry;
   446		return true;
   447	}
   448	
   449	/**
   450	 * amdgpu_vm_pt_ancestor - go to parent node
   451	 *
   452	 * @cursor: current state
   453	 *
   454	 * Walk to the parent node of the current node.
   455	 * Returns:
   456	 * True if the walk was possible, false otherwise.
   457	 */
   458	static bool amdgpu_vm_pt_ancestor(struct amdgpu_vm_pt_cursor *cursor)
   459	{
   460		if (!cursor->parent)
   461			return false;
   462	
   463		--cursor->level;
   464		cursor->entry = cursor->parent;
   465		cursor->parent = amdgpu_vm_pt_parent(cursor->parent);
   466		return true;
   467	}
   468	
   469	/**
   470	 * amdgpu_vm_pt_next - get next PD/PT in hieratchy
   471	 *
   472	 * @adev: amdgpu_device pointer
   473	 * @cursor: current state
   474	 *
   475	 * Walk the PD/PT tree to the next node.
   476	 */
   477	static void amdgpu_vm_pt_next(struct amdgpu_device *adev,
   478				      struct amdgpu_vm_pt_cursor *cursor)
   479	{
   480		/* First try a newborn child */
   481		if (amdgpu_vm_pt_descendant(adev, cursor))
   482			return;
   483	
   484		/* If that didn't worked try to find a sibling */
   485		while (!amdgpu_vm_pt_sibling(adev, cursor)) {
   486			/* No sibling, go to our parents and grandparents */
   487			if (!amdgpu_vm_pt_ancestor(cursor)) {
   488				cursor->pfn = ~0ll;
   489				return;
   490			}
   491		}
   492	}
   493	
   494	/**
   495	 * amdgpu_vm_pt_first_leaf - get first leaf PD/PT
   496	 *
   497	 * @adev: amdgpu_device pointer
   498	 * @vm: amdgpu_vm structure
   499	 * @start: start addr of the walk
   500	 * @cursor: state to initialize
   501	 *
   502	 * Start a walk and go directly to the leaf node.
   503	 */
   504	static void amdgpu_vm_pt_first_leaf(struct amdgpu_device *adev,
   505					    struct amdgpu_vm *vm, uint64_t start,
   506					    struct amdgpu_vm_pt_cursor *cursor)
   507	{
   508		amdgpu_vm_pt_start(adev, vm, start, cursor);
   509		while (amdgpu_vm_pt_descendant(adev, cursor));
   510	}
   511	
   512	/**
   513	 * amdgpu_vm_pt_next_leaf - get next leaf PD/PT
   514	 *
   515	 * @adev: amdgpu_device pointer
   516	 * @cursor: current state
   517	 *
   518	 * Walk the PD/PT tree to the next leaf node.
   519	 */
   520	static void amdgpu_vm_pt_next_leaf(struct amdgpu_device *adev,
   521					   struct amdgpu_vm_pt_cursor *cursor)
   522	{
   523		amdgpu_vm_pt_next(adev, cursor);
   524		while (amdgpu_vm_pt_descendant(adev, cursor));
   525	}
   526	
   527	/**
   528	 * for_each_amdgpu_vm_pt_leaf - walk over all leaf PDs/PTs in the hierarchy
   529	 */
   530	#define for_each_amdgpu_vm_pt_leaf(adev, vm, start, end, cursor)		\
   531		for (amdgpu_vm_pt_first_leaf((adev), (vm), (start), &(cursor));		\
   532		     (cursor).pfn <= end; amdgpu_vm_pt_next_leaf((adev), &(cursor)))
 > 533	
   534	/**
   535	 * amdgpu_vm_pt_first_dfs - start a deep first search
   536	 *
   537	 * @adev: amdgpu_device structure
   538	 * @vm: amdgpu_vm structure
   539	 * @cursor: state to initialize
   540	 *
   541	 * Starts a deep first traversal of the PD/PT tree.
   542	 */
   543	static void amdgpu_vm_pt_first_dfs(struct amdgpu_device *adev,
   544					   struct amdgpu_vm *vm,
   545					   struct amdgpu_vm_pt_cursor *cursor)
   546	{
   547		amdgpu_vm_pt_start(adev, vm, 0, cursor);
   548		while (amdgpu_vm_pt_descendant(adev, cursor));
   549	}
   550	
   551	/**
   552	 * amdgpu_vm_pt_next_dfs - get the next node for a deep first search
   553	 *
   554	 * @adev: amdgpu_device structure
   555	 * @cursor: current state
   556	 *
   557	 * Move the cursor to the next node in a deep first search.
   558	 */
   559	static void amdgpu_vm_pt_next_dfs(struct amdgpu_device *adev,
   560					  struct amdgpu_vm_pt_cursor *cursor)
   561	{
   562		if (!cursor->entry)
   563			return;
   564	
   565		if (!cursor->parent)
   566			cursor->entry = NULL;
   567		else if (amdgpu_vm_pt_sibling(adev, cursor))
   568			while (amdgpu_vm_pt_descendant(adev, cursor));
   569		else
   570			amdgpu_vm_pt_ancestor(cursor);
   571	}
   572	
   573	/**
   574	 * for_each_amdgpu_vm_pt_dfs_safe - safe deep first search of all PDs/PTs
   575	 */
   576	#define for_each_amdgpu_vm_pt_dfs_safe(adev, vm, cursor, entry)			\
   577		for (amdgpu_vm_pt_first_dfs((adev), (vm), &(cursor)),			\
   578		     (entry) = (cursor).entry, amdgpu_vm_pt_next_dfs((adev), &(cursor));\
   579		     (entry); (entry) = (cursor).entry,					\
   580		     amdgpu_vm_pt_next_dfs((adev), &(cursor)))
 > 581	

---
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: 6586 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180914/6e290a3b/attachment-0001.gz>


More information about the dri-devel mailing list