Skip to contentSkip to conversation

bump to linux-yocto 4.8 for the non-x86 BSPs

PATCH New Kevin Hao 2 participants 10 messages Sep 20, 2016 MIPS

lore
Share & tools
lore

Kevin Hao

author
#0 lore raw

Hi,

This patch series fixes some build errors in linux-yocto 4.8 and bump to 4.8 for all the non-x86 BSPs.

author
#1 lore raw

[meta-yocto-bsp] meta-yocto-bsp: bump to linux-yocto 4.8 for the non-x86 BSPs

Boot test for all these boards.

---
 meta-yocto-bsp/conf/machine/beaglebone.conf                  |  2 +-
 meta-yocto-bsp/conf/machine/edgerouter.conf                  |  2 +-
 meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf                |  2 +-
 meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.8.bbappend | 12 ++++++++++++
 4 files changed, 15 insertions(+), 3 deletions(-)
meta-yocto-bsp/conf/machine/beaglebone.conf +1 -1
index ea50accc2d8e..1b6c2dcd57f8 100644
@@ -22,7 +22,7 @@ EXTRA_IMAGECMD_jffs2 = "-lnp "
 SERIAL_CONSOLE = "115200 ttyO0"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ?= "4.4%"
+PREFERRED_VERSION_linux-yocto ?= "4.8%"
 
 KERNEL_IMAGETYPE = "zImage"
 KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb"
meta-yocto-bsp/conf/machine/edgerouter.conf +1 -1
index 6343dfc38c6d..cf521e91d5f5 100644
@@ -11,7 +11,7 @@ KERNEL_ALT_IMAGETYPE = "vmlinux.bin"
 KERNEL_IMAGE_STRIP_EXTRA_SECTIONS  = ".comment"
 
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
-PREFERRED_VERSION_linux-yocto ?= "4.4%"
+PREFERRED_VERSION_linux-yocto ?= "4.8%"
 
 SERIAL_CONSOLE = "115200 ttyS0"
 USE_VT ?= "0"
meta-yocto-bsp/conf/machine/mpc8315e-rdb.conf +1 -1
index 1e7de09a4667..a2ff07c552d6 100644
@@ -14,7 +14,7 @@ SERIAL_CONSOLE = "115200 ttyS0"
 
 MACHINE_FEATURES = "keyboard pci ext2 ext3 serial"
 
-PREFERRED_VERSION_linux-yocto ?= "4.4%"
+PREFERRED_VERSION_linux-yocto ?= "4.8%"
 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
 
 PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
meta-yocto-bsp/recipes-kernel/linux/linux-yocto_4.8.bbappend +12 -0
index efa11cb209be..4363b17aee6c 100644
@@ -3,12 +3,24 @@ KBRANCH_genericx86-64  = "standard/base"
 
 KMACHINE_genericx86 ?= "common-pc"
 KMACHINE_genericx86-64 ?= "common-pc-64"
+KBRANCH_edgerouter = "standard/edgerouter"
+KBRANCH_beaglebone = "standard/beaglebone"
+KBRANCH_mpc8315e-rdb = "standard/fsl-mpc8315e-rdb"
 
 SRCREV_machine_genericx86    ?= "a7d71794e4e38d2f861c1b1dbff761ae0b0836b3"
 SRCREV_machine_genericx86-64 ?= "a7d71794e4e38d2f861c1b1dbff761ae0b0836b3"
+SRCREV_machine_edgerouter ?= "cde1a7d656b7fdd96f82f619e4251965a4e96489"
+SRCREV_machine_beaglebone ?= "cde1a7d656b7fdd96f82f619e4251965a4e96489"
+SRCREV_machine_mpc8315e-rdb ?= "705fb8543ea6266b193a66e15fecd058c60183ea"
 
 COMPATIBLE_MACHINE_genericx86 = "genericx86"
 COMPATIBLE_MACHINE_genericx86-64 = "genericx86-64"
+COMPATIBLE_MACHINE_edgerouter = "edgerouter"
+COMPATIBLE_MACHINE_beaglebone = "beaglebone"
+COMPATIBLE_MACHINE_mpc8315e-rdb = "mpc8315e-rdb"
 
 LINUX_VERSION_genericx86 = "4.8-rc4"
 LINUX_VERSION_genericx86-64 = "4.8-rc4"
+LINUX_VERSION_edgerouter = "4.8-rc7"
+LINUX_VERSION_beaglebone = "4.8-rc7"
+LINUX_VERSION_mpc8315e-rdb = "4.8-rc7"
Signature · 1 line
2.9.3
author
#2 lore raw

