diff mbox series

[v1,1/1] xen/arm: smmuv3: Mark more init-only functions with __init

Message ID 20240522132829.1278625-2-edgar.iglesias@gmail.com (mailing list archive)
State New, archived
Headers show
Series xen/arm: smmuv3: Mark more init-only functions with __init | expand

Commit Message

Edgar E. Iglesias May 22, 2024, 1:28 p.m. UTC
From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>

Move more functions that are only called at init to
the .init.text section.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
---
 xen/drivers/passthrough/arm/smmu-v3.c | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

Comments

Julien Grall June 5, 2024, 8:55 a.m. UTC | #1
Hi Edgar,

On 22/05/2024 14:28, Edgar E. Iglesias wrote:
> From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>
> 
> Move more functions that are only called at init to
> the .init.text section.
> 
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>

Reviewed-by: Julien Grall <jgrall@amazon.com>

This also needs a reviewed-by from either Bertrand or Rahul.

Cheers,
Rahul Singh June 5, 2024, 9:54 a.m. UTC | #2
Hi Edgar,

> On 22 May 2024, at 2:28 PM, Edgar E. Iglesias <edgar.iglesias@gmail.com> wrote:
> 
> From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>
> 
> Move more functions that are only called at init to
> the .init.text section.
> 
> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>

Acked-by: Rahul Singh <rahul.singh@arm.com>
Tested-by: Rahul Singh <rahul.singh@arm.com>

Regards,
Rahul
Edgar E. Iglesias Aug. 9, 2024, 10:23 a.m. UTC | #3
On Wed, Jun 5, 2024 at 11:55 AM Rahul Singh <Rahul.Singh@arm.com> wrote:

> Hi Edgar,
>
> > On 22 May 2024, at 2:28 PM, Edgar E. Iglesias <edgar.iglesias@gmail.com>
> wrote:
> >
> > From: "Edgar E. Iglesias" <edgar.iglesias@amd.com>
> >
> > Move more functions that are only called at init to
> > the .init.text section.
> >
> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com>
>
> Acked-by: Rahul Singh <rahul.singh@arm.com>
> Tested-by: Rahul Singh <rahul.singh@arm.com>
>
> Regards,
> Rahul
>

Ping!

This still rebases cleanly on top of master but let me know if I should
resend.

Best regards,
Edgar
Julien Grall Aug. 13, 2024, 8:54 p.m. UTC | #4
Hi Edgar,

On 09/08/2024 11:23, Edgar E. Iglesias wrote:
> On Wed, Jun 5, 2024 at 11:55 AM Rahul Singh <Rahul.Singh@arm.com 
> <mailto:Rahul.Singh@arm.com>> wrote:
> 
>     Hi Edgar,
> 
>      > On 22 May 2024, at 2:28 PM, Edgar E. Iglesias
>     <edgar.iglesias@gmail.com <mailto:edgar.iglesias@gmail.com>> wrote:
>      >
>      > From: "Edgar E. Iglesias" <edgar.iglesias@amd.com
>     <mailto:edgar.iglesias@amd.com>>
>      >
>      > Move more functions that are only called at init to
>      > the .init.text section.
>      >
>      > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@amd.com
>     <mailto:edgar.iglesias@amd.com>>
> 
>     Acked-by: Rahul Singh <rahul.singh@arm.com <mailto:rahul.singh@arm.com>>
>     Tested-by: Rahul Singh <rahul.singh@arm.com
>     <mailto:rahul.singh@arm.com>>
> 
>     Regards,
>     Rahul
> 
> 
> Ping!

Thanks for the ping and sorry this fell through the cracks.

> 
> This still rebases cleanly on top of master but let me know if I should 
> resend.


This is now committed.

Cheers,
diff mbox series

Patch

diff --git a/xen/drivers/passthrough/arm/smmu-v3.c b/xen/drivers/passthrough/arm/smmu-v3.c
index 6904962467..cee5724022 100644
--- a/xen/drivers/passthrough/arm/smmu-v3.c
+++ b/xen/drivers/passthrough/arm/smmu-v3.c
@@ -1545,7 +1545,7 @@  static int arm_smmu_dt_xlate(struct device *dev,
 }
 
 /* Probing and initialisation functions */
-static int arm_smmu_init_one_queue(struct arm_smmu_device *smmu,
+static int __init arm_smmu_init_one_queue(struct arm_smmu_device *smmu,
 				   struct arm_smmu_queue *q,
 				   void __iomem *page,
 				   unsigned long prod_off,
@@ -1588,7 +1588,7 @@  static int arm_smmu_init_one_queue(struct arm_smmu_device *smmu,
 	return 0;
 }
 
-static int arm_smmu_init_queues(struct arm_smmu_device *smmu)
+static int __init arm_smmu_init_queues(struct arm_smmu_device *smmu)
 {
 	int ret;
 
@@ -1724,7 +1724,7 @@  static int arm_smmu_init_strtab(struct arm_smmu_device *smmu)
 	return 0;
 }
 
-static int arm_smmu_init_structures(struct arm_smmu_device *smmu)
+static int __init arm_smmu_init_structures(struct arm_smmu_device *smmu)
 {
 	int ret;
 
@@ -1746,7 +1746,8 @@  static int arm_smmu_write_reg_sync(struct arm_smmu_device *smmu, u32 val,
 }
 
 /* GBPA is "special" */
-static int arm_smmu_update_gbpa(struct arm_smmu_device *smmu, u32 set, u32 clr)
+static int __init arm_smmu_update_gbpa(struct arm_smmu_device *smmu,
+                                       u32 set, u32 clr)
 {
 	int ret;
 	u32 reg, __iomem *gbpa = smmu->base + ARM_SMMU_GBPA;
@@ -1842,7 +1843,7 @@  static void arm_smmu_setup_msis(struct arm_smmu_device *smmu)
 static inline void arm_smmu_setup_msis(struct arm_smmu_device *smmu) { }
 #endif /* CONFIG_MSI */
 
-static void arm_smmu_free_irqs(struct arm_smmu_device *smmu)
+static void __init arm_smmu_free_irqs(struct arm_smmu_device *smmu)
 {
 	int irq;
 
@@ -1926,7 +1927,7 @@  err_free_evtq_irq:
 	return ret;
 }
 
-static int arm_smmu_setup_irqs(struct arm_smmu_device *smmu)
+static int __init arm_smmu_setup_irqs(struct arm_smmu_device *smmu)
 {
 	int ret, irq;
 	u32 irqen_flags = IRQ_CTRL_EVTQ_IRQEN | IRQ_CTRL_GERROR_IRQEN;
@@ -1988,7 +1989,7 @@  static int arm_smmu_device_disable(struct arm_smmu_device *smmu)
 	return ret;
 }
 
-static int arm_smmu_device_reset(struct arm_smmu_device *smmu)
+static int __init arm_smmu_device_reset(struct arm_smmu_device *smmu)
 {
 	int ret;
 	u32 reg, enables;
@@ -2405,7 +2406,7 @@  static void arm_smmu_free_structures(struct arm_smmu_device *smmu)
 		xfree(smmu->strtab_cfg.l1_desc);
 }
 
-static int arm_smmu_device_probe(struct platform_device *pdev)
+static int __init arm_smmu_device_probe(struct platform_device *pdev)
 {
 	int irq, ret;
 	paddr_t ioaddr, iosize;