public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] firmware: make sure builtin firmware is page alignment
@ 2018-08-03  1:45 Zhang Ning
  2018-08-03  5:39 ` Greg KH
  0 siblings, 1 reply; 9+ messages in thread
From: Zhang Ning @ 2018-08-03  1:45 UTC (permalink / raw)
  To: gregkh, kstewart, pombredanne, yamada.masahiro, markus,
	linux-kernel
  Cc: Zhang Ning, Li, Ting

when firmware is in filesystem, request_firmware will load it,
and copy it to vmalloc memory, that is page align memory.

but when firmware is builtin, it is 8 bytes or 4 bytes alignment.

make sure builtin firmware is page algnment, that can simplify algorithm
to handle firmware.

Signed-off-by: Zhang Ning <ning.a.zhang@intel.com>
Signed-off-by: Li, Ting <ting.li@intel.com>
---
 firmware/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/firmware/Makefile b/firmware/Makefile
index 29641383e136..d7bfce56378f 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -16,10 +16,11 @@ quiet_cmd_fwbin = MK_FW   $@
 				firmware/%.gen.S,%,$@))))";		     \
 		  ASM_WORD=$(if $(CONFIG_64BIT),.quad,.long);		     \
 		  ASM_ALIGN=$(if $(CONFIG_64BIT),3,2);			     \
+		  ASM_FW_ALIGN=12;			  	   	     \
 		  PROGBITS=$(if $(CONFIG_ARM),%,@)progbits;		     \
 		  echo "/* Generated by firmware/Makefile */"		> $@;\
 		  echo "    .section .rodata"				>>$@;\
-		  echo "    .p2align $${ASM_ALIGN}"			>>$@;\
+		  echo "    .p2align $${ASM_FW_ALIGN}"			>>$@;\
 		  echo "_fw_$${FWSTR}_bin:"				>>$@;\
 		  echo "    .incbin \"$(2)\""				>>$@;\
 		  echo "_fw_end:"					>>$@;\
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-08-07  8:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-03  1:45 [PATCH] firmware: make sure builtin firmware is page alignment Zhang Ning
2018-08-03  5:39 ` Greg KH
2018-08-03  8:42   ` Zhang, Ning A
2018-08-03 10:31     ` gregkh
2018-08-06  1:48       ` Zhang, Ning A
2018-08-06  5:13         ` Zhang, Ning A
2018-08-06 14:05         ` gregkh
2018-08-07  2:27           ` Zhang, Ning A
2018-08-07  8:12             ` gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox