OSDN Git Service

iommu/io-pgtable: Move some initialization data to .init.rodata
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 9 Sep 2019 20:19:19 +0000 (22:19 +0200)
committerWill Deacon <will@kernel.org>
Tue, 1 Oct 2019 11:36:10 +0000 (12:36 +0100)
commit9062c1d0bedacf68d9c92cbd62c62a6fe6f6cebc
treebfa45005403a5a03364d3af2b69897c9463fed99
parent931a0ba638e09a707e9a905cb6bea1fb1c6d4183
iommu/io-pgtable: Move some initialization data to .init.rodata

The memory used by '__init' functions can be freed once the initialization
phase has been performed.

Mark some 'static const' array defined and used within some '__init'
functions as '__initconst', so that the corresponding data can also be
discarded.

Without '__initconst', the data are put in the .rodata section.
With the qualifier, they are put in the .init.rodata section.

With gcc 8.3.0, the following changes have been measured:

Without '__initconst':
   section      size
  .rodata       00000720
  .init.rodata  00000018

With '__initconst':
   section      size
  .rodata       00000660
  .init.rodata  00000058

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/io-pgtable-arm.c