lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 14 Aug 2013 14:21:44 +0100
From:	Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@....com>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
CC:	Sudeep KarkadaNagesha <Sudeep.KarkadaNagesha@....com>,
	"linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>,
	"rob.herring@...xeda.com" <rob.herring@...xeda.com>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	Olof Johansson <olof@...om.net>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [GIT PULL] DT/core: cpu_ofnode updates for v3.12

On 14/08/13 12:37, Benjamin Herrenschmidt wrote:
> On Wed, 2013-08-14 at 11:01 +0100, Sudeep KarkadaNagesha wrote:
>> Yes this doesn't cover the historical "ibm,ppc-interrupt-server#s",
>> for
>> which we can have PPC specific wrapper above the generic one i.e. get
>> the cpu node and then parse for thread id under custom property.
> 
> A wrapper is wrong. I don't want to have to have all ppc callers to use
> a different function.
Ok.

On the side note the main intention of this patch series[1] is to avoid
calling of_get_cpu_node function once CPU devices are registered. It
initialises the of_node in all the cpu devices using this function when
registering the CPU device. It can be retrieved from cpu_dev->of_node.
So direct users of of_get_cpu_node can be reduced to avoid unnecessary
parsing of DT to find cpu node.

> 
> As I said, just make a generic one that returns a thread ID, ie, same
> signature as the powerpc one. Make it weak, we can override it in
> powerpc-land,
IMO, making generic definition which adhere to the ePAPR specification
as weak is not so clean.

> or we can move the ibm,ppc-interrupt-server#s handling
> into the generic one, it won't hurt, but leave the thread_id return
> there, it doesn't hurt it will come in handy in a few cases without
> causing code duplication.
> 

IMO moving of handling ibm,ppc-interrupt-server#s to generic code under
#ifdef CONFIG_PPC seems to be cleaner approach than weak definitation.

As per my understanding each thread is a different logical cpu.
Each logical cpu is mapped to unique physical id(either present in reg
field or legacy ibm,ppc-interrupt-server#s field). So given a logical
cpu id we can get the cpu node corresponding to it.
Looking @ smp_setup_cpu_maps in arch/powerpc/kernel/setup-common.c
and the comment in the same file: "This implementation only supports
power of 2 number of threads.." the thread id id is implicit in the
logical cpu id. Do we need to fetch that from DT ?

Regards,
Sudeep

[1] https://lkml.org/lkml/2013/7/22/219

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