[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180117170724.GA5314@us.ibm.com>
Date: Wed, 17 Jan 2018 09:07:24 -0800
From: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
To: Frederic Barrat <fbarrat@...ux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@...erman.id.au>, linuxppc-dev@...abs.org,
Christophe Lombard <clombard@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org,
Philippe Bergheaud <philippe.bergheaud@...ibm.com>
Subject: Re: [PATCH 1/2] powerpc: export thread-tidr interfaces
Frederic Barrat [fbarrat@...ux.vnet.ibm.com] wrote:
> Hi,
>
>
> > diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
> > index 2010e4c..f20c1ad 100644
> > --- a/arch/powerpc/kernel/process.c
> > +++ b/arch/powerpc/kernel/process.c
> > @@ -1560,6 +1560,7 @@ void clear_thread_tidr(struct task_struct *t)
> > free_thread_tidr(t->thread.tidr);
> > t->thread.tidr = 0;
> > }
> > +EXPORT_SYMBOL_GPL(clear_thread_tidr);
>
> Isn't it dangerous to export clear_thread_tidr()? Other modules may also
> have assigned the TIDR by calling set_thread_tidr(), so clearing it could
> potentially break those other modules. My understanding is that once the
> TIDR is assigned, there's no safe way to reclaim it other than the thread
> exiting. Or we would need some kind of reference counter.
Yes the FTW driver avoids calling clear_thread_tidr() for the same reasons.
I don't have a strong case for exporting clear_thread_tidr(). Here is the
updated patch, exporting just the set_thread_tidr().
Thanks,
Sukadev
---
>From 204ee3c918f8dad46c1e40d2d3730b07c10a87a3 Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Date: Mon, 15 Jan 2018 13:43:18 -0600
Subject: [PATCH 1/2] powerpc: export set_thread_tidr()
Export set_thread_tidr() so it can be used by external modules.
Signed-off-by: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
---
Changelog [Frederic Barrat] Don't export clear_thread_tidr()
---
arch/powerpc/kernel/process.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 2010e4c..20df2cb2 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -1592,6 +1592,7 @@ int set_thread_tidr(struct task_struct *t)
return 0;
}
+EXPORT_SYMBOL_GPL(set_thread_tidr);
#endif /* CONFIG_PPC64 */
--
1.8.3.1
Powered by blists - more mailing lists