[kernel-meta] meta-yocto-bsp: beaglebone: remove the stale kernel options

In reply to Kevin Hao

The kernel_configcheck complains about these unnecessary kernel options. The final .config is the same with or without them.

---
 bsp/beaglebone/beaglebone.cfg | 8 --------
 1 file changed, 8 deletions(-)
bsp/beaglebone/beaglebone.cfg +0 -8
index a6fe6d33d586..4c786d0afbef 100644
@@ -229,7 +229,6 @@ CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_IMAGEBLIT=y
 # CONFIG_FB_FOREIGN_ENDIAN is not set
-# CONFIG_FB_SYS_FOPS is not set
 # CONFIG_FB_SVGALIB is not set
 # CONFIG_FB_MACMODES is not set
 # CONFIG_FB_BACKLIGHT is not set
@@ -240,26 +239,19 @@ CONFIG_FB_TILEBLITTING=y
 # Frame buffer hardware drivers
 #
 # CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_TMIO is not set
 # CONFIG_FB_VIRTUAL is not set
 # CONFIG_FB_METRONOME is not set
-# CONFIG_FB_MB862XX is not set
 # CONFIG_FB_BROADSHEET is not set
 # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set
 # CONFIG_FB_DA8XX is not set
 # CONFIG_FB_DA8XX_TDA998X is not set
-CONFIG_OMAP2_VRFB=y
 CONFIG_OMAP2_DSS=y
-# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set
 CONFIG_OMAP2_DSS_DPI=y
-# CONFIG_OMAP2_DSS_RFBI is not set
 CONFIG_OMAP2_DSS_VENC=y
 # CONFIG_OMAP2_DSS_SDI is not set
 CONFIG_OMAP2_DSS_DSI=y
 # CONFIG_OMAP2_DSS_FAKE_VSYNC is not set
 CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
-CONFIG_FB_OMAP2=y
-CONFIG_FB_OMAP2_NUM_FBS=3
 
 #
 # OMAP Display Device Drivers (new device model)
Signature · 1 line
2.9.3
author
#3 lore raw

PATCH 1/6 fs: yaffs2: kill PAGE_CACHE_* and page_cache_{get, release} macros

In reply to Kevin Hao

As what we have done in commit 09cbfeaf1a5a ("mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros").

---
 fs/yaffs2/yaffs_vfs.c | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)
fs/yaffs2/yaffs_vfs.c +19 -19
index 1494c8f33d20..9aa007d9ded6 100644
@@ -266,13 +266,13 @@ static int yaffs_readpage_nolock(struct file *f, struct page *pg)
 	struct yaffs_obj *obj;
 	unsigned char *pg_buf;
 	int ret;
-	loff_t pos = ((loff_t) pg->index) << PAGE_CACHE_SHIFT;
+	loff_t pos = ((loff_t) pg->index) << PAGE_SHIFT;
 	struct yaffs_dev *dev;
 
 	yaffs_trace(YAFFS_TRACE_OS,
 		"yaffs_readpage_nolock at %lld, size %08x",
 		(long long)pos,
-		(unsigned)PAGE_CACHE_SIZE);
+		(unsigned)PAGE_SIZE);
 
 	obj = yaffs_dentry_to_obj(f->f_path.dentry);
 
@@ -290,7 +290,7 @@ static int yaffs_readpage_nolock(struct file *f, struct page *pg)
 
 	yaffs_gross_lock(dev);
 
-	ret = yaffs_file_rd(obj, pg_buf, pos, PAGE_CACHE_SIZE);
+	ret = yaffs_file_rd(obj, pg_buf, pos, PAGE_SIZE);
 
 	yaffs_gross_unlock(dev);
 
@@ -400,22 +400,22 @@ static int yaffs_writepage(struct page *page)
 		BUG();
 	i_size = i_size_read(inode);
 
-	end_index = i_size >> PAGE_CACHE_SHIFT;
+	end_index = i_size >> PAGE_SHIFT;
 
 	if (page->index < end_index)
-		n_bytes = PAGE_CACHE_SIZE;
+		n_bytes = PAGE_SIZE;
 	else {
-		n_bytes = i_size & (PAGE_CACHE_SIZE - 1);
+		n_bytes = i_size & (PAGE_SIZE - 1);
 
 		if (page->index > end_index || !n_bytes) {
 			yaffs_trace(YAFFS_TRACE_OS,
 				"yaffs_writepage at %lld, inode size = %lld!!",
-				((loff_t)page->index) << PAGE_CACHE_SHIFT,
+				((loff_t)page->index) << PAGE_SHIFT,
 				inode->i_size);
 			yaffs_trace(YAFFS_TRACE_OS,
 				"                -> don't care!!");
 
-			zero_user_segment(page, 0, PAGE_CACHE_SIZE);
+			zero_user_segment(page, 0, PAGE_SIZE);
 			set_page_writeback(page);
 			unlock_page(page);
 			end_page_writeback(page);
@@ -423,8 +423,8 @@ static int yaffs_writepage(struct page *page)
 		}
 	}
 
