[PATCH 3/3] powerpc/pseries/mobility: rebuild cacheinfo hierarchy post-migration

2019-06-11 Thread Nathan Lynch
: 410bccf97881 ("powerpc/pseries: Partition migration in the kernel") Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/mobility.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobili

[PATCH 1/3] powerpc/cacheinfo: add cacheinfo_teardown, cacheinfo_rebuild

2019-06-11 Thread Nathan Lynch
eries: Partition migration in the kernel") Signed-off-by: Nathan Lynch --- arch/powerpc/kernel/cacheinfo.c | 21 + arch/powerpc/kernel/cacheinfo.h | 4 2 files changed, 25 insertions(+) diff --git a/arch/powerpc/kernel/cacheinfo.c b/arch/powerpc/kernel/cachein

Re: [PATCH] powerpc/pseries: fix oops in hotplug memory notifier

2019-06-07 Thread Nathan Lynch
Tyrel Datwyler writes: > On 06/06/2019 10:04 PM, Nathan Lynch wrote: >> During post-migration device tree updates, we can oops in >> pseries_update_drconf_memory if the source device tree has an >> ibm,dynamic-memory-v2 property and the destination has a >> ibm,d

Re: [PATCH] powerpc/pseries: fix oops in hotplug memory notifier

2019-06-07 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch writes: > >> During post-migration device tree updates, we can oops in >> pseries_update_drconf_memory if the source device tree has an >> ibm,dynamic-memory-v2 property and the destination has a >> ibm,dynamic_memory (v1) pr

[PATCH] powerpc/pseries: fix oops in hotplug memory notifier

2019-06-06 Thread Nathan Lynch
t's really an add in this scenario. So make sure the old property object is there before dereferencing it. Signed-off-by: Nathan Lynch --- arch/powerpc/platforms/pseries/hotplug-memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/ar

Re: [PATCH 1/3] powerpc/pseries: Simplify cpu readd to use drc_index

2019-06-04 Thread Nathan Lynch
Tyrel Datwyler writes: > On 05/20/2019 08:01 AM, Nathan Lynch wrote: >> Kernel implementation details aside, how do you change the cpu-node >> relationship at runtime without breaking NUMA-aware applications? Is >> this not a fundamental issue to address be

[PATCH] powerpc/pseries: avoid blocking in irq when queuing hotplug events

2019-05-28 Thread Nathan Lynch
GFP_ATOMIC for both allocations. Ultimately it probably would be better to avoid or reduce allocations in this path if possible. Signed-off-by: Nathan Lynch --- Found by inspection, built but not runtime-tested. arch/powerpc/platforms/pseries/dlpar.c | 8 1 file changed, 4 insertions(+), 4

Re: [PATCH] dlpar: Fix a missing-check bug in dlpar_parse_cc_property()

2019-05-28 Thread Nathan Lynch
; cc_workarea *ccwa) > > name = (char *)ccwa + be32_to_cpu(ccwa->name_offset); > prop->name = kstrdup(name, GFP_KERNEL); > + if (!prop->name) { > + dlpar_free_cc_property(prop); > + return NULL; > + } Acked-by: Nathan Lynch

Re: [PATCH 1/3] powerpc/pseries: Simplify cpu readd to use drc_index

2019-05-20 Thread Nathan Lynch
Tyrel Datwyler writes: > On 05/16/2019 12:17 PM, Nathan Lynch wrote: >> Tyrel Datwyler writes: >>> The current dlpar_cpu_readd() takes in a cpu_id and uses that to look up >>> the cpus device_node so that we can get at the ibm,my-drc-index >>>

Re: [PATCH 1/3] powerpc/pseries: Simplify cpu readd to use drc_index

2019-05-16 Thread Nathan Lynch
Tyrel Datwyler writes: > The current dlpar_cpu_readd() takes in a cpu_id and uses that to look up > the cpus device_node so that we can get at the ibm,my-drc-index > property. The only user of cpu readd is an OF notifier call back. This > call back already has a reference to the device_node and

Re: [PATCH 2/8] powerpc/pseries: Do not save the previous DTL mask value

2019-05-13 Thread Nathan Lynch
ed to save and restore the previous mask > value. > > We don't need to save and restore the earlier mask value if > CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not enabled. So, remove the field > from the structure as well. Makes sense. Acked-by: Nathan Lynch

Re: [PATCH 1/8] powerpc/pseries: Use macros for referring to the DTL enable mask

2019-05-13 Thread Nathan Lynch
"Naveen N. Rao" writes: > Introduce macros to encode the DTL enable mask fields and use those > instead of hardcoding numbers. This is a good cleanup on its own. Acked-by: Nathan Lynch

