* [v2 PATCH 1/5] powerpc/pseries: convert rtas_log_buf to linear allocation.
From: Mahesh J Salgaonkar @ 2018-06-07 10:06 UTC (permalink / raw)
To: linuxppc-dev
Cc: Aneesh Kumar K.V, Aneesh Kumar K.V, Michael Ellerman,
Laurent Dufour
In-Reply-To: <152836568375.29173.3046879842311381046.stgit@jupiter.in.ibm.com>
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
rtas_log_buf is a buffer to hold RTAS event data that are communicated
to kernel by hypervisor. This buffer is then used to pass RTAS event
data to user through proc fs. This buffer is allocated from vmalloc
(non-linear mapping) area.
On Machine check interrupt, register r3 points to RTAS extended event
log passed by hypervisor that contains the MCE event. The pseries
machine check handler then logs this error into rtas_log_buf. The
rtas_log_buf is a vmalloc-ed (non-linear) buffer we end up taking up a
page fault (vector 0x300) while accessing it. Since machine check
interrupt handler runs in NMI context we can not afford to take any
page fault. Page faults are not honored in NMI context and causes
kernel panic. This patch fixes this issue by allocating rtas_log_buf
using kmalloc.
Suggested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kernel/rtasd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c
index f915db93cd42..3957d4ae2ba2 100644
--- a/arch/powerpc/kernel/rtasd.c
+++ b/arch/powerpc/kernel/rtasd.c
@@ -559,7 +559,7 @@ static int __init rtas_event_scan_init(void)
rtas_error_log_max = rtas_get_error_log_max();
rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int);
- rtas_log_buf = vmalloc(rtas_error_log_buffer_max*LOG_NUMBER);
+ rtas_log_buf = kmalloc(rtas_error_log_buffer_max*LOG_NUMBER, GFP_KERNEL);
if (!rtas_log_buf) {
printk(KERN_ERR "rtasd: no memory\n");
return -ENOMEM;
^ permalink raw reply related
* [v2 PATCH 2/5] powerpc/pseries: Define MCE error event section.
From: Mahesh J Salgaonkar @ 2018-06-07 10:07 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Aneesh Kumar K.V, Michael Ellerman, Laurent Dufour
In-Reply-To: <152836568375.29173.3046879842311381046.stgit@jupiter.in.ibm.com>
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
On pseries, the machine check error details are part of RTAS extended
event log passed under Machine check exception section. This patch adds
the definition of rtas MCE event section and related helper
functions.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/rtas.h | 104 +++++++++++++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index ec9dd79398ee..3f2fba7ef23b 100644
--- a/arch/powerpc/include/asm/rtas.h
+++ b/arch/powerpc/include/asm/rtas.h
@@ -275,6 +275,7 @@ inline uint32_t rtas_ext_event_company_id(struct rtas_ext_event_log_v6 *ext_log)
#define PSERIES_ELOG_SECT_ID_CALL_HOME (('C' << 8) | 'H')
#define PSERIES_ELOG_SECT_ID_USER_DEF (('U' << 8) | 'D')
#define PSERIES_ELOG_SECT_ID_HOTPLUG (('H' << 8) | 'P')
+#define PSERIES_ELOG_SECT_ID_MCE (('M' << 8) | 'C')
/* Vendor specific Platform Event Log Format, Version 6, section header */
struct pseries_errorlog {
@@ -326,6 +327,109 @@ struct pseries_hp_errorlog {
#define PSERIES_HP_ELOG_ID_DRC_COUNT 3
#define PSERIES_HP_ELOG_ID_DRC_IC 4
+/* RTAS pseries MCE errorlog section */
+#pragma pack(push, 1)
+struct pseries_mc_errorlog {
+ __be32 fru_id;
+ __be32 proc_id;
+ uint8_t error_type;
+ union {
+ struct {
+ uint8_t ue_err_type;
+ /* XXXXXXXX
+ * X 1: Permanent or Transient UE.
+ * X 1: Effective address provided.
+ * X 1: Logical address provided.
+ * XX 2: Reserved.
+ * XXX 3: Type of UE error.
+ */
+ uint8_t reserved_1[6];
+ __be64 effective_address;
+ __be64 logical_address;
+ } ue_error;
+ struct {
+ uint8_t soft_err_type;
+ /* XXXXXXXX
+ * X 1: Effective address provided.
+ * XXXXX 5: Reserved.
+ * XX 2: Type of SLB/ERAT/TLB error.
+ */
+ uint8_t reserved_1[6];
+ __be64 effective_address;
+ uint8_t reserved_2[8];
+ } soft_error;
+ } u;
+};
+#pragma pack(pop)
+
+/* RTAS pseries MCE error types */
+#define PSERIES_MC_ERROR_TYPE_UE 0x00
+#define PSERIES_MC_ERROR_TYPE_SLB 0x01
+#define PSERIES_MC_ERROR_TYPE_ERAT 0x02
+#define PSERIES_MC_ERROR_TYPE_TLB 0x04
+#define PSERIES_MC_ERROR_TYPE_D_CACHE 0x05
+#define PSERIES_MC_ERROR_TYPE_I_CACHE 0x07
+
+/* RTAS pseries MCE error sub types */
+#define PSERIES_MC_ERROR_UE_INDETERMINATE 0
+#define PSERIES_MC_ERROR_UE_IFETCH 1
+#define PSERIES_MC_ERROR_UE_PAGE_TABLE_WALK_IFETCH 2
+#define PSERIES_MC_ERROR_UE_LOAD_STORE 3
+#define PSERIES_MC_ERROR_UE_PAGE_TABLE_WALK_LOAD_STORE 4
+
+#define PSERIES_MC_ERROR_SLB_PARITY 0
+#define PSERIES_MC_ERROR_SLB_MULTIHIT 1
+#define PSERIES_MC_ERROR_SLB_INDETERMINATE 2
+
+#define PSERIES_MC_ERROR_ERAT_PARITY 1
+#define PSERIES_MC_ERROR_ERAT_MULTIHIT 2
+#define PSERIES_MC_ERROR_ERAT_INDETERMINATE 3
+
+#define PSERIES_MC_ERROR_TLB_PARITY 1
+#define PSERIES_MC_ERROR_TLB_MULTIHIT 2
+#define PSERIES_MC_ERROR_TLB_INDETERMINATE 3
+
+static inline uint8_t rtas_mc_error_type(const struct pseries_mc_errorlog *mlog)
+{
+ return mlog->error_type;
+}
+
+static inline uint8_t rtas_mc_error_sub_type(
+ const struct pseries_mc_errorlog *mlog)
+{
+ switch (mlog->error_type) {
+ case PSERIES_MC_ERROR_TYPE_UE:
+ return (mlog->u.ue_error.ue_err_type & 0x07);
+ case PSERIES_MC_ERROR_TYPE_SLB:
+ case PSERIES_MC_ERROR_TYPE_ERAT:
+ case PSERIES_MC_ERROR_TYPE_TLB:
+ return (mlog->u.soft_error.soft_err_type & 0x03);
+ default:
+ return 0;
+ }
+}
+
+static inline uint64_t rtas_mc_get_effective_addr(
+ const struct pseries_mc_errorlog *mlog)
+{
+ uint64_t addr = 0;
+
+ switch (mlog->error_type) {
+ case PSERIES_MC_ERROR_TYPE_UE:
+ if (mlog->u.ue_error.ue_err_type & 0x40)
+ addr = mlog->u.ue_error.effective_address;
+ break;
+ case PSERIES_MC_ERROR_TYPE_SLB:
+ case PSERIES_MC_ERROR_TYPE_ERAT:
+ case PSERIES_MC_ERROR_TYPE_TLB:
+ if (mlog->u.soft_error.soft_err_type & 0x80)
+ addr = mlog->u.soft_error.effective_address;
+ default:
+ break;
+ }
+ return be64_to_cpu(addr);
+}
+
struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log,
uint16_t section_id);
^ permalink raw reply related
* [v2 PATCH 3/5] powerpc/pseries: Dump and flush SLB contents on SLB MCE errors.
From: Mahesh J Salgaonkar @ 2018-06-07 10:07 UTC (permalink / raw)
To: linuxppc-dev
Cc: Aneesh Kumar K.V, Michael Ellerman, Aneesh Kumar K.V,
Michael Ellerman, Laurent Dufour
In-Reply-To: <152836568375.29173.3046879842311381046.stgit@jupiter.in.ibm.com>
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
If we get a machine check exceptions due to SLB errors then dump the
current SLB contents which will be very much helpful in debugging the
root cause of SLB errors. On pseries, as of today system crashes on SLB
errors. These are soft errors and can be fixed by flushing the SLBs so
the kernel can continue to function instead of system crash. This patch
fixes that also.
With this patch the console will log SLB contents like below on SLB MCE
errors:
[ 822.711728] slb contents:
[ 822.711730] 00 c000000008000000 400ea1b217000500
[ 822.711731] 1T ESID= c00000 VSID= ea1b217 LLP:100
[ 822.711732] 01 d000000008000000 400d43642f000510
[ 822.711733] 1T ESID= d00000 VSID= d43642f LLP:110
[ 822.711734] 09 f000000008000000 400a86c85f000500
[ 822.711736] 1T ESID= f00000 VSID= a86c85f LLP:100
[ 822.711737] 10 00007f0008000000 400d1f26e3000d90
[ 822.711738] 1T ESID= 7f VSID= d1f26e3 LLP:110
[ 822.711739] 11 0000000018000000 000e3615f520fd90
[ 822.711740] 256M ESID= 1 VSID= e3615f520f LLP:110
[ 822.711740] 12 d000000008000000 400d43642f000510
[ 822.711741] 1T ESID= d00000 VSID= d43642f LLP:110
[ 822.711742] 13 d000000008000000 400d43642f000510
[ 822.711743] 1T ESID= d00000 VSID= d43642f LLP:110
Suggested-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 +
arch/powerpc/mm/slb.c | 35 +++++++++++++++++++++++++
arch/powerpc/platforms/pseries/ras.c | 29 ++++++++++++++++++++-
3 files changed, 64 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/book3s/64/mmu-hash.h b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
index 50ed64fba4ae..c0da68927235 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu-hash.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu-hash.h
@@ -487,6 +487,7 @@ extern void hpte_init_native(void);
extern void slb_initialize(void);
extern void slb_flush_and_rebolt(void);
+extern void slb_dump_contents(void);
extern void slb_vmalloc_update(void);
extern void slb_set_size(u16 size);
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 66577cc66dc9..799aa117cec3 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -145,6 +145,41 @@ void slb_flush_and_rebolt(void)
get_paca()->slb_cache_ptr = 0;
}
+void slb_dump_contents(void)
+{
+ int i;
+ unsigned long e, v;
+ unsigned long llp;
+
+ pr_err("slb contents:\n");
+ for (i = 0; i < mmu_slb_size; i++) {
+ asm volatile("slbmfee %0,%1" : "=r" (e) : "r" (i));
+ asm volatile("slbmfev %0,%1" : "=r" (v) : "r" (i));
+
+ if (!e && !v)
+ continue;
+
+ pr_err("%02d %016lx %016lx", i, e, v);
+
+ if (!(e & SLB_ESID_V)) {
+ pr_err("\n");
+ continue;
+ }
+ llp = v & SLB_VSID_LLP;
+ if (v & SLB_VSID_B_1T) {
+ pr_err(" 1T ESID=%9lx VSID=%13lx LLP:%3lx\n",
+ GET_ESID_1T(e),
+ (v & ~SLB_VSID_B) >> SLB_VSID_SHIFT_1T,
+ llp);
+ } else {
+ pr_err(" 256M ESID=%9lx VSID=%13lx LLP:%3lx\n",
+ GET_ESID(e),
+ (v & ~SLB_VSID_B) >> SLB_VSID_SHIFT,
+ llp);
+ }
+ }
+}
+
void slb_vmalloc_update(void)
{
unsigned long vflags;
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index 5e1ef9150182..7470a216cd6b 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -422,6 +422,31 @@ int pSeries_system_reset_exception(struct pt_regs *regs)
return 0; /* need to perform reset */
}
+static int mce_handle_error(struct rtas_error_log *errp)
+{
+ struct pseries_errorlog *pseries_log;
+ struct pseries_mc_errorlog *mce_log;
+ int disposition = rtas_error_disposition(errp);
+ uint8_t error_type;
+
+ pseries_log = get_pseries_errorlog(errp, PSERIES_ELOG_SECT_ID_MCE);
+ if (pseries_log == NULL)
+ goto out;
+
+ mce_log = (struct pseries_mc_errorlog *)pseries_log->data;
+ error_type = rtas_mc_error_type(mce_log);
+
+ if ((disposition == RTAS_DISP_NOT_RECOVERED) &&
+ (error_type == PSERIES_MC_ERROR_TYPE_SLB)) {
+ slb_dump_contents();
+ slb_flush_and_rebolt();
+ disposition = RTAS_DISP_FULLY_RECOVERED;
+ }
+
+out:
+ return disposition;
+}
+
/*
* See if we can recover from a machine check exception.
* This is only called on power4 (or above) and only via
@@ -434,7 +459,9 @@ int pSeries_system_reset_exception(struct pt_regs *regs)
static int recover_mce(struct pt_regs *regs, struct rtas_error_log *err)
{
int recovered = 0;
- int disposition = rtas_error_disposition(err);
+ int disposition;
+
+ disposition = mce_handle_error(err);
if (!(regs->msr & MSR_RI)) {
/* If MSR_RI isn't set, we cannot recover */
^ permalink raw reply related
* [v2 PATCH 4/5] powerpc/pseries: Display machine check error details.
From: Mahesh J Salgaonkar @ 2018-06-07 10:07 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Aneesh Kumar K.V, Michael Ellerman, Laurent Dufour
In-Reply-To: <152836568375.29173.3046879842311381046.stgit@jupiter.in.ibm.com>
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Extract the MCE eror details from RTAS extended log and display it to
console.
With this patch you should now see mce logs like below:
[ 142.371818] Severe Machine check interrupt [Recovered]
[ 142.371822] NIP [d00000000ca301b8]: init_module+0x1b8/0x338 [bork_kernel]
[ 142.371822] Initiator: CPU
[ 142.371823] Error type: SLB [Multihit]
[ 142.371824] Effective address: d00000000ca70000
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/include/asm/rtas.h | 5 +
arch/powerpc/platforms/pseries/ras.c | 128 +++++++++++++++++++++++++++++++++-
2 files changed, 131 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/asm/rtas.h b/arch/powerpc/include/asm/rtas.h
index 3f2fba7ef23b..8100a95c133a 100644
--- a/arch/powerpc/include/asm/rtas.h
+++ b/arch/powerpc/include/asm/rtas.h
@@ -190,6 +190,11 @@ static inline uint8_t rtas_error_extended(const struct rtas_error_log *elog)
return (elog->byte1 & 0x04) >> 2;
}
+static inline uint8_t rtas_error_initiator(const struct rtas_error_log *elog)
+{
+ return (elog->byte2 & 0xf0) >> 4;
+}
+
#define rtas_error_type(x) ((x)->byte3)
static inline
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index 7470a216cd6b..afdf05444bc2 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -422,7 +422,130 @@ int pSeries_system_reset_exception(struct pt_regs *regs)
return 0; /* need to perform reset */
}
-static int mce_handle_error(struct rtas_error_log *errp)
+#define VAL_TO_STRING(ar, val) ((val < ARRAY_SIZE(ar)) ? ar[val] : "Unknown")
+
+static void pseries_print_mce_info(struct pt_regs *regs,
+ struct rtas_error_log *errp, int disposition)
+{
+ const char *level, *sevstr;
+ struct pseries_errorlog *pseries_log;
+ struct pseries_mc_errorlog *mce_log;
+ uint8_t error_type, err_sub_type;
+ uint8_t initiator = rtas_error_initiator(errp);
+ uint64_t addr;
+
+ static const char * const initiators[] = {
+ "Unknown",
+ "CPU",
+ "PCI",
+ "ISA",
+ "Memory",
+ "Power Mgmt",
+ };
+ static const char * const mc_err_types[] = {
+ "UE",
+ "SLB",
+ "ERAT",
+ "TLB",
+ "D-Cache",
+ "Unknown",
+ "I-Cache",
+ };
+ static const char * const mc_ue_types[] = {
+ "Indeterminate",
+ "Instruction fetch",
+ "Page table walk ifetch",
+ "Load/Store",
+ "Page table walk Load/Store",
+ };
+
+ /* SLB sub errors valid values are 0x0, 0x1, 0x2 */
+ static const char * const mc_slb_types[] = {
+ "Parity",
+ "Multihit",
+ "Indeterminate",
+ };
+
+ /* TLB and ERAT sub errors valid values are 0x1, 0x2, 0x3 */
+ static const char * const mc_soft_types[] = {
+ "Unknown",
+ "Parity",
+ "Multihit",
+ "Indeterminate",
+ };
+
+ pseries_log = get_pseries_errorlog(errp, PSERIES_ELOG_SECT_ID_MCE);
+ if (pseries_log == NULL)
+ return;
+
+ mce_log = (struct pseries_mc_errorlog *)pseries_log->data;
+
+ error_type = rtas_mc_error_type(mce_log);
+ err_sub_type = rtas_mc_error_sub_type(mce_log);
+
+ switch (rtas_error_severity(errp)) {
+ case RTAS_SEVERITY_NO_ERROR:
+ level = KERN_INFO;
+ sevstr = "Harmless";
+ break;
+ case RTAS_SEVERITY_WARNING:
+ level = KERN_WARNING;
+ sevstr = "";
+ break;
+ case RTAS_SEVERITY_ERROR:
+ case RTAS_SEVERITY_ERROR_SYNC:
+ level = KERN_ERR;
+ sevstr = "Severe";
+ break;
+ case RTAS_SEVERITY_FATAL:
+ default:
+ level = KERN_ERR;
+ sevstr = "Fatal";
+ break;
+ }
+
+ printk("%s%s Machine check interrupt [%s]\n", level, sevstr,
+ disposition == RTAS_DISP_FULLY_RECOVERED ?
+ "Recovered" : "Not recovered");
+ if (user_mode(regs)) {
+ printk("%s NIP: [%016lx] PID: %d Comm: %s\n", level,
+ regs->nip, current->pid, current->comm);
+ } else {
+ printk("%s NIP [%016lx]: %pS\n", level, regs->nip,
+ (void *)regs->nip);
+ }
+ printk("%s Initiator: %s\n", level,
+ VAL_TO_STRING(initiators, initiator));
+
+ switch (error_type) {
+ case PSERIES_MC_ERROR_TYPE_UE:
+ printk("%s Error type: %s [%s]\n", level,
+ VAL_TO_STRING(mc_err_types, error_type),
+ VAL_TO_STRING(mc_ue_types, err_sub_type));
+ break;
+ case PSERIES_MC_ERROR_TYPE_SLB:
+ printk("%s Error type: %s [%s]\n", level,
+ VAL_TO_STRING(mc_err_types, error_type),
+ VAL_TO_STRING(mc_slb_types, err_sub_type));
+ break;
+ case PSERIES_MC_ERROR_TYPE_ERAT:
+ case PSERIES_MC_ERROR_TYPE_TLB:
+ printk("%s Error type: %s [%s]\n", level,
+ VAL_TO_STRING(mc_err_types, error_type),
+ VAL_TO_STRING(mc_soft_types, err_sub_type));
+ break;
+ default:
+ printk("%s Error type: %s\n", level,
+ VAL_TO_STRING(mc_err_types, error_type));
+ break;
+ }
+
+ addr = rtas_mc_get_effective_addr(mce_log);
+ if (addr)
+ printk("%s Effective address: %016llx\n", level, addr);
+}
+
+static int mce_handle_error(struct pt_regs *regs, struct rtas_error_log *errp)
{
struct pseries_errorlog *pseries_log;
struct pseries_mc_errorlog *mce_log;
@@ -442,6 +565,7 @@ static int mce_handle_error(struct rtas_error_log *errp)
slb_flush_and_rebolt();
disposition = RTAS_DISP_FULLY_RECOVERED;
}
+ pseries_print_mce_info(regs, errp, disposition);
out:
return disposition;
@@ -461,7 +585,7 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log *err)
int recovered = 0;
int disposition;
- disposition = mce_handle_error(err);
+ disposition = mce_handle_error(regs, err);
if (!(regs->msr & MSR_RI)) {
/* If MSR_RI isn't set, we cannot recover */
^ permalink raw reply related
* [v2 PATCH 5/5] powerpc/pseries: Fix endainness while restoring of
From: Mahesh J Salgaonkar @ 2018-06-07 10:08 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Aneesh Kumar K.V, Michael Ellerman, Laurent Dufour
In-Reply-To: <152836568375.29173.3046879842311381046.stgit@jupiter.in.ibm.com>
r3 in MCE handler.
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
During Machine Check interrupt on pseries platform, register r3 points
RTAS extended event log passed by hypervisor. Since hypervisor uses r3
to pass pointer to rtas log, it stores the original r3 value at the
start of the memory (first 8 bytes) pointed by r3. Since hypervisor
stores this info and rtas log is in BE format, linux should make
sure to restore r3 value in correct endian format.
Without this patch when MCE handler, after recovery, returns to code that
that caused the MCE may end up with Data SLB access interrupt for invalid
address followed by kernel panic or hang.
[ 62.878965] Severe Machine check interrupt [Recovered]
[ 62.878968] NIP [d00000000ca301b8]: init_module+0x1b8/0x338 [bork_kernel]
[ 62.878969] Initiator: CPU
[ 62.878970] Error type: SLB [Multihit]
[ 62.878971] Effective address: d00000000ca70000
cpu 0xa: Vector: 380 (Data SLB Access) at [c0000000fc7775b0]
pc: c0000000009694c0: vsnprintf+0x80/0x480
lr: c0000000009698e0: vscnprintf+0x20/0x60
sp: c0000000fc777830
msr: 8000000002009033
dar: a803a30c000000d0
current = 0xc00000000bc9ef00
paca = 0xc00000001eca5c00 softe: 3 irq_happened: 0x01
pid = 8860, comm = insmod
[c0000000fc7778b0] c0000000009698e0 vscnprintf+0x20/0x60
[c0000000fc7778e0] c00000000016b6c4 vprintk_emit+0xb4/0x4b0
[c0000000fc777960] c00000000016d40c vprintk_func+0x5c/0xd0
[c0000000fc777980] c00000000016cbb4 printk+0x38/0x4c
[c0000000fc7779a0] d00000000ca301c0 init_module+0x1c0/0x338 [bork_kernel]
[c0000000fc777a40] c00000000000d9c4 do_one_initcall+0x54/0x230
[c0000000fc777b00] c0000000001b3b74 do_init_module+0x8c/0x248
[c0000000fc777b90] c0000000001b2478 load_module+0x12b8/0x15b0
[c0000000fc777d30] c0000000001b29e8 sys_finit_module+0xa8/0x110
[c0000000fc777e30] c00000000000b204 system_call+0x58/0x6c
--- Exception: c00 (System Call) at 00007fff8bda0644
SP (7fffdfbfe980) is in userspace
This patch fixes this issue.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/platforms/pseries/ras.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/ras.c b/arch/powerpc/platforms/pseries/ras.c
index afdf05444bc2..cd9446980092 100644
--- a/arch/powerpc/platforms/pseries/ras.c
+++ b/arch/powerpc/platforms/pseries/ras.c
@@ -360,7 +360,7 @@ static struct rtas_error_log *fwnmi_get_errinfo(struct pt_regs *regs)
}
savep = __va(regs->gpr[3]);
- regs->gpr[3] = savep[0]; /* restore original r3 */
+ regs->gpr[3] = be64_to_cpu(savep[0]); /* restore original r3 */
/* If it isn't an extended log we can use the per cpu 64bit buffer */
h = (struct rtas_error_log *)&savep[1];
^ permalink raw reply related
* [PATCH 1/3] powerpc: make CPU selection logic generic in Makefile
From: Christophe Leroy @ 2018-06-07 10:10 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, npiggin
Cc: linux-kernel, linuxppc-dev
At the time being, when adding a new CPU for selection, both
Kconfig.cputype and Makefile have to be modified.
This patch moves into Kconfig.cputype the name of the CPU to me
passed to the -mcpu= argument.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/Makefile | 8 +-------
arch/powerpc/platforms/Kconfig.cputype | 15 +++++++++++++++
2 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 9704ab360d39..9a5642552abc 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -175,13 +175,7 @@ ifdef CONFIG_MPROFILE_KERNEL
endif
endif
-CFLAGS-$(CONFIG_CELL_CPU) += $(call cc-option,-mcpu=cell)
-CFLAGS-$(CONFIG_POWER5_CPU) += $(call cc-option,-mcpu=power5)
-CFLAGS-$(CONFIG_POWER6_CPU) += $(call cc-option,-mcpu=power6)
-CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc-option,-mcpu=power7)
-CFLAGS-$(CONFIG_POWER8_CPU) += $(call cc-option,-mcpu=power8)
-CFLAGS-$(CONFIG_POWER9_CPU) += $(call cc-option,-mcpu=power9)
-CFLAGS-$(CONFIG_PPC_8xx) += $(call cc-option,-mcpu=860)
+CFLAGS-$(CONFIG_SPECIAL_CPU_BOOL) += $(call cc-option,-mcpu=$(CONFIG_SPECIAL_CPU))
# Altivec option not allowed with e500mc64 in GCC.
ifeq ($(CONFIG_ALTIVEC),y)
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index cc892dcfa114..71ef559cc474 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -140,6 +140,21 @@ config E6500_CPU
endchoice
+config SPECIAL_CPU_BOOL
+ bool
+ default !GENERIC_CPU
+
+config SPECIAL_CPU
+ string
+ depends on SPECIAL_CPU_BOOL
+ default "cell" if CELL_CPU
+ default "power5" if POWER5_CPU
+ default "power6" if POWER6_CPU
+ default "power7" if POWER7_CPU
+ default "power8" if POWER8_CPU
+ default "power9" if POWER9_CPU
+ default "860" if PPC_8xx
+
config PPC_BOOK3S
def_bool y
depends on PPC_BOOK3S_32 || PPC_BOOK3S_64
--
2.13.3
^ permalink raw reply related
* [PATCH 2/3] powerpc: Allow CPU selection also on PPC32
From: Christophe Leroy @ 2018-06-07 10:10 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, npiggin
Cc: linux-kernel, linuxppc-dev
In-Reply-To: <273f8ed3e980b9385c6e1b31e17f890ea08ce33c.1528365638.git.christophe.leroy@c-s.fr>
This patch extends to PPC32 the capability to select the exact
CPU type.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/platforms/Kconfig.cputype | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index 71ef559cc474..ed7c6edec87e 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -86,7 +86,6 @@ endchoice
choice
prompt "CPU selection"
- depends on PPC64
default GENERIC_CPU
help
This will create a kernel which is optimised for a particular CPU.
@@ -96,13 +95,17 @@ choice
config GENERIC_CPU
bool "Generic (POWER4 and above)"
- depends on !CPU_LITTLE_ENDIAN
+ depends on PPC64 && !CPU_LITTLE_ENDIAN
config GENERIC_CPU
bool "Generic (POWER8 and above)"
- depends on CPU_LITTLE_ENDIAN
+ depends on PPC64 && CPU_LITTLE_ENDIAN
select ARCH_HAS_FAST_MULTIPLIER
+config GENERIC_CPU
+ bool "Generic 32 bits powerpc"
+ depends on PPC32 && !PPC_8xx
+
config CELL_CPU
bool "Cell Broadband Engine"
depends on PPC_BOOK3S_64 && !CPU_LITTLE_ENDIAN
@@ -138,6 +141,10 @@ config E6500_CPU
bool "Freescale e6500"
depends on E500
+config 860_CPU
+ bool "8xx family"
+ depends on PPC_8xx
+
endchoice
config SPECIAL_CPU_BOOL
@@ -153,7 +160,7 @@ config SPECIAL_CPU
default "power7" if POWER7_CPU
default "power8" if POWER8_CPU
default "power9" if POWER9_CPU
- default "860" if PPC_8xx
+ default "860" if 860_CPU
config PPC_BOOK3S
def_bool y
--
2.13.3
^ permalink raw reply related
* [PATCH 3/3] powerpc: Allow CPU selection of e300core variants
From: Christophe Leroy @ 2018-06-07 10:10 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman, npiggin
Cc: linux-kernel, linuxppc-dev
In-Reply-To: <273f8ed3e980b9385c6e1b31e17f890ea08ce33c.1528365638.git.christophe.leroy@c-s.fr>
GCC supports -mcpu=e300c2 and -mcpu=e300c3
This patch gives the opportunity to tune kernel to one of
those two types.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
arch/powerpc/platforms/Kconfig.cputype | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index ed7c6edec87e..d174acb41389 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -145,6 +145,14 @@ config 860_CPU
bool "8xx family"
depends on PPC_8xx
+config E300C2_CPU
+ bool "e300c2 (832x)"
+ depends on PPC_BOOK3S_32
+
+config E300C3_CPU
+ bool "e300c3 (831x)"
+ depends on PPC_BOOK3S_32
+
endchoice
config SPECIAL_CPU_BOOL
@@ -161,6 +169,8 @@ config SPECIAL_CPU
default "power8" if POWER8_CPU
default "power9" if POWER9_CPU
default "860" if 860_CPU
+ default "e300c2" if E300C2_CPU
+ default "e300c3" if E300C3_CPU
config PPC_BOOK3S
def_bool y
--
2.13.3
^ permalink raw reply related
* Re: Fwd: [powerpc/Baremetal]Kernel OOPS while executing memory hotplug on Power8 baremetal
From: vrbagal1 @ 2018-06-07 10:37 UTC (permalink / raw)
To: Bart Van Assche, axboe, kent.overstreet, snitzer, linux-block
Cc: linux-scsi, linuxppc-dev, sachinp, Linuxppc-dev
In-Reply-To: <042fc8ee69b74c57815c0edfdbb253495e9d7718.camel@wdc.com>
On 2018-06-07 13:12, Bart Van Assche wrote:
> On Thu, 2018-06-07 at 12:56 +0530, Venkat Rao B wrote:
>> On Thursday 07 June 2018 12:46 PM, Bart Van Assche wrote:
>> > On Thu, 2018-06-07 at 12:38 +0530, vrbagal1 wrote:
>> > > Observing Kernel oops and machine reboots while executing memory hotplug
>> > > test case, on Power8 Baremetal machine.
>> > >
>> > > I see this is introduced some where between rc6 and 4.17.
>> >
>> > Please provide the exact versions (git commit IDs) of the kernel versions
>> > you have tested.
>>
>> Commit Id ---> 5037be168f
>
> The reason I was asking for the commit ID is because I saw that
> clone_endio()
> occurs in the oops which means that the dm driver is involved. An
> important fix
> for the dm driver went upstream recently, namely d37753540568 ("dm: Use
> kzalloc
> for all structs with embedded biosets/mempools"). Can you double check
> whether
> that commit it present in your tree? If it is not present, please
> update to the
> latest master and retest. If it is present, please report how to
> reproduce
> this oops to Kent Overstreet, Jens Axboe, linux-block and Mike Snitzer.
>
> Thanks,
>
> Bart.
Yes, the fix is present in the tree, which I have tested.
Steps to reproduce:
Step1: Clone and Install avocado git clone
https://github.com/avocado-framework/avocado.git
Step2: Clone
https://github.com/avocado-framework-tests/avocado-misc-tests.git
Test case is
https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/memory/memhotplug.py
Step3: Command to run the test is avocado run
avocado-misc-tests/memory/memhotplug.py
Regards,
Venkat.
^ permalink raw reply
* Re: [v2 PATCH 0/5] powerpc/pseries: Machien check handler improvements.
From: Nicholas Piggin @ 2018-06-07 10:45 UTC (permalink / raw)
To: Mahesh J Salgaonkar; +Cc: linuxppc-dev, Laurent Dufour, Aneesh Kumar K.V
In-Reply-To: <152836568375.29173.3046879842311381046.stgit@jupiter.in.ibm.com>
On Thu, 07 Jun 2018 15:36:25 +0530
Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com> wrote:
> This patch series includes some improvement to Machine check handler
> for pseries. Patch 1 fixes an issue where machine check handler crashes
> kernel while accessing vmalloc-ed buffer while in nmi context.
> Patch 3 dumps the SLB contents on SLB MCE errors to improve the debugability.
> Patch 4 display's the MCE error details on console.
>
> Change in V2:
> - patch 4: Display additional info (NIP and task info) in MCE error details.
> - patch 5: Fix endain bug while restoring of r3 in MCE handler.
>
> ---
>
> Mahesh Salgaonkar (5):
> powerpc/pseries: convert rtas_log_buf to linear allocation.
> powerpc/pseries: Define MCE error event section.
> powerpc/pseries: Dump and flush SLB contents on SLB MCE errors.
> powerpc/pseries: Display machine check error details.
> powerpc/pseries: Fix endainness while restoring of r3 in MCE handler.
These look good, should patch 5 be moved to patch 2 and the first 2
patches marked for stable?
Do you also plan to dump SLB contents for bare metal MCEs?
Thanks,
Nick
^ permalink raw reply
* Re: [RFC PATCH -tip v5 07/27] powerpc/kprobes: Remove jprobe powerpc implementation
From: Naveen N. Rao @ 2018-06-07 11:31 UTC (permalink / raw)
To: Masami Hiramatsu, Ingo Molnar, Thomas Gleixner
Cc: Andrew Morton, Ananth N Mavinakayanahalli, Benjamin Herrenschmidt,
H . Peter Anvin, linux-arch, linux-kernel, linuxppc-dev,
Ingo Molnar, Michael Ellerman, Paul Mackerras, Steven Rostedt
In-Reply-To: <152812751377.10068.6090934299713110701.stgit@devbox>
Masami Hiramatsu wrote:
> Remove arch dependent setjump/longjump functions
> and unused fields in kprobe_ctlblk for jprobes
> from arch/powerpc. This also reverts commits
> related __is_active_jprobe() function.
>=20
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
>=20
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> ---
> arch/powerpc/include/asm/kprobes.h | 2 -
> arch/powerpc/kernel/kprobes-ftrace.c | 15 -------
> arch/powerpc/kernel/kprobes.c | 54 ------------------=
------
> arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 39 ++---------------
> 4 files changed, 5 insertions(+), 105 deletions(-)
LGTM.
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
- Naveen
=
^ permalink raw reply
* Re: [RFC PATCH -tip v5 18/27] powerpc/kprobes: Don't call the ->break_handler() in arm kprobes code
From: Naveen N. Rao @ 2018-06-07 11:37 UTC (permalink / raw)
To: Masami Hiramatsu, Ingo Molnar, Thomas Gleixner
Cc: Andrew Morton, H . Peter Anvin, linux-arch, linux-kernel,
linuxppc-dev, Ingo Molnar, Paul Mackerras, Steven Rostedt
In-Reply-To: <152812783350.10068.4690566636762511152.stgit@devbox>
Masami Hiramatsu wrote:
> Don't call the ->break_handler() from the arm kprobes code,
^^^ powerpc
> because it was only used by jprobes which got removed.
>=20
> This also makes skip_singlestep() a static function since
> only ftrace-kprobe.c is using this function.
>=20
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
> Cc: linuxppc-dev@lists.ozlabs.org
> ---
> arch/powerpc/include/asm/kprobes.h | 10 ----------
> arch/powerpc/kernel/kprobes-ftrace.c | 16 +++-------------
> arch/powerpc/kernel/kprobes.c | 31 +++++++++++-----------------=
---
> 3 files changed, 14 insertions(+), 43 deletions(-)
With 2 small comments...
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
- Naveen
>=20
> diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/as=
m/kprobes.h
> index 674036db558b..785c464b6588 100644
> --- a/arch/powerpc/include/asm/kprobes.h
> +++ b/arch/powerpc/include/asm/kprobes.h
> @@ -102,16 +102,6 @@ extern int kprobe_exceptions_notify(struct notifier_=
block *self,
> extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
> extern int kprobe_handler(struct pt_regs *regs);
> extern int kprobe_post_handler(struct pt_regs *regs);
> -#ifdef CONFIG_KPROBES_ON_FTRACE
> -extern int skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> - struct kprobe_ctlblk *kcb);
> -#else
> -static inline int skip_singlestep(struct kprobe *p, struct pt_regs *regs=
,
> - struct kprobe_ctlblk *kcb)
> -{
> - return 0;
> -}
> -#endif
> #else
> static inline int kprobe_handler(struct pt_regs *regs) { return 0; }
> static inline int kprobe_post_handler(struct pt_regs *regs) { return 0; =
}
> diff --git a/arch/powerpc/kernel/kprobes-ftrace.c b/arch/powerpc/kernel/k=
probes-ftrace.c
> index 1b316331c2d9..3869b0e5d5c7 100644
> --- a/arch/powerpc/kernel/kprobes-ftrace.c
> +++ b/arch/powerpc/kernel/kprobes-ftrace.c
> @@ -26,8 +26,8 @@
> #include <linux/ftrace.h>
>=20
> static nokprobe_inline
> -int __skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> - struct kprobe_ctlblk *kcb, unsigned long orig_nip)
> +int skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> + struct kprobe_ctlblk *kcb, unsigned long orig_nip)
> {
> /*
> * Emulate singlestep (and also recover regs->nip)
> @@ -44,16 +44,6 @@ int __skip_singlestep(struct kprobe *p, struct pt_regs=
*regs,
> return 1;
> }
>=20
> -int skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> - struct kprobe_ctlblk *kcb)
> -{
> - if (kprobe_ftrace(p))
> - return __skip_singlestep(p, regs, kcb, 0);
> - else
> - return 0;
> -}
> -NOKPROBE_SYMBOL(skip_singlestep);
> -
> /* Ftrace callback handler for kprobes */
> void kprobe_ftrace_handler(unsigned long nip, unsigned long parent_nip,
> struct ftrace_ops *ops, struct pt_regs *regs)
> @@ -82,7 +72,7 @@ void kprobe_ftrace_handler(unsigned long nip, unsigned =
long parent_nip,
> __this_cpu_write(current_kprobe, p);
> kcb->kprobe_status =3D KPROBE_HIT_ACTIVE;
> if (!p->pre_handler || !p->pre_handler(p, regs))
> - __skip_singlestep(p, regs, kcb, orig_nip);
> + skip_singlestep(p, regs, kcb, orig_nip);
We can probably get rid of skip_singlestep() completely along with=20
orig_nip since instructions are always 4 bytes on powerpc. So, the=20
changes we do to nip should help to recover the value automatically.
- Naveen
=
^ permalink raw reply
* Re: [RFC PATCH -tip v5 24/27] bpf: error-inject: kprobes: Clear current_kprobe and enable preempt in kprobe
From: Naveen N. Rao @ 2018-06-07 11:42 UTC (permalink / raw)
To: Masami Hiramatsu, Ingo Molnar, Thomas Gleixner
Cc: Andrew Morton, Alexei Starovoitov, Catalin Marinas, Rich Felker,
David S. Miller, Fenghua Yu, Heiko Carstens, H . Peter Anvin,
Josef Bacik, James Hogan, linux-arch, linux-arm-kernel,
Russell King, linux-ia64, linux-kernel, linux-mips, linuxppc-dev,
linux-s390, linux-sh, linux-snps-arc, Ingo Molnar, Paul Mackerras,
Ralf Baechle, Steven Rostedt, Martin Schwidefsky, sparclinux,
Tony Luck, Vineet Gupta, Will Deacon, x86, Yoshinori Sato
In-Reply-To: <152812800822.10068.3306094708706993432.stgit@devbox>
Masami Hiramatsu wrote:
> Clear current_kprobe and enable preemption in kprobe
> even if pre_handler returns !0.
>=20
> This simplifies function override using kprobes.
>=20
> Jprobe used to require to keep the preemption disabled and
> keep current_kprobe until it returned to original function
> entry. For this reason kprobe_int3_handler() and similar
> arch dependent kprobe handers checks pre_handler result
> and exit without enabling preemption if the result is !0.
>=20
> After removing the jprobe, Kprobes does not need to
> keep preempt disabled even if user handler returns !0
> anymore.
>=20
> But since the function override handler in error-inject
> and bpf is also returns !0 if it overrides a function,
> to balancing the preempt count, it enables preemption
> and reset current kprobe by itself.
>=20
> That is a bad design that is very buggy. This fixes
> such unbalanced preempt-count and current_kprobes setting
> in kprobes, bpf and error-inject.
>=20
> Note: for powerpc and x86, this removes all preempt_disable
> from kprobe_ftrace_handler because ftrace callbacks are
> called under preempt disabled.
>=20
> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: Russell King <linux@armlinux.org.uk>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Tony Luck <tony.luck@intel.com>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: James Hogan <jhogan@kernel.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
> Cc: Josef Bacik <jbacik@fb.com>
> Cc: Alexei Starovoitov <ast@kernel.org>
> Cc: x86@kernel.org
> Cc: linux-snps-arc@lists.infradead.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-ia64@vger.kernel.org
> Cc: linux-mips@linux-mips.org
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: linux-s390@vger.kernel.org
> Cc: linux-sh@vger.kernel.org
> Cc: sparclinux@vger.kernel.org
> ---
> Changes in v5:
> - Fix kprobe_ftrace_handler in arch/powerpc too.
> ---
> arch/arc/kernel/kprobes.c | 5 +++--
> arch/arm/probes/kprobes/core.c | 10 +++++-----
> arch/arm64/kernel/probes/kprobes.c | 10 +++++-----
> arch/ia64/kernel/kprobes.c | 13 ++++---------
> arch/mips/kernel/kprobes.c | 4 ++--
> arch/powerpc/kernel/kprobes-ftrace.c | 15 ++++++---------
> arch/powerpc/kernel/kprobes.c | 7 +++++--
For the powerpc bits:
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Thanks,
Naveen
=
^ permalink raw reply
* [GIT PULL] Please pull powerpc/linux.git powerpc-4.18-1 tag
From: Michael Ellerman @ 2018-06-07 12:00 UTC (permalink / raw)
To: Linus Torvalds
Cc: aik, akshay.adiga, alastair, andrew.donnellan, aneesh.kumar,
aneesh.kumar, anju, anton, arnd, bauerman, bsingharora,
christophe.leroy, clg, colin.king, dale, duwe, ego, fabio.estevam,
fbarrat, fthain, haren, hbathini, j.neuschaefer, jpoimboe,
jrdr.linux, linux-kernel, linux, linuxppc-dev, linuxram, maddy,
mahesh, malat, mgreer, mikey, msuchanek, naveen.n.rao, npiggin,
olof, paul.gortmaker, paulus, peda, ravi.bangoria, rdunlap, remi,
rostedt, ruscur, sbobroff, shilpa.bhat, stewart, vaibhav, vaibhav,
viro, wei.guo.simon, weiyongjun1, wsa+renesas, xieyisheng1,
yuehaibing
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi Linus,
Please pull powerpc updates for 4.18:
The following changes since commit 6da6c0db5316275015e8cc2959f12a17584aeb64:
Linux v4.17-rc3 (2018-04-29 14:17:42 -0700)
are available in the git repository at:
https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git tags/po=
werpc-4.18-1
for you to fetch changes up to ff5bc793e47b537bf3e904fada585e102c54dd8b:
powerpc/64s/radix: Fix missing ptesync in flush_cache_vmap (2018-06-06 18=
:50:53 +1000)
- ------------------------------------------------------------------
powerpc updates for 4.18
Notable changes:
- Support for split PMD page table lock on 64-bit Book3S (Power8/9).
- Add support for HAVE_RELIABLE_STACKTRACE, so we properly support live
patching again.
- Add support for patching barrier_nospec in copy_from_user() and syscall =
entry.
- A couple of fixes for our data breakpoints on Book3S.
- A series from Nick optimising TLB/mm handling with the Radix MMU.
- Numerous small cleanups to squash sparse/gcc warnings from Mathieu Malat=
erre.
- Several series optimising various parts of the 32-bit code from Christop=
he Leroy.
- Removal of support for two old machines, "SBC834xE" and "C2K" ("GEFanuc,=
C2K"),
which is why the diffstat has so many deletions.
And many other small improvements & fixes.
There's a few out-of-area changes. Some minor ftrace changes OK'ed by Steve=
, and
a fix to our powernv cpuidle driver. Then there's a series touching mm, x86=
and
fs/proc/task_mmu.c, which cleans up some details around pkey support. It was
ack'ed/reviewed by Ingo & Dave and has been in next for several weeks.
Thanks to:
Akshay Adiga, Alastair D'Silva, Alexey Kardashevskiy, Al Viro, Andrew
Donnellan, Aneesh Kumar K.V, Anju T Sudhakar, Arnd Bergmann, Balbir Singh,
C=C3=A9dric Le Goater, Christophe Leroy, Christophe Lombard, Colin Ian Ki=
ng, Dave
Hansen, Fabio Estevam, Finn Thain, Frederic Barrat, Gautham R. Shenoy, Ha=
ren
Myneni, Hari Bathini, Ingo Molnar, Jonathan Neusch=C3=A4fer, Josh Poimboe=
uf,
Kamalesh Babulal, Madhavan Srinivasan, Mahesh Salgaonkar, Mark Greer, Mat=
hieu
Malaterre, Matthew Wilcox, Michael Neuling, Michal Suchanek, Naveen N. Ra=
o,
Nicholas Piggin, Nicolai Stange, Olof Johansson, Paul Gortmaker, Paul
Mackerras, Peter Rosin, Pridhiviraj Paidipeddi, Ram Pai, Rashmica Gupta, =
Ravi
Bangoria, Russell Currey, Sam Bobroff, Samuel Mendoza-Jonas, Segher
Boessenkool, Shilpasri G Bhat, Simon Guo, Souptick Joarder, Stewart Smith,
Thiago Jung Bauermann, Torsten Duwe, Vaibhav Jain, Wei Yongjun, Wolfram S=
ang,
Yisheng Xie, YueHaibing.
- ------------------------------------------------------------------
Akshay Adiga (1):
powerpc/powernv/cpuidle: Init all present cpus for deep states
Al Viro (6):
powerpc/syscalls: Switch trivial cases to SYSCALL_DEFINE
powerpc/syscalls: signal_{32, 64} - switch to SYSCALL_DEFINE
powerpc/syscalls: switch rtas(2) to SYSCALL_DEFINE
powerpc/syscalls: kill ppc32_select()
powerpc/syscalls: timer_create can be handle by perfectly normal COMP=
AT_SYS_SPU
powerpc/ptrace: Use copy_{from, to}_user() rather than open-coding
Alastair D'Silva (7):
powerpc: Add TIDR CPU feature for POWER9
powerpc: Use TIDR CPU feature to control TIDR allocation
powerpc: use task_pid_nr() for TID allocation
ocxl: Rename pnv_ocxl_spa_remove_pe to clarify it's action
ocxl: Expose the thread_id needed for wait on POWER9
ocxl: Add an IOCTL so userspace knows what OCXL features are available
ocxl: Document new OCXL IOCTLs
Alexey Kardashevskiy (2):
powerpc/ioda: Use ibm, supported-tce-sizes for IOMMU page size mask
powerpc/powernv/ioda2: Remove redundant free of TCE pages
Aneesh Kumar K.V (20):
powerpc/kvm: Switch kvm pmd allocator to custom allocator
powerpc/mm/book3s64: Move book3s64 code to pgtable-book3s64
powerpc/mm: Use pmd_lockptr instead of opencoding it
powerpc/mm: Rename pte fragment functions
powerpc/mm/book3e/64: Remove unsupported 64Kpage size from 64bit booke
powerpc/mm/nohash: Remove pte fragment dependency from nohash
powerpc/mm/book3s64/4k: Switch 4k pagesize config to use pagetable fr=
agment
powerpc/book3s64/mm: Simplify the rcu callback for page table free
powerpc/mm: Implement helpers for pagetable fragment support at PMD l=
evel
powerpc/mm: Use page fragments for allocation page table at PMD level
powerpc/book3s64: Enable split pmd ptlock.
powerpc/livepatch: Fix build error with kprobes disabled.
powerpc/mm: Fix kernel crash on page table free
powerpc/mm/hugetlb: Update huge_ptep_set_access_flags to call __ptep_=
set_access_flags directly
powerpc/mm/radix: Move function from radix.h to pgtable-radix.c
powerpc/mm: Change function prototype
powerpc/mm/radix: Change pte relax sequence to handle nest MMU hang
powerpc/mm/hash: Add missing isync prior to kernel stack SLB switch
powerpc/mm/hugetlb: Update hugetlb related locks
powerpc/mm/hash: hard disable irq in the SLB insert path
Anju T Sudhakar (5):
powerpc/perf: Fix memory allocation for core-imc based on num_possibl=
e_cpus()
powerpc/perf: Rearrange memory freeing in imc init
powerpc/perf: Replace the direct return with goto statement
powerpc/perf: Return appropriate value for unknown domain
powerpc/perf: Unregister thread-imc if core-imc not supported
Arnd Bergmann (5):
powerpc: always enable RTC_LIB
powerpc: rtas: clean up time handling
powerpc: use time64_t in read_persistent_clock
powerpc: use time64_t in update_persistent_clock
powerpc: remove unused to_tm() helper
Balbir Singh (1):
Revert "powerpc/powernv: Increase memory block size to 1GB on radix"
Christophe Leroy (30):
powerpc/nohash: Remove hash related code from nohash headers.
powerpc/nohash: Remove _PAGE_BUSY
powerpc/nohash: Use IS_ENABLED() to simplify __set_pte_at()
powerpc: get rid of PMD_PAGE_SIZE() and _PMD_SIZE
Revert "powerpc/64: Fix checksum folding in csum_add()"
powerpc: Avoid an unnecessary test and branch in longjmp()
powerpc/32: Use stmw/lmw for registers save/restore in asm
powerpc/mm: Use instruction symbolic names in store_updates_sp()
powerpc/mm: Only read faulting instruction when necessary in do_page_=
fault()
powerpc/8xx: fix invalid register expression in head_8xx.S
powerpc/64: Fix strncpy() related build failures with GCC 8.1
powerpc: Fix build by disabling attribute-alias warning for SYSCALL_D=
EFINEx
powerpc/dma: remove unnecessary BUG()
powerpc/mm: constify FIRST_CONTEXT in mmu_context_nohash
powerpc/mm: Avoid unnecessary test and reduce code size
powerpc/mm: constify LAST_CONTEXT in mmu_context_nohash
powerpc/mm: Remove stale_map[] handling on non SMP processors
powerpc/64: optimises from64to32()
powerpc/misc: merge reloc_offset() and add_reloc_offset()
powerpc/boot: remove unused variable in mpc8xx
powerpc/8xx: Remove RTC clock on 88x
powerpc/signal32: Use fault_in_pages_readable() to prefault user cont=
ext
powerpc/lib: Adjust .balign inside string functions for PPC32
powerpc/32: Optimise __csum_partial()
powerpc: Implement csum_ipv6_magic in assembly
powerpc/Makefile: set -mcpu=3D860 flag for the 8xx
powerpc/time: inline arch_vtime_task_switch()
powerpc/lib: optimise 32 bits __clear_user()
powerpc/lib: optimise PPC32 memcmp
powerpc: fix build failure by disabling attribute-alias warning in pc=
i_32
Colin Ian King (4):
macintosh/windfarm: fix spelling mistake: "ttarged" -> "ttarget"
powerpc/rtas: Fix spelling mistake "Discharching" -> "Discharging"
powerpc: fix spelling mistake: "Usupported" -> "Unsupported"
powerpc-opal: fix spelling mistake "Uniterrupted" -> "Uninterrupted"
C=C3=A9dric Le Goater (4):
powerpc/64/kexec: fix race in kexec when XIVE is shutdown
powerpc/xive: fix hcall H_INT_RESET to support long busy delays
powerpc/xive: shutdown XIVE when kexec or kdump is performed
powerpc/xive: prepare all hcalls to support long busy delays
Fabio Estevam (1):
powerpc: cpm_gpio: Remove owner assignment from platform_driver
Finn Thain (1):
powerpc/lib: Fix "integer constant is too large" build failure
Gautham R. Shenoy (1):
cpuidle: powernv: Fix promotion from snooze if next state disabled
Haren Myneni (1):
powerpc/powernv: copy/paste - Mask SO bit in CR
Hari Bathini (1):
powerpc/fadump: Do not use hugepages when fadump is active
Jonathan Neusch=C3=A4fer (6):
powerpc: wii_defconfig: Disable Ethernet driver support code
powerpc: wii_defconfig: Enable GPIO-related options
powerpc: wii_defconfig: Enable Wii SDHCI driver
powerpc: wii_defconfig: Disable BCMA support
powerpc/embedded6xx/flipper-pic: Don't match all IRQ domains
powerpc/embedded6xx/hlwd-pic: Prevent interrupts from being handled b=
y Starlet
Josh Poimboeuf (1):
powerpc/modules: remove unused mod_arch_specific.toc field
Madhavan Srinivasan (1):
powerpc/perf: Update raw-event code encoding comment for power8
Mahesh Salgaonkar (2):
powerpc/fadump: exclude memory holes while reserving memory in second=
kernel
powerpc/fadump: Unregister fadump on kexec down path.
Mark Greer (5):
powerpc/embedded6xx: Remove C2K board support
powerpc/boot: Remove support for Marvell MPSC serial controller
powerpc/boot: Remove support for Marvell mv64x60 i2c controller
powerpc/boot: Remove core support for Marvell mv64x60 hostbridges
powerpc: Remove core support for Marvell mv64x60 hostbridges
Mathieu Malaterre (21):
powerpc/kvm: Prefer fault_in_pages_readable function
powerpc/xmon: Add __printf annotation to xmon_printf()
powerpc: Add __printf verification to prom_printf
powerpc/altivec: Add missing prototypes for altivec
powerpc/sparse: Fix plain integer as NULL pointer warning
powerpc/mm/radix: Use do/while(0) trick for single statement block
powerpc/wii: Make hlwd_pic_init function static
powerpc/chrp/setup: Remove idu_size variable and make some functions =
static
powerpc/powermac: Mark variable x as unused
powerpc/chrp/pci: Make some functions static
powerpc/powermac: Move pmac_pfunc_base_install prototype to header fi=
le
powerpc/powermac: Add missing prototype for note_bootable_part()
powerpc/52xx: Add missing functions prototypes
powerpc: Add missing prototype
powerpc/tau: Synchronize function prototypes and body
powerpc: Make function btext_initialize static
powerpc/tau: Make some function static
powerpc/chrp/time: Make some functions static, add missing header inc=
lude
powerpc/32: Add a missing include header
powerpc: Add a missing include header
powerpc/prom: Fix %u/%llx usage since prom_printf() change
Michael Ellerman (36):
powerpc: Only support DYNAMIC_FTRACE not static
tracing: Remove PPC32 wart from config TRACING_SUPPORT
mm/pkeys: Remove include of asm/mmu_context.h from pkeys.h
mm/pkeys, powerpc, x86: Provide an empty vma_pkey() in linux/pkeys.h
x86/pkeys: Move vma_pkey() into asm/pkeys.h
x86/pkeys: Add arch_pkeys_enabled()
mm/pkeys: Add an empty arch_pkeys_enabled()
powerpc/pkeys: Drop private VM_PKEY definitions
powerpc/pseries: hcall_exit tracepoint retval should be signed
powerpc/syscalls: Add COMPAT_SPU_NEW() macro
powerpc: Make it clearer that systbl check errors are errors
powerpc/lib: Fix feature fixup test of external branch
powerpc/lib: Fix the feature fixup tests to actually work
powerpc/lib: Rename ftr_fixup_test7 to ftr_fixup_test_too_big
powerpc/lib: Add alt patching test of branching past the last instruc=
tion
powerpc/prom: Drop support for old FDT versions
powerpc/powernv: Fix memtrace build when NUMA=3Dn
Merge branch 'topic/ppc-kvm' into next
powerpc/io: Add __raw_writeq_be() __raw_rm_writeq_be()
powerpc/powernv: Use __raw_[rm_]writeq_be() in pci-ioda.c
powerpc/powernv: Use __raw_[rm_]writeq_be() in npu-dma.c
powerpc/xmon: Specify the full format in DUMP() macro
powerpc/xmon: Realign paca dump fields
powerpc/xmon: Update paca fields dumped in xmon
Merge branch 'topic/ppc-kvm' into next
Merge branch 'topic/kbuild' into next
Merge branch 'fixes' into next
Merge branch 'topic/pkey' into next
powerpc: Rename thread_struct.fs to addr_limit
powerpc: Check address limit on user-mode return (TIF_FSCHECK)
powerpc/64: Save stack pointer when we hard disable interrupts
powerpc/nmi: Add an API for sending "safe" NMIs
powerpc/64s: Wire up arch_trigger_cpumask_backtrace()
powerpc/stacktrace: Update copyright
powerpc: Use barrier_nospec in copy_from_user()
powerpc/64: Use barrier_nospec in syscall entry
Michael Neuling (6):
powerpc/ptrace: Fix enforcement of DAWR constraints
powerpc/ptrace: Fix setting 512B aligned breakpoints with PTRACE_SET_=
DEBUGREG
selftests/powerpc: Remove redundant cp_abort test
selftests/powerpc: Add missing .gitignores
selftests/powerpc: Add ptrace hw breakpoint test
selftests/powerpc: Add perf breakpoint test
Michal Suchanek (6):
powerpc/xmon: Also setup debugger hooks when single-stepping
powerpc/64s: Add barrier_nospec
powerpc/64s: Add support for ori barrier_nospec patching
powerpc/64s: Patch barrier_nospec in modules
powerpc/64s: Enable barrier_nospec based on firmware settings
powerpc/64s: Enhance the information in cpu_show_spectre_v1()
Naveen N. Rao (10):
powerpc64/ftrace: Add a field in paca to disable ftrace in unsafe cod=
e paths
powerpc64/ftrace: Rearrange #ifdef sections in ftrace.h
powerpc64/ftrace: Add helpers to hard disable ftrace
powerpc64/ftrace: Delay enabling ftrace on secondary cpus
powerpc64/ftrace: Disable ftrace during hotplug
powerpc64/ftrace: Disable ftrace during kvm entry/exit
powerpc64/kexec: Hard disable ftrace before switching to the new kern=
el
powerpc64/module: Tighten detection of mcount call sites with -mprofi=
le-kernel
powerpc64/ftrace: Use the generic version of ftrace_replace_code()
powerpc64/ftrace: Implement support for ftrace_regs_caller()
Nicholas Piggin (32):
powerpc/config: powernv_defconfig updates
powerpc/watchdog: don't update the watchdog timestamp if a lockup is =
detected
powerpc/watchdog: provide more data in watchdog messages
selftests/powerpc: fix exec benchmark
powerpc/mm/radix: implement LPID based TLB flushes to be used by KVM
powerpc/powernv: Fix opal_event_shutdown() called with interrupts dis=
abled
powerpc/kbuild: Set default generic machine type for 32-bit compile
powerpc/kbuild: Remove CROSS32 defines from top level powerpc Makefile
powerpc/kbuild: Use flags variables rather than overriding LD/CC/AS
powerpc/64: irq_work avoid interrupt when called with hardware irqs e=
nabled
powerpc/pseries: put cede MSR[EE] check under IRQ_SOFT_MASK_DEBUG
powerpc/64s: micro-optimise __hard_irq_enable() for mtmsrd L=3D1 supp=
ort
powerpc/64: remove start_tb and accum_tb from thread_struct
powerpc/pseries: lparcfg calculate PURR on demand
powerpc: generic clockevents broadcast receiver call tick_receive_bro=
adcast
powerpc: allow soft-NMI watchdog to cover timer interrupts with large=
decrementers
powerpc: move timer broadcast code under GENERIC_CLOCKEVENTS_BROADCAS=
T ifdef
powerpc: move a stray NMI IPI case under NMI_IPI ifdef
powerpc/time: account broadcast timer event interrupts separately
powerpc/pmu/fsl: fix is_nmi test for irq mask change
powerpc/64: change softe to irqmask in show_regs and xmon
powerpc/powernv: call OPAL_QUIESCE before OPAL_SIGNAL_SYSTEM_RESET
powerpc/powernv: process all OPAL event interrupts with kopald
powerpc/64s/radix: do not flush TLB when relaxing access
powerpc/64s/radix: do not flush TLB on spurious fault
powerpc/64s/radix: make ptep_get_and_clear_full non-atomic for the fu=
ll case
powerpc/64s/radix: prefetch user address in update_mmu_cache
powerpc/64s/radix: avoid ptesync after set_pte and ptep_set_access_fl=
ags
powerpc/64s/radix: optimise pte_update
powerpc/64s/radix: flush remote CPUs out of single-threaded mm_cpumask
powerpc/64s: Fix compiler store ordering to SLB shadow area
powerpc/64s/radix: Fix missing ptesync in flush_cache_vmap
Olof Johansson (1):
powerpc/pasemi: Set PCI_SCAN_ALL_PCI_DEVS
Paul Gortmaker (1):
powerpc: remove retired sbc834x support
Peter Rosin (1):
powerpc/fsl/dts: fix the i2c-mux compatible for t104xqds
Ram Pai (4):
mm, powerpc, x86: define VM_PKEY_BITx bits if CONFIG_ARCH_HAS_PKEYS i=
s enabled
mm, powerpc, x86: introduce an additional vma bit for powerpc pkey
mm/pkeys, x86, powerpc: Display pkey in smaps if arch supports pkeys
powerpc/pkeys: Detach execute_only key on !PROT_EXEC
Ravi Bangoria (3):
powerpc/sstep: Introduce GETTYPE macro
powerpc/sstep: Fix kernel crash if VSX is not present
powerpc/sstep: Fix emulate_step test if VSX not present
Russell Currey (1):
powerpc/xive: Remove (almost) unused macros
Sam Bobroff (12):
powerpc/eeh: Add final message for successful recovery
powerpc/eeh: Fix use-after-release of EEH driver
powerpc/eeh: Remove unused eeh_pcid_name()
powerpc/eeh: Strengthen types of eeh traversal functions
powerpc/eeh: Add message when PE processing at parent
powerpc/eeh: Clean up pci_ers_result handling
powerpc/eeh: Introduce eeh_for_each_pe()
powerpc/eeh: Introduce eeh_edev_actionable()
powerpc/eeh: Introduce eeh_set_channel_state()
powerpc/eeh: Introduce eeh_set_irq_state()
powerpc/eeh: Cleaner handling of EEH_DEV_NO_HANDLER
powerpc/eeh: Refactor report functions
Shilpasri G Bhat (3):
powernv: opal-sensor: Add support to read 64bit sensor values
hwmon: (ibmpowernv): Add support to read 64 bit sensors
hwmon: (ibmpowernv) Add energy sensors
Simon Guo (3):
powerpc: Export msr_check_and_set() to modules
powerpc/reg: Add TEXASR related macros
powerpc: Export tm_enable()/tm_disable/tm_abort() APIs
Souptick Joarder (1):
powerpc/cell/spufs: Change return type to vm_fault_t
Stewart Smith (1):
hvc_opal: don't set tb_ticks_per_usec in udbg_init_opal_common()
Thiago Jung Bauermann (2):
selftests/powerpc: Add ptrace tests for Protection Key registers
selftests/powerpc: Add core file test for Protection Key registers
Torsten Duwe (1):
powerpc/livepatch: Implement reliable stack tracing for the consisten=
cy model
Vaibhav Jain (2):
cxl: Disable prefault_mode in Radix mode
cxl: Configure PSL to not use APC virtual machines
Wei Yongjun (1):
ocxl: Fix missing unlock on error in afu_ioctl_enable_p9_wait()
Wolfram Sang (1):
powerpc/watchdog: fix typo 'can by' to 'can be'
Yisheng Xie (1):
powerpc/xmon: use match_string() helper
YueHaibing (1):
powerpc/xics: Add missing of_node_put() in error path
Documentation/ABI/testing/sysfs-class-cxl | 4 +-
Documentation/accelerators/ocxl.rst | 11 +
Documentation/devicetree/bindings/marvell.txt | 516 ------------------
arch/powerpc/Kconfig | 3 +
arch/powerpc/Makefile | 32 +-
arch/powerpc/boot/Makefile | 23 +-
arch/powerpc/boot/cuboot-c2k.c | 189 -------
arch/powerpc/boot/dts/c2k.dts | 366 -------------
arch/powerpc/boot/dts/fsl/t104xqds.dtsi | 2 +-
arch/powerpc/boot/dts/sbc8349.dts | 331 ------------
arch/powerpc/boot/mpc8xx.c | 3 +-
arch/powerpc/boot/mpsc.c | 169 ------
arch/powerpc/boot/mv64x60.c | 581 -----------------=
----
arch/powerpc/boot/mv64x60.h | 70 ---
arch/powerpc/boot/mv64x60_i2c.c | 204 --------
arch/powerpc/boot/ops.h | 1 -
arch/powerpc/boot/serial.c | 4 -
arch/powerpc/configs/83xx/sbc834x_defconfig | 74 ---
arch/powerpc/configs/c2k_defconfig | 389 --------------
arch/powerpc/configs/powernv_defconfig | 108 ++--
arch/powerpc/configs/wii_defconfig | 14 +
arch/powerpc/include/asm/asm-prototypes.h | 20 +-
arch/powerpc/include/asm/barrier.h | 15 +
arch/powerpc/include/asm/book3s/32/pgalloc.h | 1 +
arch/powerpc/include/asm/book3s/32/pgtable.h | 7 +-
arch/powerpc/include/asm/book3s/64/hash-4k.h | 8 +-
arch/powerpc/include/asm/book3s/64/hash-64k.h | 7 +
arch/powerpc/include/asm/book3s/64/hash.h | 10 -
arch/powerpc/include/asm/book3s/64/mmu.h | 7 +-
arch/powerpc/include/asm/book3s/64/pgalloc.h | 46 +-
arch/powerpc/include/asm/book3s/64/pgtable.h | 28 +-
arch/powerpc/include/asm/book3s/64/radix-4k.h | 3 +
arch/powerpc/include/asm/book3s/64/radix-64k.h | 4 +
arch/powerpc/include/asm/book3s/64/radix.h | 86 ++-
.../powerpc/include/asm/book3s/64/tlbflush-radix.h | 7 +
arch/powerpc/include/asm/book3s/64/tlbflush.h | 12 +-
arch/powerpc/include/asm/cache.h | 3 +
arch/powerpc/include/asm/cacheflush.h | 14 +-
arch/powerpc/include/asm/checksum.h | 15 +-
arch/powerpc/include/asm/cputable.h | 3 +-
arch/powerpc/include/asm/cputime.h | 16 +-
arch/powerpc/include/asm/eeh.h | 11 +-
arch/powerpc/include/asm/feature-fixups.h | 9 +
arch/powerpc/include/asm/ftrace.h | 31 +-
arch/powerpc/include/asm/hardirq.h | 1 +
arch/powerpc/include/asm/hugetlb.h | 21 +-
arch/powerpc/include/asm/hw_irq.h | 11 +-
arch/powerpc/include/asm/imc-pmu.h | 1 +
arch/powerpc/include/asm/io.h | 10 +
arch/powerpc/include/asm/machdep.h | 2 +-
arch/powerpc/include/asm/mmu-book3e.h | 6 -
arch/powerpc/include/asm/mmu_context.h | 5 -
arch/powerpc/include/asm/module.h | 10 +-
arch/powerpc/include/asm/mpc52xx.h | 6 +-
arch/powerpc/include/asm/nmi.h | 6 +
arch/powerpc/include/asm/nohash/32/pgalloc.h | 1 +
arch/powerpc/include/asm/nohash/32/pgtable.h | 41 +-
arch/powerpc/include/asm/nohash/32/pte-40x.h | 3 -
arch/powerpc/include/asm/nohash/64/pgalloc.h | 95 ++--
arch/powerpc/include/asm/nohash/64/pgtable-64k.h | 57 --
arch/powerpc/include/asm/nohash/64/pgtable.h | 46 +-
arch/powerpc/include/asm/nohash/pgtable.h | 58 +-
arch/powerpc/include/asm/nohash/pte-book3e.h | 6 -
arch/powerpc/include/asm/opal-api.h | 8 +
arch/powerpc/include/asm/opal.h | 5 +-
arch/powerpc/include/asm/paca.h | 3 +-
arch/powerpc/include/asm/page.h | 1 +
arch/powerpc/include/asm/pgtable.h | 1 +
arch/powerpc/include/asm/pkeys.h | 13 -
arch/powerpc/include/asm/plpar_wrappers.h | 8 +-
arch/powerpc/include/asm/pmac_pfunc.h | 1 +
arch/powerpc/include/asm/pnv-ocxl.h | 2 +-
arch/powerpc/include/asm/ppc-opcode.h | 1 +
arch/powerpc/include/asm/ppc_asm.h | 6 +-
arch/powerpc/include/asm/processor.h | 10 +-
arch/powerpc/include/asm/pte-common.h | 8 -
arch/powerpc/include/asm/reg.h | 32 +-
arch/powerpc/include/asm/rheap.h | 3 +
arch/powerpc/include/asm/rtas.h | 2 +-
arch/powerpc/include/asm/setup.h | 9 +
arch/powerpc/include/asm/smp.h | 1 +
arch/powerpc/include/asm/sstep.h | 2 +
arch/powerpc/include/asm/switch_to.h | 1 -
arch/powerpc/include/asm/syscalls.h | 2 +-
arch/powerpc/include/asm/systbl.h | 6 +-
arch/powerpc/include/asm/thread_info.h | 8 +-
arch/powerpc/include/asm/time.h | 11 -
arch/powerpc/include/asm/tlb.h | 13 +
arch/powerpc/include/asm/tm.h | 2 -
arch/powerpc/include/asm/trace.h | 7 +-
arch/powerpc/include/asm/uaccess.h | 21 +-
arch/powerpc/include/asm/xive-regs.h | 6 -
arch/powerpc/include/asm/xmon.h | 2 +-
arch/powerpc/include/asm/xor.h | 12 +-
arch/powerpc/include/asm/xor_altivec.h | 19 +
arch/powerpc/kernel/align.c | 2 +-
arch/powerpc/kernel/asm-offsets.c | 1 +
arch/powerpc/kernel/btext.c | 10 +-
arch/powerpc/kernel/dma.c | 2 -
arch/powerpc/kernel/dt_cpu_ftrs.c | 1 +
arch/powerpc/kernel/eeh.c | 19 +-
arch/powerpc/kernel/eeh_driver.c | 496 ++++++++++--------
arch/powerpc/kernel/eeh_pe.c | 26 +-
arch/powerpc/kernel/entry_64.S | 11 +
arch/powerpc/kernel/exceptions-64s.S | 1 +
arch/powerpc/kernel/fadump.c | 40 +-
arch/powerpc/kernel/head_8xx.S | 2 +-
arch/powerpc/kernel/hw_breakpoint.c | 4 +-
arch/powerpc/kernel/irq.c | 8 +-
arch/powerpc/kernel/kvm.c | 4 +-
arch/powerpc/kernel/machine_kexec.c | 2 +
arch/powerpc/kernel/machine_kexec_64.c | 8 +-
arch/powerpc/kernel/misc.S | 36 +-
arch/powerpc/kernel/module.c | 6 +
arch/powerpc/kernel/module_32.c | 4 +-
arch/powerpc/kernel/module_64.c | 44 +-
arch/powerpc/kernel/nvram_64.c | 4 +-
arch/powerpc/kernel/pci_32.c | 11 +-
arch/powerpc/kernel/pci_64.c | 8 +-
arch/powerpc/kernel/ppc_save_regs.S | 4 +
arch/powerpc/kernel/process.c | 147 ++----
arch/powerpc/kernel/prom.c | 23 +-
arch/powerpc/kernel/prom_init.c | 189 ++++---
arch/powerpc/kernel/ptrace.c | 21 +-
arch/powerpc/kernel/rtas-proc.c | 26 +-
arch/powerpc/kernel/rtas-rtc.c | 4 +-
arch/powerpc/kernel/rtas.c | 7 +-
arch/powerpc/kernel/security.c | 71 +++
arch/powerpc/kernel/setup-common.c | 6 -
arch/powerpc/kernel/setup.h | 6 +
arch/powerpc/kernel/setup_64.c | 7 +
arch/powerpc/kernel/signal.c | 4 +
arch/powerpc/kernel/signal.h | 6 +-
arch/powerpc/kernel/signal_32.c | 61 ++-
arch/powerpc/kernel/signal_64.c | 19 +-
arch/powerpc/kernel/smp.c | 46 +-
arch/powerpc/kernel/stacktrace.c | 181 ++++++-
arch/powerpc/kernel/sys_ppc32.c | 9 -
arch/powerpc/kernel/syscalls.c | 4 +
arch/powerpc/kernel/systbl.S | 2 +-
arch/powerpc/kernel/systbl_chk.c | 2 +-
arch/powerpc/kernel/systbl_chk.sh | 4 +-
arch/powerpc/kernel/tau_6xx.c | 15 +-
arch/powerpc/kernel/time.c | 227 +++-----
arch/powerpc/kernel/tm.S | 12 +
arch/powerpc/kernel/trace/ftrace.c | 212 ++++++--
arch/powerpc/kernel/trace/ftrace_32.S | 20 -
arch/powerpc/kernel/trace/ftrace_64.S | 29 -
arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 88 +++-
arch/powerpc/kernel/trace/ftrace_64_pg.S | 6 +-
arch/powerpc/kernel/vdso32/Makefile | 15 +-
arch/powerpc/kernel/vecemu.c | 1 +
arch/powerpc/kernel/vmlinux.lds.S | 7 +
arch/powerpc/kernel/watchdog.c | 32 +-
arch/powerpc/kvm/book3s_64_mmu_radix.c | 36 +-
arch/powerpc/kvm/book3s_hv.c | 4 +
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 3 +
arch/powerpc/lib/Makefile | 5 +-
arch/powerpc/lib/checksum_32.S | 46 +-
arch/powerpc/lib/checksum_64.S | 28 +
arch/powerpc/lib/feature-fixups-test.S | 42 +-
arch/powerpc/lib/feature-fixups.c | 60 ++-
arch/powerpc/lib/memcmp_32.S | 45 ++
arch/powerpc/lib/sstep.c | 26 +-
arch/powerpc/lib/string.S | 70 +--
arch/powerpc/lib/string_32.S | 90 ++++
arch/powerpc/lib/test_emulate_step.c | 21 +-
arch/powerpc/lib/xor_vmx_glue.c | 1 +
arch/powerpc/mm/fault.c | 76 ++-
arch/powerpc/mm/hash_utils_64.c | 10 +-
arch/powerpc/mm/hugetlbpage.c | 40 +-
arch/powerpc/mm/mem.c | 4 +-
arch/powerpc/mm/mmu_context.c | 6 +-
arch/powerpc/mm/mmu_context_book3s64.c | 39 +-
arch/powerpc/mm/mmu_context_nohash.c | 135 ++---
arch/powerpc/mm/pgtable-book3s64.c | 279 +++++++++-
arch/powerpc/mm/pgtable-hash64.c | 8 +-
arch/powerpc/mm/pgtable-radix.c | 38 +-
arch/powerpc/mm/pgtable.c | 49 +-
arch/powerpc/mm/pgtable_64.c | 171 ------
arch/powerpc/mm/pkeys.c | 4 +-
arch/powerpc/mm/ppc_mmu_32.c | 2 +-
arch/powerpc/mm/slb.c | 21 +-
arch/powerpc/mm/subpage-prot.c | 8 +-
arch/powerpc/mm/tlb-radix.c | 366 ++++++++++++-
arch/powerpc/mm/tlb_hash32.c | 10 +-
arch/powerpc/perf/core-fsl-emb.c | 2 +-
arch/powerpc/perf/imc-pmu.c | 68 ++-
arch/powerpc/perf/isa207-common.h | 64 ---
arch/powerpc/perf/power8-pmu.c | 64 +++
arch/powerpc/platforms/83xx/Kconfig | 7 -
arch/powerpc/platforms/83xx/Makefile | 1 -
arch/powerpc/platforms/83xx/sbc834x.c | 73 ---
arch/powerpc/platforms/8xx/adder875.c | 2 -
arch/powerpc/platforms/8xx/ep88xc.c | 2 -
arch/powerpc/platforms/8xx/m8xx_setup.c | 11 +-
arch/powerpc/platforms/8xx/mpc885ads_setup.c | 2 -
arch/powerpc/platforms/Kconfig.cputype | 4 +
arch/powerpc/platforms/cell/spu_callbacks.c | 2 +-
arch/powerpc/platforms/cell/spu_syscalls.c | 3 +-
arch/powerpc/platforms/cell/spufs/file.c | 33 +-
arch/powerpc/platforms/chrp/pci.c | 12 +-
arch/powerpc/platforms/chrp/setup.c | 12 +-
arch/powerpc/platforms/chrp/time.c | 6 +-
arch/powerpc/platforms/embedded6xx/Kconfig | 10 -
arch/powerpc/platforms/embedded6xx/Makefile | 1 -
arch/powerpc/platforms/embedded6xx/c2k.c | 148 ------
arch/powerpc/platforms/embedded6xx/flipper-pic.c | 8 -
arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 7 +-
arch/powerpc/platforms/maple/maple.h | 2 +-
arch/powerpc/platforms/maple/time.c | 5 +-
arch/powerpc/platforms/pasemi/pasemi.h | 2 +-
arch/powerpc/platforms/pasemi/pci.c | 2 +
arch/powerpc/platforms/pasemi/time.c | 4 +-
arch/powerpc/platforms/powermac/bootx_init.c | 6 +-
arch/powerpc/platforms/powermac/pci.c | 4 +-
arch/powerpc/platforms/powermac/pmac.h | 2 +-
arch/powerpc/platforms/powermac/setup.c | 9 +-
arch/powerpc/platforms/powermac/smp.c | 1 -
arch/powerpc/platforms/powermac/time.c | 48 +-
arch/powerpc/platforms/powernv/copy-paste.h | 6 +-
arch/powerpc/platforms/powernv/idle.c | 4 +-
arch/powerpc/platforms/powernv/memtrace.c | 2 +-
arch/powerpc/platforms/powernv/npu-dma.c | 5 +-
arch/powerpc/platforms/powernv/ocxl.c | 4 +-
arch/powerpc/platforms/powernv/opal-hmi.c | 2 +-
arch/powerpc/platforms/powernv/opal-imc.c | 22 +-
arch/powerpc/platforms/powernv/opal-irqchip.c | 89 ++--
arch/powerpc/platforms/powernv/opal-rtc.c | 5 +-
arch/powerpc/platforms/powernv/opal-sensor.c | 53 ++
arch/powerpc/platforms/powernv/opal-wrappers.S | 2 +
arch/powerpc/platforms/powernv/opal.c | 23 +-
arch/powerpc/platforms/powernv/pci-ioda.c | 46 +-
arch/powerpc/platforms/powernv/powernv.h | 3 +-
arch/powerpc/platforms/powernv/setup.c | 11 +-
arch/powerpc/platforms/powernv/smp.c | 17 +-
arch/powerpc/platforms/ps3/platform.h | 2 +-
arch/powerpc/platforms/ps3/repository.c | 4 +-
arch/powerpc/platforms/ps3/time.c | 26 +-
arch/powerpc/platforms/pseries/hvCall_inst.c | 2 +-
arch/powerpc/platforms/pseries/kexec.c | 7 +-
arch/powerpc/platforms/pseries/lpar.c | 3 +-
arch/powerpc/platforms/pseries/lparcfg.c | 18 +-
arch/powerpc/platforms/pseries/setup.c | 1 +
arch/powerpc/sysdev/Makefile | 3 -
arch/powerpc/sysdev/cpm_gpio.c | 1 -
arch/powerpc/sysdev/mv64x60.h | 13 -
arch/powerpc/sysdev/mv64x60_dev.c | 535 -----------------=
--
arch/powerpc/sysdev/mv64x60_pci.c | 171 ------
arch/powerpc/sysdev/mv64x60_pic.c | 297 -----------
arch/powerpc/sysdev/mv64x60_udbg.c | 152 ------
arch/powerpc/sysdev/xics/xics-common.c | 7 +-
arch/powerpc/sysdev/xive/native.c | 2 +-
arch/powerpc/sysdev/xive/spapr.c | 88 +++-
arch/powerpc/tools/gcc-check-mprofile-kernel.sh | 12 +-
arch/powerpc/xmon/nonstdio.h | 8 +-
arch/powerpc/xmon/spu-dis.c | 18 +-
arch/powerpc/xmon/xmon.c | 261 ++++-----
arch/x86/include/asm/mmu_context.h | 15 -
arch/x86/include/asm/pkeys.h | 13 +
arch/x86/kernel/setup.c | 8 -
drivers/cpuidle/cpuidle-powernv.c | 32 +-
drivers/hwmon/ibmpowernv.c | 9 +-
drivers/macintosh/via-pmu.c | 18 +-
drivers/macintosh/windfarm_pm121.c | 2 +-
drivers/macintosh/windfarm_pm81.c | 2 +-
drivers/macintosh/windfarm_pm91.c | 2 +-
drivers/misc/cxl/pci.c | 4 +-
drivers/misc/cxl/sysfs.c | 16 +-
drivers/misc/ocxl/context.c | 5 +-
drivers/misc/ocxl/file.c | 80 +++
drivers/misc/ocxl/link.c | 38 +-
drivers/misc/ocxl/ocxl_internal.h | 1 +
drivers/tty/hvc/hvc_opal.c | 1 -
fs/proc/task_mmu.c | 13 +-
include/linux/mm.h | 14 +-
include/linux/pkeys.h | 13 +-
include/misc/ocxl.h | 9 +
include/uapi/misc/ocxl.h | 14 +
kernel/sys_ni.c | 2 +-
kernel/trace/Kconfig | 6 +-
scripts/recordmcount.pl | 18 +-
tools/testing/selftests/powerpc/Makefile | 1 -
.../testing/selftests/powerpc/alignment/.gitignore | 1 +
.../selftests/powerpc/benchmarks/exec_target.c | 7 +-
.../selftests/powerpc/context_switch/.gitignore | 1 -
.../selftests/powerpc/context_switch/Makefile | 5 -
.../selftests/powerpc/context_switch/cp_abort.c | 110 ----
tools/testing/selftests/powerpc/include/reg.h | 1 +
tools/testing/selftests/powerpc/ptrace/.gitignore | 2 +
tools/testing/selftests/powerpc/ptrace/Makefile | 6 +-
tools/testing/selftests/powerpc/ptrace/child.h | 139 +++++
tools/testing/selftests/powerpc/ptrace/core-pkey.c | 461 ++++++++++++++++
.../selftests/powerpc/ptrace/perf-hwbreak.c | 195 +++++++
.../selftests/powerpc/ptrace/ptrace-hwbreak.c | 342 ++++++++++++
.../testing/selftests/powerpc/ptrace/ptrace-pkey.c | 327 ++++++++++++
tools/testing/selftests/powerpc/ptrace/ptrace.h | 38 ++
tools/testing/selftests/powerpc/tm/.gitignore | 1 +
298 files changed, 5696 insertions(+), 6903 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/marvell.txt
delete mode 100644 arch/powerpc/boot/cuboot-c2k.c
delete mode 100644 arch/powerpc/boot/dts/c2k.dts
delete mode 100644 arch/powerpc/boot/dts/sbc8349.dts
delete mode 100644 arch/powerpc/boot/mpsc.c
delete mode 100644 arch/powerpc/boot/mv64x60.c
delete mode 100644 arch/powerpc/boot/mv64x60.h
delete mode 100644 arch/powerpc/boot/mv64x60_i2c.c
delete mode 100644 arch/powerpc/configs/83xx/sbc834x_defconfig
delete mode 100644 arch/powerpc/configs/c2k_defconfig
delete mode 100644 arch/powerpc/include/asm/nohash/64/pgtable-64k.h
create mode 100644 arch/powerpc/include/asm/xor_altivec.h
create mode 100644 arch/powerpc/lib/memcmp_32.S
create mode 100644 arch/powerpc/lib/string_32.S
delete mode 100644 arch/powerpc/platforms/83xx/sbc834x.c
delete mode 100644 arch/powerpc/platforms/embedded6xx/c2k.c
delete mode 100644 arch/powerpc/sysdev/mv64x60.h
delete mode 100644 arch/powerpc/sysdev/mv64x60_dev.c
delete mode 100644 arch/powerpc/sysdev/mv64x60_pci.c
delete mode 100644 arch/powerpc/sysdev/mv64x60_pic.c
delete mode 100644 arch/powerpc/sysdev/mv64x60_udbg.c
delete mode 100644 tools/testing/selftests/powerpc/context_switch/.gitigno=
re
delete mode 100644 tools/testing/selftests/powerpc/context_switch/Makefile
delete mode 100644 tools/testing/selftests/powerpc/context_switch/cp_abort=
.c
create mode 100644 tools/testing/selftests/powerpc/ptrace/child.h
create mode 100644 tools/testing/selftests/powerpc/ptrace/core-pkey.c
create mode 100644 tools/testing/selftests/powerpc/ptrace/perf-hwbreak.c
create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c
create mode 100644 tools/testing/selftests/powerpc/ptrace/ptrace-pkey.c
-----BEGIN PGP SIGNATURE-----
iQIcBAEBCAAGBQJbGR2pAAoJEFHr6jzI4aWAzq8QAJEPg0NmJ2CHmwqYCmrUG5HQ
NelMOxgWUCaOpXaQ6dWHhSgXMfK82cM7xQ1MjlsBdUCdfTRfaqVCjXCXvXiPDo/T
2ST0JT6xe8MoPT8RbqYY5dguaFbwdgDMsf0cgglOmWOegnyVUOEH7D9KiJ5iUeb0
dUq0ZsZ7vroQFCw3wJwsRwTBw+a8Jtb6yM8QWujzo4TOePpgWVr2qJvcBUPieOcf
kkheIQgp3Q7N1AK+LEx8gODrWKClkoKv5ACxXYzC4xvhFMA7H9PYVY1YB2/68Db6
NHBkeCoxYC8RwfDLczEpQnj8FgOfatJNqcCygqe/fHPGB9mydZNSSaIgJwyd64Rz
Nkqy6wzirPSAbVr0mpx/RNQaraWDDoLHCk7QK/1QrS/cpJb6bvURqjsMwkRVCnS+
x5MZvgb+Pkdt1aXXT6X6Qgso3QbNYvqJRmya9tjnUfyrorauwu+Grj8AteU50ACC
n8hSppD7qqU99KqoySsgrHsqj+ShrVL6n/TgOJOkdMtJexGoMxsUy1UgWO2pxqFc
uOsekJaxYrPHRnDkePTRUTHa27oqj0MJ5kwYBM1P0W6O5L1VY21IVzALgmj0O+6r
KC+ONQVCst7jlVF5E0vTBnzDrp30WOZVxmU9iGb0ha9X/JU0pvHaci7CXtKpko33
705n/Q3r4XFNNbHc4zfN
=3D2yFv
-----END PGP SIGNATURE-----
^ permalink raw reply
* Re: Fwd: [powerpc/Baremetal]Kernel OOPS while executing memory hotplug on Power8 baremetal
From: Michael Ellerman @ 2018-06-07 12:51 UTC (permalink / raw)
To: vrbagal1, Bart Van Assche, axboe, kent.overstreet, snitzer,
linux-block
Cc: sachinp, Linuxppc-dev, linuxppc-dev, linux-scsi
In-Reply-To: <e01428cf15ab45bd42a45a14424e5384@linux.vnet.ibm.com>
vrbagal1 <vrbagal1@linux.vnet.ibm.com> writes:
> On 2018-06-07 13:12, Bart Van Assche wrote:
>> On Thu, 2018-06-07 at 12:56 +0530, Venkat Rao B wrote:
>>> On Thursday 07 June 2018 12:46 PM, Bart Van Assche wrote:
>>> > On Thu, 2018-06-07 at 12:38 +0530, vrbagal1 wrote:
>>> > > Observing Kernel oops and machine reboots while executing memory hotplug
>>> > > test case, on Power8 Baremetal machine.
>>> > >
>>> > > I see this is introduced some where between rc6 and 4.17.
>>> >
>>> > Please provide the exact versions (git commit IDs) of the kernel versions
>>> > you have tested.
>>>
>>> Commit Id ---> 5037be168f
>>
>> The reason I was asking for the commit ID is because I saw that
>> clone_endio()
>> occurs in the oops which means that the dm driver is involved. An
>> important fix
>> for the dm driver went upstream recently, namely d37753540568 ("dm: Use
>> kzalloc
>> for all structs with embedded biosets/mempools"). Can you double check
>> whether
>> that commit it present in your tree? If it is not present, please
>> update to the
>> latest master and retest. If it is present, please report how to
>> reproduce
>> this oops to Kent Overstreet, Jens Axboe, linux-block and Mike Snitzer.
>>
>> Thanks,
>>
>> Bart.
>
>
> Yes, the fix is present in the tree, which I have tested.
>
> Steps to reproduce:
>
> Step1: Clone and Install avocado git clone
> https://github.com/avocado-framework/avocado.git
> Step2: Clone
> https://github.com/avocado-framework-tests/avocado-misc-tests.git
> Test case is
> https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/memory/memhotplug.py
> Step3: Command to run the test is avocado run
> avocado-misc-tests/memory/memhotplug.py
That gave me:
$ avocado run avocado-misc-tests/memory/memhotplug.py
avocado: command not found
Was I meant to install it?
I tried this which worked (I think):
$ ./scripts/avocado run avocado-misc-tests/memory/memhotplug.py
Failed to load plugin from module "avocado_runner_vm": ImportError('No module named libvirt',)
JOB ID : 28deb5a455fb876a7e177deb2b46eab640f313c8
JOB LOG : /home/michael/avocado/job-results/job-2018-06-07T22.27-28deb5a/job.log
(1/4) avocado-misc-tests/memory/memhotplug.py:memstress.test_hotplug_loop: PASS (10.62 s)
(2/4) avocado-misc-tests/memory/memhotplug.py:memstress.test_hotplug_toggle: PASS (245.15 s)
(3/4) avocado-misc-tests/memory/memhotplug.py:memstress.test_dlpar_mem_hotplug: PASS (0.37 s)
(4/4) avocado-misc-tests/memory/memhotplug.py:memstress.test_hotplug_per_numa_node: PASS (41.09 s)
RESULTS : PASS 4 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME : 323.45 s
JOB HTML : /home/michael/avocado/job-results/job-2018-06-07T22.27-28deb5a/results.html
So what's different about your system?
What does 'lsblk -O' say on your system?
cheers
^ permalink raw reply
* Re: [RFC PATCH -tip v5 07/27] powerpc/kprobes: Remove jprobe powerpc implementation
From: Masami Hiramatsu @ 2018-06-07 14:23 UTC (permalink / raw)
To: Naveen N. Rao
Cc: Ingo Molnar, Thomas Gleixner, Andrew Morton,
Ananth N Mavinakayanahalli, Benjamin Herrenschmidt,
H . Peter Anvin, linux-arch, linux-kernel, linuxppc-dev,
Ingo Molnar, Michael Ellerman, Paul Mackerras, Steven Rostedt
In-Reply-To: <1528370755.shi1gq6h7g.naveen@linux.ibm.com>
On Thu, 07 Jun 2018 17:01:23 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
> Masami Hiramatsu wrote:
> > Remove arch dependent setjump/longjump functions
> > and unused fields in kprobe_ctlblk for jprobes
> > from arch/powerpc. This also reverts commits
> > related __is_active_jprobe() function.
> >
> > Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> >
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > ---
> > arch/powerpc/include/asm/kprobes.h | 2 -
> > arch/powerpc/kernel/kprobes-ftrace.c | 15 -------
> > arch/powerpc/kernel/kprobes.c | 54 ------------------------
> > arch/powerpc/kernel/trace/ftrace_64_mprofile.S | 39 ++---------------
> > 4 files changed, 5 insertions(+), 105 deletions(-)
>
> LGTM.
>
> Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Thanks Naveen!
>
> - Naveen
>
>
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply
* Re: [RFC PATCH -tip v5 18/27] powerpc/kprobes: Don't call the ->break_handler() in arm kprobes code
From: Masami Hiramatsu @ 2018-06-07 14:28 UTC (permalink / raw)
To: Naveen N. Rao
Cc: Ingo Molnar, Thomas Gleixner, Andrew Morton, H . Peter Anvin,
linux-arch, linux-kernel, linuxppc-dev, Ingo Molnar,
Paul Mackerras, Steven Rostedt
In-Reply-To: <1528371112.vwnh1m0k39.naveen@linux.ibm.com>
On Thu, 07 Jun 2018 17:07:00 +0530
"Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> wrote:
> Masami Hiramatsu wrote:
> > Don't call the ->break_handler() from the arm kprobes code,
> ^^^ powerpc
>
> > because it was only used by jprobes which got removed.
> >
> > This also makes skip_singlestep() a static function since
> > only ftrace-kprobe.c is using this function.
> >
> > Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > ---
> > arch/powerpc/include/asm/kprobes.h | 10 ----------
> > arch/powerpc/kernel/kprobes-ftrace.c | 16 +++-------------
> > arch/powerpc/kernel/kprobes.c | 31 +++++++++++--------------------
> > 3 files changed, 14 insertions(+), 43 deletions(-)
>
> With 2 small comments...
2 ? or 1 ?
> Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
>
> - Naveen
>
> >
> > diff --git a/arch/powerpc/include/asm/kprobes.h b/arch/powerpc/include/asm/kprobes.h
> > index 674036db558b..785c464b6588 100644
> > --- a/arch/powerpc/include/asm/kprobes.h
> > +++ b/arch/powerpc/include/asm/kprobes.h
> > @@ -102,16 +102,6 @@ extern int kprobe_exceptions_notify(struct notifier_block *self,
> > extern int kprobe_fault_handler(struct pt_regs *regs, int trapnr);
> > extern int kprobe_handler(struct pt_regs *regs);
> > extern int kprobe_post_handler(struct pt_regs *regs);
> > -#ifdef CONFIG_KPROBES_ON_FTRACE
> > -extern int skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> > - struct kprobe_ctlblk *kcb);
> > -#else
> > -static inline int skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> > - struct kprobe_ctlblk *kcb)
> > -{
> > - return 0;
> > -}
> > -#endif
> > #else
> > static inline int kprobe_handler(struct pt_regs *regs) { return 0; }
> > static inline int kprobe_post_handler(struct pt_regs *regs) { return 0; }
> > diff --git a/arch/powerpc/kernel/kprobes-ftrace.c b/arch/powerpc/kernel/kprobes-ftrace.c
> > index 1b316331c2d9..3869b0e5d5c7 100644
> > --- a/arch/powerpc/kernel/kprobes-ftrace.c
> > +++ b/arch/powerpc/kernel/kprobes-ftrace.c
> > @@ -26,8 +26,8 @@
> > #include <linux/ftrace.h>
> >
> > static nokprobe_inline
> > -int __skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> > - struct kprobe_ctlblk *kcb, unsigned long orig_nip)
> > +int skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> > + struct kprobe_ctlblk *kcb, unsigned long orig_nip)
> > {
> > /*
> > * Emulate singlestep (and also recover regs->nip)
> > @@ -44,16 +44,6 @@ int __skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> > return 1;
> > }
> >
> > -int skip_singlestep(struct kprobe *p, struct pt_regs *regs,
> > - struct kprobe_ctlblk *kcb)
> > -{
> > - if (kprobe_ftrace(p))
> > - return __skip_singlestep(p, regs, kcb, 0);
> > - else
> > - return 0;
> > -}
> > -NOKPROBE_SYMBOL(skip_singlestep);
> > -
> > /* Ftrace callback handler for kprobes */
> > void kprobe_ftrace_handler(unsigned long nip, unsigned long parent_nip,
> > struct ftrace_ops *ops, struct pt_regs *regs)
> > @@ -82,7 +72,7 @@ void kprobe_ftrace_handler(unsigned long nip, unsigned long parent_nip,
> > __this_cpu_write(current_kprobe, p);
> > kcb->kprobe_status = KPROBE_HIT_ACTIVE;
> > if (!p->pre_handler || !p->pre_handler(p, regs))
> > - __skip_singlestep(p, regs, kcb, orig_nip);
> > + skip_singlestep(p, regs, kcb, orig_nip);
>
> We can probably get rid of skip_singlestep() completely along with
> orig_nip since instructions are always 4 bytes on powerpc. So, the
> changes we do to nip should help to recover the value automatically.
Good point! Yes, skip_singlestep() is no more exported, so we just consolidate
it into kprobe_ftrace_handler() for simplifying operation.
Thank you!
>
> - Naveen
>
>
--
Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply
* Re: Fwd: [powerpc/Baremetal]Kernel OOPS while executing memory hotplug on Power8 baremetal
From: Jens Axboe @ 2018-06-07 14:45 UTC (permalink / raw)
To: vrbagal1, Bart Van Assche, kent.overstreet, snitzer, linux-block
Cc: linux-scsi, linuxppc-dev, sachinp, Linuxppc-dev
In-Reply-To: <e01428cf15ab45bd42a45a14424e5384@linux.vnet.ibm.com>
On 6/7/18 4:37 AM, vrbagal1 wrote:
> On 2018-06-07 13:12, Bart Van Assche wrote:
>> On Thu, 2018-06-07 at 12:56 +0530, Venkat Rao B wrote:
>>> On Thursday 07 June 2018 12:46 PM, Bart Van Assche wrote:
>>>> On Thu, 2018-06-07 at 12:38 +0530, vrbagal1 wrote:
>>>>> Observing Kernel oops and machine reboots while executing memory hotplug
>>>>> test case, on Power8 Baremetal machine.
>>>>>
>>>>> I see this is introduced some where between rc6 and 4.17.
>>>>
>>>> Please provide the exact versions (git commit IDs) of the kernel versions
>>>> you have tested.
>>>
>>> Commit Id ---> 5037be168f
>>
>> The reason I was asking for the commit ID is because I saw that
>> clone_endio()
>> occurs in the oops which means that the dm driver is involved. An
>> important fix
>> for the dm driver went upstream recently, namely d37753540568 ("dm: Use
>> kzalloc
>> for all structs with embedded biosets/mempools"). Can you double check
>> whether
>> that commit it present in your tree? If it is not present, please
>> update to the
>> latest master and retest. If it is present, please report how to
>> reproduce
>> this oops to Kent Overstreet, Jens Axboe, linux-block and Mike Snitzer.
>>
>> Thanks,
>>
>> Bart.
>
>
> Yes, the fix is present in the tree, which I have tested.
>
> Steps to reproduce:
>
> Step1: Clone and Install avocado git clone
> https://github.com/avocado-framework/avocado.git
> Step2: Clone
> https://github.com/avocado-framework-tests/avocado-misc-tests.git
> Test case is
> https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/memory/memhotplug.py
> Step3: Command to run the test is avocado run
> avocado-misc-tests/memory/memhotplug.py
Can you try with the below? Not a fully formed fix since I'd prefer
if the dm bioset copy stuff was changed instead, but worth a shot.
diff --git a/block/bio.c b/block/bio.c
index 595663e0281a..45bdee67d28b 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1967,6 +1967,27 @@ int bioset_init(struct bio_set *bs,
}
EXPORT_SYMBOL(bioset_init);
+void bioset_move(struct bio_set *dst, struct bio_set *src)
+{
+ dst->bio_slab = src->bio_slab;
+ dst->front_pad = src->front_pad;
+ mempool_move(&dst->bio_pool, &src->bio_pool);
+ mempool_move(&dst->bvec_pool, &src->bvec_pool);
+#if defined(CONFIG_BLK_DEV_INTEGRITY)
+ mempool_move(&dst->bio_integrity_pool, &src->bio_integrity_pool);
+ mempool_move(&dst->bvec_integrity_pool, &src->bvec_integrity_pool);
+#endif
+ BUG_ON(!bio_list_empty(&src->rescue_list));
+ BUG_ON(work_pending(&src->rescue_work));
+ spin_lock_init(&dst->rescue_lock);
+ bio_list_init(&dst->rescue_list);
+ INIT_WORK(&dst->rescue_work, bio_alloc_rescue);
+ dst->rescue_workqueue = src->rescue_workqueue;
+
+ memset(src, 0, sizeof(*src));
+}
+EXPORT_SYMBOL(bioset_move);
+
#ifdef CONFIG_BLK_CGROUP
/**
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 98dff36b89a3..87f636815baf 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1982,10 +1982,8 @@ static void __bind_mempools(struct mapped_device *md, struct dm_table *t)
bioset_initialized(&md->bs) ||
bioset_initialized(&md->io_bs));
- md->bs = p->bs;
- memset(&p->bs, 0, sizeof(p->bs));
- md->io_bs = p->io_bs;
- memset(&p->io_bs, 0, sizeof(p->io_bs));
+ bioset_move(&md->bs, &p->bs);
+ bioset_move(&md->io_bs, &p->io_bs);
out:
/* mempool bind completed, no longer need any mempools in the table */
dm_table_free_md_mempools(t);
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 810a8bee8f85..7581231dd0a3 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -417,6 +417,7 @@ enum {
extern int bioset_init(struct bio_set *, unsigned int, unsigned int, int flags);
extern void bioset_exit(struct bio_set *);
extern int biovec_init_pool(mempool_t *pool, int pool_entries);
+extern void bioset_move(struct bio_set *dst, struct bio_set *src);
extern struct bio *bio_alloc_bioset(gfp_t, unsigned int, struct bio_set *);
extern void bio_put(struct bio *);
diff --git a/include/linux/mempool.h b/include/linux/mempool.h
index 0c964ac107c2..20818919180c 100644
--- a/include/linux/mempool.h
+++ b/include/linux/mempool.h
@@ -47,6 +47,7 @@ extern int mempool_resize(mempool_t *pool, int new_min_nr);
extern void mempool_destroy(mempool_t *pool);
extern void *mempool_alloc(mempool_t *pool, gfp_t gfp_mask) __malloc;
extern void mempool_free(void *element, mempool_t *pool);
+extern void mempool_move(mempool_t *dst, mempool_t *src);
/*
* A mempool_alloc_t and mempool_free_t that get the memory from
diff --git a/mm/mempool.c b/mm/mempool.c
index b54f2c20e5e0..dd402653367b 100644
--- a/mm/mempool.c
+++ b/mm/mempool.c
@@ -181,6 +181,8 @@ int mempool_init_node(mempool_t *pool, int min_nr, mempool_alloc_t *alloc_fn,
mempool_free_t *free_fn, void *pool_data,
gfp_t gfp_mask, int node_id)
{
+ memset(pool, 0, sizeof(*pool));
+
spin_lock_init(&pool->lock);
pool->min_nr = min_nr;
pool->pool_data = pool_data;
@@ -546,3 +548,19 @@ void mempool_free_pages(void *element, void *pool_data)
__free_pages(element, order);
}
EXPORT_SYMBOL(mempool_free_pages);
+
+void mempool_move(mempool_t *dst, mempool_t *src)
+{
+ BUG_ON(waitqueue_active(&src->wait));
+
+ spin_lock_init(&dst->lock);
+ dst->min_nr = src->min_nr;
+ dst->curr_nr = src->curr_nr;
+ memcpy(dst->elements, src->elements, sizeof(void *) * src->curr_nr);
+ dst->pool_data = src->pool_data;
+ dst->alloc = src->alloc;
+ dst->free = src->free;
+ init_waitqueue_head(&dst->wait);
+
+ memset(src, 0, sizeof(*src));
+}
--
Jens Axboe
^ permalink raw reply related
* [RFC PATCH 4/5] powerpc: Add VSX regset to compat_regsets
From: Pedro Franco de Carvalho @ 2018-06-07 15:25 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20180607152534.29427-1-pedromfc@linux.vnet.ibm.com>
This patch copies the the missing VSX regset to the compat_regsets
array.
Not having this regset can cause issues in fs/binfmt_elf.c in the
fill_thread_core_info function, which iterates over all the regsets
defined in compat_regsets to fill note info for a core dump of a
32-bit thread. However, the number of regset notes allocated for
writing is the number of regsets with core_note_type != 0. If the
regset array has an entry with core_note_type == 0, which is the case
for the missing VSX element, this can cause later regsets to be
written outside the bounds of the allocated notes.
The compat_regset is also missing entries for REGSET_PMR and
REGSET_PKEY, but because these are at the end of the powerpc_regset
enum, the designated initializers for the compat_regset array don't
cause implicit elements to be created, like they did for REGSET_VSX.
---
arch/powerpc/kernel/ptrace.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 69123feaef9e..2da0668a96dc 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -2237,6 +2237,13 @@ static const struct user_regset compat_regsets[] = {
.active = vr_active, .get = vr_get, .set = vr_set
},
#endif
+#ifdef CONFIG_VSX
+ [REGSET_VSX] = {
+ .core_note_type = NT_PPC_VSX, .n = 32,
+ .size = sizeof(double), .align = sizeof(double),
+ .active = vsr_active, .get = vsr_get, .set = vsr_set
+ },
+#endif
#ifdef CONFIG_SPE
[REGSET_SPE] = {
.core_note_type = NT_PPC_SPE, .n = 35,
--
2.13.6
^ permalink raw reply related
* [RFC PATCH 2/5] powerpc: Flush checkpointed gpr state for 32-bit processes in ptrace
From: Pedro Franco de Carvalho @ 2018-06-07 15:25 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20180607152534.29427-1-pedromfc@linux.vnet.ibm.com>
Currently ptrace doesn't flush the register state when the
checkpointed GPRs of a 32-bit thread are accessed. This can cause core
dumps to have stale data in the checkpointed GPR note.
---
arch/powerpc/kernel/ptrace.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 6618570c6d56..be8ca03a0bd5 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -2124,6 +2124,16 @@ static int tm_cgpr32_get(struct task_struct *target,
unsigned int pos, unsigned int count,
void *kbuf, void __user *ubuf)
{
+ if (!cpu_has_feature(CPU_FTR_TM))
+ return -ENODEV;
+
+ if (!MSR_TM_ACTIVE(target->thread.regs->msr))
+ return -ENODATA;
+
+ flush_tmregs_to_thread(target);
+ flush_fp_to_thread(target);
+ flush_altivec_to_thread(target);
+
return gpr32_get_common(target, regset, pos, count, kbuf, ubuf,
&target->thread.ckpt_regs.gpr[0]);
}
@@ -2133,6 +2143,16 @@ static int tm_cgpr32_set(struct task_struct *target,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf)
{
+ if (!cpu_has_feature(CPU_FTR_TM))
+ return -ENODEV;
+
+ if (!MSR_TM_ACTIVE(target->thread.regs->msr))
+ return -ENODATA;
+
+ flush_tmregs_to_thread(target);
+ flush_fp_to_thread(target);
+ flush_altivec_to_thread(target);
+
return gpr32_set_common(target, regset, pos, count, kbuf, ubuf,
&target->thread.ckpt_regs.gpr[0]);
}
--
2.13.6
^ permalink raw reply related
* [RFC PATCH 0/5] powerpc: Misc. ptrace regset fixes
From: Pedro Franco de Carvalho @ 2018-06-07 15:25 UTC (permalink / raw)
To: linuxppc-dev
This series attempts to fix a few issues with ptrace regsets.
Patch 1 simply inverts the active predicate for ebb_set. I don't know
if there was a reason for having opposite predicates in
ebb_get/ebb_set, but I assumed this was a typo.
Patch 2 adds the usual HTM prologue for regsets to the tm_cgpr32
get/set functions, so that the cgprs are flushed. I don't really
understand the need for flushing the fp and altivec states, but I
copied that over since it was done in the regular tm_cgpr get/set
functions.
Patch 3 changes the pmu get/set functions so that they don't read or
write outside the bounds of thread_struct.mmcr0. The endianess of the
kernel is used to determine where the mmcr0 word should be placed (or
read from) in its corresponding 64-bit slot in the regset. I am not
sure if this is the correct way to go, or if the endianess of the
thread being traced should determine this position (can the kernel run
threads with a different endianess?). I used the kernel endianess
because that is what seems to happen for other registers smaller than
their regset fields (for instance, it seems that checkpointed CR is
saved by the kernel as a doubleword, so the the position of the word
depends on the kernel's endianess). The rest of the function assumes
that unsigned longs are doublewords, so the patch assumes that an
unsigned is a word. This patch (and the original pmu_get/set
functions) might not work if the kernel is compiled in 32 bits.
Patch 4 adds the VSX regset to compat_regsets, which could cause out
of bounds writes in fs/binfmt_elf.c.
Patch 5 adds the PMU regset to compat_regsets.
I also noticed that the regset for CGPRs for 32-bit threads has 48 * 8
bytes (same as the one for 64-bit threads), but the data only occupies
the first 48 * 4 bytes (like for the 32-bit GPR regset). I am not sure
if this was intended, or if it can be changed now that other programs
might already assume the 48 * 8 size. If the kernel is compiled in
32-bits, the size will change (because it depends on sizeof (long)),
but I don't know if HTM and the corresponding regsets are supported in
the first place for a 32-bit kernel.
I haven't added the PKEY regset to compat_regsets. Does that make
sense for 32-bit threads?
Pedro Franco de Carvalho (5):
powerpc: Fix inverted active predicate for setting the EBB regset
powerpc: Flush checkpointed gpr state for 32-bit processes in ptrace
powerpc: Fix pmu get/set functions
powerpc: Add VSX regset to compat_regsets
powerpc: Add PMU regset to compat_regsets
arch/powerpc/kernel/ptrace.c | 65 ++++++++++++++++++++++++++++++++++++++++----
1 file changed, 60 insertions(+), 5 deletions(-)
--
2.13.6
^ permalink raw reply
* [RFC PATCH 1/5] powerpc: Fix inverted active predicate for setting the EBB regset
From: Pedro Franco de Carvalho @ 2018-06-07 15:25 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20180607152534.29427-1-pedromfc@linux.vnet.ibm.com>
Currently, the ebb_set function for writing to the EBB regset returns
ENODATA when ebb is active in the thread, and copies in the data when
it is inactive. This patch inverts the condition so that it matches
ebb_get and ebb_active.
---
arch/powerpc/kernel/ptrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index d23cf632edf0..6618570c6d56 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -1701,7 +1701,7 @@ static int ebb_set(struct task_struct *target,
if (!cpu_has_feature(CPU_FTR_ARCH_207S))
return -ENODEV;
- if (target->thread.used_ebb)
+ if (!target->thread.used_ebb)
return -ENODATA;
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
--
2.13.6
^ permalink raw reply related
* [RFC PATCH 3/5] powerpc: Fix pmu get/set functions
From: Pedro Franco de Carvalho @ 2018-06-07 15:25 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20180607152534.29427-1-pedromfc@linux.vnet.ibm.com>
The PMU regset exposed through ptrace has 5 64-bit words, which are
all copied in and out. However, mmcr0 in the thread_struct is an
unsigned, which causes pmu_set to clobber the next variable in the
thread_struct (used_ebb), and pmu_get to return the same variable in
one half of the mmcr0 slot.
---
arch/powerpc/kernel/ptrace.c | 31 +++++++++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index be8ca03a0bd5..69123feaef9e 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -1733,6 +1733,9 @@ static int pmu_get(struct task_struct *target,
unsigned int pos, unsigned int count,
void *kbuf, void __user *ubuf)
{
+ int ret = 0;
+ unsigned long mmcr0 = target->thread.mmcr0;
+
/* Build tests */
BUILD_BUG_ON(TSO(siar) + sizeof(unsigned long) != TSO(sdar));
BUILD_BUG_ON(TSO(sdar) + sizeof(unsigned long) != TSO(sier));
@@ -1742,9 +1745,16 @@ static int pmu_get(struct task_struct *target,
if (!cpu_has_feature(CPU_FTR_ARCH_207S))
return -ENODEV;
- return user_regset_copyout(&pos, &count, &kbuf, &ubuf,
- &target->thread.siar, 0,
+ ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
+ &target->thread.siar, 0,
+ 4 * sizeof(unsigned long));
+
+ if (!ret)
+ ret = user_regset_copyout(&pos, &count, &kbuf, &ubuf,
+ &mmcr0, 4 * sizeof(unsigned long),
5 * sizeof(unsigned long));
+
+ return ret;
}
static int pmu_set(struct task_struct *target,
@@ -1754,6 +1764,12 @@ static int pmu_set(struct task_struct *target,
{
int ret = 0;
+#ifdef __BIG_ENDIAN
+ int mmcr0_offset = sizeof(unsigned);
+#else
+ int mmcr0_offset = 0;
+#endif
+
/* Build tests */
BUILD_BUG_ON(TSO(siar) + sizeof(unsigned long) != TSO(sdar));
BUILD_BUG_ON(TSO(sdar) + sizeof(unsigned long) != TSO(sier));
@@ -1783,9 +1799,16 @@ static int pmu_set(struct task_struct *target,
4 * sizeof(unsigned long));
if (!ret)
+ ret = user_regset_copyin_ignore(&pos, &count, &kbuf,
+ &ubuf, 4 * sizeof(unsigned long),
+ 4 * sizeof(unsigned long) + mmcr0_offset);
+
+ if (!ret)
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
- &target->thread.mmcr0, 4 * sizeof(unsigned long),
- 5 * sizeof(unsigned long));
+ &target->thread.mmcr0,
+ 4 * sizeof(unsigned long) + mmcr0_offset,
+ 4 * sizeof(unsigned long) + mmcr0_offset
+ + sizeof (unsigned));
return ret;
}
#endif
--
2.13.6
^ permalink raw reply related
* [RFC PATCH 5/5] powerpc: Add PMU regset to compat_regsets
From: Pedro Franco de Carvalho @ 2018-06-07 15:25 UTC (permalink / raw)
To: linuxppc-dev
In-Reply-To: <20180607152534.29427-1-pedromfc@linux.vnet.ibm.com>
This patch allows setting and getting PMU registers from 32-bit
threads.
---
arch/powerpc/kernel/ptrace.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 2da0668a96dc..3a9c4ae65429 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -2317,6 +2317,11 @@ static const struct user_regset compat_regsets[] = {
.size = sizeof(u64), .align = sizeof(u64),
.active = ebb_active, .get = ebb_get, .set = ebb_set
},
+ [REGSET_PMR] = {
+ .core_note_type = NT_PPC_PMU, .n = ELF_NPMU,
+ .size = sizeof(u64), .align = sizeof(u64),
+ .active = pmu_active, .get = pmu_get, .set = pmu_set
+ },
#endif
};
--
2.13.6
^ permalink raw reply related
* Re: Fwd: [powerpc/Baremetal]Kernel OOPS while executing memory hotplug on Power8 baremetal
From: Jens Axboe @ 2018-06-07 15:40 UTC (permalink / raw)
To: vrbagal1, Bart Van Assche, kent.overstreet, snitzer, linux-block
Cc: linux-scsi, linuxppc-dev, sachinp, Linuxppc-dev
In-Reply-To: <b1b67ad6-b300-7def-5851-b11baa6edf97@kernel.dk>
On 6/7/18 8:45 AM, Jens Axboe wrote:
> On 6/7/18 4:37 AM, vrbagal1 wrote:
>> On 2018-06-07 13:12, Bart Van Assche wrote:
>>> On Thu, 2018-06-07 at 12:56 +0530, Venkat Rao B wrote:
>>>> On Thursday 07 June 2018 12:46 PM, Bart Van Assche wrote:
>>>>> On Thu, 2018-06-07 at 12:38 +0530, vrbagal1 wrote:
>>>>>> Observing Kernel oops and machine reboots while executing memory hotplug
>>>>>> test case, on Power8 Baremetal machine.
>>>>>>
>>>>>> I see this is introduced some where between rc6 and 4.17.
>>>>>
>>>>> Please provide the exact versions (git commit IDs) of the kernel versions
>>>>> you have tested.
>>>>
>>>> Commit Id ---> 5037be168f
>>>
>>> The reason I was asking for the commit ID is because I saw that
>>> clone_endio()
>>> occurs in the oops which means that the dm driver is involved. An
>>> important fix
>>> for the dm driver went upstream recently, namely d37753540568 ("dm: Use
>>> kzalloc
>>> for all structs with embedded biosets/mempools"). Can you double check
>>> whether
>>> that commit it present in your tree? If it is not present, please
>>> update to the
>>> latest master and retest. If it is present, please report how to
>>> reproduce
>>> this oops to Kent Overstreet, Jens Axboe, linux-block and Mike Snitzer.
>>>
>>> Thanks,
>>>
>>> Bart.
>>
>>
>> Yes, the fix is present in the tree, which I have tested.
>>
>> Steps to reproduce:
>>
>> Step1: Clone and Install avocado git clone
>> https://github.com/avocado-framework/avocado.git
>> Step2: Clone
>> https://github.com/avocado-framework-tests/avocado-misc-tests.git
>> Test case is
>> https://github.com/avocado-framework-tests/avocado-misc-tests/blob/master/memory/memhotplug.py
>> Step3: Command to run the test is avocado run
>> avocado-misc-tests/memory/memhotplug.py
>
> Can you try with the below? Not a fully formed fix since I'd prefer
> if the dm bioset copy stuff was changed instead, but worth a shot.
This is closer to an actual fix, please try that instead.
diff --git a/block/bio.c b/block/bio.c
index 595663e0281a..0616d86b15c6 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1967,6 +1967,21 @@ int bioset_init(struct bio_set *bs,
}
EXPORT_SYMBOL(bioset_init);
+int bioset_init_from_src(struct bio_set *new, struct bio_set *src)
+{
+ unsigned int pool_size = src->bio_pool.min_nr;
+ int flags;
+
+ flags = 0;
+ if (src->bvec_pool.min_nr)
+ flags |= BIOSET_NEED_BVECS;
+ if (src->rescue_workqueue)
+ flags |= BIOSET_NEED_RESCUER;
+
+ return bioset_init(new, pool_size, src->front_pad, flags);
+}
+EXPORT_SYMBOL(bioset_init_from_src);
+
#ifdef CONFIG_BLK_CGROUP
/**
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 98dff36b89a3..20a8d63754bf 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1953,9 +1953,10 @@ static void free_dev(struct mapped_device *md)
kvfree(md);
}
-static void __bind_mempools(struct mapped_device *md, struct dm_table *t)
+static int __bind_mempools(struct mapped_device *md, struct dm_table *t)
{
struct dm_md_mempools *p = dm_table_get_md_mempools(t);
+ int ret = 0;
if (dm_table_bio_based(t)) {
/*
@@ -1982,13 +1983,16 @@ static void __bind_mempools(struct mapped_device *md, struct dm_table *t)
bioset_initialized(&md->bs) ||
bioset_initialized(&md->io_bs));
- md->bs = p->bs;
- memset(&p->bs, 0, sizeof(p->bs));
- md->io_bs = p->io_bs;
- memset(&p->io_bs, 0, sizeof(p->io_bs));
+ ret = bioset_init_from_src(&md->bs, &p->bs);
+ if (ret)
+ goto out;
+ ret = bioset_init_from_src(&md->io_bs, &p->io_bs);
+ if (ret)
+ bioset_exit(&md->bs);
out:
/* mempool bind completed, no longer need any mempools in the table */
dm_table_free_md_mempools(t);
+ return ret;
}
/*
@@ -2033,6 +2037,7 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
struct request_queue *q = md->queue;
bool request_based = dm_table_request_based(t);
sector_t size;
+ int ret;
lockdep_assert_held(&md->suspend_lock);
@@ -2068,7 +2073,11 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
md->immutable_target = dm_table_get_immutable_target(t);
}
- __bind_mempools(md, t);
+ ret = __bind_mempools(md, t);
+ if (ret) {
+ old_map = ERR_PTR(ret);
+ goto out;
+ }
old_map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock));
rcu_assign_pointer(md->map, (void *)t);
@@ -2078,6 +2087,7 @@ static struct dm_table *__bind(struct mapped_device *md, struct dm_table *t,
if (old_map)
dm_sync_table(md);
+out:
return old_map;
}
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 810a8bee8f85..307682ac2f31 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -417,6 +417,7 @@ enum {
extern int bioset_init(struct bio_set *, unsigned int, unsigned int, int flags);
extern void bioset_exit(struct bio_set *);
extern int biovec_init_pool(mempool_t *pool, int pool_entries);
+extern int bioset_init_from_src(struct bio_set *new, struct bio_set *src);
extern struct bio *bio_alloc_bioset(gfp_t, unsigned int, struct bio_set *);
extern void bio_put(struct bio *);
--
Jens Axboe
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox