GPUOpen-LibrariesAndSDKs / MxGPU-Virtualization

MIT License
182 stars 83 forks source link

make gim compatible with kernel >= 5.0 #24

Open flumm opened 5 years ago

flumm commented 5 years ago

kernel 5.0 removed some deprecated timespec/timeval functions so conditionally convert everything to timespec64

Signed-off-by: Dominik Csapak d.csapak@proxmox.com

ljymonk commented 5 years ago

Hi flumm

You’d better make your change compatible with pre-5.0 kernel: [cid:image001.jpg@01D52B73.5E340AC0]

Look your change would break old kernel , e.g. 4.13

Maybe you can use MACROS to differentiate whether use timespec or TIMESPECTYPE

/Monk

From: flumm notifications@github.com Sent: Tuesday, June 25, 2019 4:06 AM To: GPUOpen-LibrariesAndSDKs/MxGPU-Virtualization MxGPU-Virtualization@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [GPUOpen-LibrariesAndSDKs/MxGPU-Virtualization] make gim compatible with kernel >= 5.0 (#24)

kernel 5.0 removed some deprecated timespec/timeval functions so conditionally convert everything to timespec64

Signed-off-by: Dominik Csapak d.csapak@proxmox.commailto:d.csapak@proxmox.com


You can view, comment on, or merge this pull request online at:

https://github.com/GPUOpen-LibrariesAndSDKs/MxGPU-Virtualization/pull/24

Commit Summary

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/GPUOpen-LibrariesAndSDKs/MxGPU-Virtualization/pull/24?email_source=notifications&email_token=AG4GO4LSGZ7OV5LRK6CMPDDP4HGVDA5CNFSM4H3FR5X2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4G3PGZ7A, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AG4GO4IEY3IFW3V46RDFKDTP4HGVDANCNFSM4H3FR5XQ.

flumm commented 5 years ago

Maybe you can use MACROS to differentiate whether use timespec or TIMESPECTYPE

but i am doing exactly this?

in gim_adapter.h i define TIMESPECTYPE as timespec for kernels < 5 and as timespec64 for kernels >= 5

i did this to avoid dozens of `#if LINUX_VERSION_CODE <... ..

else

...

endif`

blocks.

also i can build and load it here on an debian stretch with kernel 4.9.0 without problems

ljymonk commented 5 years ago

oh, sorry,didn't look into othe files yet

获取 Outlook for Androidhttps://aka.ms/ghei36


From: flumm notifications@github.com Sent: Wednesday, June 26, 2019 3:35:01 AM To: GPUOpen-LibrariesAndSDKs/MxGPU-Virtualization Cc: Liu, Monk; Comment Subject: Re: [GPUOpen-LibrariesAndSDKs/MxGPU-Virtualization] make gim compatible with kernel >= 5.0 (#24)

Maybe you can use MACROS to differentiate whether use timespec or TIMESPECTYPE

but i am doing exactly this?

in gim_adapter.h i define TIMESPECTYPE as timespec for kernels < 5 and as timespec64 for kernels >= 5

i did this to avoid dozens of

if LINUX_VERSION_CODE <... .. #else ... #endif

blocks.

also i can build and load it here on an debian stretch with kernel 4.9.0 without problems

― You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/GPUOpen-LibrariesAndSDKs/MxGPU-Virtualization/pull/24?email_source=notifications&email_token=AG4GO4M7JNKL4X67AORAW53P4ML2LA5CNFSM4H3FR5X2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYST55Q#issuecomment-505757430, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AG4GO4OVW7Q7YYMC5E6HLSLP4ML2LANCNFSM4H3FR5XQ.

flumm commented 5 years ago

Oh no problem

tuxis-ie commented 4 years ago

Pretty please @ljymonk ?

srinivamd commented 4 years ago

Does gim support 5.x kernel?

flumm commented 4 years ago

Does gim support 5.x kernel?

well i'm using it with this pull request since quite some time up to kernel 5.4 (cannot say for newer kernels), so i'd say it works, but since nobody from amd commented yet, i do not know if its 'supported'

mac-linux-free commented 3 years ago

Could you please make GIM compatible with newer Kernels? 5.9+

https://github.com/fabianishere/pve-edge-kernel

Thank you.