The protocol for suspending or migrating an LPAR requires all present
processor threads to enter H_JOIN. So if we have threads offline, we
have to temporarily bring them up. This can race with administrator
actions such as SMT state changes. As of dfd718a2ed1f ("powerpc/rtas:
Fix a potential race b
Remove the separate KERN_ from each pe_level_printk and
instead add the KERN_ to the format.
pfix in pe_level_printk could also be used uninitialized so
add a new else and set pfx to the hex value of pe->flags.
Rename pe_level_printk to pe_printk and update the pe_
macros.
Signed-off-by: Joe Per
The existing code uses bunch of hardcoded values from the PCI Bus Binding
to IEEE Std 1275 spec; and it does so in quite non-obvious way.
This defines fields from the cell#0 of the "reg" property of a PCI device
and uses them for parsing.
This should cause no behavioral change.
Signed-off-by: Al
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe()
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/Kconfig | 1 +
arch/powerpc/include/asm/uaccess.h | 12
2 files changed, 13 insertions(+)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
inde
memcpy_mcsafe currently return -EFAULT on a machine check exception, change
it to return the remaining bytes that needs to be copied, so that machine
check safe copy_to_user can maintain the same behavior as copy_to_user.
Signed-off-by: Santosh Sivaraj
---
arch/powerpc/lib/memcpy_mcsafe_64.S | 1
From: Reza Arbab
Testing my memcpy_mcsafe() work in progress with an injected UE, I get
an error like this immediately after the function returns:
BUG: Unable to handle kernel data access at 0x7fff84dec8f8
Faulting instruction address: 0xc008009c00b0
Oops: Kernel access of bad area, sig: 11
From: Reza Arbab
Signed-off-by: Reza Arbab
---
arch/powerpc/kernel/exceptions-64s.S | 6 ++
arch/powerpc/kernel/mce.c| 2 ++
2 files changed, 8 insertions(+)
diff --git a/arch/powerpc/kernel/exceptions-64s.S
b/arch/powerpc/kernel/exceptions-64s.S
index c83e38a403fd..311f1392a2
From: Reza Arbab
Add an mce notifier intended to service memcpy_mcsafe().
The notifier uses this heuristic; if a UE occurs when accessing device
memory, and the faulting instruction had a fixup entry, the callback
will return NOTIFY_STOP.
This causes the notification mechanism to consider the M
From: Balbir Singh
The pmem infrastructure uses memcpy_mcsafe in the pmem
layer so as to convert machine check exceptions into
a return value on failure in case a machine check
exception is encountered during the memcpy.
This patch largely borrows from the copyuser_power7
logic and does not add
From: Reza Arbab
If the instruction causing a UE has an exception table entry with fixup
address, save it in the machine_check_event struct.
If a machine check notifier callback returns NOTIFY_STOP to indicate it
has handled the error, set nip to continue execution from the fixup
address.
Signe
From: Reza Arbab
Signed-off-by: Reza Arbab
---
arch/powerpc/include/asm/mce.h | 3 ++-
arch/powerpc/kernel/mce.c | 9 +
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/mce.h b/arch/powerpc/include/asm/mce.h
index 948bef579086..240dd1fdfe35 10
From: Reza Arbab
If a notifier returns NOTIFY_STOP, consider the MCE handled, just as we
do when machine_check_early() returns 1.
Signed-off-by: Reza Arbab
---
arch/powerpc/include/asm/asm-prototypes.h | 2 +-
arch/powerpc/kernel/exceptions-64s.S | 3 +++
arch/powerpc/kernel/mce.c
From: Reza Arbab
Move the call site of machine_check_ue_event() slightly later in the MCE
codepath. No functional change intended--this is prep for a later patch
to conditionally skip the call.
Signed-off-by: Reza Arbab
---
arch/powerpc/kernel/mce.c | 5 -
1 file changed, 4 insertions(+),
From: Reza Arbab
Signed-off-by: Reza Arbab
---
arch/powerpc/include/asm/asm-prototypes.h | 1 +
arch/powerpc/include/asm/mce.h| 4
arch/powerpc/kernel/exceptions-64s.S | 4
arch/powerpc/kernel/mce.c | 22 ++
4 files changed, 31 i
From: Balbir Singh
The code currently assumes PAGE_SHIFT as the shift value of
the pfn, this works correctly (mostly) for user space pages,
but the correct thing to do is
1. Extract the shift value returned via the pte-walk API's
2. Use the shift value to access the instruction address.
Note, t
During a memcpy from a pmem device, if a machine check exception is
generated we end up in a panic. In case of fsdax read, this should
only result in a -EIO. Avoid MCE by implementing memcpy_mcsafe.
Before this patch series:
```
bash-4.4# mount -o dax /dev/pmem0 /mnt/pmem/
[ 7621.714094] Disablin
From: Reza Arbab
The function doesn't get used outside this file, so make it static.
Signed-off-by: Reza Arbab
---
arch/powerpc/kernel/mce.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c
index b18df633eae9..e78c4f1
On Thu, May 23, 2019 at 5:51 PM Christoph Hellwig wrote:
>
> These have been unused ever since they've been added to the kernel.
>
> Signed-off-by: Christoph Hellwig
> ---
> arch/powerpc/include/asm/pnv-pci.h| 4 --
> arch/powerpc/platforms/powernv/pci-ioda.c | 4 +-
> arch/powerpc/pla
On Thu, May 23, 2019 at 5:56 PM Christoph Hellwig wrote:
>
> These two function have never been used since they were added to the
> kernel.
>
> Signed-off-by: Christoph Hellwig
> ---
> arch/powerpc/include/asm/vas.h | 10 --
> arch/powerpc/platforms/powernv/vas-window.c | 19
On 20/6/19 2:12 pm, Alastair D'Silva wrote:
From: Alastair D'Silva
If an OpenCAPI context is to be used directly by a kernel driver, there
may not be a suitable mm to use.
The patch makes the mm parameter to ocxl_context_attach optional.
Signed-off-by: Alastair D'Silva
Acked-by: Andrew Don
No longer needed, let's remove it. Also, drop the "hint" parameter
completely from "find_memory_block_by_id", as nobody needs it anymore.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Cc: Andrew Morton
Cc: Stephen Rothwell
Cc: Pavel Tatashin
Cc: "mike.tra...@hpe.com"
Signed-off-by: David Hi
Let's move walk_memory_blocks() to the place where memory block logic
resides and simplify it. While at it, add a type for the callback function.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Cc: David Hildenbrand
Cc: Andrew Morton
Cc: Stephen Rothwell
Cc: Pavel Tatashin
Cc: Andrew Banman
walk_memory_range() was once used to iterate over sections. Now, it
iterates over memory blocks. Rename the function, fixup the
documentation. Also, pass start+size instead of PFNs, which is what most
callers already have at hand. (we'll rework link_mem_sections() most
probably soon)
Follow-up pat
@Andrew: Only patch 1, 4 and 6 changed compared to v1.
Some further cleanups around memory block devices. Especially, clean up
and simplify walk_memory_range(). Including some other minor cleanups.
Compiled + tested on x86 with DIMMs under QEMU. Compile-tested on ppc64.
v2 -> v3:
- "mm/memory_ho
It is only used internally.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Cc: Andrew Morton
Cc: Keith Busch
Cc: Oscar Salvador
Signed-off-by: David Hildenbrand
---
drivers/base/node.c | 3 ++-
include/linux/node.h | 7 ---
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a
Block ids are just shifted section numbers, so let's also use
"unsigned long" for them, too.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Signed-off-by: David Hildenbrand
---
drivers/base/memory.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/dr
We are using a mixture of "int" and "unsigned long". Let's make this
consistent by using "unsigned long" everywhere. We'll do the same with
memory block ids next.
While at it, turn the "unsigned long i" in removable_show() into an
int - sections_per_block is an int.
Cc: Greg Kroah-Hartman
Cc: "R
On 20.06.19 12:35, David Hildenbrand wrote:
> No longer needed, let's remove it. Also, drop the "hint" parameter
> completely from "find_memory_block_by_id", as nobody needs it anymore.
>
> Cc: Greg Kroah-Hartman
> Cc: "Rafael J. Wysocki"
> Cc: Andrew Morton
> Cc: Stephen Rothwell
> Cc: Pavel
On Thu, Jun 20, 2019 at 5:19 AM Nicholas Piggin wrote:
>
> The processor aliasing problem happens because the struct will
> be initialised with stores using one base register (e.g., stack
> register), and then same memory is loaded using a different
> register (e.g., parameter register).
Hmm. Hon
On 20.06.19 18:05, Nathan Chancellor wrote:
> On Thu, Jun 20, 2019 at 12:35:18PM +0200, David Hildenbrand wrote:
>> walk_memory_range() was once used to iterate over sections. Now, it
>> iterates over memory blocks. Rename the function, fixup the
>> documentation. Also, pass start+size instead of P
On Thu, Jun 20, 2019 at 12:35:18PM +0200, David Hildenbrand wrote:
> walk_memory_range() was once used to iterate over sections. Now, it
> iterates over memory blocks. Rename the function, fixup the
> documentation. Also, pass start+size instead of PFNs, which is what most
> callers already have at
Benjamin Herrenschmidt writes:
> On Wed, 2019-06-19 at 22:32 +1000, Michael Ellerman wrote:
>> Christoph Hellwig writes:
>> > Any chance this could get picked up to fix the regression?
>>
>> Was hoping Ben would Ack it. He's still powermac maintainer :)
>>
>> I guess he OK'ed it in the other th
Linus Torvalds's on June 12, 2019 11:09 am:
> On Tue, Jun 11, 2019 at 2:55 PM Nicholas Piggin wrote:
>>
>> What does this do for performance? I've found this pattern can be
>> bad for store aliasing detection.
>
> I wouldn't expect it to be noticeable, and the lack of argument
> reloading etc sho
I just noticed I didn't have Andrew explicitly on the receipents
list, so adding him.
Is everyone happy enough to give this a spin in -mm and linux-next?
On 6/20/19 3:46 PM, Nicholas Piggin wrote:
> Mahesh J Salgaonkar's on June 20, 2019 7:53 pm:
>> On 2019-06-20 15:14:50 Thu, Nicholas Piggin wrote:
>>> machine_check_common_early and machine_check_handle_early only run in
>>> HVMODE. Remove dead code.
>>
>> That's not true. For pseries guest with FW
No longer needed, let's remove it. Also, drop the "hint" parameter
completely from "find_memory_block_by_id", as nobody needs it anymore.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Cc: Andrew Morton
Cc: Stephen Rothwell
Cc: Pavel Tatashin
Cc: "mike.tra...@hpe.com"
Signed-off-by: David Hi
walk_memory_range() was once used to iterate over sections. Now, it
iterates over memory blocks. Rename the function, fixup the
documentation. Also, pass start+size instead of PFNs, which is what most
callers already have at hand. (we'll rework link_mem_sections() most
probably soon)
Follow-up pat
Let's move walk_memory_blocks() to the place where memory block logic
resides and simplify it. While at it, add a type for the callback function.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Cc: David Hildenbrand
Cc: Andrew Morton
Cc: Stephen Rothwell
Cc: Pavel Tatashin
Cc: Andrew Banman
It is only used internally.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Cc: Andrew Morton
Cc: Keith Busch
Cc: Oscar Salvador
Signed-off-by: David Hildenbrand
---
drivers/base/node.c | 3 ++-
include/linux/node.h | 7 ---
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a
We are using a mixture of "int" and "unsigned long". Let's make this
consistent by using "unsigned long" everywhere. We'll do the same with
memory block ids next.
While at it, turn the "unsigned long i" in removable_show() into an
int - sections_per_block is an int.
Cc: Greg Kroah-Hartman
Cc: "R
@Andrew: Only patch 1 and 6 changed. The patches are based on the
same state as the previous patches (replace the old ones if possible).
Some further cleanups around memory block devices. Especially, clean up
and simplify walk_memory_range(). Including some other minor cleanups.
Compiled + tested
Block ids are just shifted section numbers, so let's also use
"unsigned long" for them, too.
Cc: Greg Kroah-Hartman
Cc: "Rafael J. Wysocki"
Signed-off-by: David Hildenbrand
---
drivers/base/memory.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/dr
Mahesh J Salgaonkar's on June 20, 2019 7:53 pm:
> On 2019-06-20 15:14:50 Thu, Nicholas Piggin wrote:
>> machine_check_common_early and machine_check_handle_early only run in
>> HVMODE. Remove dead code.
>
> That's not true. For pseries guest with FWNMI enabled hypervisor,
> machine_check_common_ea
On 2019-06-20 15:14:50 Thu, Nicholas Piggin wrote:
> machine_check_common_early and machine_check_handle_early only run in
> HVMODE. Remove dead code.
That's not true. For pseries guest with FWNMI enabled hypervisor,
machine_check_common_early gets called in non-HV mode as well.
machine_check_
Mahesh Jagannath Salgaonkar's on June 20, 2019 7:26 pm:
> On 6/20/19 10:44 AM, Nicholas Piggin wrote:
>> Remove dead code.
>>
>> Signed-off-by: Nicholas Piggin
>> ---
>> arch/powerpc/kernel/exceptions-64s.S | 3 ---
>> 1 file changed, 3 deletions(-)
>>
>> diff --git a/arch/powerpc/kernel/except
On 6/20/19 10:44 AM, Nicholas Piggin wrote:
> Remove dead code.
>
> Signed-off-by: Nicholas Piggin
> ---
> arch/powerpc/kernel/exceptions-64s.S | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/arch/powerpc/kernel/exceptions-64s.S
> b/arch/powerpc/kernel/exceptions-64s.S
> index 286bd
Le 20/06/2019 à 06:12, Alastair D'Silva a écrit :
From: Alastair D'Silva
If an OpenCAPI context is to be used directly by a kernel driver, there
may not be a suitable mm to use.
The patch makes the mm parameter to ocxl_context_attach optional.
Signed-off-by: Alastair D'Silva
---
Thanks
nd_label->dpa issue was observed when trying to enable the namespace created
with little-endian kernel on a big-endian kernel. That made me run
`sparse` on the rest of the code and other changes are the result of that.
Fixes: d9b83c756953 ("libnvdimm, btt: rework error clearing")
Fixes: 9dedc73a46
vmem_altmap_offset() adjust the section aligned base_pfn offset.
So we need to make sure we account for the same when computing base_pfn.
ie, for altmap_valid case, our pfn_first should be:
pfn_first = altmap->base_pfn + vmem_altmap_offset(altmap);
Signed-off-by: Aneesh Kumar K.V
---
kernel/me
This is needed so that we don't wrongly initialize a namespace
which doesn't have enough space reserved for holding struct pages
with the current kernel.
Signed-off-by: Aneesh Kumar K.V
---
drivers/nvdimm/pfn.h | 5 -
drivers/nvdimm/pfn_devs.c | 27 ++-
2 files
Use PAGE_SIZE instead of SZ_4K and sizeof(struct page) instead of 64.
If we have a kernel built with different struct page size the previous
patch should handle marking the namespace disabled.
Signed-off-by: Aneesh Kumar K.V
---
drivers/nvdimm/label.c | 2 +-
drivers/nvdimm/namespace_de
Allow arch to provide the supported alignments and use hugepage alignment only
if we support hugepage. Right now we depend on compile time configs whereas this
patch switch this to runtime discovery.
Architectures like ppc64 can have THP enabled in code, but then can have
hugepage size disabled by
This patch add -EOPNOTSUPP as return from probe callback to
indicate we were not able to initialize a namespace due to pfn superblock
feature/version mismatch. We want to consider this a probe success so that
we can create new namesapce seed and there by avoid marking the failed
namespace as the se
This series handle configs where hugepage support is not enabled by default.
Also, we update some of the information messages to make sure we use PAGE_SIZE
instead
of SZ_4K. We now store page size and struct page size in pfn_sb and do extra
check
before enabling namespace. There also an endiannes
On 20/06/2019 09:57, Laurent Vivier wrote:
> On 20/06/2019 03:46, Suraj Jitindar Singh wrote:
>> If we enter an L1 guest with a pending decrementer exception then this
>> is cleared on guest exit if the guest has writtien a positive value into
>> the decrementer (indicating that it handled the decr
Hi Laurent,
I downloaded your script and run it on Intel 2s skylake platform with spf-v12
patch
serials.
Here attached the output results of this script.
The following comparison result is statistics from the script outputs.
a). Enable THP
SPF_0
Greg Kroah-Hartman wrote:
> When calling debugfs functions, there is no need to ever check the
> return value. The function can work or not, but the code logic should
> never do something different based on this.
>
> Also, there is no need to store the individual debugfs file names,
> especially
On Wed, Jun 12, 2019 at 05:49:50AM +, Christophe Leroy wrote:
> Below commit came with a typo in the CONFIG_ symbol, leading
> to a permanently reduced max key size regarless of the driver
> capabilities.
>
> Reported-by: Horia Geantă
> Fixes: b8fbdc2bc4e7 ("crypto: talitos - reduce max key s
On Tue, Jun 11, 2019 at 11:54:31AM +1000, Daniel Axtens wrote:
> The CTR code comes from OpenSSL, where it does a 32-bit counter.
> The kernel has a 128-bit counter. This difference has lead to
> issues.
>
> Document it.
>
> Signed-off-by: Daniel Axtens
> ---
> drivers/crypto/vmx/aesp8-ppc.pl |
On 20/06/2019 03:46, Suraj Jitindar Singh wrote:
> If we enter an L1 guest with a pending decrementer exception then this
> is cleared on guest exit if the guest has writtien a positive value into
> the decrementer (indicating that it handled the decrementer exception)
> since there is no other way
On 20/06/2019 03:46, Suraj Jitindar Singh wrote:
> On POWER9 the decrementer can operate in large decrementer mode where
> the decrementer is 56 bits and signed extended to 64 bits. When not
> operating in this mode the decrementer behaves as a 32 bit decrementer
> which is NOT signed extended (as
On 20/06/2019 16:21, Christoph Hellwig wrote:
> On Thu, Jun 20, 2019 at 04:20:08PM +1000, Alexey Kardashevskiy wrote:
>>
>>
>> On 20/06/2019 16:03, Christoph Hellwig wrote:
>>> Hi Linus,
>>>
>>> this goes back to the discussion at last years kernel summit, where
>>> we had the discussion on remo
On Thu, Jun 20, 2019 at 04:20:08PM +1000, Alexey Kardashevskiy wrote:
>
>
> On 20/06/2019 16:03, Christoph Hellwig wrote:
> > Hi Linus,
> >
> > this goes back to the discussion at last years kernel summit, where
> > we had the discussion on removing code never used by any in-kernel
> > user an n
On 20/06/2019 16:03, Christoph Hellwig wrote:
> Hi Linus,
>
> this goes back to the discussion at last years kernel summit, where
> we had the discussion on removing code never used by any in-kernel
> user an no prospects of one. The IBM folks are unfortunately still
> dragging their feet on t
Hi Linus,
this goes back to the discussion at last years kernel summit, where
we had the discussion on removing code never used by any in-kernel
user an no prospects of one. The IBM folks are unfortunately still
dragging their feet on the powerpc side. Can we revise this discussion?
The use cas
On Mon, Jun 17, 2019 at 09:15:02PM +, Christophe Leroy wrote:
> All mapping iterator logic is based on the assumption that sg->offset
> is always lower than PAGE_SIZE.
>
> But there are situations where sg->offset is such that the SG item
> is on the second page. In that case sg_copy_to_buffer
When emulating tsr, treclaim and trechkpt, we incorrectly set CR0. The
code currently sets:
CR0 <- 00 || MSR[TS]
but according to the ISA it should be:
CR0 <- 0 || MSR[TS] || 0
This fixes the bit shift to put the bits in the correct location.
Tested-by: Suraj Jitindar Singh
Signed-off-b
Nicholas Piggin's on June 20, 2019 3:14 pm:
> The idle wake up code in the system reset interrupt is not very
> optimal. There are two requirements: perform idle wake up quickly;
> and save everything including CFAR for non-idle interrupts, with
> no performance requirement.
>
> The problem with p
Alastair D'Silva's on June 20, 2019 2:12 pm:
> From: Alastair D'Silva
>
> If an OpenCAPI context is to be used directly by a kernel driver, there
> may not be a suitable mm to use.
>
> The patch makes the mm parameter to ocxl_context_attach optional.
>
> Signed-off-by: Alastair D'Silva
Yeah I
For consistency. These may not be required on modern processors,
and they don't quite fit with the RFI_TO macros, but they should
be all removed in that case.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/power
Short forward and backward branches can be given number labels,
but larger significant divergences in code path a more readable
if they're given descriptive names.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/kernel/exceptions-64s.S | 10 +-
1 file changed, 5 insertions(+), 5 deletion
machine_check_early_common now branches to machine_check_handle_early
which is its only caller, and they're separated by a bunch of other
code which makes no sense.
This patch moves that other code out of the way, and removes the
branch instruction.
Signed-off-by: Nicholas Piggin
---
arch/power
72 matches
Mail list logo