Commit 1fc711f7ffb01089efc58042cfdbac8573d1b59a (powerpc/kexec: Fix race
in kexec shutdown) moved the write to signal the cpu had exited the kernel
from before the transition to real mode in kexec_smp_wait to kexec_wait.
Unfornately it missed that kexec_wait is used both by cpus leaving the
Starting with 1426d5a3bd07589534286375998c0c8c6fdc5260 (powerpc:
Dynamically allocate pacas) the space for pacas beyond cpu_possible
is freed, but we failed to update the loop in crash.c.
Since c1854e00727f50f7ac99e98d26ece04c087ef785 (powerpc: Set nr_cpu_ids
early and use it to free PACAs) the
Building on Grant's efforts to remove the irq_map array, this patch
moves spider-pics use of virq_to_host() to use irq_data_get_chip_data
and sets the irq chip data in the map call, like most other interrupt
controllers in powerpc.
Signed-off-by: Milton Miller milt...@bga.com
---
---
Instead of checking for rogue msi numbers via the irq_map host field
set the chip_data to h.host_data (which is the msic struct pointer)
at map and compare it in get_irq.
Signed-off-by: Milton Miller milt...@bga.com
---
---
arch/powerpc/platforms/cell/axon_msi.c |3 ++-
1 files changed, 2
When allocating irqs, wait to clear the IRQ_NOREQUEST flag until the
host map hook has been called.
When freeing irqs, set the IRQ_NOREQUEST flag before calling the host
unmap hook.
Signed-off-by: Milton Miller milt...@bga.com
---
arch/powerpc/kernel/irq.c | 14 +++---
1 files
Some irq_host implementations are using virq_to_host to check if
they are the irq_host for a virtual irq. To allow us to make space
versus time tradeoffs, replace this usage with an assertive
virq_is_host that confirms or denies the irq is associated with the
given irq_host.
Signed-off-by:
Now that we never set a cpu above nr_cpu_ids possible we can
limit our initial paca allocation to nr_cpu_ids. We can then
clamp the number of cpus in platforms/iseries/setup.c.
Signed-off-by: Milton Miller milt...@bga.com
---
---
arch/powerpc/kernel/paca.c | 17 ++---
We should not set cpus above nr_cpu_ids to possible. While we
will trigger a warning with CONFIG_CPUMASK_DEBUG, even then the mask
initializers will set the bits beyond what the iterators check and cause
nr_cpu_ids to increase.
Respecting nr_cpu_ids during setup will allow us to use it in our
If none of irq category bits were set mpc52xx_get_irq() would pass
NO_IRQ_IGNORE (-1) to irq_linear_revmap, which does an unsigned compare
and declares the interrupt above the linear map range. It then punts
to irq_find_mapping, which performs a linear search of all irqs,
which will likely miss
As NO_IRQ_IGNORE is only used between the static function cpld_pic_get_irq
and its caller cpld_pic_cascade, and cpld_pic_cascade only uses it to
suppress calling handle_generic_irq, we can change these uses to NO_IRQ
and remove the extra tests and pathlength in cpld_pic_cascade.
Signed-off-by:
9cb82f2f4692293a27c578c3038518ce4477de72 (Make iSeries spin on
__secondary_hold_spinloop, like pSeries) added a load of current_set
but this load was repeated later and we don't even have the paca yet.
It also checked __secondary_hold_spinloop with a 32 bit compare instead
of a 64 bit compare.
handler_data should be reserved for flow handlers on the dependent
irq, not consumed by the parent irq code that is part of the irq_chip
code. The msi_data pointer was already set in msidesc-irqhost-hostdata
and being copied to irq_data-chipdata in the msidesc-irqhost-map()
method called via
The msi platform device driver was abusing dev.platform_data for its
platform_driver_data. Use the correct pointer for storage.
Platform_data is supposed to be for platforms to communicate to drivers
parameters that are not otherwise discoverable. Its lifetime matches
the platform_device not
Create a dummy irq_host using the generic dummy irq chip for the secondary
cpus to use. Create a direct irq mapping for the ipi and register the
ipi action handler against it. If for some unlikely reason part of this
fails then don't detect the secondary cpus.
This removes another instance of
It was called from irq_create_mapping if that was called for a host
and hwirq that was previously mapped, to update the flags. But the
only implementation was in beat_interrupt and all it did was repeat a
hypervisor call without error checking that was performed with error
checking at the
It was never called because the host is always IRQ_HOST_MAP_LEGACY.
And what it purported to do was mask the interrupt (which will already
have happend if we shutdown the interrupt), then synchronise_irq and
clear the chip pointer, both of which will have been be done by the
caller were we to
These all just clear chip or chipdata fields, which will be done
by the generic code when we call irq_free_descs.
Signed-off-by: Milton Miller milt...@bga.com
---
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c |8
arch/powerpc/platforms/embedded6xx/flipper-pic.c |7 ---
If for some reason the code incrorectly calls the wrong function to
manage the revmap, not only should we warn, we should take action.
However, in the paths we expect to be taken every delivered interrupt
change to WARN_ON_ONCE. Use the if (WARN_ON(x)) format to get the
unlikely for free.
Since there are only 4 messages, we can replace the atomic bit set
(which uses atomic load reserve and store conditional sequence) with
a byte stores to seperate bytes. We still have to perform a load
reserve and store conditional sequence to avoid loosing messages on
reception but we can do that
Since the generic irq code uses a radix tree for sparse interrupts,
the initcall ordering has been changed to initialize radix trees before
irqs. We no longer need to defer creating revmap radix trees to the
arch_initcall irq_late_init.
Also, the kmem caches are allocated so we don't need to
Since we already have a special case in map to set the ipi handler, use
the desired flow.
If we don't find an ics to handle the interrupt complain instead of
returning 0 without having set a chip or handler.
Signed-off-by: Milton Miller milt...@bga.com
---
arch/powerpc/sysdev/xics/xics-common.c
The only references to the irq_map[].host field are internal to
arch/powerpc/kernel/irq.c
Signed-off-by: Milton Miller milt...@bga.com
---
---
arch/powerpc/include/asm/irq.h |1 -
arch/powerpc/kernel/irq.c |6 --
2 files changed, 0 insertions(+), 7 deletions(-)
diff --git
Compile the new smp ipi mux and demux code only if a platform
will make use of it. The new config is selected as required.
The new cause_ipi smp op is only available conditionally to point out
configs where the select is required; this makes setting the op an
immediate fail instead of a deferred
I can't see any reason these functions are needed by machdep.h
and they are all hidden by CONFIG_SMP with no UP alternative.
Also move the declarations for the fallback timebase ops, which
are used to fill in the smp ops.
Signed-off-by: Milton Miller milt...@bga.com
---
Consolidate the mux and demux of ipi messages into smp.c and call
a new smp_ops callback to actually trigger the ipi.
The powerpc architecture code is optimised for having 4 distinct
ipi triggers, which are mapped to 4 distinct messages (ipi many, ipi
single, scheduler ipi, and enter debugger).
I have no idea if the beat hypervisor supports multiple cpus in
a partition, but the code has not been touched since these stubs
were added in February of 2007 except to move them in April of 2008.
These are stubs: start_cpu always returns fail (which is dropped),
the message passing and reciving
Replace all remaining callers of alloc_maybe_bootmem with
zalloc_maybe_bootmem. The callsite in pci_dn is followed with a
memset to clear the memory, and not zeroing at the other callsites
in the celleb fake pci code could lead to following uninitialized
memory as pointers or even freeing said
Its unused, and of the three declarations, one is duplicated in pmac.h,
the second is static and the third is renamed and static.
Signed-off-by: Milton Miller milt...@bga.com
---
---
arch/powerpc/platforms/powermac/pic.h | 11 ---
1 files changed, 0 insertions(+), 11 deletions(-)
Now that MSG_ALL and MSG_ALL_BUT_SELF have been eliminated,
smp_mpic_mesage_pass no longer needs to lookup the cpumask just to
have mpic_send_ipi extract part of it and recode it in a NR_CPUS loop
by mpic_physmask.
Signed-off-by: Milton Miller milt...@bga.com
---
I chose stepwise refinement but
Now that powerpc has removed its use of MSG_ALL_BUT_SELF and MSG_ALL
all these MSG_ flags are unused.
Signed-off-by: Milton Miller milt...@bga.com
---
To be merged by powerpc with the series posted to linuxppc-dev
After the previous 2 patches, grep shows the following false hits (from
partial
Now that smp_ops-smp_message_pass is always called with an (online) cpu
number for the target remove the checks for MSG_ALL and MSG_ALL_BUT_SELF.
Signed-off-by: Milton Miller milt...@bga.com
---
rediffed for ppc-next xics split
---
arch/powerpc/include/asm/dbell.h |2 +-
The only user of MSG_ALL_BUT_SELF in the whole kernel tree is powerpc,
and it only uses it to start the debugger. Both debuggers always call
smp_send_debugger_break with MSG_ALL_BUT_SELF, and only mpic can do
anything more optimal than a loop over all online cpus, but all message
passing
mpic_set_affinity is allocating and freeing a cpumask var even though
it was breaking the cpumask abstraction when passing the mask to
mpic_physmask. It also didn't have any check for allocatin failure.
Break the cpumask abstraction earlier and use simple bitwise and of the
bits from the mask
mpic_physmask was looping NR_CPUS times over a mask that was passed as
a u32. Since mpic is architecturaly limited to 32 physical cpus, clamp
the logical cpus to 32 when compiling (we could also clamp at runtime
to nr_cpu_ids).
Signed-off-by: Milton Miller milt...@bga.com
---
c1854e00727f50f7ac99e98d26ece04c087ef785 (powerpc: Set nr_cpu_ids early
and use it to free PACAs) copied the formerly static setup_nr_cpu_ids
from init/main.c but 34db18a054c600b6f81787165669dc572fe4de25 (smp:
move smp setup functions to kernel/smp.c) moved it to kernel/smp.c
with a declaration in
This series represents a somewhat ordered, somewhat meandering series
development series of patches I've been working on for the past few weeks.
It starts with memory corruption fixes that need to go back to stable
relating to slave cpu searches and paca allocation. After refactoring
and taking
This is a request to merge patchwork id 3780 with the same subject.
I believe it was marked changes requested because it depended on a
patch that had requested changes, but those were resolved and this
one got overlooked. The next patch will remove smp_msg_recv.
thanks,
milton
Here is the
Starting with 1426d5a3bd07589534286375998c0c8c6fdc5260 (powerpc:
Dynamically allocate pacas) we free the memory for pacas beyond
cpu_possible, but we failed to update the loop the secondary cpus use
to find their paca. If the system has running cpu threads for which
the kernel did not allocate a
This adds the infrastructure for handling PAPR hcalls in the kernel,
either early in the guest exit path while we are still in real mode,
or later once the MMU has been turned back on and we are in the full
kernel context. The advantage of handling hcalls in real mode if
possible is that we avoid
Instead of branching out-of-line with the DO_KVM macro to check if we
are in a KVM guest at the time of an interrupt, this moves the KVM
check inline in the first-level interrupt handlers. This speeds up
the non-KVM case and makes sure that none of the interrupt handlers
are missing the check.
The following series of patches enable KVM to exploit the hardware
hypervisor mode on 64-bit Power ISA Book3S machines. At present only
POWER7 is supported, but it would be easy to add other processors.
Running the KVM host in hypervisor mode means that the guest can use
both supervisor mode and
This lifts the restriction that book3s_hv guests can only run one
hardware thread per core, and allows them to use up to 4 threads
per core on POWER7. The host still has to run single-threaded.
This capability is advertised to qemu through a new KVM_CAP_PPC_SMT
capability.
To use this, the host
From 964ee93b2d728e4fb16ae66eaceb6e912bf114ad Mon Sep 17 00:00:00 2001
From: Paul Mackerras pau...@samba.org
Date: Tue, 10 May 2011 22:23:18 +1000
Subject: [PATCH 08/13] kvm/powerpc: Move guest enter/exit down into
subarch-specific code
Instead of doing the kvm_guest_enter/exit() and
From: David Gibson d...@au1.ibm.com
This improves I/O performance for guests using the PAPR paravirtualization
interface by making the H_PUT_TCE hcall faster, by implementing it in
real mode. H_PUT_TCE is used for updating virtual IOMMU tables, and is
used both for virtual I/O and for real I/O
From d8fc78f42250481db50898ab3df95c21283cb9b0 Mon Sep 17 00:00:00 2001
From: Paul Mackerras pau...@samba.org
Date: Tue, 10 May 2011 15:37:13 +1000
Subject: [PATCH 07/13] kvm/powerpc: Pass init/destroy vm and prepare/commit
memory region ops down
This arranges for the top-level
Commits a5d4f3ad3a (powerpc: Base support for exceptions using
HSRR0/1) and 673b189a2e (powerpc: Always use SPRN_SPRG_HSCRATCH0
when running in HV mode) cause compile and link errors for 32-bit
classic Book 3S processors when KVM is enabled. This fixes these
errors.
Signed-off-by: Paul Mackerras
This moves the slb field, which represents the state of the emulated
SLB, from the kvmppc_vcpu_book3s struct to the kvm_vcpu_arch, and the
hpte_hash_[v]pte[_long] fields from kvm_vcpu_arch to kvmppc_vcpu_book3s.
This is in accord with the principle that the kvm_vcpu_arch struct
represents the
Doing so means that we don't have to save the flags anywhere and gets
rid of the last reference to to_book3s(vcpu) in arch/powerpc/kvm/book3s.c.
Doing so is OK because a program interrupt won't be generated at the
same time as any other synchronous interrupt. If a program interrupt
and an
The vcpu-arch.pending_exceptions field is a bitfield indexed by
interrupt priority number as returned by kvmppc_book3s_vec2irqprio.
However, kvmppc_core_pending_dec was using an interrupt vector shifted
by 7 as the bit index. Fix it to use the irqprio value for the
decrementer interrupt instead.
In hypervisor mode, the LPCR controls several aspects of guest
partitions, including virtual partition memory mode, and also controls
whether the hypervisor decrementer interrupts are enabled. This sets
up LPCR at boot time so that guest partitions will use a virtual real
memory area (VRMA)
I tried the suggestion of setting eTSEC2 as active port for the u-boot .
Ethernet of Core1 (connected to 1G) is working now.
Thanks for the inputs , they really helped !
Best Regards
Prasanna Khanapur
On Tue, May 10, 2011 at 9:50 AM, Aggrwal Poonam-B10812 b10...@freescale.com
wrote:
The
On Wed, May 11, 2011 at 08:46:56PM +1000, Paul Mackerras wrote:
arch/powerpc/sysdev/xics/icp-native.c.
What kernel tree do I need to actually have that file?
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
Fix switch initialization to ensure that all switches have default
routing disabled. This guarantees that no unexpected RapidIO packets
arrive to the default port set by reset and there is no default routing
destination until it is properly configured by software.
This update also unifies
On 05/10/2011 09:09 AM, Peter Zijlstra wrote:
On Mon, 2011-05-09 at 16:26 -0500, Jesse Larrew wrote:
According the the Power firmware folks, updating the home node of a
virtual cpu happens rather infrequently. The VPHN code currently
checks for topology updates every 60 seconds, but we can
On Wed, May 11, 2011 at 7:29 AM, Milton Miller milt...@bga.com wrote:
Since the generic irq code uses a radix tree for sparse interrupts,
the initcall ordering has been changed to initialize radix trees before
irqs. We no longer need to defer creating revmap radix trees to the
arch_initcall
On Wed, May 11, 2011 at 7:29 AM, Milton Miller milt...@bga.com wrote:
If for some reason the code incrorectly calls the wrong function to
manage the revmap, not only should we warn, we should take action.
However, in the paths we expect to be taken every delivered interrupt
change to
On Wed, May 11, 2011 at 7:30 AM, Milton Miller milt...@bga.com wrote:
The msi platform device driver was abusing dev.platform_data for its
platform_driver_data. Use the correct pointer for storage.
Platform_data is supposed to be for platforms to communicate to drivers
parameters that are
On Wed, May 11, 2011 at 7:30 AM, Milton Miller milt...@bga.com wrote:
As NO_IRQ_IGNORE is only used between the static function cpld_pic_get_irq
and its caller cpld_pic_cascade, and cpld_pic_cascade only uses it to
suppress calling handle_generic_irq, we can change these uses to NO_IRQ
and
On Wed, May 11, 2011 at 7:30 AM, Milton Miller milt...@bga.com wrote:
If none of irq category bits were set mpc52xx_get_irq() would pass
NO_IRQ_IGNORE (-1) to irq_linear_revmap, which does an unsigned compare
and declares the interrupt above the linear map range. It then punts
to
On Wed, May 11, 2011 at 7:30 AM, Milton Miller milt...@bga.com wrote:
Building on Grant's efforts to remove the irq_map array, this patch
moves spider-pics use of virq_to_host() to use irq_data_get_chip_data
and sets the irq chip data in the map call, like most other interrupt
controllers in
On Wed, May 11, 2011 at 7:30 AM, Milton Miller milt...@bga.com wrote:
Some irq_host implementations are using virq_to_host to check if
they are the irq_host for a virtual irq. To allow us to make space
versus time tradeoffs, replace this usage with an assertive
virq_is_host that confirms or
On Wed, May 11, 2011 at 7:30 AM, Milton Miller milt...@bga.com wrote:
The only references to the irq_map[].host field are internal to
arch/powerpc/kernel/irq.c
Signed-off-by: Milton Miller milt...@bga.com
Acked-by: Grant Likely grant.lik...@secretlab.ca
---
---
On Wed, May 11, 2011 at 7:30 AM, Milton Miller milt...@bga.com wrote:
When allocating irqs, wait to clear the IRQ_NOREQUEST flag until the
host map hook has been called.
When freeing irqs, set the IRQ_NOREQUEST flag before calling the host
unmap hook.
A description describing why this change
On Wed, May 11, 2011 at 7:43 AM, Milton Miller milt...@bga.com wrote:
[...]
After doing a bunch of grep's on arch/sh, I think the interesting
parts of super8 interrupt handling that Thomas referred to are in
drivers/sh/intc. For some reason they populate the radix tree first
with a descriptor
On Wed, 11 May 2011 10:46:03 -0400
Alexandre Bounine alexandre.boun...@idt.com wrote:
Fix switch initialization to ensure that all switches have default
routing disabled. This guarantees that no unexpected RapidIO packets
arrive to the default port set by reset and there is no default routing
Otherwise we get silent truncations.
Signed-off-by: Nishanth Aravamudan n...@us.ibm.com
Cc: Anton Blanchard an...@samba.org
Cc: Milton Miller milt...@bga.com
Cc: linuxppc-...@ozlabs.org
---
arch/powerpc/platforms/pseries/iommu.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff
On Wed, May 11, 2011 at 03:44:15PM +0200, Christoph Hellwig wrote:
On Wed, May 11, 2011 at 08:46:56PM +1000, Paul Mackerras wrote:
arch/powerpc/sysdev/xics/icp-native.c.
What kernel tree do I need to actually have that file?
The next branch of
Hi,
My MPC8313-based board, running a 2.6.37 kernel, is occasionally
hitting this bug while doing RNDIS-based communication:
BUG: scheduling while atomic: lighttpd/1145/0x1200
Call Trace:
[c6a8b910] [c00086c0] show_stack+0x7c/0x194 (unreliable)
[c6a8b950] [c0019e28] __schedule_bug+0x54/0x68
This series of patches attempts to cleanup and fix some bugs related to
dynamic dma windows and kexec/kdump. They build on the three patches I
have submitted most recently:
powerpc: fix kexec with dynamic dma windows
http://patchwork.ozlabs.org/patch/94445/
pseries/iommu: restore iommu
From: Milton Miller milt...@bga.com
Move the discovery of windows previously setup from when the pci driver
calls set_dma_mask to an arch_initcall.
When kexecing into a kernel with dynamic dma windows allocated, we need
to find the windows early so that memory hot remove will be able to
delete
From: Milton Miller milt...@bga.com
The hook dma_get_required_mask is supposed to return the mask required
by the platform to operate efficently. The generic version of
dma_get_required_mask in driver/base/platform.c returns a mask based
only on max_pfn. However, this is likely too big for
From: Milton Miller milt...@bga.com
Do not check dma supported until we have chosen the right dma ops.
Check that the device is pci before treating it as such.
Check the mask is supported by the selected dma ops before
committing it.
We only need to set iommu ops if it is not the current ops;
From: Milton Miller milt...@bga.com
If we destroy the window, we need to remove the property recording that
we setup the window. Otherwise the next kernel we kexec will be
confused.
Also we should remove the property if even if we don't find the
ibm,ddw-applicable window or if one of the
From: Milton Miller milt...@bga.com
When using a property refering to the availibily of dynamic dma windows
call it ddw_avail not ddr_avail.
dupe_ddw_if_already_created does not dupilcate anything, it only finds
and reuses the windows we already created, so rename it to
find_existing_ddw. Also,
From: Milton Miller milt...@bga.com
The new get_required_mask hook name is longer than many of but not all
of the prior ops. Tidy the struct initializers to align the equal signs
using the local whitespace.
Signed-off-by: Milton Miller milt...@bga.com
Signed-off-by: Nishanth Aravamudan
From: Milton Miller milt...@bga.com
Now that the generic code has dma_map_ops set, instead of having a
messy ifdef if block in the base dma_get_required_mask hook push
the computation into the dma ops.
If the ops fails to set the get_required_mask hook default to the
width of dma_addr_t.
This
On Wed, 04 May 2011 around 10:17:37 -, Kumar Gala wrote:
We should utilize nr_cpus as the max # of CPUs that we can have present
instead of NR_CPUS. This way we actually respect how nr_cpus is set on
the command line rather than ignoring it.
Signed-off-by: Kumar Gala
This change adds a new seccomp mode based on the work by
a...@chromium.org in [1]. This new mode, filter mode, provides a hash
table of seccomp_filter objects. When in the new mode (2), all system
calls are checked against the filters - first by system call number,
then by a filter string. If an
On Thu, May 12, 2011 at 00:25, Nishanth Aravamudan n...@us.ibm.com wrote:
diff --git a/arch/powerpc/platforms/ps3/system-bus.c
b/arch/powerpc/platforms/ps3/system-bus.c
index 23083c3..688141c 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
79 matches
Mail list logo