The PCI hotplug can be part of EEH error recovery. The @pdn and
the device's PE number aren't removed and added afterwords. The
PE number in @pdn should be set to an invalid one. Otherwise, the
PE's device count is decreased on removing devices while failing
to be increased on adding devices. It le
When PCI Device pass-through is enabled via VFIO, KVM-PPC will
pin pages using get_user_pages_fast(). One of the downsides of
the pinning is that the page could be in CMA region. The CMA
region is used for other allocations like the hash page table.
Ideally we want the pinned pages to be from non
On 06/09/16 15:32, Daniel Axtens wrote:
Sparse checking revealed that it is no longer used.
There is an EXPORT_SYMBOL_GPL, but there's no header that
provides a prototype, so nothing should be using it anyway.
Remove it.
Signed-off-by: Daniel Axtens
Reviewed-by: Andrew Donnellan
--
Andrew
Balbir Singh writes:
> From: Balbir Singh
> Subject: [RESEND][v2][PATCH] KVM: PPC: Book3S HV: Migrate pinned pages out of
> CMA
>
> When PCI Device pass-through is enabled via VFIO, KVM-PPC will
> pin pages using get_user_pages_fast(). One of the downsides of
> the pinning is that the page coul
Another set of things that are only called from assembler and so need
prototypes to keep sparse happy.
Signed-off-by: Daniel Axtens
---
v2: Fix a couple of issues identified by the 0day bot:
- different definition of sys_swapendian for 32/64
- the previous fadump patch fixes a weird int
Firmware Assisted Dump is a facility to dump kernel core with assistance
from firmware. As part of this process the kernel ELF version is
stored.
Currently, fadump.h defines this to 0 if it is not already defined. This
clashes with a define in elf.h which sets it based on the current task -
not b
A bunch of KVM functions are only called from assembler.
Give them prototypes in asm-prototypes.h
Signed-off-by: Daniel Axtens
---
v2: fix compile error when CONFIG_KVM is undefined, thanks 0day bot!
---
arch/powerpc/include/asm/asm-prototypes.h | 44 +++
arch/powerp
Squash a bunch of sparse warnings by making things static.
Reviewed-by: Andrew Donnellan
Signed-off-by: Daniel Axtens
---
v2: remove the symbol that I dropped in the previous patch.
This is an omnibus patch - I wrote a Python script to figure out if
sparse warnings could be automatically fixe
Sparse checking revealed that it is no longer used.
There is an EXPORT_SYMBOL_GPL, but there's no header that
provides a prototype, so nothing should be using it anyway.
Remove it.
Signed-off-by: Daniel Axtens
---
arch/powerpc/platforms/cell/interrupt.c | 6 --
1 file changed, 6 deletions(-
On Thursday 01 September 2016 12:56 PM, Peter Zijlstra wrote:
On Mon, Aug 29, 2016 at 02:30:46AM +0530, Madhavan Srinivasan wrote:
It's a perennial request from hardware folks to be able to
see the raw values of the pmu registers. Partly it's so that
they can verify perf is doing what they wan
In pnv_ioda_free_pe(), the PE object (including the associated PE
number) is cleared before resetting the corresponding bit in the
PE allocation bitmap. It means PE#0 is always released to the bitmap
wrongly.
This fixes above issue by caching the PE number before the PE object
is cleared.
Fixes:
The compound PE is created to accommodate the devices attached to
one specific PCI bus that consume multiple M64 segments. The compound
PE is made up of one master PE and possibly multiple slave PEs. The
slave PEs should be destroyed when releasing the master PE. A kernel
crash happens when derfere
When using the OPAL ICP backend we incorrectly pass Linux CPU numbers
rather than HW CPU numbers to OPAL.
Signed-off-by: Benjamin Herrenschmidt
Fixes: d74361881f0dfe5f9dcac37d1b753a15a2345d8c
---
diff --git a/arch/powerpc/sysdev/xics/icp-opal.c
b/arch/powerpc/sysdev/xics/icp-opal.c
index 57d72f
On 31/08/16 14:14, Alexey Kardashevskiy wrote:
> On 14/07/16 14:25, Balbir Singh wrote:
>>
>> From: Balbir Singh
>> Subject: [RESEND][v2][PATCH] KVM: PPC: Book3S HV: Migrate pinned pages out
>> of CMA
>>
>> When PCI Device pass-through is enabled via VFIO, KVM-PPC will
>> pin pages using get_us
On Wed, 2016-08-24 at 15:03 +0530, Aneesh Kumar K.V wrote:
> Power9 DD1 requires to update the hid0 register when switching from
> hash to radix.
One minor nit. This is bidirectional not just "hash to radix"
Could just be:
powerpc/mm: Update the HID bit when switching MMU modes
Power9 DD1 requ
On Wed, 2016-08-24 at 15:03 +0530, Aneesh Kumar K.V wrote:
> POWER9 DD1 requires pte to be marked invalid (V=0) before updating
> it with the new value. This makes this distinction for the different
> revisions.
>
> Signed-off-by: Aneesh Kumar K.V
Acked-by: Michael Neuling
> ---
> arch/powerp
On Wed, 2016-08-24 at 15:03 +0530, Aneesh Kumar K.V wrote:
> POWER9 DD1 uses RTS - 28 for the RTS value but other revisions use
> RTS - 31. This makes this distinction for the different revisions
>
> Signed-off-by: Aneesh Kumar K.V
Acked-by: Michael Neuling
> ---
> arch/powerpc/include/asm/b
On Wed, 2016-08-24 at 15:03 +0530, Aneesh Kumar K.V wrote:
> Signed-off-by: Aneesh Kumar K.V
Acked-by: Michael Neuling
> ---
> arch/powerpc/include/asm/cputable.h | 4 +++-
> arch/powerpc/kernel/cputable.c | 19 +++
> 2 files changed, 22 insertions(+), 1 deletion(-)
>
>
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/Makefile | 1 +
tools/testing/selftests/powerpc/signal/Makefile| 12 +++
tools/testing/selftests/powerpc/signal/signal.S| 50 ++
tools/testing/selftests/powerpc/signal/signal.c| 111
Previous rework of TM code leaves these functions unused
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/tm.h | 5 -
arch/powerpc/kernel/fpu.S | 26 --
arch/powerpc/kernel/vector.S | 25 -
3 files changed, 56 deletions(-)
diff --gi
If a thread receives a signal while transactional the kernel creates a
second context to show the transactional state of the process. This
test loads some known values and waits for a signal and confirms that
the expected values are in the signal context.
Signed-off-by: Cyril Bur
---
tools/testi
If a thread receives a signal while transactional the kernel creates a
second context to show the transactional state of the process. This
test loads some known values and waits for a signal and confirms that
the expected values are in the signal context.
Signed-off-by: Cyril Bur
---
tools/testi
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/harness.c | 9 +++--
tools/testing/selftests/powerpc/utils.h | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/powerpc/harness.c
b/tools/testing/selftests/powerpc/harness.c
index 52f9b
Make the structures being used for checkpointed state named
consistently with the pt_regs/ckpt_regs.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/processor.h | 8 ++---
arch/powerpc/kernel/asm-offsets.c| 12
arch/powerpc/kernel/fpu.S| 2 +-
arch/powerpc/kernel
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/tm/tm.h | 27 +++
1 file changed, 27 insertions(+)
diff --git a/tools/testing/selftests/powerpc/tm/tm.h
b/tools/testing/selftests/powerpc/tm/tm.h
index 60318ba..2c8da74 100644
--- a/tools/testing/selftests/powe
There is currently an inconsistency as to how the entire CPU register
state is saved and restored when a thread uses transactional memory
(TM).
Using transactional memory results in the CPU having duplicated
(almost) all of its register state. This duplication results in a set
of registers which c
If a thread receives a signal while transactional the kernel creates a
second context to show the transactional state of the process. This
test loads some known values and waits for a signal and confirms that
the expected values are in the signal context.
Signed-off-by: Cyril Bur
---
tools/testi
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/gpr_asm.h | 96 +++
1 file changed, 96 insertions(+)
create mode 100644 tools/testing/selftests/powerpc/gpr_asm.h
diff --git a/tools/testing/selftests/powerpc/gpr_asm.h
b/tools/testing/selftests/powerpc/gp
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/math/vmx_asm.S | 85 +-
tools/testing/selftests/powerpc/vmx_asm.h | 98 ++
2 files changed, 99 insertions(+), 84 deletions(-)
create mode 100644 tools/testing/selftests/powerpc/vmx_asm.h
If a thread receives a signal while transactional the kernel creates a
second context to show the transactional state of the process. This
test loads some known values and waits for a signal and confirms that
the expected values are in the signal context.
Signed-off-by: Cyril Bur
---
tools/testi
The FPU regs are placed at the top of the stack frame. Currently the
position expected to be passed to the macro. The macros now should be
passed the stack frame size and from there they can calculate where to
put the regs, this makes the use simpler.
Also move them to a header file to be used in
Ensure the kernel correctly switches VSX registers correctly. VSX
registers are all volatile, and despite the kernel preserving VSX
across syscalls, it doesn't have to. Test that during interrupts and
timeslices ending the VSX regs remain the same.
Signed-off-by: Cyril Bur
---
tools/testing/self
Much of the signal code takes a pt_regs on which it operates. Over
time the signal code has needed to know more about the thread than
what pt_regs can supply, this information is obtained as needed by
using 'current'.
This approach is not strictly incorrect however it does mean that
there is now a
After a thread is reclaimed from its active or suspended transactional
state the checkpointed state exists on CPU, this state (along with the
live/transactional state) has been saved in its entirety by the
reclaiming process.
There exists a sequence of events that would cause the kernel to call
on
msr_check_and_set() always performs a mfmsr() to determine if it needs
to perform an mtmsr(), as mfmsr() can be a costly operation
msr_check_and_set() could return the MSR now on the CPU to avoid
callers of msr_check_and_set having to make their own mfmsr() call.
Signed-off-by: Cyril Bur
---
arc
giveup_all() causes FPU/VMX/VSX facilities to be disabled in a threads
MSR. If the thread performing the giveup was transactional, the kernel
must record which facilities were in use before the giveup as the
thread must have these facilities re-enabled on return to userspace.
>From process.c:
/*
Comment from arch/powerpc/kernel/process.c:967:
If userspace is inside a transaction (whether active or
suspended) and FP/VMX/VSX instructions have ever been enabled
inside that transaction, then we have to keep them enabled
and keep the FP/VMX/VSX state loaded while ever the transaction
conti
It might be nice to compile selftests against older kernels and
headers but which may not have HWCAP2.
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/utils.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/tools/testing/selftests/powerpc/utils.h
b/tools/testing/selftest
v4: Address review from Mikey, comment and commit message changes.
Dropped patch "selftests/powerpc: Add TM tcheck helpers in C" as
it was unused.
V3:
In v2 the MSR_{FP,VEC,VSX} bits were left on (if in use) after a
reclaim which meant that signal code did the correct thing.
This also mean
of_mm_gpiochip_add_data() calls mm_gc->save_regs() before
setting the data. Therefore ->save_regs() cannot use
gpiochip_get_data()
An Oops is encountered without this fix.
fixes: 1e714e54b5ca5 ("powerpc: qe_lib-gpio: use gpiochip data pointer")
Signed-off-by: Christophe Leroy
Cc:
---
drivers/s
Enable CONFIG_KEXEC_FILE in powernv_defconfig, ppc64_defconfig and
pseries_defconfig.
It depends on CONFIG_CRYPTO_SHA256=y, so add that as well.
Signed-off-by: Thiago Jung Bauermann
---
arch/powerpc/configs/powernv_defconfig | 2 ++
arch/powerpc/configs/ppc64_defconfig | 2 ++
arch/powerpc/co
This purgatory implementation comes from kexec-tools, almost unchanged.
The only changes were that the sha256_regions global variable was
renamed to sha_regions to match what kexec_file_load expects, and to
use the sha256.c file from x86's purgatory to avoid adding yet another
SHA-256 implementati
This uses all the infrastructure built up by the previous patches
in the series to load an ELF vmlinux file and an initrd. It uses the
flattened device tree at initial_boot_params as a base and adjusts memory
reservations and its /chosen node for the next kernel.
Signed-off-by: Thiago Jung Bauerma
kexec_file_load needs to set up the device tree that will be used
by the next kernel and check whether it provides a console
that can be used by the purgatory.
[a...@linux-foundation.org: coding-style fixes]
Signed-off-by: Thiago Jung Bauermann
Signed-off-by: Andrew Morton
---
arch/powerpc/incl
arch_kexec_walk_mem and arch_kexec_apply_relocations_add are used by
generic kexec code, while setup_purgatory is powerpc-specific and sets
runtime variables needed by the powerpc purgatory implementation.
Signed-off-by: Josh Sklar
Signed-off-by: Thiago Jung Bauermann
---
arch/powerpc/Kconfig
A little endian kernel might need to kexec a big endian kernel (the
opposite is less likely but could happen as well), so we can't just cast
the buffer with the binary to ELF structs and use them as is done
elsewhere.
This patch adds functions which do byte-swapping as necessary when
populating th
Extend elf64_apply_relocate_add to support relative symbols. This is
necessary because there is a difference between how the module loading
mechanism and the kexec purgatory loading code use Elf64_Sym.st_value
at relocation time: the former changes st_value to point to the absolute
memory address b
When apply_relocate_add is called, modules are already loaded at their
final location in memory so Elf64_Shdr.sh_addr can be used for accessing
the section contents as well as the base address for relocations.
This is not the case for kexec's purgatory, because it will only be
copied to its final
The kexec_file_load system call needs to relocate the purgatory, so
factor out the module relocation code so that it can be shared.
This patch's purpose is to move the ELF relocation logic from
apply_relocate_add to elf_util_64.c with as few changes as
possible. The following changes were needed:
Commit 2965faa5e03d ("kexec: split kexec_load syscall from kexec core
code") introduced CONFIG_KEXEC_CORE so that CONFIG_KEXEC means whether
the kexec_load system call should be compiled-in and CONFIG_KEXEC_FILE
means whether the kexec_file_load system call should be compiled-in.
These options can
kexec_locate_mem_hole will be used by the PowerPC kexec_file_load
implementation to find free memory for the purgatory stack.
Signed-off-by: Thiago Jung Bauermann
Acked-by: Dave Young
---
include/linux/kexec.h | 1 +
kernel/kexec_file.c | 25 -
2 files changed, 21 ins
This is done to simplify the kexec_add_buffer argument list.
Adapt all callers to set up a kexec_buf to pass to kexec_add_buffer.
In addition, change the type of kexec_buf.buffer from char * to void *.
There is no particular reason for it to be a char *, and the change
allows us to get rid of 3 ex
Allow architectures to specify a different memory walking function for
kexec_add_buffer. x86 uses iomem to track reserved memory ranges, but
PowerPC uses the memblock subsystem.
Signed-off-by: Thiago Jung Bauermann
Acked-by: Dave Young
Acked-by: Balbir Singh
---
include/linux/kexec.h | 29 ++
When Stephen Rothwell added this patch series to the linux-next tree,
he found out that it fails to cross build a ppc64 LE kernel using a
ppc64 BE host. This version of the series fixes that problem with a
change in arch/powerpc/purgatory/Makefile.
While I was at it I noticed that it is not necess
On Monday 05 September 2016 10:48 PM, Madhavan Srinivasan wrote:
On Monday 29 August 2016 07:11 AM, Nicholas Piggin wrote:
On Mon, 29 Aug 2016 00:07:27 +0530
Madhavan Srinivasan wrote:
New Kconfig is added "CONFIG_IRQ_DEBUG_SUPPORT" to add a warn_on
to alert the usage of soft_irq_set_mask
On Monday 29 August 2016 07:11 AM, Nicholas Piggin wrote:
On Mon, 29 Aug 2016 00:07:27 +0530
Madhavan Srinivasan wrote:
New Kconfig is added "CONFIG_IRQ_DEBUG_SUPPORT" to add a warn_on
to alert the usage of soft_irq_set_mask() for disabling lower
bitmask interrupts.
Have also moved the code
Local atomic operations are fast and highly reentrant per CPU counters.
Used for percpu variable updates. Local atomic operations only guarantee
variable modification atomicity wrt the CPU which owns the data and
these needs to be executed in a preemption safe way.
Here is the design of this patch
Two new arch_local_irq_and_pmu_*() functions are added. These are primarily
intended to be used for disabling multiple interrupts. Also the current
arch_local_irq_save() have be modified to "OR" and "Store" value
instead of just "store" function. This is to avoid any lose of interrupts
bits incase
To support masking of the PMI interrupts, couple of new interrupt handler
macros are added MASKABLE_EXCEPTION_PSERIES_OOL and
MASKABLE_RELON_EXCEPTION_PSERIES_OOL.
Couple of new irq #defs "PACA_IRQ_PMI" and "SOFTEN_VALUE_0xf0*" added to
use in the exception code to check for PMI interrupts.
In th
Make it explicit the interrupt masking supported
by a gievn interrupt handler. Patch correspondingly
extends the MASKABLE_* macros with an addition's parameter.
"bitmask" parameter is passed to SOFTEN_TEST macro to decide
on masking the interrupt.
Signed-off-by: Madhavan Srinivasan
---
arch/powe
Currently soft_enabled is used as the flag to determine
the interrupt state. Patch extends the soft_enabled
to be used as a mask instead of a flag.
Signed-off-by: Madhavan Srinivasan
---
arch/powerpc/include/asm/exception-64s.h | 4 ++--
arch/powerpc/include/asm/hw_irq.h| 1 +
arch/power
To support addition of "bitmask" to MASKABLE_* macros,
factor out the EXCPETION_PROLOG_1 macro.
Signed-off-by: Madhavan Srinivasan
---
arch/powerpc/include/asm/exception-64s.h | 30 ++
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/include
Currently we use both EXCEPTION_PROLOG_1 and __EXCEPTION_PROLOG_1
in the MASKABLE_* macros. As a cleanup, this patch makes MASKABLE_*
to use only __EXCEPTION_PROLOG_1. There is not logic change.
Signed-off-by: Madhavan Srinivasan
---
arch/powerpc/include/asm/exception-64s.h | 4 ++--
1 file chan
"paca->soft_enabled" is used as a flag to mask some of interrupts.
Currently supported flags values and their details:
soft_enabledMSR[EE]
0 0 Disabled (PMI and HMI not masked)
1 1 Enabled
"paca->soft_enabled" is initialized to 1 to make the interripts
Signed-off-by: Madhavan Srinivasan
---
arch/powerpc/include/asm/kvm_ppc.h | 2 +-
arch/powerpc/kernel/irq.c | 2 +-
arch/powerpc/kernel/setup_64.c | 4 ++--
arch/powerpc/kernel/time.c | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/includ
Move set_soft_enabled() from powerpc/kernel/irq.c to
asm/hw_irq.c. this way updation of paca->soft_enabled
can be forced wherever possible.
Signed-off-by: Madhavan Srinivasan
---
arch/powerpc/include/asm/hw_irq.h | 6 ++
arch/powerpc/kernel/irq.c | 6 --
2 files changed, 6 insert
Two #defs IRQ_DISABLE_LEVEL_NONE and IRQ_DISABLE_LEVEL_LINUX
are added to be used when updating paca->soft_enabled.
Signed-off-by: Madhavan Srinivasan
---
arch/powerpc/include/asm/hw_irq.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/include/asm/hw_irq.h
b/arch/powerpc
Replace the hardcoded values used when updating
paca->soft_enabled with IRQ_DISABLE_MASK_* #def.
No logic change.
Signed-off-by: Madhavan Srinivasan
---
arch/powerpc/include/asm/exception-64s.h | 2 +-
arch/powerpc/include/asm/hw_irq.h| 15 ---
arch/powerpc/include/asm/irqfl
Local atomic operations are fast and highly reentrant per CPU counters.
Used for percpu variable updates. Local atomic operations only guarantee
variable modification atomicity wrt the CPU which owns the data and
these needs to be executed in a preemption safe way.
Here is the design of the patchs
Source: linux
Version: 4.7.2-1
Severity: normal
User: debian-powe...@lists.debian.org
Usertags: powerpcspe
Hi!
Linux 4.7.x introduced another regression on powerpcspe due to the use of
unsupported assembly instructions [1]:
/<>/arch/powerpc/xmon/spr_access.S: Assembler messages:
/<>/arch/powerpc
Ping?
On 2016/8/12 13:42, Yongji Xie wrote:
This series introduces a way for PCI resource allocator to force
MMIO BARs not to share PAGE_SIZE. This would make sense to VFIO
driver. Because current VFIO implementation disallows to mmap
sub-page(size < PAGE_SIZE) MMIO BARs which may share the same
On 03/09/16 06:39, Uma Krishnan wrote:
Commit 704c4b0ddc03 ("cxlflash: Shutdown notify support for CXL Flash
cards") was recently introduced to notify the AFU when a system is going
down. Due to the position of the cxlflash driver in the device stack,
cxlflash devices are _always_ removed during
72 matches
Mail list logo