Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel 6.4 build #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions common/fw_validation.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ typedef struct {
typedef struct {
uint32_t key_size;
uint32_t content_size;
uint8_t certificates_data[0];
uint8_t certificates_data[];
} secure_boot_certificate_t;

#ifdef _MSC_VER
Expand All @@ -62,4 +62,4 @@ int FW_VALIDATION__validate_fw_header(uintptr_t firmware_base_address,
int FW_VALIDATION__validate_cert_header(uintptr_t firmware_base_address,
size_t firmware_size, uint32_t *outer_consumed_firmware_offset, secure_boot_certificate_t **out_firmware_cert);

#endif
#endif
4 changes: 4 additions & 0 deletions linux/pcie/src/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,11 @@ int hailo_pcie_register_chrdev(unsigned int major, const char *name)

char_major = register_chrdev(major, name, &hailo_pcie_fops);

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
chardev_class = class_create(THIS_MODULE, "hailo_chardev");
#else
chardev_class = class_create("hailo_chardev");
#endif

return char_major;
}
Expand Down
7 changes: 5 additions & 2 deletions linux/utils/compact.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@
#endif


#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 5, 0)
#define get_user_pages_compact(start, nr_pages, gup_flags, pages, vmas) \
get_user_pages(start, nr_pages, gup_flags, pages)
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)
#define get_user_pages_compact get_user_pages
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 168)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0))
#define get_user_pages_compact(start, nr_pages, gup_flags, pages, vmas) \
Expand Down Expand Up @@ -143,4 +146,4 @@ static inline bool is_dma_capable(struct device *dev, dma_addr_t dma_addr, size_
}
#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)

#endif /* _HAILO_PCI_COMPACT_H_ */
#endif /* _HAILO_PCI_COMPACT_H_ */