aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2008-09-22 17:56:40 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-23 12:42:12 -0400
commitfa25b99a503f68594a1787e6f31159a5aec77928 (patch)
tree8c82c97f1ed8070273bf32d4c2d3b33614525343 /drivers/scsi
parent5a36756b8b3d7178d9c101d1e2a7a83fd7b17706 (diff)
[SCSI] aic7xxx: introduce "dont_generate_debug_code" keyword in aicasm parser
aic7xxx still contains ~30kb of dead code if pretty printing of registers is requested. These patches deal with it. Size differences: text data bss dec hex filename DEBUG_ENABLE+PRETTY_PRINT: 234697 2362 1188 238247 3a2a7 linux-2.6.26-rc8-/drivers/scsi/aic7xxx/built-in.o 205092 2362 1188 208642 32f02 linux-2.6.26-rc8/drivers/scsi/aic7xxx/built-in.o NO_DEBUG_ENABLE+PRETTY_PRINT: 227272 2362 1172 230806 38596 linux-2.6.26-rc8-/drivers/scsi/aic7xxx/built-in.o 197671 2362 1172 201205 311f5 linux-2.6.26-rc8/drivers/scsi/aic7xxx/built-in.o DEBUG_ENABLE+NO_PRETTY_PRINT: 192457 2362 1188 196007 2fda7 linux-2.6.26-rc8-/drivers/scsi/aic7xxx/built-in.o 192457 2362 1188 196007 2fda7 linux-2.6.26-rc8/drivers/scsi/aic7xxx/built-in.o NO_DEBUG_ENABLE+NO_PRETTY_PRINT: 185040 2362 1172 188574 2e09e linux-2.6.26-rc8-/drivers/scsi/aic7xxx/built-in.o 185040 2362 1172 188574 2e09e linux-2.6.26-rc8/drivers/scsi/aic7xxx/built-in.o This patch: Introduce "dont_generate_debug_code" keyword in aicasm parser. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Hannes Reinecke <hare@suse.de> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aic7xxx/aicasm/aicasm_gram.y10
-rw-r--r--drivers/scsi/aic7xxx/aicasm/aicasm_scan.l1
-rw-r--r--drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c3
-rw-r--r--drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h3
4 files changed, 16 insertions, 1 deletions
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
index 81be6a261cc8..e4064433842e 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_gram.y
@@ -147,6 +147,8 @@ void yyerror(const char *string);
147 147
148%token T_ACCESS_MODE 148%token T_ACCESS_MODE
149 149
150%token T_DONT_GENERATE_DEBUG_CODE
151
150%token T_MODES 152%token T_MODES
151 153
152%token T_DEFINE 154%token T_DEFINE
@@ -357,6 +359,7 @@ reg_attribute:
357| size 359| size
358| count 360| count
359| access_mode 361| access_mode
362| dont_generate_debug_code
360| modes 363| modes
361| field_defn 364| field_defn
362| enum_defn 365| enum_defn
@@ -410,6 +413,13 @@ access_mode:
410 } 413 }
411; 414;
412 415
416dont_generate_debug_code:
417 T_DONT_GENERATE_DEBUG_CODE
418 {
419 cur_symbol->dont_generate_debug_code = 1;
420 }
421;
422
413modes: 423modes:
414 T_MODES mode_list 424 T_MODES mode_list
415 { 425 {
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
index 2c7f02daf88d..93c8667cd704 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
@@ -164,6 +164,7 @@ download { return T_DOWNLOAD; }
164address { return T_ADDRESS; } 164address { return T_ADDRESS; }
165count { return T_COUNT; } 165count { return T_COUNT; }
166access_mode { return T_ACCESS_MODE; } 166access_mode { return T_ACCESS_MODE; }
167dont_generate_debug_code { return T_DONT_GENERATE_DEBUG_CODE; }
167modes { return T_MODES; } 168modes { return T_MODES; }
168RW|RO|WO { 169RW|RO|WO {
169 if (strcmp(yytext, "RW") == 0) 170 if (strcmp(yytext, "RW") == 0)
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
index fcd357872b43..078ed600f47a 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.c
@@ -539,6 +539,9 @@ symtable_dump(FILE *ofile, FILE *dfile)
539 aic_print_include(dfile, stock_include_file); 539 aic_print_include(dfile, stock_include_file);
540 SLIST_FOREACH(curnode, &registers, links) { 540 SLIST_FOREACH(curnode, &registers, links) {
541 541
542 if (curnode->symbol->dont_generate_debug_code)
543 continue;
544
542 switch(curnode->symbol->type) { 545 switch(curnode->symbol->type) {
543 case REGISTER: 546 case REGISTER:
544 case SCBLOC: 547 case SCBLOC:
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
index 05190c1a2fb7..2ba73ae7c777 100644
--- a/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
+++ b/drivers/scsi/aic7xxx/aicasm/aicasm_symbol.h
@@ -137,7 +137,8 @@ typedef struct symbol {
137 struct label_info *linfo; 137 struct label_info *linfo;
138 struct cond_info *condinfo; 138 struct cond_info *condinfo;
139 struct macro_info *macroinfo; 139 struct macro_info *macroinfo;
140 }info; 140 } info;
141 int dont_generate_debug_code;
141} symbol_t; 142} symbol_t;
142 143
143typedef struct symbol_ref { 144typedef struct symbol_ref {