deinline some functions in aic7xxx drivers, save 80k of text
Subsystems (2)
PATCH 13/15 deinline some functions in aic7xxx drivers, save 80k of text
From: Denis Vlasenko <[email protected]>
I moved a bunch of inlined functions from aic79xx_osm.h and aic79xx_inline.h to aic79xx_osm_o.c and aic79xx_inline.c and #included them from aic79xx_core.c. This is a bit ugly, but I was not sure where would maintainer like them to be moved to.
Same for aic7xxx. End result is:
# size */aic7*xx.o text data bss dec hex filename 144078 11617 600 156295 26287 aic7xxx.old/aic79xx.o 108610 16289 564 125463 1ea17 aic7xxx.old/aic7xxx.o 85255 11617 600 97472 17cc0 aic7xxx/aic79xx.o 83395 16289 564 100248 18798 aic7xxx/aic7xxx.o
Signed-off-by Denis Vlasenko <[email protected]>
Cc James Bottomley <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/scsi/aic7xxx/aic79xx_core.c | 7 drivers/scsi/aic7xxx/aic79xx_inline.c | 460 ++++++++++++++++++++++ drivers/scsi/aic7xxx/aic79xx_inline.h | 494 ------------------------ drivers/scsi/aic7xxx/aic79xx_osm.c | 2 drivers/scsi/aic7xxx/aic79xx_osm.h | 126 ------ drivers/scsi/aic7xxx/aic79xx_osm_o.c | 114 +++++ drivers/scsi/aic7xxx/aic7xxx_core.c | 4 drivers/scsi/aic7xxx/aic7xxx_inline.c | 311 +++++++++++++++ drivers/scsi/aic7xxx/aic7xxx_inline.h | 337 ---------------- drivers/scsi/aic7xxx/aic7xxx_osm.c | 6 drivers/scsi/aic7xxx/aic7xxx_osm.h | 86 ---- drivers/scsi/aic7xxx/aic7xxx_osm_o.c | 75 +++ 12 files changed, 1029 insertions(+), 993 deletions(-)
drivers/scsi/aic7xxx/aic79xx_core.c renamed from drivers/scsi/aic7xxx/aic79xx_core.c~deinline-some-functions-in-aic7xxx-drivers-save-80k-of-text +5 -2
@@ -50,6 +50,9 @@#include <dev/aic7xxx/aicasm/aicasm_insformat.h> #endif +/* Were inlined, but moved out-of-line because they are HUGE: */ +#include "aic79xx_osm_o.c" +#include "aic79xx_inline.c" /***************************** Lookup Tables **********************************/ static char *ahd_chip_names[] =
@@ -304,7 +307,7 @@ ahd_currently_packetized(struct ahd_softreturn (packetized); } -static __inlineint +static int ahd_set_active_fifo (struct ahd_softc *ahd) {u_int active_fifo;
@@ -7192,7 +7195,7 @@ ahd_resume(struct ahd_softc *ahd)* scbid that should be restored once manipualtion * of the TCL entry is complete. */ -static __inlineu_int +static u_int ahd_index_busy_tcl (struct ahd_softc *ahd,u_int *saved_scbid,u_int tcl) {/*
drivers/scsi/aic7xxx/aic79xx_inline.c new file +460 -0
460 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_inline.h renamed from drivers/scsi/aic7xxx/aic79xx_inline.h~deinline-some-functions-in-aic7xxx-drivers-save-80k-of-text +20 -474
568 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_osm.c renamed from drivers/scsi/aic7xxx/aic79xx_osm.c~deinline-some-functions-in-aic7xxx-drivers-save-80k-of-text +1 -1
@@ -462,7 +462,7 @@ ahd_linux_queue(struct scsi_cmnd * cmd,return rtn; } -static inline struct scsi_target ** +static struct scsi_target **ahd_linux_target_in_softc (struct scsi_target *starget) { struct ahd_softc *ahd =
drivers/scsi/aic7xxx/aic79xx_osm.h renamed from drivers/scsi/aic7xxx/aic79xx_osm.h~deinline-some-functions-in-aic7xxx-drivers-save-80k-of-text +11 -115
164 lines not on this page · raw message
drivers/scsi/aic7xxx/aic79xx_osm_o.c new file +114 -0
114 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_core.c renamed from drivers/scsi/aic7xxx/aic7xxx_core.c~deinline-some-functions-in-aic7xxx-drivers-save-80k-of-text +4 -0
@@ -50,6 +50,10 @@#include <dev/aic7xxx/aicasm/aicasm_insformat.h> #endif +/* Were inlined, but moved out-of-line because they are HUGE: */ +#include "aic7xxx_osm_o.c" +#include "aic7xxx_inline.c" +/***************************** Lookup Tables **********************************/ char *ahc_chip_names[] = {
drivers/scsi/aic7xxx/aic7xxx_inline.c new file +311 -0
311 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_inline.h renamed from drivers/scsi/aic7xxx/aic7xxx_inline.h~deinline-some-functions-in-aic7xxx-drivers-save-80k-of-text +15 -322
360 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_osm.c renamed from drivers/scsi/aic7xxx/aic7xxx_osm.c~deinline-some-functions-in-aic7xxx-drivers-save-80k-of-text +3 -3
@@ -392,7 +392,7 @@ static int ahc_linux_unit;/********************************* Inlines ************************************/ static __inlinevoid ahc_linux_unmap_scb (struct ahc_softc *,struct scb *); -static __inlineint ahc_linux_map_seg (struct ahc_softc *ahc,struct scb *scb, +static int ahc_linux_map_seg (struct ahc_softc *ahc,struct scb *scb,struct ahc_dma_seg *sg,dma_addr_t addr,bus_size_t len);
@@ -417,7 +417,7 @@ ahc_linux_unmap_scb(struct ahc_softc *ah } } -static __inlineint +static int ahc_linux_map_seg (struct ahc_softc *ahc,struct scb *scb,struct ahc_dma_seg *sg,dma_addr_t addr,bus_size_t len) {
@@ -491,7 +491,7 @@ ahc_linux_queue(struct scsi_cmnd * cmd,return rtn; } -static inline struct scsi_target ** +static struct scsi_target **ahc_linux_target_in_softc (struct scsi_target *starget) { struct ahc_softc *ahc =
drivers/scsi/aic7xxx/aic7xxx_osm.h renamed from drivers/scsi/aic7xxx/aic7xxx_osm.h~deinline-some-functions-in-aic7xxx-drivers-save-80k-of-text +10 -76
112 lines not on this page · raw message
drivers/scsi/aic7xxx/aic7xxx_osm_o.c new file +75 -0
75 lines not on this page · raw message
_