-	if (n_bytes != PAGE_CACHE_SIZE)
-		zero_user_segment(page, n_bytes, PAGE_CACHE_SIZE);
+	if (n_bytes != PAGE_SIZE)
+		zero_user_segment(page, n_bytes, PAGE_SIZE);
 
 	get_page(page);
 
@@ -436,13 +436,13 @@ static int yaffs_writepage(struct page *page)
 
 	yaffs_trace(YAFFS_TRACE_OS,
 		"yaffs_writepage at %lld, size %08x",
-		((loff_t)page->index) << PAGE_CACHE_SHIFT, n_bytes);
+		((loff_t)page->index) << PAGE_SHIFT, n_bytes);
 	yaffs_trace(YAFFS_TRACE_OS,
 		"writepag0: obj = %lld, ino = %lld",
 		obj->variant.file_variant.file_size, inode->i_size);
 
 	n_written = yaffs_wr_file(obj, buffer,
-				  ((loff_t)page->index) << PAGE_CACHE_SHIFT, n_bytes, 0);
+				  ((loff_t)page->index) << PAGE_SHIFT, n_bytes, 0);
 
 	yaffs_set_super_dirty(dev);
 
@@ -505,7 +505,7 @@ static int yaffs_write_begin(struct file *filp, struct address_space *mapping,
 			     struct page **pagep, void **fsdata)
 {
 	struct page *pg = NULL;
-	pgoff_t index = pos >> PAGE_CACHE_SHIFT;
+	pgoff_t index = pos >> PAGE_SHIFT;
 
 	int ret = 0;
 	int space_held = 0;
@@ -554,7 +554,7 @@ out:
 		yaffs_release_space(filp);
 	if (pg) {
 		unlock_page(pg);
-		page_cache_release(pg);
+		put_page(pg);
 	}
 	return ret;
 }
