From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/5] decompressor: define macros for non-PBL case as well
Date: Wed, 13 Jul 2022 12:09:20 +0200 [thread overview]
Message-ID: <20220713100922.1880282-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20220713100922.1880282-1-a.fatoum@pengutronix.de>
Do as Linux does to allow the same file to be built both for preboot
decompression and for use in barebox proper.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
include/linux/decompress/mm.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/linux/decompress/mm.h b/include/linux/decompress/mm.h
index ac0702dfb111..1891a5136842 100644
--- a/include/linux/decompress/mm.h
+++ b/include/linux/decompress/mm.h
@@ -66,8 +66,17 @@ static __maybe_unused void simple_free(void *where)
#define MALLOC simple_malloc
#define FREE simple_free
-#define INIT
+#else
+
+#define large_malloc(a) malloc(a)
+#define large_free(a) free(a)
#endif /* STATIC */
+#ifndef STATIC
+#define STATIC
+#endif
+
+#define INIT
+
#endif /* DECOMPR_MM_H */
--
2.30.2
next prev parent reply other threads:[~2022-07-13 10:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 10:09 [PATCH 0/5] lib: zstd: allow use in PBL and shell Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 1/5] lib: zstd: adopt Linux directory structure Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 2/5] lib: zstd: sync with Linux Ahmad Fatoum
2022-07-13 10:09 ` Ahmad Fatoum [this message]
2022-07-13 10:09 ` [PATCH 4/5] ARM: cpu: uncompress: increase early malloc pool to 256K Ahmad Fatoum
2022-07-13 10:09 ` [PATCH 5/5] lib: uncompress: add general zstd support Ahmad Fatoum
2022-07-14 8:45 ` Sascha Hauer
2022-07-14 8:54 ` Ahmad Fatoum
2022-07-14 9:20 ` Sascha Hauer
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=20220713100922.1880282-4-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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