ata: start separating SATA specific code from libata-core.c
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Thu, 26 Mar 2020 15:58:11 +0000 (16:58 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 26 Mar 2020 16:28:19 +0000 (10:28 -0600)
commit7fe183c773c42f9814cd361c45a0233f441bc4fc
tree3553149188ac70a9d0dd654e9ac54dbbfc524501
parent4c9029e7d00f31923bcecbaab6a12ba52017924e
ata: start separating SATA specific code from libata-core.c

Start separating SATA specific code from libata-core.c:

* move following functions to libata-sata.c:
  - ata_tf_to_fis()
  - ata_tf_from_fis()
  - sata_link_scr_lpm()
  - ata_slave_link_init()
  - sata_lpm_ignore_phy_events()

* group above functions together in <linux/libata.h>

* include libata-sata.c in the build when CONFIG_SATA_HOST=y

Code size savings on m68k arch using (modified) atari_defconfig:

   text    data     bss     dec     hex filename
before:
  37582     572      40   38194    9532 drivers/ata/libata-core.o
after:
  36762     572      40   37374    91fe drivers/ata/libata-core.o

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/Makefile
drivers/ata/libata-core.c
drivers/ata/libata-sata.c [new file with mode: 0644]
include/linux/libata.h