@@ -638,7 +638,7 @@ static int yaffs_write_end(struct file *filp, struct address_space *mapping,
 {
 	int ret = 0;
 	void *addr, *kva;
-	uint32_t offset_into_page = pos & (PAGE_CACHE_SIZE - 1);
+	uint32_t offset_into_page = pos & (PAGE_SIZE - 1);
 
 	kva = kmap(pg);
 	addr = kva + offset_into_page;
@@ -660,7 +660,7 @@ static int yaffs_write_end(struct file *filp, struct address_space *mapping,
 
 	yaffs_release_space(filp);
 	unlock_page(pg);
-	page_cache_release(pg);
+	put_page(pg);
 	return ret;
 }
 #else
@@ -670,7 +670,7 @@ static int yaffs_commit_write(struct file *f, struct page *pg, unsigned offset,
 {
 	void *addr, *kva;
 
-	loff_t pos = (((loff_t) pg->index) << PAGE_CACHE_SHIFT) + offset;
+	loff_t pos = (((loff_t) pg->index) << PAGE_SHIFT) + offset;
 	int n_bytes = to - offset;
 	int n_written;
 
@@ -2836,8 +2836,8 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version,
 		return NULL;
 	}
 
-	sb->s_blocksize = PAGE_CACHE_SIZE;
-	sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
+	sb->s_blocksize = PAGE_SIZE;
+	sb->s_blocksize_bits = PAGE_SHIFT;
 
 	yaffs_trace(YAFFS_TRACE_OS,
 		"yaffs_read_super: Using yaffs%d", yaffs_version);
Signature · 1 line
2.9.3
author
#4 lore raw

PATCH 2/6 fs: yaffs2: switch to the new prototype for ->set/getxattr()

In reply to Kevin Hao

Since commit 3767e255b390 ("switch ->setxattr() to passing dentry and inode separately") and commit ce23e6401334 ("->getxattr(): pass dentry and inode as separate arguments"), a new inode argument has been added for these two functions. Adjust these two functions to accommodate to this change.

---
 fs/yaffs2/yaffs_vfs.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)
fs/yaffs2/yaffs_vfs.c +5 -6
index 9aa007d9ded6..cd387d7abfa2 100644
@@ -919,10 +919,10 @@ static int yaffs_setattr(struct dentry *dentry, struct iattr *attr)
 	return error;
 }
 
-static int yaffs_setxattr(struct dentry *dentry, const char *name,
-		   const void *value, size_t size, int flags)
+static int yaffs_setxattr(struct dentry *dentry, struct inode *inode,
+			  const char *name, const void *value, size_t size,
+			  int flags)
 {
-	struct inode *inode = dentry->d_inode;
 	int error = 0;
 	struct yaffs_dev *dev;
 	struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
@@ -952,10 +952,9 @@ static int yaffs_setxattr(struct dentry *dentry, const char *name,
 	return error;
 }
 
-static ssize_t yaffs_getxattr(struct dentry * dentry, const char *name,
-			void *buff, size_t size)
+static ssize_t yaffs_getxattr(struct dentry * dentry, struct inode *inode,
+			      const char *name, void *buff, size_t size)
 {
-	struct inode *inode = dentry->d_inode;
 	int error = 0;
 	struct yaffs_dev *dev;
 	struct yaffs_obj *obj = yaffs_inode_to_obj(inode);
Signature · 1 line
2.9.3
author
#5 lore raw

PATCH 3/6 fs: yaffs2: replace ->follow_link() with -->get_link()

In reply to Kevin Hao

As what we done in commit 6b2553918d8b ("replace ->follow_link() with new method that could stay in RCU mode").

---
 fs/yaffs2/yaffs_vfs.c | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
fs/yaffs2/yaffs_vfs.c +10 -3
index cd387d7abfa2..b57d612808de 100644
@@ -1059,7 +1059,8 @@ static int yaffs_readlink(struct dentry *dentry, char __user * buffer,
 }
 
 #if (YAFFS_NEW_FOLLOW_LINK == 1)
-static const char *yaffs_follow_link(struct dentry *dentry, void **cookie)
+static const char *yaffs_get_link(struct dentry *dentry, struct inode *inode,
+				  void **cookie)
 {
 	void *ret;
 #else
@@ -1069,8 +1070,12 @@ static int yaffs_follow_link(struct dentry *dentry, struct nameidata *nd)
 #endif
 	unsigned char *alias;
 	int ret_int = 0;
-	struct yaffs_dev *dev = yaffs_dentry_to_obj(dentry)->my_dev;
+	struct yaffs_dev *dev;
+
+	if (!dentry)
+		return ERR_PTR(-ECHILD);
 
+	dev = yaffs_dentry_to_obj(dentry)->my_dev;
 	yaffs_gross_lock(dev);
 
 	alias = yaffs_get_symlink_alias(yaffs_dentry_to_obj(dentry));
@@ -1121,9 +1126,11 @@ void yaffs_put_link(struct inode *inode, void *cookie)
 
 static const struct inode_operations yaffs_symlink_inode_operations = {
 	.readlink = yaffs_readlink,
-	.follow_link = yaffs_follow_link,
 #if (YAFFS_NEW_FOLLOW_LINK == 1)
+	.get_link = yaffs_get_link,
 	.put_link = yaffs_put_link,
+#else
+	.follow_link = yaffs_follow_link,
 #endif
 	.setattr = yaffs_setattr,
 	.setxattr = yaffs_setxattr,
Signature · 1 line
2.9.3
author
#6 lore raw

PATCH 4/6 fs: yaffs2: kill ->put_link()

In reply to Kevin Hao

As What we have done in commit fceef393a538 ("switch ->get_link() to delayed_call, kill ->put_link()")

---
 fs/yaffs2/yaffs_vfs.c | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
fs/yaffs2/yaffs_vfs.c +2 -10
index b57d612808de..f3efeb0ad4e0 100644
@@ -1060,7 +1060,7 @@ static int yaffs_readlink(struct dentry *dentry, char __user * buffer,
 
 #if (YAFFS_NEW_FOLLOW_LINK == 1)
 static const char *yaffs_get_link(struct dentry *dentry, struct inode *inode,
-				  void **cookie)
+				  struct delayed_call *done)
 {
 	void *ret;
 #else
@@ -1086,7 +1086,7 @@ static int yaffs_follow_link(struct dentry *dentry, struct nameidata *nd)
 		goto out;
 	}
 #if (YAFFS_NEW_FOLLOW_LINK == 1)
-	*cookie = alias;
+	set_delayed_call(done, kfree_link, alias);
 	ret = alias;
 out:
 	if (ret_int)
@@ -1117,18 +1117,10 @@ static void yaffs_put_inode(struct inode *inode)
 }
 #endif
 
-#if (YAFFS_NEW_FOLLOW_LINK == 1)
-void yaffs_put_link(struct inode *inode, void *cookie)
-{
-	kfree(cookie);
-}
-#endif
-
 static const struct inode_operations yaffs_symlink_inode_operations = {
 	.readlink = yaffs_readlink,
 #if (YAFFS_NEW_FOLLOW_LINK == 1)
 	.get_link = yaffs_get_link,
-	.put_link = yaffs_put_link,
 #else
 	.follow_link = yaffs_follow_link,
 #endif
Signature · 1 line
2.9.3
author
#7 lore raw

PATCH 5/6 fs: yaffs2: fix the wrong check of return value of dir_emit()

In reply to Kevin Hao

Fix the following build warning:
fs/yaffs2/yaffs_vfs.c:1788:34: warning: comparison of constant '0' with boolean expression is always false [-Wbool-compare]

           this_inode, this_type) < 0) {
---
 fs/yaffs2/yaffs_vfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/yaffs2/yaffs_vfs.c +1 -1
index f3efeb0ad4e0..5a9c295aecc8 100644
@@ -1785,7 +1785,7 @@ static int yaffs_readdir(struct file *file, struct dir_context *ctx)
 			yaffs_gross_unlock(dev);
 
 			if (!dir_emit(ctx, name, strlen(name),
-				      this_inode, this_type) < 0) {
+				      this_inode, this_type)) {
 				yaffs_gross_lock(dev);
 				goto out;
 			}
Signature · 1 line
2.9.3
author
#8 lore raw

PATCH 6/6 MIPS: OCTEON: mangle-port: fix build failure with VDSO code

In reply to Kevin Hao

From: Aaro Koskinen <[email protected]>

Patch got from https://patchwork.linux-mips.org/patch/14039/

Commit 1685ddbe35cd ("MIPS: Octeon: Changes to support readq()/writeq() usage.") added bitwise shift operations that assume that unsigned long is always 64-bits. This broke the build of VDSO code, as it gets compiled also in "faked" 32-bit mode. Althought the failing inline functions are never executed in 32-bit mode, they still need to pass the compilation. Fix by using 64-bit types explicitly.

The patch fixes the following build failure:

CC arch/mips/vdso/gettimeofday-o32.o
In file included from los/git/devel/linux/arch/mips/include/asm/io.h:32:0,
from los/git/devel/linux/arch/mips/include/asm/page.h:194,
from los/git/devel/linux/arch/mips/vdso/vdso.h:26,
from los/git/devel/linux/arch/mips/vdso/gettimeofday.c:11:
los/git/devel/linux/arch/mips/include/asm/mach-cavium-octeon/mangle-port.h: In function '__should_swizzle_bits':
los/git/devel/linux/arch/mips/include/asm/mach-cavium-octeon/mangle-port.h:19:40: error: right shift count >= width of type [-Werror=shift-count-overflow]

  unsigned long did = ((unsigned long)a >> 40) & 0xff;
                                        ^~
Fixes 1685ddbe35cd ("MIPS: Octeon: Changes to support readq()/writeq() usage.")
---
 arch/mips/include/asm/mach-cavium-octeon/mangle-port.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/mips/include/asm/mach-cavium-octeon/mangle-port.h +2 -2
index 0cf5ac1f7245..8ff2cbdf2c3e 100644
@@ -15,8 +15,8 @@
 static inline bool __should_swizzle_bits(volatile void *a)
 {
 	extern const bool octeon_should_swizzle_table[];
+	u64 did = ((u64)(uintptr_t)a >> 40) & 0xff;
 
-	unsigned long did = ((unsigned long)a >> 40) & 0xff;
 	return octeon_should_swizzle_table[did];
 }
 
@@ -29,7 +29,7 @@ static inline bool __should_swizzle_bits(volatile void *a)
 
 #define __should_swizzle_bits(a)	false
 
-static inline bool __should_swizzle_addr(unsigned long p)
+static inline bool __should_swizzle_addr(u64 p)
 {
 	/* boot bus? */
 	return ((p >> 40) & 0xff) == 0;
Signature · 1 line
2.9.3
#9 lore raw
In reply to Kevin Hao
Quoted 4 lines · Kevin Hao

Hi,

This patch series fixes some build errors in linux-yocto 4.8 and bump to 4.8 for all the non-x86 BSPs.

Thanks Kevin,

I'm queuing these in my tree and will send them out with my 4.8-rc7 series.

Bruce

Quoted 1 line