diff mbox series

[RFC,v3,1/9] ACPI: NUMA: export pxm_to_node

Message ID 20190919142228.5483-2-david@redhat.com (mailing list archive)
State RFC, archived
Headers show
Series [RFC,v3,1/9] ACPI: NUMA: export pxm_to_node | expand

Commit Message

David Hildenbrand Sept. 19, 2019, 2:22 p.m. UTC
Will be needed by virtio-mem to identify the node from a pxm.

Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
Signed-off-by: David Hildenbrand <david@redhat.com>
---
 drivers/acpi/numa.c | 1 +
 1 file changed, 1 insertion(+)

Comments

David Hildenbrand Sept. 23, 2019, 10:13 a.m. UTC | #1
On 19.09.19 16:22, David Hildenbrand wrote:
> Will be needed by virtio-mem to identify the node from a pxm.
> 
> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> Cc: Len Brown <lenb@kernel.org>
> Cc: linux-acpi@vger.kernel.org
> Signed-off-by: David Hildenbrand <david@redhat.com>
> ---
>  drivers/acpi/numa.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
> index eadbf90e65d1..d5847fa7ac69 100644
> --- a/drivers/acpi/numa.c
> +++ b/drivers/acpi/numa.c
> @@ -35,6 +35,7 @@ int pxm_to_node(int pxm)
>  		return NUMA_NO_NODE;
>  	return pxm_to_node_map[pxm];
>  }
> +EXPORT_SYMBOL(pxm_to_node);

FWIW, this is a fairly old patch I dragged along and I think I'll
convert this to EXPORT_SYMBOL_GPL now that I know better :)

>  
>  int node_to_pxm(int node)
>  {
>
Michal Hocko Sept. 23, 2019, 10:36 a.m. UTC | #2
On Mon 23-09-19 12:13:11, David Hildenbrand wrote:
> On 19.09.19 16:22, David Hildenbrand wrote:
> > Will be needed by virtio-mem to identify the node from a pxm.
> > 
> > Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
> > Cc: Len Brown <lenb@kernel.org>
> > Cc: linux-acpi@vger.kernel.org
> > Signed-off-by: David Hildenbrand <david@redhat.com>
> > ---
> >  drivers/acpi/numa.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
> > index eadbf90e65d1..d5847fa7ac69 100644
> > --- a/drivers/acpi/numa.c
> > +++ b/drivers/acpi/numa.c
> > @@ -35,6 +35,7 @@ int pxm_to_node(int pxm)
> >  		return NUMA_NO_NODE;
> >  	return pxm_to_node_map[pxm];
> >  }
> > +EXPORT_SYMBOL(pxm_to_node);
> 
> FWIW, this is a fairly old patch I dragged along and I think I'll
> convert this to EXPORT_SYMBOL_GPL now that I know better :)

All other exports in this file are EXPORT_SYMBOL. Why is this one
considered special to restrict the access?
David Hildenbrand Sept. 23, 2019, 10:39 a.m. UTC | #3
On 23.09.19 12:36, Michal Hocko wrote:
> On Mon 23-09-19 12:13:11, David Hildenbrand wrote:
>> On 19.09.19 16:22, David Hildenbrand wrote:
>>> Will be needed by virtio-mem to identify the node from a pxm.
>>>
>>> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
>>> Cc: Len Brown <lenb@kernel.org>
>>> Cc: linux-acpi@vger.kernel.org
>>> Signed-off-by: David Hildenbrand <david@redhat.com>
>>> ---
>>>  drivers/acpi/numa.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
>>> index eadbf90e65d1..d5847fa7ac69 100644
>>> --- a/drivers/acpi/numa.c
>>> +++ b/drivers/acpi/numa.c
>>> @@ -35,6 +35,7 @@ int pxm_to_node(int pxm)
>>>  		return NUMA_NO_NODE;
>>>  	return pxm_to_node_map[pxm];
>>>  }
>>> +EXPORT_SYMBOL(pxm_to_node);
>>
>> FWIW, this is a fairly old patch I dragged along and I think I'll
>> convert this to EXPORT_SYMBOL_GPL now that I know better :)
> 
> All other exports in this file are EXPORT_SYMBOL. Why is this one
> considered special to restrict the access?
> 

Uh, so I did actually use my brain two years ago back when I was
crafting this patch :)
diff mbox series

Patch

diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index eadbf90e65d1..d5847fa7ac69 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -35,6 +35,7 @@  int pxm_to_node(int pxm)
 		return NUMA_NO_NODE;
 	return pxm_to_node_map[pxm];
 }
+EXPORT_SYMBOL(pxm_to_node);
 
 int node_to_pxm(int node)
 {