From: Milton Miller <miltonm@bga.com>
To: Jon Loeliger <jdl@jdl.com>
Cc: linuxppc-dev@ozlabs.org, David Gibson <david@gibson.dropbear.id.au>
Subject: [PATCH 04/11] dtc: implement labels on memory reserve slots
Date: Sat, 7 Jul 2007 01:18:49 -0500 (CDT) [thread overview]
Message-ID: <dtc-5-04.miltonm@bga.com> (raw)
In-Reply-To: <dtc-5-00.miltonm@bga.com>
Allow a label to be placed on a memory reserve entry.
Change the parser to recogonise and store them. Emit
them when writing assembly output.
Signed-off-by: Milton Miller <miltonm@bga.com>
---
The infrastructure for storing the label was already present, so
the changes are small.
Index: dtc/dtc-parser.y
===================================================================
--- dtc.orig/dtc-parser.y 2007-06-14 22:59:05.000000000 -0500
+++ dtc/dtc-parser.y 2007-06-14 22:59:07.000000000 -0500
@@ -92,11 +92,11 @@ memreserves: memreserve memreserves {
}
;
-memreserve: DT_MEMRESERVE DT_ADDR DT_ADDR ';' {
- $$ = build_reserve_entry($2, $3, NULL);
+memreserve: label DT_MEMRESERVE DT_ADDR DT_ADDR ';' {
+ $$ = build_reserve_entry($3, $4, $1);
}
- | DT_MEMRESERVE DT_ADDR '-' DT_ADDR ';' {
- $$ = build_reserve_entry($2, $4 - $2 + 1, NULL);
+ | label DT_MEMRESERVE DT_ADDR '-' DT_ADDR ';' {
+ $$ = build_reserve_entry($3, $5 - $3 + 1, $1);
}
;
Index: dtc/flattree.c
===================================================================
--- dtc.orig/flattree.c 2007-06-14 22:59:00.000000000 -0500
+++ dtc/flattree.c 2007-06-14 22:59:07.000000000 -0500
@@ -497,6 +497,10 @@ void dt_to_asm(FILE *f, struct boot_info
* as it appears .quad isn't available in some assemblers.
*/
for (re = bi->reservelist; re; re = re->next) {
+ if (re->label) {
+ fprintf(f, "\t.globl\t%s\n", re->label);
+ fprintf(f, "%s:\n", re->label);
+ }
fprintf(f, "\t.long\t0x%08x\n\t.long\t0x%08x\n",
(unsigned int)(re->re.address >> 32),
(unsigned int)(re->re.address & 0xffffffff));
next prev parent reply other threads:[~2007-07-07 6:18 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-07 6:18 [PATCH 00/11] dtc: some fixes, and make asm labels for data Milton Miller
2007-07-07 6:18 ` [PATCH 01/11] dtc: fix asm for version 17 Milton Miller
2007-07-18 1:56 ` David Gibson
2007-07-07 6:18 ` [PATCH 02/11] dtc: move declaration of yyerror Milton Miller
2007-07-19 5:02 ` David Gibson
2007-07-07 6:18 ` [PATCH 03/11] dtc: complain about unparsed digits in cell lists Milton Miller
2007-07-18 2:01 ` David Gibson
2007-07-07 6:18 ` [PATCH 05/11] dtc: clean up grow_data_for() Milton Miller
2007-07-07 6:18 ` Milton Miller [this message]
2007-07-07 6:18 ` [PATCH 06/11] dtc: allow a label: in any dts context Milton Miller
2007-07-07 6:18 ` [PATCH 07/11] dtc: implement labels on property data Milton Miller
2007-07-07 6:18 ` [PATCH 08/11] dtc: store labels in asscending order Milton Miller
2007-07-07 6:18 ` [PATCH 09/11] dtc: add a testcase with labels Milton Miller
2007-07-07 6:18 ` [PATCH 10/11] dtc: align header comments in asm output Milton Miller
2007-07-07 6:18 ` [PATCH 11/11] dtc: format memory reserve as pairs on two lines Milton Miller
2007-07-07 19:24 ` [PATCH 00/11] dtc: some fixes, and make asm labels for data Jon Loeliger
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=dtc-5-04.miltonm@bga.com \
--to=miltonm@bga.com \
--cc=david@gibson.dropbear.id.au \
--cc=jdl@jdl.com \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).