From: Zhang Ning <ning.a.zhang@intel.com>
To: gregkh@linuxfoundation.org, kstewart@linuxfoundation.org,
pombredanne@nexb.com, yamada.masahiro@socionext.com,
markus@trippelsdorf.de, linux-kernel@vger.kernel.org
Cc: Zhang Ning <ning.a.zhang@intel.com>,
Li@vger.kernel.org, Ting <ting.li@intel.com>
Subject: [PATCH] firmware: make sure builtin firmware is page alignment
Date: Fri, 3 Aug 2018 09:45:21 +0800 [thread overview]
Message-ID: <20180803014521.21527-1-ning.a.zhang@intel.com> (raw)
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
next reply other threads:[~2018-08-03 1:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-03 1:45 Zhang Ning [this message]
2018-08-03 5:39 ` [PATCH] firmware: make sure builtin firmware is page alignment 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180803014521.21527-1-ning.a.zhang@intel.com \
--to=ning.a.zhang@intel.com \
--cc=Li@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus@trippelsdorf.de \
--cc=pombredanne@nexb.com \
--cc=ting.li@intel.com \
--cc=yamada.masahiro@socionext.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).