Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
  1. Aug 01, 2024
  2. Jul 28, 2024
    • Linus Torvalds's avatar
      minmax: add a few more MIN_T/MAX_T users · 4477b39c
      Linus Torvalds authored
      Commit 3a7e02c0 ("minmax: avoid overly complicated constant
      expressions in VM code") added the simpler MIN_T/MAX_T macros in order
      to avoid some excessive expansion from the rather complicated regular
      min/max macros.
      
      The complexity of those macros stems from two issues:
      
       (a) trying to use them in situations that require a C constant
           expression (in static initializers and for array sizes)
      
       (b) the type sanity checking
      
      and MIN_T/MAX_T avoids both of these issues.
      
      Now, in the whole (long) discussion about all this, it was pointed out
      that the whole type sanity checking is entirely unnecessary for
      min_t/max_t which get a fixed type that the comparison is done in.
      
      But that still leaves min_t/max_t unnecessarily complicated due to
      worries about the C constant expression case.
      
      However, it turns out that there really aren't very many cases that use
      min_t/max_t for this, and we can just force-convert those.
      
      This does exactly that.
      
      Which in turn will then a...
      4477b39c
    • Richard Weinberger's avatar
      ubi: Fix ubi_init() ubiblock_exit() section mismatch · 92a286e9
      Richard Weinberger authored
      
      Since ubiblock_exit() is now called from an init function,
      the __exit section no longer makes sense.
      
      Cc: Ben Hutchings <bwh@kernel.org>
      Reported-by: default avatarkernel test robot <lkp@intel.com>
      Closes: https://lore.kernel.org/oe-kbuild-all/202407131403.wZJpd8n2-lkp@intel.com/
      
      
      Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
      Reviewed-by: default avatarZhihao Cheng <chengzhihao1@huawei.com>
      92a286e9
  3. Jul 26, 2024
  4. Jul 25, 2024
  5. Jul 24, 2024
    • ZhenGuo Yin's avatar
      drm/amdgpu: reset vm state machine after gpu reset(vram lost) · 5659b0c9
      ZhenGuo Yin authored
      
      [Why]
      Page table of compute VM in the VRAM will lost after gpu reset.
      VRAM won't be restored since compute VM has no shadows.
      
      [How]
      Use higher 32-bit of vm->generation to record a vram_lost_counter.
      Reset the VM state machine when vm->genertaion is not equal to
      the new generation token.
      
      v2: Check vm->generation instead of calling drm_sched_entity_error
      in amdgpu_vm_validate.
      v3: Use new generation token instead of vram_lost_counter for check.
      
      Signed-off-by: default avatarZhenGuo Yin <zhenguo.yin@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      (cherry picked from commit 47c0388b)
      5659b0c9
    • Tim Huang's avatar
      drm/amdgpu: add missed harvest check for VCN IP v4/v5 · fab1ead0
      Tim Huang authored
      
      To prevent below probe failure, add a check for models with VCN
      IP v4.0.6 where VCN1 may be harvested.
      
      v2:
      Apply the same check to VCN IP v4.0 and v5.0.
      
      [   54.070117] RIP: 0010:vcn_v4_0_5_start_dpg_mode+0x9be/0x36b0 [amdgpu]
      [   54.071055] Code: 80 fb ff 8d 82 00 80 fe ff 81 fe 00 06 00 00 0f 43
      c2 49 69 d5 38 0d 00 00 48 8d 71 04 c1 e8 02 4c 01 f2 48 89 b2 50 f6 02
      00 <89> 01 48 8b 82 50 f6 02 00 48 8d 48 04 48 89 8a 50 f6 02 00 c7 00
      [   54.072408] RSP: 0018:ffffb17985f736f8 EFLAGS: 00010286
      [   54.072793] RAX: 00000000000000d6 RBX: ffff99a82f680000 RCX:
      0000000000000000
      [   54.073315] RDX: ffff99a82f680000 RSI: 0000000000000004 RDI:
      ffff99a82f680000
      [   54.073835] RBP: ffffb17985f73730 R08: 0000000000000001 R09:
      0000000000000000
      [   54.074353] R10: 0000000000000008 R11: ffffb17983c05000 R12:
      0000000000000000
      [   54.074879] R13: 0000000000000000 R14: ffff99a82f680000 R15:
      0000000000000001
      [   54.075400] FS:  00007f8d9c79a000(0000) GS:ffff99ab2f140000(0000)
      knlGS:0000000000000000
      [   54.075988] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [   54.076408] CR2: 0000000000000000 CR3: 0000000140c3a000 CR4:
      0000000000750ef0
      [   54.076927] PKRU: 55555554
      [   54.077132] Call Trace:
      [   54.077319]  <TASK>
      [   54.077484]  ? show_regs+0x69/0x80
      [   54.077747]  ? __die+0x28/0x70
      [   54.077979]  ? page_fault_oops+0x180/0x4b0
      [   54.078286]  ? do_user_addr_fault+0x2d2/0x680
      [   54.078610]  ? exc_page_fault+0x84/0x190
      [   54.078910]  ? asm_exc_page_fault+0x2b/0x30
      [   54.079224]  ? vcn_v4_0_5_start_dpg_mode+0x9be/0x36b0 [amdgpu]
      [   54.079941]  ? vcn_v4_0_5_start_dpg_mode+0xe6/0x36b0 [amdgpu]
      [   54.080617]  vcn_v4_0_5_set_powergating_state+0x82/0x19b0 [amdgpu]
      [   54.081316]  amdgpu_device_ip_set_powergating_state+0x64/0xc0
      [amdgpu]
      [   54.082057]  amdgpu_vcn_ring_begin_use+0x6f/0x1d0 [amdgpu]
      [   54.082727]  amdgpu_ring_alloc+0x44/0x70 [amdgpu]
      [   54.083351]  amdgpu_vcn_dec_sw_ring_test_ring+0x40/0x110 [amdgpu]
      [   54.084054]  amdgpu_ring_test_helper+0x22/0x90 [amdgpu]
      [   54.084698]  vcn_v4_0_5_hw_init+0x87/0xc0 [amdgpu]
      [   54.085307]  amdgpu_device_init+0x1f96/0x2780 [amdgpu]
      [   54.085951]  amdgpu_driver_load_kms+0x1e/0xc0 [amdgpu]
      [   54.086591]  amdgpu_pci_probe+0x19f/0x550 [amdgpu]
      [   54.087215]  local_pci_probe+0x48/0xa0
      [   54.087509]  pci_device_probe+0xc9/0x250
      [   54.087812]  really_probe+0x1a4/0x3f0
      [   54.088101]  __driver_probe_device+0x7d/0x170
      [   54.088443]  driver_probe_device+0x24/0xa0
      [   54.088765]  __driver_attach+0xdd/0x1d0
      [   54.089068]  ? __pfx___driver_attach+0x10/0x10
      [   54.089417]  bus_for_each_dev+0x8e/0xe0
      [   54.089718]  driver_attach+0x22/0x30
      [   54.090000]  bus_add_driver+0x120/0x220
      [   54.090303]  driver_register+0x62/0x120
      [   54.090606]  ? __pfx_amdgpu_init+0x10/0x10 [amdgpu]
      [   54.091255]  __pci_register_driver+0x62/0x70
      [   54.091593]  amdgpu_init+0x67/0xff0 [amdgpu]
      [   54.092190]  do_one_initcall+0x5f/0x330
      [   54.092495]  do_init_module+0x68/0x240
      [   54.092794]  load_module+0x201c/0x2110
      [   54.093093]  init_module_from_file+0x97/0xd0
      [   54.093428]  ? init_module_from_file+0x97/0xd0
      [   54.093777]  idempotent_init_module+0x11c/0x2a0
      [   54.094134]  __x64_sys_finit_module+0x64/0xc0
      [   54.094476]  do_syscall_64+0x58/0x120
      [   54.094767]  entry_SYSCALL_64_after_hwframe+0x6e/0x76
      
      Signed-off-by: default avatarTim Huang <tim.huang@amd.com>
      Reviewed-by: default avatarSaleemkhan Jamadar <saleemkhan.jamadar@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      (cherry picked from commit 0b071245)
      fab1ead0
    • Stanley.Yang's avatar
      drm/amdgpu: Fix eeprom max record count · 1a882525
      Stanley.Yang authored
      
      The eeprom table is empty before initializing,
      set eeprom table version first before initializing.
      
      Changed from V1:
      	Reuse amdgpu_ras_set_eeprom_table_version function
      
      Signed-off-by: default avatarStanley.Yang <Stanley.Yang@amd.com>
      Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      (cherry picked from commit 015b8a2f)
      1a882525
    • YiPeng Chai's avatar
      drm/amdgpu: fix ras UE error injection failure issue · afac8c65
      YiPeng Chai authored
      
      The ras command shared memory is allocated from
      VRAM and the response status of the command
      buffer will not be zero due to gpu being in
      fatal error state after ras UE error injection.
      
      Signed-off-by: default avatarYiPeng Chai <YiPeng.Chai@amd.com>
      Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      (cherry picked from commit 8284951a)
      afac8c65