Page MenuHomeFreeBSD

linuxkpi: Move shmem related function in it's own file
ClosedPublic

Authored by manu on Feb 19 2020, 9:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 14 2024, 12:53 PM
Unknown Object (File)
Dec 23 2023, 6:52 AM
Unknown Object (File)
Nov 17 2023, 10:10 PM
Unknown Object (File)
Aug 16 2023, 5:24 AM
Unknown Object (File)
Aug 16 2023, 4:56 AM
Unknown Object (File)
Aug 4 2023, 12:03 PM
Unknown Object (File)
Aug 4 2023, 12:02 PM
Unknown Object (File)
Aug 4 2023, 12:01 PM
Subscribers

Details

Summary

For drmkpi (D23085) we don't want the Linux struct file as we don't emulate
everything. Also the prototypes should be in shmem_fs.h to have 100%
compatibility with Linux.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

You also need to update sys/conf/files with the new file.

Add the new file to sys/conf/files

You also need to update sys/conf/files with the new file.

Yep, sorry. It's done now.

You need to bump the __FreeBSD_version to xxx80, because the following change is needed in drm-kms: @zeising Please ack!

@manu : This change should not be MFC'ed for now.

From c2faeead8478457b465617bf0edde2ad72558469 Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <hps@selasky.org>
Date: Thu, 20 Feb 2020 12:03:04 +0100
Subject: [PATCH] Update code after header file change in -current.

Signed-off-by: Hans Petter Selasky <hps@selasky.org>
---
 linuxkpi/dummy/include/linux/shmem_fs.h | 0
 linuxkpi/gplv2/include/linux/shmem_fs.h | 3 +++
 2 files changed, 3 insertions(+)
 delete mode 100644 linuxkpi/dummy/include/linux/shmem_fs.h
 create mode 100644 linuxkpi/gplv2/include/linux/shmem_fs.h

diff --git a/linuxkpi/dummy/include/linux/shmem_fs.h b/linuxkpi/dummy/include/linux/shmem_fs.h
deleted file mode 100644
index e69de29bb..000000000
diff --git a/linuxkpi/gplv2/include/linux/shmem_fs.h b/linuxkpi/gplv2/include/linux/shmem_fs.h
new file mode 100644
index 000000000..37bfb6797
--- /dev/null
+++ b/linuxkpi/gplv2/include/linux/shmem_fs.h
@@ -0,0 +1,3 @@
+#if __FreeBSD_version >= 1300080
+#include_next <linux/shmem_fs.h>
+#endif
-- 
2.25.0

You need to bump the __FreeBSD_version to xxx80, because the following change is needed in drm-kms: @zeising Please ack!

@manu : This change should not be MFC'ed for now.

From c2faeead8478457b465617bf0edde2ad72558469 Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <hps@selasky.org>
Date: Thu, 20 Feb 2020 12:03:04 +0100
Subject: [PATCH] Update code after header file change in -current.

Signed-off-by: Hans Petter Selasky <hps@selasky.org>
---
 linuxkpi/dummy/include/linux/shmem_fs.h | 0
 linuxkpi/gplv2/include/linux/shmem_fs.h | 3 +++
 2 files changed, 3 insertions(+)
 delete mode 100644 linuxkpi/dummy/include/linux/shmem_fs.h
 create mode 100644 linuxkpi/gplv2/include/linux/shmem_fs.h

diff --git a/linuxkpi/dummy/include/linux/shmem_fs.h b/linuxkpi/dummy/include/linux/shmem_fs.h
deleted file mode 100644
index e69de29bb..000000000
diff --git a/linuxkpi/gplv2/include/linux/shmem_fs.h b/linuxkpi/gplv2/include/linux/shmem_fs.h
new file mode 100644
index 000000000..37bfb6797
--- /dev/null
+++ b/linuxkpi/gplv2/include/linux/shmem_fs.h
@@ -0,0 +1,3 @@
+#if __FreeBSD_version >= 1300080
+#include_next <linux/shmem_fs.h>
+#endif
-- 
2.25.0

