Kernel 5.9

AmigaOne X1000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 6377
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.9

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 6377
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.9

Post by xeno74 »

Hi All,

I released the RC3 of kernel 5.9 for the X1000 and X5000 today.

New:
Download: linux-image-5.9-rc3-X1000_X5000.tar.gz

Image

Please test the kernels.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 6377
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.9

Post by xeno74 »

Hi All,

Here is the RC4 of kernel 5.9 for testing.

New:
Download: linux-image-5.9-rc4-X1000_X5000.tar.gz

I successfully tested the X5000 Linux kernel 5.9-rc4 with Fienix Soar 3.0-2020608 in an e5500 based virtual QEMU machine today.

Screenshots:

Image

Image

Image

Please test the kernels.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 6377
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.9

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 6377
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.9

Post by xeno74 »

Hi All,

I released the RC5 of kernel 5.9 for the X1000 and X5000 today.

New:
Download: linux-image-5.9-rc5-X1000_X5000.tar.gz

Screenshot of Fienix with the RC5 and with a virtual Fienix with also the RC5 in a QEMU/KVM HV machine:

Image

Please test the kernels.

Thanks,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 6377
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.9

Post by xeno74 »

Hi All,

I tried to compile the RC6 today but unfortunately it doesn't compile.

Error messages:

Code: Select all

drivers/dax/super.c:325:6: error: redefinition of ‘dax_supported’
 bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev,
      ^~~~~~~~~~~~~
In file included from drivers/dax/super.c:16:0:
./include/linux/dax.h:162:20: note: previous definition of ‘dax_supported’ was here
 static inline bool dax_supported(struct dax_device *dax_dev,
                    ^~~~~~~~~~~~~
scripts/Makefile.build:283: recipe for target 'drivers/dax/super.o' failed
make[2]: *** [drivers/dax/super.o] Error 1
scripts/Makefile.build:500: recipe for target 'drivers/dax' failed
make[1]: *** [drivers/dax] Error 2
Makefile:1784: recipe for target 'drivers' failed
make: *** [drivers] Error 2
This bug is already known: PROBLEM: 5.9.0-rc6 fails to compile due to 'redefinition of ‘dax_supported’'

The problematic commit: dm: Call proper helper to determine dax support

I created a patch (dax.patch):

Code: Select all

diff -rupN a/drivers/dax/super.c b/drivers/dax/super.c
--- a/drivers/dax/super.c	2020-09-21 01:33:55.000000000 +0200
+++ b/drivers/dax/super.c	2020-09-21 11:48:56.749207387 +0200
@@ -85,12 +85,6 @@ bool __generic_fsdax_supported(struct da
 		return false;
 	}
 
-	if (!dax_dev) {
-		pr_debug("%s: error: dax unsupported by block device\n",
-				bdevname(bdev, buf));
-		return false;
-	}
-
 	err = bdev_dax_pgoff(bdev, start, PAGE_SIZE, &pgoff);
 	if (err) {
 		pr_info("%s: error: unaligned partition for dax\n",
@@ -106,6 +100,12 @@ bool __generic_fsdax_supported(struct da
 		return false;
 	}
 
+	if (!dax_dev || !bdev_dax_supported(bdev, blocksize)) {
+		pr_debug("%s: error: dax unsupported by block device\n",
+				bdevname(bdev, buf));
+		return false;
+	}
+
 	id = dax_read_lock();
 	len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn);
 	len2 = dax_direct_access(dax_dev, pgoff_end, 1, &end_kaddr, &end_pfn);
@@ -325,15 +325,11 @@ EXPORT_SYMBOL_GPL(dax_direct_access);
 bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev,
 		int blocksize, sector_t start, sector_t len)
 {
-	if (!dax_dev)
-		return false;
-
 	if (!dax_alive(dax_dev))
 		return false;
 
 	return dax_dev->ops->dax_supported(dax_dev, bdev, blocksize, start, len);
 }
-EXPORT_SYMBOL_GPL(dax_supported);
 
 size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr,
 		size_t bytes, struct iov_iter *i)
diff -rupN a/drivers/md/dm-table.c b/drivers/md/dm-table.c
--- a/drivers/md/dm-table.c	2020-09-21 01:33:55.000000000 +0200
+++ b/drivers/md/dm-table.c	2020-09-21 11:49:57.656110596 +0200
@@ -860,14 +860,10 @@ EXPORT_SYMBOL_GPL(dm_table_set_type);
 int device_supports_dax(struct dm_target *ti, struct dm_dev *dev,
 			sector_t start, sector_t len, void *data)
 {
-	int blocksize = *(int *) data, id;
-	bool rc;
+	int blocksize = *(int *) data;
 
-	id = dax_read_lock();
-	rc = dax_supported(dev->dax_dev, dev->bdev, blocksize, start, len);
-	dax_read_unlock(id);
-
-	return rc;
+	return generic_fsdax_supported(dev->dax_dev, dev->bdev, blocksize,
+				       start, len);
 }
 
 /* Check devices support synchronous DAX */
diff -rupN a/include/linux/dax.h b/include/linux/dax.h
--- a/include/linux/dax.h	2020-09-21 01:33:55.000000000 +0200
+++ b/include/linux/dax.h	2020-09-21 11:50:31.919050184 +0200
@@ -130,8 +130,6 @@ static inline bool generic_fsdax_support
 	return __generic_fsdax_supported(dax_dev, bdev, blocksize, start,
 			sectors);
 }
-bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev,
-		int blocksize, sector_t start, sector_t len);
 
 static inline void fs_put_dax(struct dax_device *dax_dev)
 {
@@ -159,13 +157,6 @@ static inline bool generic_fsdax_support
 	return false;
 }
 
-static inline bool dax_supported(struct dax_device *dax_dev,
-		struct block_device *bdev, int blocksize, sector_t start,
-		sector_t len)
-{
-	return false;
-}
-
 static inline void fs_put_dax(struct dax_device *dax_dev)
 {
 }
@@ -198,23 +189,14 @@ static inline void dax_unlock_page(struc
 }
 #endif
 
-#if IS_ENABLED(CONFIG_DAX)
 int dax_read_lock(void);
 void dax_read_unlock(int id);
-#else
-static inline int dax_read_lock(void)
-{
-	return 0;
-}
-
-static inline void dax_read_unlock(int id)
-{
-}
-#endif /* CONFIG_DAX */
 bool dax_alive(struct dax_device *dax_dev);
 void *dax_get_private(struct dax_device *dax_dev);
 long dax_direct_access(struct dax_device *dax_dev, pgoff_t pgoff, long nr_pages,
 		void **kaddr, pfn_t *pfn);
+bool dax_supported(struct dax_device *dax_dev, struct block_device *bdev,
+		int blocksize, sector_t start, sector_t len);
 size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr,
 		size_t bytes, struct iov_iter *i);
 size_t dax_copy_to_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr,
Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 6377
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.9

Post by xeno74 »

http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
Posts: 6377
Joined: Fri Mar 23, 2012 7:58 am

Re: Kernel 5.9

Post by xeno74 »

Hi All,

I am happy to announce the availability of the new final kernel 5.9 for our AmigaOnes. Now, we have the possibility to use the latest Linux kernel on our AmigaOnes. With modern distributions like Fienix, it is possible, to use many features of the new kernel 5.9.
Many thanks to all for helping me with testing, reporting, and fixing problems during the kernel 5.9 test time. Have a lot of fun with the new kernel 5.9.

New:
Download: linux-image-5.9-X1000_X5000.tar.gz

Image

Image

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply