summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2008-04-25 15:01:41 +0200
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-04-27 12:20:00 -0500
commit3dbd10f3d8b00dad35d3fac95e91c066ae71d9a8 (patch)
treecbd020e0d4e9911afc88dbfc725f66139fb30129 /drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
parenta198c3d0393faa1fa9f0e6e917ce980d3638f8df (diff)
downloadop-kernel-dev-3dbd10f3d8b00dad35d3fac95e91c066ae71d9a8.zip
op-kernel-dev-3dbd10f3d8b00dad35d3fac95e91c066ae71d9a8.tar.gz
[SCSI] aic7xxx: teach aicasm to not emit unused debug code/data
Add a 'count' variable to each symbol which gets increased every time the symbol is referenced. And then modify the register definition to include counts for symbols which are referenced from the source code only and not from the sequencer code. This will give us an automatic usage count for the symbols with only minimal hand-crafting. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aic7xxx/aicasm/aicasm_gram.y')
-rw-r--r--drivers/scsi/aic7xxx/aicasm/aicasm_gram.y12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
index e1079dd..81be6a2 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
@@ -143,6 +143,8 @@ void yyerror(const char *string);
%token <value> T_ADDRESS
+%token T_COUNT
+
%token T_ACCESS_MODE
%token T_MODES
@@ -353,6 +355,7 @@ reg_attribute_list:
reg_attribute:
reg_address
| size
+| count
| access_mode
| modes
| field_defn
@@ -393,6 +396,13 @@ size:
}
;
+count:
+ T_COUNT T_NUMBER
+ {
+ cur_symbol->count += $2;
+ }
+;
+
access_mode:
T_ACCESS_MODE T_MODE
{
@@ -801,6 +811,7 @@ scratch_ram:
cur_symtype = SRAMLOC;
cur_symbol->type = SRAMLOC;
initialize_symbol(cur_symbol);
+ cur_symbol->count += 1;
}
reg_address
{
@@ -832,6 +843,7 @@ scb:
initialize_symbol(cur_symbol);
/* 64 bytes of SCB space */
cur_symbol->info.rinfo->size = 64;
+ cur_symbol->count += 1;
}
reg_address
{
OpenPOWER on IntegriCloud