Thanks,
Can you submit this patch to the v5.0 branch of kms-drm ? There is another PR to merge so doing a new release with both would save time.

I've seen this, I'll fix the drm drivers and update tonight.

In D23764#522191, @manu wrote:

You need to bump the __FreeBSD_version to xxx80, because the following change is needed in drm-kms: @zeising Please ack!

@manu : This change should not be MFC'ed for now.

From c2faeead8478457b465617bf0edde2ad72558469 Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <hps@selasky.org>
Date: Thu, 20 Feb 2020 12:03:04 +0100
Subject: [PATCH] Update code after header file change in -current.

Signed-off-by: Hans Petter Selasky <hps@selasky.org>
---
 linuxkpi/dummy/include/linux/shmem_fs.h | 0
 linuxkpi/gplv2/include/linux/shmem_fs.h | 3 +++
 2 files changed, 3 insertions(+)
 delete mode 100644 linuxkpi/dummy/include/linux/shmem_fs.h
 create mode 100644 linuxkpi/gplv2/include/linux/shmem_fs.h

diff --git a/linuxkpi/dummy/include/linux/shmem_fs.h b/linuxkpi/dummy/include/linux/shmem_fs.h
deleted file mode 100644
index e69de29bb..000000000
diff --git a/linuxkpi/gplv2/include/linux/shmem_fs.h b/linuxkpi/gplv2/include/linux/shmem_fs.h
new file mode 100644
index 000000000..37bfb6797
--- /dev/null
+++ b/linuxkpi/gplv2/include/linux/shmem_fs.h
@@ -0,0 +1,3 @@
+#if __FreeBSD_version >= 1300080
+#include_next <linux/shmem_fs.h>
+#endif
-- 
2.25.0

Thanks,
Can you submit this patch to the v5.0 branch of kms-drm ? There is another PR to merge so doing a new release with both would save time.

I think it's needed for both 4.16 and 5.0 branch.

In D23764#522191, @manu wrote:

You need to bump the __FreeBSD_version to xxx80, because the following change is needed in drm-kms: @zeising Please ack!

@manu : This change should not be MFC'ed for now.

From c2faeead8478457b465617bf0edde2ad72558469 Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <hps@selasky.org>
Date: Thu, 20 Feb 2020 12:03:04 +0100
Subject: [PATCH] Update code after header file change in -current.

Signed-off-by: Hans Petter Selasky <hps@selasky.org>
---
 linuxkpi/dummy/include/linux/shmem_fs.h | 0
 linuxkpi/gplv2/include/linux/shmem_fs.h | 3 +++
 2 files changed, 3 insertions(+)
 delete mode 100644 linuxkpi/dummy/include/linux/shmem_fs.h
 create mode 100644 linuxkpi/gplv2/include/linux/shmem_fs.h

diff --git a/linuxkpi/dummy/include/linux/shmem_fs.h b/linuxkpi/dummy/include/linux/shmem_fs.h
deleted file mode 100644
index e69de29bb..000000000
diff --git a/linuxkpi/gplv2/include/linux/shmem_fs.h b/linuxkpi/gplv2/include/linux/shmem_fs.h
new file mode 100644
index 000000000..37bfb6797
--- /dev/null
+++ b/linuxkpi/gplv2/include/linux/shmem_fs.h
@@ -0,0 +1,3 @@
+#if __FreeBSD_version >= 1300080
+#include_next <linux/shmem_fs.h>
+#endif
-- 
2.25.0

Thanks,
Can you submit this patch to the v5.0 branch of kms-drm ? There is another PR to merge so doing a new release with both would save time.

I think it's needed for both 4.16 and 5.0 branch.

Indeed.

I just made a PR for this in the drm-kms repo, can you please have a look in case I screwed something up.
https://github.com/FreeBSDDesktop/kms-drm/pull/219

Idea is to merge it to v4.16 and then pick it into 5.0.

@hselasky are you ok with the review ?
I don't put _FreeBSD_version bump in review as it's something that could change between the time the review is created and when it's commited.

Just do a GENERIC buildkernel on amd64 before pushing.

This revision is now accepted and ready to land.Feb 21 2020, 9:16 AM