<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:kugel@rockbox.org" title="Thomas Martitz <kugel@rockbox.org>"> <span class="fn">Thomas Martitz</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [4.17-rc1] RIP: smu7_populate_single_firmware_entry.isra.6+0x57/0xc0 [amdgpu] RSP: ffffa17901efb930"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105760">bug 105760</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #140560 is obsolete</td>
           <td>
                
           </td>
           <td>1
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [4.17-rc1] RIP: smu7_populate_single_firmware_entry.isra.6+0x57/0xc0 [amdgpu] RSP: ffffa17901efb930"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105760#c36">Comment # 36</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - [4.17-rc1] RIP: smu7_populate_single_firmware_entry.isra.6+0x57/0xc0 [amdgpu] RSP: ffffa17901efb930"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=105760">bug 105760</a>
              from <span class="vcard"><a class="email" href="mailto:kugel@rockbox.org" title="Thomas Martitz <kugel@rockbox.org>"> <span class="fn">Thomas Martitz</span></a>
</span></b>
        <pre>Created <span class=""><a href="attachment.cgi?id=140591" name="attach_140591" title="workaround without memcpy">attachment 140591</a> <a href="attachment.cgi?id=140591&action=edit" title="workaround without memcpy">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=105760&attachment=140591'>[review]</a>
workaround without memcpy

I made the following patch as an alternative workaround. The printks I added
indicate what's going wrong. The smu_data->header pointer does not become
busted. Instead, the toc->num_entries member somehow gets set to -1 (perhaps by
accident), and since toc->num_entries is used as an index for the toc->entry
array, the smu7_populate_single_firmware_entry() function gets passed an
invalid pointer.

The workaround uses a temp. variable as the index (which seems to make resume
work), but it's still to be found out why toc->num_entries changes to -1. Also,
I still get lots of powerplay error messages with this patch. I'll attach dmesg
next, below is just the output of the printks I added.

kugel@thomas-nb:linux.git$ dmesg  | grep smu7
[    0.908377] amdgpu: [powerplay] smu7_request_smu_load_fw: 10
ffffa8a060081000 0 1
[    0.908422] amdgpu: [powerplay] smu7_request_smu_load_fw: 20
ffffa8a060081000 0 1
[   30.042293] amdgpu: [powerplay] smu7_request_smu_load_fw: 10
ffffa8a060081000 0 1
[   30.042309] amdgpu: [powerplay] smu7_request_smu_load_fw: 20
ffffa8a060081000 -1 -1</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>