Christophe Leroy
894fa235eb
powerpc: inline iomap accessors
ioreadXX()/ioreadXXbe() accessors are equivalent to ppc
in_leXX()/in_be16() accessors but they are not inlined.
Since commit 0eb5736828 ("powerpc/kerenl: Enable EEH for IO
accessors"), the 'le' versions are equivalent to the ones
defined in asm-generic/io.h, allthough the ones there are inlined.
Include asm-generic/io.h to get them. Keep ppc versions of the
'be' ones as they are optimised, but make them inline in ppc io.h.
This reduces the size of ppc64e_defconfig build by 3 kbytes:
text data bss dec hex filename
10160733 4343422 562972 15067127 e5e7f7 vmlinux.before
10159239 4341590 562972 15063801 e5daf9 vmlinux.after
A typical function using ioread and iowrite before the change:
c00000000066a3c4 <.ata_bmdma_stop>:
c00000000066a3c4: 7c 08 02 a6 mflr r0
c00000000066a3c8: fb c1 ff f0 std r30,-16(r1)
c00000000066a3cc: f8 01 00 10 std r0,16(r1)
c00000000066a3d0: fb e1 ff f8 std r31,-8(r1)
c00000000066a3d4: f8 21 ff 81 stdu r1,-128(r1)
c00000000066a3d8: eb e3 00 00 ld r31,0(r3)
c00000000066a3dc: eb df 00 98 ld r30,152(r31)
c00000000066a3e0: 7f c3 f3 78 mr r3,r30
c00000000066a3e4: 4b 9b 6f 7d bl c000000000021360 <.ioread8>
c00000000066a3e8: 60 00 00 00 nop
c00000000066a3ec: 7f c4 f3 78 mr r4,r30
c00000000066a3f0: 54 63 06 3c rlwinm r3,r3,0,24,30
c00000000066a3f4: 4b 9b 70 4d bl c000000000021440 <.iowrite8>
c00000000066a3f8: 60 00 00 00 nop
c00000000066a3fc: 7f e3 fb 78 mr r3,r31
c00000000066a400: 38 21 00 80 addi r1,r1,128
c00000000066a404: e8 01 00 10 ld r0,16(r1)
c00000000066a408: eb c1 ff f0 ld r30,-16(r1)
c00000000066a40c: 7c 08 03 a6 mtlr r0
c00000000066a410: eb e1 ff f8 ld r31,-8(r1)
c00000000066a414: 4b ff ff 8c b c00000000066a3a0 <.ata_sff_dma_pause>
The same function with this patch:
c000000000669cb4 <.ata_bmdma_stop>:
c000000000669cb4: e8 63 00 00 ld r3,0(r3)
c000000000669cb8: e9 43 00 98 ld r10,152(r3)
c000000000669cbc: 7c 00 04 ac hwsync
c000000000669cc0: 89 2a 00 00 lbz r9,0(r10)
c000000000669cc4: 0c 09 00 00 twi 0,r9,0
c000000000669cc8: 4c 00 01 2c isync
c000000000669ccc: 55 29 06 3c rlwinm r9,r9,0,24,30
c000000000669cd0: 7c 00 04 ac hwsync
c000000000669cd4: 99 2a 00 00 stb r9,0(r10)
c000000000669cd8: a1 4d 06 f0 lhz r10,1776(r13)
c000000000669cdc: 2c 2a 00 00 cmpdi r10,0
c000000000669ce0: 41 c2 00 08 beq- c000000000669ce8 <.ata_bmdma_stop+0x34>
c000000000669ce4: b1 4d 06 f2 sth r10,1778(r13)
c000000000669ce8: 4b ff ff a8 b c000000000669c90 <.ata_sff_dma_pause>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/18b357d68c4cde149f75c7a1031c850925cd8128.1605981539.git.christophe.leroy@csgroup.eu
2020-12-04 01:01:09 +11:00
..
2020-11-26 22:05:42 +11:00
2020-10-18 09:27:10 -07:00
2020-07-23 17:41:36 +10:00
2020-10-22 13:13:57 -07:00
2020-10-22 13:13:57 -07:00
2020-03-25 11:50:48 +01:00
2020-07-29 21:09:37 +10:00
2020-10-06 23:22:25 +11:00
2017-11-02 11:10:55 +01:00
2020-10-25 14:51:49 -07:00
2020-07-30 22:53:48 +10:00
2019-06-15 16:52:06 +10:00
2017-11-02 11:10:55 +01:00
2020-06-02 20:59:11 +10:00
2019-05-30 11:26:32 -07:00
2019-11-17 01:56:31 -06:00
2019-06-05 17:37:06 +02:00
2020-11-19 14:49:56 +11:00
2019-05-30 11:26:32 -07:00
2020-11-19 14:49:56 +11:00
2020-05-19 00:10:39 +10:00
2020-07-26 23:34:19 +10:00
2020-07-29 21:02:09 +10:00
2020-09-25 06:20:47 +02:00
2019-02-18 22:41:03 +11:00
2019-05-30 11:26:32 -07:00
2020-10-06 23:22:22 +11:00
2019-11-13 19:27:40 +11:00
2020-11-02 12:54:20 +11:00
2020-08-07 18:48:15 -07:00
2019-09-14 00:01:14 +10:00
2020-10-07 22:34:47 +11:00
2020-07-26 23:34:20 +10:00
2020-10-22 10:38:53 +11:00
2020-11-19 16:56:55 +11:00
2020-10-08 12:50:52 +11:00
2019-05-30 11:26:32 -07:00
2020-05-19 00:10:37 +10:00
2020-10-06 23:22:23 +11:00
2020-11-23 21:16:27 +11:00
2020-10-16 12:21:15 -07:00
2020-07-29 21:02:10 +10:00
2020-10-08 21:17:13 +11:00
2019-11-13 19:27:40 +11:00
2020-11-05 23:34:25 +11:00
2020-11-19 16:56:55 +11:00
2020-11-05 23:34:16 +11:00
2020-06-09 09:39:13 -07:00
2020-11-19 16:56:54 +11:00
2020-11-25 23:17:31 +11:00
2020-11-19 16:56:54 +11:00
2020-06-09 09:39:13 -07:00
2020-09-15 22:13:19 +10:00
2020-09-15 22:13:19 +10:00
2020-06-02 20:59:11 +10:00
2019-05-30 11:26:32 -07:00
2020-01-16 14:59:37 +10:00
2020-06-02 20:59:11 +10:00
2020-09-18 19:59:43 +10:00
2020-05-07 17:25:54 +10:00
2020-06-09 09:39:13 -07:00
2019-05-30 11:26:32 -07:00
2020-12-04 01:01:09 +11:00
2020-09-03 18:12:15 +02:00
2020-10-08 21:17:14 +11:00
2020-06-02 10:59:10 -07:00
2020-05-19 00:10:37 +10:00
2020-06-18 12:10:37 -07:00
2019-05-30 11:26:35 -07:00
2020-09-08 11:52:34 +02:00
2019-09-14 00:04:40 +10:00
2019-09-14 00:04:40 +10:00
2020-10-08 21:17:13 +11:00
2019-12-18 15:04:42 +01:00
2020-11-19 14:50:14 +11:00
2020-07-23 17:43:30 +10:00
2020-10-16 20:13:55 +11:00
2020-09-02 11:00:21 +10:00
2020-10-08 21:17:12 +11:00
2020-06-02 20:59:11 +10:00
2020-05-11 23:15:14 +10:00
2020-06-17 10:57:41 -07:00
2020-07-27 00:01:30 +10:00
2019-05-30 11:26:32 -07:00
2019-08-30 09:40:15 +10:00
2020-06-05 12:39:30 -07:00
2020-07-26 23:34:19 +10:00
2020-05-19 00:10:39 +10:00
2020-05-26 23:36:57 +10:00
2020-11-19 14:50:14 +11:00
2019-08-22 23:11:48 +10:00
2020-06-05 12:39:30 -07:00
2020-07-26 23:34:21 +10:00
2020-01-06 16:25:29 +11:00
2020-10-15 13:42:49 +11:00
2020-05-18 21:58:44 +10:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-04-04 21:40:57 +11:00
2020-02-04 03:05:26 +00:00
2020-09-18 18:12:46 +10:00
2019-10-29 15:12:17 +11:00
2020-10-25 14:51:49 -07:00
2017-11-02 11:10:55 +01:00
2020-09-15 22:13:22 +10:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-02-04 03:05:26 +00:00
2020-06-09 09:39:13 -07:00
2020-02-04 03:05:26 +00:00
2018-06-03 20:43:33 +10:00
2020-10-06 23:22:27 +11:00
2020-07-16 13:12:38 +10:00
2020-07-16 14:49:53 +10:00
2020-10-08 12:50:52 +11:00
2019-11-13 00:33:22 +11:00
2019-11-13 00:33:22 +11:00
2020-10-08 21:17:13 +11:00
2020-11-25 23:17:31 +11:00
2020-11-02 12:54:38 +11:00
2020-11-19 14:50:14 +11:00
2020-07-15 12:04:40 +10:00
2020-07-15 12:04:40 +10:00
2020-10-23 10:06:38 -07:00
2020-04-01 13:42:13 +11:00
2017-11-02 11:10:55 +01:00
2020-11-02 12:54:20 +11:00
2020-06-09 09:39:13 -07:00
2019-06-14 10:48:56 +02:00
2020-06-02 20:59:11 +10:00
2019-06-19 17:11:22 +02:00
2019-06-19 17:11:22 +02:00
2017-11-02 11:10:55 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2020-11-19 23:47:20 +11:00
2019-11-15 14:38:29 +01:00
2020-09-18 20:05:24 +10:00
2019-05-30 11:26:32 -07:00
2020-04-01 13:42:13 +11:00
2020-09-15 22:13:30 +10:00
2020-10-08 21:17:15 +11:00
2020-10-06 23:22:25 +11:00
2020-10-20 07:59:21 +11:00
2019-08-30 09:40:15 +10:00
2019-05-30 11:26:32 -07:00
2019-10-11 19:33:25 +11:00
2020-05-26 23:36:51 +10:00
2020-07-16 13:12:47 +10:00
2020-05-19 00:10:37 +10:00
2020-07-16 13:00:24 +10:00
2020-11-25 23:17:31 +11:00
2019-04-30 11:31:02 +10:00