linux 内核修改分辨率后出现的WARNING解决方法

将分辨率由800x480改为1280x800后 出现了如下警告

[   21.581886] ------------[ cut here ]------------
[   21.581907] WARNING: at mm/page_alloc.c:2121 __alloc_pages_nodemask+0x468/0x63c()
[   21.581914] Modules linked in:
[   21.581940] [] (unwind_backtrace+0x0/0xfc) from [] (warn_slowpath_common+0x54/0x64)
[   21.581957] [] (warn_slowpath_common+0x54/0x64) from [] (warn_slowpath_null+0x1c/0x24)
[   21.581971] [] (warn_slowpath_null+0x1c/0x24) from [] (__alloc_pages_nodemask+0x468/0x63c)
[   21.581986] [] (__alloc_pages_nodemask+0x468/0x63c) from [] (__dma_alloc+0x8c/0x3bc)
[   21.581999] [] (__dma_alloc+0x8c/0x3bc) from [] (dma_alloc_writecombine+0x24/0x2c)
[   21.582016] [] (dma_alloc_writecombine+0x24/0x2c) from [] (s3cfb_map_video_memory+0xac/0x174)
[   21.582031] [] (s3cfb_map_video_memory+0xac/0x174) from [] (s3cfb_set_par+0x58/0xc0)
[   21.582050] [] (s3cfb_set_par+0x58/0xc0) from [] (fb_set_var+0x168/0x2a4)
[   21.582065] [] (fb_set_var+0x168/0x2a4) from [] (do_fb_ioctl+0x3bc/0x5f4)
[   21.582079] [] (do_fb_ioctl+0x3bc/0x5f4) from [] (do_vfs_ioctl+0x80/0x5fc)
[   21.582092] [] (do_vfs_ioctl+0x80/0x5fc) from [] (sys_ioctl+0x38/0x60)
[   21.582108] [] (sys_ioctl+0x38/0x60) from [] (ret_fast_syscall+0x0/0x30)
[   21.582117] ---[ end trace d22d266c12264dc9 ]---

出现这个必不会影响显示 还是觉得不妥 以前也出现过这个问题也去管 这次就跟踪下吧

网上也有人碰过到这个问题网址:http://comments.gmane.org/gmane.linux.ports.arm.kernel/115480

这里面给了个链接里有解决方法:https://community.freescale.com/thread/320821

不知道你们看不看的了 我把原文贴在下面

问题

Hello,

I'm using dma_alloc_writecombine() to allocate memory in my framebuffer
device driver just like many other drivers do.

Now I have a new panel with a higher resolution and more bits-per-pixel.
I want to use double-buffering with DirectFB and so my framebuffer size
exceeds 4Mb.

Even though my embedded system has plenty of memory, now I receive the
following warning and the allocation fails:

WARNING: at /home/teemhu/mcu/has/topas/mm/page_alloc.c:2012
__alloc_pages_nodemask+0x444/0x650()

This is due to the following check in __alloc_pages_slowpath():
	if (order >= MAX_ORDER) {
		WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
		return NULL;
	}

Because MAX_ORDER is 11, only memory chunks of size (PAGE_SIZE <<
MAX_ORDER_NR_PAGES) = 4Mb can be allocated.

Apparently this topic has come up when using the OMAP DSS already:
http://www.spinics.net/lists/linux-omap/msg08124.html

Another user has asked this question on the linuxfb-dev mailing list in
October 2010, but did not receive an answer:
http://www.spinics.net/lists/linux-fbdev/msg01745.html
出现这个问题的原因

DMA memory allocation is limited to 4MB
大小定义说明


#define CONFIG_FORCE_MAX_ZONEORDER 12

 

By default, MAX_ORDER is 11 which means the biggest memory chunk is: PAGE_SIZE * 2 ^( FORCE_MAX_ZONEORDER - 1)

= 4K * 1 K = 4M.
最后解决方法直接将
MAX_ORDER
改大

在头文件include/linux/mmzone.h里定义了MAX_ORDER

首先确定下有没有定义FORCE_MAX_ZONEORDER

我的里面定义了FORCE_MAX_ZONEORDER但是make menuconfig里直接改不了FORCE_MAX_ZONEORDER在

arch/arm/Kconfig定义直接把default改成 然后make menuconfig保存 确认下.config这个参数是不是改了 编译下载

问题解决




你可能感兴趣的:(linux系统)