Re: [PATCH]powerpc/mobility: Serialize PRRN and LPM in device tree update

2019-05-06 Thread Nathan Lynch
Hi Juliet, Juliet Kim writes: > Fix extending start/stop topology update scope during LPM > Commit 65b9fdadfc4d ("powerpc/pseries/mobility: Extend start/stop > topology update scope") made the change to the duration that > topology updates are suppressed during LPM to allow the complete >

Re: [PATCH v4] powerpc/pseries: Remove limit in wait for dying CPU

2019-05-01 Thread Nathan Lynch
Hi Thiago, Thiago Jung Bauermann writes: > Nathan Lynch writes: >> Thiago Jung Bauermann writes: >>> + while (true) { >>> cpu_status = smp_query_cpu_stopped(pcpu); >>> if (cpu_status == QCSS_STOPPED || &g

Re: [PATCH v4] powerpc/pseries: Remove limit in wait for dying CPU

2019-04-30 Thread Nathan Lynch
Thiago Jung Bauermann writes: > This can be a problem because if the busy loop finishes too early, then the > kernel may offline another CPU before the previous one finished dying, > which would lead to two concurrent calls to rtas-stop-self, which is > prohibited by the PAPR. > > Since the

Re: [PATCH 0/2] disable NUMA affinity reassignments at runtime

2019-04-18 Thread Nathan Lynch
Michal Suchánek writes: > On Thu, 18 Apr 2019 13:56:56 -0500 > Nathan Lynch wrote: > > Hello, > >> Changing cpu <-> node relationships at runtime, as the pseries >> platform code attempts to do for LPM, PRRN, and VPHN is essentially >> unsuppo

[PATCH 2/2] powerpc/numa: document topology_updates_enabled, disable by default

2019-04-18 Thread Nathan Lynch
-by: Nathan Lynch --- arch/powerpc/mm/numa.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c index 48c9a97eb2c3..71af382ce1d5 100644 --- a/arch/powerpc/mm/numa.c +++ b/arch/powerpc/mm/numa.c @@ -908,16 +908,22 @@ static int

[PATCH 0/2] disable NUMA affinity reassignments at runtime

2019-04-18 Thread Nathan Lynch
nments are disabled. [1] E.g. see the discussion here: https://lore.kernel.org/lkml/20180831115350.gc8...@linux.vnet.ibm.com/T/#u Nathan Lynch (2): powerpc/numa: improve control of topology updates powerpc/numa: document topology_updates_enabled, disable by default arch/powerpc/mm/numa.

[PATCH 1/2] powerpc/numa: improve control of topology updates

2019-04-18 Thread Nathan Lynch
s incoherent. Check the topology_updates_enabled flag in start/stop_topology_update() so that callers of those APIs need not be aware of whether reassignments are enabled. This allows the administrative decision on reassignments to remain in force across migrations and suspensions. Signed-off-by: Nathan Lync

Re: [PATCH v3] arm64, ia64, ppc, s390, sh, tile, um, x86, mm: Remove default gate area

2014-07-18 Thread Nathan Lynch
. Akpm, can you take this? FWIW: Acked-by: Nathan Lynch nathan_ly...@mentor.com This patch allows me to avoid adding a bunch of empty hooks to arch/arm when adding VDSO support: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-June/268045.html

Re: [PATCH] powerpc/mm: add devmem_is_allowed() for STRICT_DEVMEM checking

2011-06-14 Thread Nathan Lynch
Hi Steve, On Tue, 2011-06-14 at 12:58 -0400, Steve Best wrote: diff --git a/arch/powerpc/Kconfig.debug b/arch/powerpc/Kconfig.debug index e72dcf6..e1aab6b 100644 --- a/arch/powerpc/Kconfig.debug +++ b/arch/powerpc/Kconfig.debug @@ -283,4 +283,15 @@ config PPC_EARLY_DEBUG_CPM_ADDR

Re: High load average (~2.0) on an idle PowerPC 64 machine

2011-03-25 Thread Nathan Lynch
On Fri, 2011-03-25 at 09:23 +, David Laight wrote: We also have the related fubar (on x64/amd64) of the kernel generating stack traces for processes that are sleeping uninterruptibly for long periods. Turn off CONFIG_DETECT_HUNG_TASK? ___

[PATCH] use correct ccr bit for syscall error status

2010-03-12 Thread Nathan Lynch
The powerpc implementations of syscall_get_error and syscall_set_return_value should use CCR0:S0 (0x1000) for testing and setting syscall error status. Fortunately these APIs don't seem to be used at the moment. Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/include/asm

Re: [PATCH 1/6 v5] Kernel DLPAR Infrastructure

2009-10-28 Thread Nathan Lynch
On Thu, 2009-10-29 at 14:08 +1100, Benjamin Herrenschmidt wrote: On Wed, 2009-10-28 at 15:53 -0500, Nathan Fontenot wrote: + struct device_node *dn; + struct device_node *first_dn = NULL; + struct device_node *last_dn = NULL; + struct property *property; + struct property

Re: [PATCH] Re:[BUILD FAILURE 04/04] Next June 04:PPC64 randconfig [drivers/net/ucc_geth.o]

2009-06-10 Thread Nathan Lynch
Subrata Modak subr...@linux.vnet.ibm.com writes: On Thu, 2009-06-11 at 11:05 +1000, Stephen Rothwell wrote: Hi Subrata, On Wed, 10 Jun 2009 23:13:23 +0530 Subrata Modak subr...@linux.vnet.ibm.com wrote: /* Find the TBI PHY. If it's not there, we don't support SGMII */ - ph =

Re: [PATCH 5/5] proc: export more page flags in /proc/kpageflags

2009-04-28 Thread Nathan Lynch
Wu Fengguang fengguang...@intel.com writes: On Wed, Apr 29, 2009 at 05:32:44AM +0800, Andrew Morton wrote: On Tue, 28 Apr 2009 09:09:12 +0800 Wu Fengguang fengguang...@intel.com wrote: +/* + * Kernel flags are exported faithfully to Linus and his fellow hackers. + * Otherwise some

Re: [PATCH] Quieten arch/powerpc in a allmodconfig build.

2009-04-09 Thread Nathan Lynch
Tony Breeds t...@bakeyournoodle.com wrote: On Wed, Apr 08, 2009 at 01:47:36PM -0500, Nathan Lynch wrote: I think I had some reason for doing it this way, but I'm drawing a blank right now. In the meantime, can someone post the warnings that gcc emits for cacheinfo.c, as well

Re: [PATCH] Quieten arch/powerpc in a allmodconfig build.

2009-04-08 Thread Nathan Lynch
Michael Ellerman mich...@ellerman.id.au wrote: On Wed, 2009-04-08 at 15:51 +1000, Tony Breeds wrote: On Wed, Apr 08, 2009 at 03:08:55PM +1000, Michael Ellerman wrote: The getter routines in here could really multiplex their return values with a negative error code, which I generally

Re: [PATCH 1/3] powerpc: bare minimum checkpoint/restart implementation

2009-03-16 Thread Nathan Lynch
Oren Laadan or...@cs.columbia.edu wrote: Nathan Lynch wrote: Nathan Lynch n...@pobox.com wrote: Oren Laadan wrote: Nathan Lynch wrote: What doesn't work: * restarting a 32-bit task from a 64-bit task and vice versa Is there a test to bail if we attempt to checkpoint such tasks

Re: [PATCH 1/3] powerpc: bare minimum checkpoint/restart implementation

2009-02-24 Thread Nathan Lynch
On Tue, 24 Feb 2009 13:58:26 -0600 Serge E. Hallyn se...@us.ibm.com wrote: Quoting Nathan Lynch (n...@pobox.com): Nathan Lynch n...@pobox.com wrote: Oren Laadan wrote: Nathan Lynch wrote: What doesn't work: * restarting a 32-bit task from a 64-bit task and vice

[RFC/PATCH] powerpc: provide APIs for validating and updating DABR

2009-02-17 Thread Nathan Lynch
. Split this into validate (debugreg_valid) and update (debugreg_update) functions, and make them available for use outside of the ptrace code. Also ptrace_set_debugreg has extern linkage, but no users outside of ptrace.c. Make it static. Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc

[PATCH 1/3 v2] powerpc: heckpoint/restart implementation

2009-02-17 Thread Nathan Lynch
On Tue, 17 Feb 2009 01:03:55 -0600 Nathan Lynch n...@pobox.com wrote: Nathan Lynch n...@pobox.com wrote: Oren Laadan wrote: Nathan Lynch wrote: What doesn't work: * restarting a 32-bit task from a 64-bit task and vice versa Is there a test to bail if we attempt

Re: [PATCH 1/3] powerpc: bare minimum checkpoint/restart implementation

2009-02-16 Thread Nathan Lynch
Nathan Lynch n...@pobox.com wrote: Oren Laadan wrote: Nathan Lynch wrote: What doesn't work: * restarting a 32-bit task from a 64-bit task and vice versa Is there a test to bail if we attempt to checkpoint such tasks ? No, but I'll add one if it looks too hard to fix

Re: [PATCH 1/3] powerpc: bare minimum checkpoint/restart implementation

2009-01-30 Thread Nathan Lynch
Oren Laadan wrote: Nathan Lynch wrote: Oren Laadan wrote: Nathan Lynch wrote: + pr_debug(%s: unexpected thread_hdr contents: 0x%lx\n, + __func__, (unsigned long)thread_hdr-unimplemented); Given the macro for 'pr_fmt' in include/linux/checkpoint.h, the use

Re: [PATCH 1/3] powerpc: bare minimum checkpoint/restart implementation

2009-01-29 Thread Nathan Lynch
Hey Oren, thanks for taking a look. Oren Laadan wrote: Nathan Lynch wrote: What doesn't work: * restarting a 32-bit task from a 64-bit task and vice versa Is there a test to bail if we attempt to checkpoint such tasks ? No, but I'll add one if it looks too hard to fix for the next

Re: [PATCH 1/1] powerpc: Fix partition migration hang under load

2009-01-29 Thread Nathan Lynch
Brian King wrote: While testing partition migration with heavy CPU load using shared processors, it was observed that sometimes the migration would never complete and would appear to hang. Currently, the migration code assumes that if H_SUCCESS is returned from the H_JOIN then the migration

[RFC/PATCH 0/3] checkpoint/restart for powerpc

2009-01-28 Thread Nathan Lynch
This series is a first attempt at enabling checkpoint/restart for powerpc. It is based on Oren Laadan's v13 checkpoint/restart series: http://lkml.org/lkml/2009/1/27/227 Nathan Lynch (3): powerpc: bare minimum checkpoint/restart implementation powerpc: wire up checkpoint and restart

[PATCH 2/3] powerpc: wire up checkpoint and restart syscalls

2009-01-28 Thread Nathan Lynch
Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/include/asm/systbl.h |2 ++ arch/powerpc/include/asm/unistd.h |4 +++- 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h index 803def2..cdb60b4

[PATCH 3/3] allow checkpoint/restart on powerpc

2009-01-28 Thread Nathan Lynch
Signed-off-by: Nathan Lynch n...@pobox.com --- checkpoint/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/checkpoint/Kconfig b/checkpoint/Kconfig index ffaa635..00036aa 100644 --- a/checkpoint/Kconfig +++ b/checkpoint/Kconfig @@ -1,7 +1,7 @@ config

[PATCH 1/3] powerpc: bare minimum checkpoint/restart implementation

2009-01-28 Thread Nathan Lynch
and external checkpoint of simple (single thread, one open file) 32- and 64-bit processes on a ppc64 kernel What doesn't work: * restarting a 32-bit task from a 64-bit task and vice versa Untested: * ppc32 (but it builds) Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/include/asm

[PATCH] cacheinfo: rename cache_dir per-cpu variable

2009-01-09 Thread Nathan Lynch
The per_cpu__ prefix on DECLARE_PER_CPU'd variables is going away; rename cache_dir to cache_dir_pcpu. Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/kernel/cacheinfo.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) Not sure which route this should go, I assume

Re: [PATCH/RFC] sysfs cache code rewrite

2009-01-07 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: I don't know quite the detail of the new cpumask stuff ... It could be as simple as passing a pointer instead of the value in the cpumask_scnprintf call though... Actually, I'll do more tests and if that ends up being the only needed change, I'll push your

Re: [PATCH/RFC] sysfs cache code rewrite

2009-01-07 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: On Wed, 2009-01-07 at 03:46 -0600, Nathan Lynch wrote: Benjamin Herrenschmidt wrote: I don't know quite the detail of the new cpumask stuff ... It could be as simple as passing a pointer instead of the value in the cpumask_scnprintf call though

Re: [PATCH/RFC] sysfs cache code rewrite

2009-01-06 Thread Nathan Lynch
is better, and the functions are much shorter and less complex. Nathan Lynch wrote: The current code for providing processor cache information in sysfs has the following deficiencies: - several complex functions that are hard to understand - implicit recursion (cache_desc_release - kobject_put

Re: [PATCH] powerpc/iseries: Kexec is known not to work on iseries

2008-12-23 Thread Nathan Lynch
Hi, Michael Ellerman wrote: The non-zero return from the prepare callback is returned by sys_kexec_load() to userspace, indicating that kexec is not supported on the machine. ... @@ -638,6 +639,13 @@ static int __init iseries_probe(void) return 1; } +#ifdef CONFIG_KEXEC +static

[PATCH/RFC] sysfs cache code rewrite

2008-12-23 Thread Nathan Lynch
it would have roughly doubled the size of sysfs.c, which is already kind of messy. Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/kernel/Makefile|2 +- arch/powerpc/kernel/cacheinfo.c | 837 +++ arch/powerpc/kernel/cacheinfo.h |8 + arch

[PATCH] ehea: use get_zeroed_page for alignment-sensitive allocation

2008-12-22 Thread Nathan Lynch
and that the first error message complains about its alignment). This allows the system to boot. Signed-off-by: Nathan Lynch n...@pobox.com --- drivers/net/ehea/ehea_qmr.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) By the way, there are several other kzalloc(PAGE_SIZE) call sites

Re: [PATCH 1/3] add of_find_next_cache_node()

2008-12-15 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: On Wed, 2008-12-10 at 18:46 -0600, Nathan Lynch wrote: + /* OF on pmac has nodes instead of properties named l2-cache +* beneath CPU nodes. +*/ + if (!strcmp(np-type, cpu)) + for_each_child_of_node(np, child

Re: [PATCH 1/3] add of_find_next_cache_node()

2008-12-15 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: Don't 970MP have a shared L2 tho ? The 970MP UM describes 1MB L2 per core, and the device tree on the quad G5 reflects that... might be interesting to know what it looks like on IBM JS21 for comparison's sake, but I think we're okay.

Re: [PATCH] [RFC] Pass a valid token to rats_call() in phyp-dump code.

2008-12-15 Thread Nathan Lynch
Tony Breeds wrote: ibm_configure_kernel_dump, is passed as the token to rtas_call() but I cannot see where it is initialised. Set it to something sane? Yes, please. Acked-by: Nathan Lynch n...@pobox.com Would be good to know whether the dump area registration and dump retrieval are working

Re: [PATCH 1/3] add of_find_next_cache_node()

2008-12-14 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: On Wed, 2008-12-10 at 18:46 -0600, Nathan Lynch wrote: + /* OF on pmac has nodes instead of properties named l2-cache +* beneath CPU nodes. +*/ + if (!strcmp(np-type, cpu)) + for_each_child_of_node(np, child

[PATCH] check for GIQ indicator before calling set-indicator

2008-12-11 Thread Nathan Lynch
information on failure. Signed-off-by: Nathan Lynch n...@pobox.com --- arch/powerpc/include/asm/rtas.h |1 + arch/powerpc/kernel/rtas.c| 26 ++ arch/powerpc/platforms/pseries/xics.c | 15 --- 3 files changed, 39 insertions(+), 3 deletions

[PATCH] move smp_hw_index to 32-bit code

2008-12-10 Thread Nathan Lynch
smp_hw_index isn't used on 64-bit, so move it from smp.c to setup_32.c. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/setup_32.c |2 ++ arch/powerpc/kernel/smp.c |1 - 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/setup_32

[PATCH] powermac: use set_hard_smp_processor_id() instead of smp_hw_index

2008-12-10 Thread Nathan Lynch
The hard_smp_processor_id functions are the appropriate interfaces for managing physical CPU ids. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/platforms/powermac/smp.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/platforms/powermac

[PATCH 3/3] convert sysfs cache code to of_find_next_cache_node()

2008-12-10 Thread Nathan Lynch
Using the common code means that more complete cache information will provided in sysfs on platforms that don't use the l2-cache property convention. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/sysfs.c |7 +-- 1 files changed, 1 insertions(+), 6 deletions

[PATCH 1/3] add of_find_next_cache_node()

2008-12-10 Thread Nathan Lynch
We have more than one piece of code that looks up cache nodes manually using the l2-cache property. Add a common helper routine which does this and handles ePAPR's next-level-cache property as well as powermac. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/include/asm/prom.h

[PATCH 2/3] convert cpu_to_l2cache() to of_find_next_cache_node()

2008-12-10 Thread Nathan Lynch
The smp code uses cache information to populate cpu_core_map; change it to use common code for cache lookup. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/smp.c | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/smp.c b

Re: [PATCH 2/3] convert cpu_to_l2cache() to of_find_next_cache_node()

2008-12-10 Thread Nathan Lynch
Stephen Rothwell wrote: On Wed, 10 Dec 2008 18:46:05 -0600 Nathan Lynch [EMAIL PROTECTED] wrote: @@ -418,13 +416,7 @@ static struct device_node *cpu_to_l2cache(int cpu) if (np == NULL) return NULL; - php = of_get_property(np, l2-cache, NULL); - if (php == NULL

[PATCH 2/3 v2] convert cpu_to_l2cache() to of_find_next_cache_node()

2008-12-10 Thread Nathan Lynch
The smp code uses cache information to populate cpu_core_map; change it to use common code for cache lookup. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/smp.c | 11 --- 1 files changed, 4 insertions(+), 7 deletions(-) v2: Fix refcount imbalance, thanks to sfr

Re: [PATCH] powerpc/4xx: Add L2 cache node to AMCC Canyonlands dts file

2008-12-05 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: On Fri, 2008-12-05 at 06:08 -0500, Josh Boyer wrote: Shouldn't there also be a next-level-cache property added to the cpu node that references this? It would be nice indeed, it would allow the kernel to expose the cache info in sysfs Currently the kernel

Re: [PATCH] powerpc: Remove modpost warning with start_secondary

2008-12-03 Thread Nathan Lynch
Kumar Gala wrote: On Dec 2, 2008, at 11:31 PM, Nathan Lynch wrote: Kumar Gala wrote: WARNING: vmlinux.o(.text+0x2aa): Section mismatch in reference from the variable __secondary_start to the function .devinit.text:start_secondary() The function __secondary_start() references

Re: __cpu_up vs. start_secondary race?

2008-12-02 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: On Mon, 2008-12-01 at 15:30 -0600, Nathan Lynch wrote: cpu_callin_map is used during secondary CPU bootstrap to notify the waiting CPU that the new CPU is coming up. __cpu_up clears cpu_callin_map[cpu] and then polls the same location, waiting

Re: __cpu_up vs. start_secondary race?

2008-12-02 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: On Tue, 2008-12-02 at 20:16 -0600, Nathan Lynch wrote: Apart from barriers (or lack thereof), the fact that __cpu_up gives up after a more-or-less arbitrary period seems... well, arbitrary. If we get to Processor X is stuck then something is seriously wrong

Re: [PATCH] powerpc: Remove modpost warning with start_secondary

2008-12-02 Thread Nathan Lynch
Kumar Gala wrote: WARNING: vmlinux.o(.text+0x2aa): Section mismatch in reference from the variable __secondary_start to the function .devinit.text:start_secondary() The function __secondary_start() references the function __devinit start_secondary(). start_secondary gets called by

__cpu_up vs. start_secondary race?

2008-12-01 Thread Nathan Lynch
Hi, I think there may be a plausible issue here. If not, maybe I'll get an education :) cpu_callin_map is used during secondary CPU bootstrap to notify the waiting CPU that the new CPU is coming up. __cpu_up clears cpu_callin_map[cpu] and then polls the same location, waiting for

Re: [PATCH] powerpc/pseries: Fix cpu hotplug

2008-11-27 Thread Nathan Lynch
Hi, I have some questions about this patch. Sebastien Dugue wrote: Currently, pseries_cpu_die() calls msleep() while polling RTAS for the status of the dying cpu. However if the cpu that is going down also happens to be the one doing the tick then we're hosed as the tick_do_timer_cpu

Re: [PATCH] hide attr_smt_snooze_delay reference with CONFIG_PPC64

2008-11-24 Thread Nathan Lynch
Milton Miller wrote: attr_smt_snooze_delay is defined for CONFIG_PPC64, so protect the attribute removal with the same condition. /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c: In function ‘unregister_cpu_online’: /data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722:

Re: Nodes with no memory

2008-11-21 Thread Nathan Lynch
Dave Hansen wrote: I was handed off a bug report about a blade not booting with a, um newer kernel. If you're unable to provide basic information such as the kernel version then perhaps this isn't the best forum for discussing this. :) I'm thinking that we need to at least fix

[PATCH] remove redundant sysfs_remove_file calls for cache info

2008-08-12 Thread Nathan Lynch
so. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/sysfs.c | 11 ++- 1 files changed, 2 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index 56d172d..12058db 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch

Re: Strange tg3 regression with UMP fw. link reporting

2008-08-08 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: On Fri, 2008-08-08 at 10:58 +0200, Segher Boessenkool wrote: I don't know yet for sure what happens, but a quick look at the commit seems to show that the driver synchronously spin-waits for up to 2.5ms That's what the comment says, but the code says 2.5

[PATCH 1/6] kill useless SMT code in prom_hold_cpus

2008-07-26 Thread Nathan Lynch
I think this code that counts SMT threads and compares against NR_CPUS is an artifact of pre-powerpc-merge ppc64. We care about starting only primary threads in the OF client code. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/prom_init.c | 39

[PATCH 0/6] powerpc topology updates

2008-07-26 Thread Nathan Lynch
/core_id:0 cpu0/topology/thread_siblings:0003 cpu0/topology/thread_siblings_list:0-1 cpu0/topology/core_siblings:000f cpu0/topology/core_siblings_list:0-3 Nathan Lynch (6): kill useless SMT code in prom_hold_cpus register_cpu_online should be __cpuinit Update cpu_sibling_maps dynamically

[PATCH 2/6] register_cpu_online should be __cpuinit

2008-07-26 Thread Nathan Lynch
It is called only in cpu online paths. (caught by CONFIG_DEBUG_SECTION_MISMATCH=y) Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/sysfs.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c

[PATCH 4/6] make core sibling information available to userspace

2008-07-26 Thread Nathan Lynch
Implement the notion of core siblings for powerpc. This makes /sys/devices/system/cpu/cpu*/topology/core_siblings present sensible values, indicating online CPUs which share an L2 cache. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/smp.c | 71

[PATCH 3/6] Update cpu_sibling_maps dynamically

2008-07-26 Thread Nathan Lynch
that of x86, and is arguably more useful. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/setup-common.c | 24 arch/powerpc/kernel/setup_64.c |3 --- arch/powerpc/kernel/smp.c | 32 +--- 3 files

[PATCH 6/6] show processor cache information in sysfs

2008-07-26 Thread Nathan Lynch
those attributes for which it is able to determine values; attributes for values which cannot be determined are not created at all. [1] arch/x86/kernel/cpu/intel_cacheinfo.c Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/sysfs.c | 308

[PATCH 5/6] make core id information available to userspace

2008-07-26 Thread Nathan Lynch
Existing Open Firmware practice is to report each processor core as a separate node in the device tree. Report the value of the reg OF property corresponding to a logical CPU's device node as the core_id attribute in /sys/devices/system/cpu/cpu*/topology/core_id. Signed-off-by: Nathan Lynch

Re: can't boot mpc5200, powerpc: Enable AT_BASE_PLATFORM aux vector

2008-07-25 Thread Nathan Lynch
Jon Smirl wrote: I've lost my ability to boot on the mpc5200. Reverting this patch fixes it. How does it fail? @@ -1652,6 +1655,14 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) } else *t = *s;

Re: can't boot mpc5200, powerpc: Enable AT_BASE_PLATFORM aux vector

2008-07-25 Thread Nathan Lynch
Commit 9115d13453dee22473a1e8cacc90a8d64a9c4bc9 (powerpc: Enable AT_BASE_PLATFORM aux vector) broke boot on 32-bit powerpc systems; we have to use PTRRELOC to initialize powerpc_base_platform this early in boot. Bug reported by Jon Smirl. Signed-off-by: Nathan Lynch [EMAIL PROTECTED

Re: can't boot mpc5200, powerpc: Enable AT_BASE_PLATFORM aux vector

2008-07-25 Thread Nathan Lynch
This works too. Thanks Jon, sorry about that. ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev

[PATCH] Fix vio build warnings

2008-07-25 Thread Nathan Lynch
arch/powerpc/kernel/vio.c:1034: warning: function declaration isn’t a prototype arch/powerpc/kernel/vio.c:1035: warning: function declaration isn’t a prototype Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/vio.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions

lockdep badness

2008-07-24 Thread Nathan Lynch
I'm seeing warnings from the lockdep code itself in recent kernels on a Power6 blade (v2.6.26 and benh's -next branch). Something to do with powerpc's lazy interrupt-disabling, perhaps? A couple of stack traces below, the first is from benh's tree, the second is from 2.6.26. The lockdep

Re: lockdep badness

2008-07-24 Thread Nathan Lynch
Nathan Lynch wrote: A couple of stack traces below, the first is from benh's tree, the second is from 2.6.26. The lockdep self-tests all pass at boot. Sorry, should have pointed out the code that is warning more specifically. RTAS daemon started RTAS: event: 295, Type: Dump Notification

Re: lockdep badness

2008-07-24 Thread Nathan Lynch
Benjamin Herrenschmidt wrote: On Thu, 2008-07-24 at 14:23 -0500, Nathan Lynch wrote: I'm seeing warnings from the lockdep code itself in recent kernels on a Power6 blade (v2.6.26 and benh's -next branch). Something to do with powerpc's lazy interrupt-disabling, perhaps? A couple

[PATCH] Update cpu_sibling_maps dynamically

2008-07-24 Thread Nathan Lynch
at boot, update the maps at cpu online/offline time. Note: while this is a bug fix, it is also a behavior change -- the thread_siblings attribute now reflects only online siblings, whereas it would display offline siblings before. The new behavior matches that of x86. Signed-off-by: Nathan Lynch

[PATCH v4] elf loader support for auxvec base platform string

2008-07-21 Thread Nathan Lynch
that value to the user stack in the same manner as ELF_PLATFORM. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- Andrew Morton wrote: OK. But it conflicts directly with the already-queued execve-filename-document-and-export-via-auxiliary-vector.patch (which various potential reviewers

Re: [PATCH] Don't panic when EEH_MAX_FAILS is exceeded

2008-07-20 Thread Nathan Lynch
Sean MacLennan wrote: On Sun, 20 Jul 2008 11:28:36 -0700 Mike Mason [EMAIL PROTECTED] wrote: This patch changes the EEH_MAX_FAILS action from panic to printing an error message. Panicking under under this condition is too harsh. Although performance will be affected and the device may

Re: [PATCH] Don't panic when EEH_MAX_FAILS is exceeded

2008-07-20 Thread Nathan Lynch
Mike Mason wrote: This patch changes the EEH_MAX_FAILS action from panic to printing an error message. Panicking under under this condition is too harsh. Although performance will be affected and the device may not recover, the system is still running, which at the very least, should allow

Re: [PATCH v3] elf loader support for auxvec base platform string

2008-07-18 Thread Nathan Lynch
John Reiser wrote: Andrew Morton wrote: On Thu, 17 Jul 2008 17:19:32 -0500 Nathan Lynch [EMAIL PROTECTED] wrote: [snip] A new aux vector entry, AT_BASE_PLATFORM, will denote the actual hardware. [snip] OK. But it conflicts directly with the already-queued execve-filename

Re: [PATCH] elf loader support for auxvec base platform string

2008-07-17 Thread Nathan Lynch
Andrew Morton wrote: On Tue, 2008-07-15 at 18:58 -0500, Nathan Lynch wrote: diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index d48ff5f..834c2c4 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -131,6 +131,10 @@ static int padzero(unsigned long elf_bss) #define

Re: [PATCH] elf loader support for auxvec base platform string

2008-07-17 Thread Nathan Lynch
Linus Torvalds wrote: On Thu, 17 Jul 2008, Benjamin Herrenschmidt wrote: Should I seek somebody's ack before merging a patch like the one below ? I'm a bit reluctant to merge via the powerpc.git tree some changes to generic files without at least an ack from somebody else :-)

[PATCH v3] elf loader support for auxvec base platform string

2008-07-17 Thread Nathan Lynch
that value to the user stack in the same manner as ELF_PLATFORM. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- Added comment explaining ELF_BASE_PLATFORM. fs/binfmt_elf.c| 28 include/linux/auxvec.h |5 - 2 files changed, 32 insertions(+), 1

Re: [PATCH] powerpc: support for latencytop

2008-07-16 Thread Nathan Lynch
Arnd Bergmann wrote: Implement save_stack_trace_tsk on powerpc, so that we can run with latencytop. So I tried latencytop with linux-next and got the following oops, but I didn't really look into it yet. Unable to handle kernel paging request for data at address 0x0008 Faulting instruction

Re: [PATCH] powerpc: fix support for latencytop

2008-07-16 Thread Nathan Lynch
Arnd Bergmann wrote: We need to pass the kernel stack pointer instead of the user space stack pointer in save_stack_trace_tsk(). Thanks, this fixes it, and latencytop even seems to work. :) ___ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org

[PATCH] elf loader support for auxvec base platform string

2008-07-15 Thread Nathan Lynch
that value to the user stack in the same manner as ELF_PLATFORM. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- fs/binfmt_elf.c| 23 +++ include/linux/auxvec.h |5 - 2 files changed, 27 insertions(+), 1 deletions(-) diff --git a/fs/binfmt_elf.c b/fs

[PATCH] enable AT_BASE_PLATFORM aux vector for powerpc

2008-07-15 Thread Nathan Lynch
Stash the first platform string matched by identify_cpu() in powerpc_base_platform, and supply that to the ELF loader for the value of AT_BASE_PLATFORM. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/cputable.c | 11 +++ include/asm-powerpc/cputable.h |2

AT_BASE_PLATFORM (v2)

2008-07-15 Thread Nathan Lynch
Background: Some IBM POWER-based systems have the ability to run in a compatibility mode which mostly appears to the OS as a different processor from the actual hardware. This feature of the platform is useful for live partition migration and for backwards compatibility with old kernels on new

[PATCH v3] Add PPC_FEATURE_PSERIES_PERFMON_COMPAT

2008-07-09 Thread Nathan Lynch
, then the performance tool can surface just those events to the user of the tool. PPC_FEATURE_PSERIES_PERFMON_COMPAT indicates that the PMU supports at least this basic subset of events which is compatible across POWER processor lines. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- Changes since v2

[PATCH v2] Add PPC_FEATURE_PSERIES_PMU_COMPAT

2008-07-08 Thread Nathan Lynch
, then the performance tool can surface just those events to the user of the tool. PPC_FEATURE_PSERIES_PMU_COMPAT indicates that the PMU supports at least this basic subset of events which is compatible across POWER processor lines. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- Changes since v1: - make name

[PATCH] kill useless SMT code in prom_hold_cpus

2008-07-08 Thread Nathan Lynch
I think this code that counts SMT threads and compares against NR_CPUS is an artifact of pre-powerpc-merge ppc64. We care about starting only primary threads in the OF client code. Signed-off-by: Nathan Lynch [EMAIL PROTECTED] --- arch/powerpc/kernel/prom_init.c | 39

<    3   4   5   6   7   8   9   >