* [PATCH v9 0/5] powerpc/hv-24x7: Expose chip/sockets info to add json file metric support for the hv_24x7 socket/chip level events
From: Kajol Jain @ 2020-05-18 12:04 UTC (permalink / raw)
To: linuxppc-dev, mpe, suka, nathanl
Cc: ravi.bangoria, maddy, mpetlan, peterz, gregkh, alexander.shishkin,
kjain, anju, mamatha4, namhyung, mingo
Patchset fixes the inconsistent results we are getting when
we run multiple 24x7 events.
"hv_24x7" pmu interface events needs system dependent parameter
like socket/chip/core. For example, hv_24x7 chip level events needs
specific chip-id to which the data is requested should be added as part
of pmu events.
So to enable JSON file support to "hv_24x7" interface, patchset expose
total number of sockets and chips per-socket details in sysfs
files (sockets, chips) under "/sys/devices/hv_24x7/interface/".
To get number of sockets, chips per sockets and cores per chip patchset adds a
rtas call with token "PROCESSOR_MODULE_INFO" to get these details. Patchset
also handles partition migration case to re-init these system depended
parameters by adding proper calls in post_mobility_fixup() (mobility.c).
Changelog:
v8 -> v9
- As we not need 8k data buffer we also not require new lock and
buffer size. So, removed that part.
- Made more changes as suggested by Nathan Lynch.
v7 -> v8
- Add support for exposing cores per details as well.
Suggested by: Madhavan Srinivasan.
- Remove config check for 'CONFIG_PPC_RTAS' in previous
implementation and address other comments by Michael Ellerman.
v6 -> v7
- Split patchset into two patch series, one with kernel changes
and another with perf tool side changes. This pachset contain
all kernel side changes.
Kajol Jain (5):
powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple
hv-24x7 events run
powerpc/hv-24x7: Add rtas call in hv-24x7 driver to get processor
details
powerpc/hv-24x7: Add sysfs files inside hv-24x7 device to show
processor details
Documentation/ABI: Add ABI documentation for chips and sockets
powerpc/pseries: Update hv-24x7 information after migration
.../sysfs-bus-event_source-devices-hv_24x7 | 21 ++++
arch/powerpc/include/asm/rtas.h | 6 +
arch/powerpc/perf/hv-24x7.c | 106 ++++++++++++++++--
arch/powerpc/platforms/pseries/mobility.c | 3 +
4 files changed, 126 insertions(+), 10 deletions(-)
--
2.18.2
^ permalink raw reply
* Re: [Regression 5.7-rc1] Random hangs on 32-bit PowerPC (PowerBook6,7)
From: Christophe Leroy @ 2020-05-18 11:50 UTC (permalink / raw)
To: Rui Salvaterra, linuxppc-dev, debian-powerpc
In-Reply-To: <CALjTZvZ69v3Z=8MY28F+p8v8_Z5e+7NrH0PAJ7TGD9kh6Ab7bw@mail.gmail.com>
Hi,
Le 18/05/2020 à 13:20, Rui Salvaterra a écrit :
> [Resending since I messed up the subject, sorry]
>
> Hi, everyone,
>
> Something went wrong between Linux 5.6 and 5.7-rc1. This is an iBook
> G4 laptop with 1.5 GiB of RAM running the Debian powerpc port. I
> haven't bisected yet, since it's going to take quite a bit of time, so
> I'm sending this mostly as a heads-up (and to see if anybody has any
> clues about the possible cause). I'm using the following reproducer:
>
> stress-ng --cpu 8 --io 8 --vm 8 --vm-bytes 1G --fork 8 --timeout 10m
>
> On Linux 5.7-rc1, this completely hangs the machine in about 30
> seconds. Linux 5.6 survives the test. Let me know if I can provide any
> additional info, otherwise I'll just bite the bullet and start
> bisecting.
>
Can you provide your .config, tell which GCC version you are using, and
tell a bit more about your config: amount of RAM, is there swap, etc ...
^ permalink raw reply
* Re: [PATCH] powerpc/sysdev: fix compile errors
From: Michael Ellerman @ 2020-05-18 11:37 UTC (permalink / raw)
To: Jiri Kosina, Christophe Leroy
Cc: Kate Stewart, linux-kernel, wenhu.pku, Paul Mackerras,
Greg Kroah-Hartman, WANG Wenhu, linuxppc-dev, Thomas Gleixner,
Allison Randal
In-Reply-To: <nycvar.YFH.7.76.2005181232140.25812@cbobk.fhfr.pm>
Jiri Kosina <jikos@kernel.org> writes:
> On Mon, 18 May 2020, Jiri Kosina wrote:
>> > > Include linux/io.h into fsl_85xx_cache_sram.c to fix the
>> > > implicit-declaration compile errors when building Cache-Sram.
>> > >
>> > > arch/powerpc/sysdev/fsl_85xx_cache_sram.c: In function
>> > > ‘instantiate_cache_sram’:
>> > > arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:26: error: implicit declaration
>> > > of function ‘ioremap_coherent’; did you mean ‘bitmap_complement’?
>> > > [-Werror=implicit-function-declaration]
>> > > cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
>> > > ^~~~~~~~~~~~~~~~
>> > > bitmap_complement
>> > > arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:24: error: assignment makes
>> > > pointer from integer without a cast [-Werror=int-conversion]
>> > > cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
>> > > ^
>> > > arch/powerpc/sysdev/fsl_85xx_cache_sram.c:123:2: error: implicit declaration
>> > > of function ‘iounmap’; did you mean ‘roundup’?
>> > > [-Werror=implicit-function-declaration]
>> > > iounmap(cache_sram->base_virt);
>> > > ^~~~~~~
>> > > roundup
>> > > cc1: all warnings being treated as errors
>> > >
>> > > Fixed: commit 6db92cc9d07d ("powerpc/85xx: add cache-sram support")
>> > > Signed-off-by: WANG Wenhu <wenhu.wang@vivo.com>
>> >
>> > Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
>>
>> As this doesn't seem to have been picked up for linux-next yet, I am
>> picking it up now.
>
> Only now I've noticed that this is actually a dead code o_O as this file
> can't be built by any combination of config options. So I am dropping the
> patch again, but why do we keep it in the tree in the first place?
Yeah, sigh.
As Christophe pointed out, it has been dead code for a long time but
there is a series in flight that's trying to make it usable.
cheers
^ permalink raw reply
* debian-powerpc@lists.debian.org
From: Rui Salvaterra @ 2020-05-18 11:18 UTC (permalink / raw)
To: linuxppc-dev
Hi, everyone,
I strongly suspect something went wrong between Linux 5.6 and 5.7-rc1.
This is an iBook G4 laptop with 1.5 GiB of RAM running the Debian
powerpc port. I haven't bisected yet, since it's going to take quite a
bit of time, so I'm sending this mostly as a heads-up (and to see if
anybody has any clues about the possible cause). I'm using the
following reproducer:
stress-ng --cpu 8 --io 8 --vm 8 --vm-bytes 1G --fork 8 --timeout 10m
On Linux 5.7-rc1, this completely hangs the machine in about 30
seconds. Linux 5.6 survives the test. Let me know if I can provide any
additional info, otherwise I'll just bite the bullet and start
bisecting.
Thanks,
Rui
^ permalink raw reply
* Re: [PATCH v2 2/2] powerpc/configs: replace deprecated riva/nvidia with nouveau
From: Emil Velikov @ 2020-05-18 11:19 UTC (permalink / raw)
To: Michael Ellerman
Cc: linux-fbdev, Antonino Daplas, Bartlomiej Zolnierkiewicz,
ML dri-devel, Paul Mackerras, linuxppc-dev
In-Reply-To: <87d071aedu.fsf@mpe.ellerman.id.au>
Hi Michael,
On Mon, 18 May 2020 at 08:30, Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Emil Velikov <emil.l.velikov@gmail.com> writes:
> > As mentioned in earlier commit, the riva and nvidia fbdev drivers have
> > seen no love over the years, are short on features and overall below par
> >
> > Users are encouraged to switch to the nouveau drm driver instead.
> >
> > v2: Split configs to separate patch, enable nouveau (Bartlomiej)
> >
> > Cc: Antonino Daplas <adaplas@gmail.com>
> > Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > Cc: linux-fbdev@vger.kernel.org
> > Cc: dri-devel@lists.freedesktop.org
> > Cc: Michael Ellerman <mpe@ellerman.id.au>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: Paul Mackerras <paulus@samba.org>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> > Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
> > ---
> > Hi all unless, there are objections I would prefer to merge this via
> > the drm tree.
>
> Have you tested that the resulting kernels work on the relevant
> hardware?
>
Sadly, no I haven't. I'm updating the defconfigs as requested by the
fbdev maintainer.
> The old drivers may be crufty but they presumably have been tested by
> people and at least somewhat work.
>
> So I'd be inclined to leave the defconfigs alone until someone can test
> that the new driver works at all.
>
Works for me.
> I gave it a quick spin on a G5 I have access to and dmesg has a bunch of
> errors in it (see below). I can't actually tell if the display is
> working because the machine is remote, and I can't go and check it at
> the moment because the office is closed.
>
From what I can see, there seems to be three bits:
- attempted out-of-bound attempts to read the vbios
Genuine concern or noise? Likely using the bios from open firmware,
check any of the other options - see NvBios in [1]
- cannot figure out the timer input frequency
No idea
- the TV1 EDID is empty
Is there an actual TV connected to the device, check with another cable
Regardless of the patches, reporting [2] the above would be a nice move.
Thanks
Emil
[1] https://nouveau.freedesktop.org/wiki/KernelModuleParameters/
[2] https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/-/issues
^ permalink raw reply
* [Regression 5.7-rc1] Random hangs on 32-bit PowerPC (PowerBook6,7)
From: Rui Salvaterra @ 2020-05-18 11:20 UTC (permalink / raw)
To: linuxppc-dev, debian-powerpc
[Resending since I messed up the subject, sorry]
Hi, everyone,
Something went wrong between Linux 5.6 and 5.7-rc1. This is an iBook
G4 laptop with 1.5 GiB of RAM running the Debian powerpc port. I
haven't bisected yet, since it's going to take quite a bit of time, so
I'm sending this mostly as a heads-up (and to see if anybody has any
clues about the possible cause). I'm using the following reproducer:
stress-ng --cpu 8 --io 8 --vm 8 --vm-bytes 1G --fork 8 --timeout 10m
On Linux 5.7-rc1, this completely hangs the machine in about 30
seconds. Linux 5.6 survives the test. Let me know if I can provide any
additional info, otherwise I'll just bite the bullet and start
bisecting.
Thanks,
Rui
^ permalink raw reply
* [PATCH] ASoC: fsl_micfil: Fix unused assignment in fsl_set_clock_params()
From: Tang Bin @ 2020-05-18 11:00 UTC (permalink / raw)
To: broonie, timur, nicoleotsuka, Xiubo.Lee, perex
Cc: alsa-devel, linuxppc-dev, linux-kernel, Tang Bin
Delete unused initialized value of 'ret', because it will
be assigned by the function fsl_micfil_set_mclk_rate().
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
sound/soc/fsl/fsl_micfil.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index 79cf488fa..a7a6118be 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -295,7 +295,7 @@ static int fsl_set_clock_params(struct device *dev, unsigned int rate)
{
struct fsl_micfil *micfil = dev_get_drvdata(dev);
int clk_div;
- int ret = 0;
+ int ret;
ret = fsl_micfil_set_mclk_rate(micfil, rate);
if (ret < 0)
--
2.20.1.windows.1
^ permalink raw reply related
* [RFC PATCH 4/4] powerpc/papr_scm: Add support for PDSM GET_PERF_STAT
From: Vaibhav Jain @ 2020-05-18 11:08 UTC (permalink / raw)
To: linuxppc-dev, linux-nvdimm
Cc: Santosh Sivaraj, Oliver O'Halloran, Aneesh Kumar K . V,
Vaibhav Jain, Dan Williams
In-Reply-To: <20200518110814.145644-1-vaibhav@linux.ibm.com>
This patch adds support for retrieving a singled NVDIMM performance
stat from PHYP via PDSM GET_PERF_STAT_VERSION. A new uapi 'struct
nd_pdsm_get_perf_stat' is introduced that holds a single performance
stat and is populated by newly introduced papr_scm_get_perf_stat() by
issuing an H_SCM_PERFORMANCE_STATS to PHYP.
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
---
arch/powerpc/include/uapi/asm/papr_scm_pdsm.h | 12 +++
arch/powerpc/platforms/pseries/papr_scm.c | 74 +++++++++++++++++++
2 files changed, 86 insertions(+)
diff --git a/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h b/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h
index 2db4ffdff285..473c4bbddb2f 100644
--- a/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h
+++ b/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h
@@ -116,6 +116,7 @@ enum papr_scm_pdsm {
PAPR_SCM_PDSM_HEALTH,
PAPR_SCM_PDSM_FETCH_PERF_STATS,
PAPR_SCM_PDSM_READ_PERF_STATS,
+ PAPR_SCM_PDSM_GET_PERF_STAT,
PAPR_SCM_PDSM_MAX,
};
@@ -218,4 +219,15 @@ struct nd_pdsm_read_perf_stats_v1 {
#define nd_pdsm_read_perf_stats nd_pdsm_read_perf_stats_v1
#define ND_PDSM_READ_PERF_STATS_VERSION 1
+/*
+ * Fetch the value of single nvdimm performance stat id of which is
+ * stored in 'stat.id'
+ */
+struct nd_pdsm_get_perf_stat_v1 {
+ struct nd_pdsm_perf_stat stat;
+} __packed;
+
+#define nd_pdsm_get_perf_stat nd_pdsm_get_perf_stat_v1
+#define ND_PDSM_GET_PERF_STAT_VERSION 1
+
#endif /* _UAPI_ASM_POWERPC_PAPR_SCM_PDSM_H_ */
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
index 06744d7fe727..284d04f0a094 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -525,6 +525,77 @@ static int is_cmd_valid(struct nvdimm *nvdimm, unsigned int cmd, void *buf,
return 0;
}
+static int papr_scm_get_perf_stat(struct papr_scm_priv *p,
+ struct nd_pdsm_cmd_pkg *pkg)
+{
+ int rc;
+ struct nd_pdsm_get_perf_stat *stat =
+ (struct nd_pdsm_get_perf_stat *)pdsm_cmd_to_payload(pkg);
+ const size_t copysize = sizeof(struct nd_pdsm_get_perf_stat);
+ struct papr_scm_perf_stats *stats_req;
+ ssize_t stat_size;
+
+ /*
+ * If the requested payload version is greater than one we know
+ * about, return the payload version we know about and let
+ * caller/userspace handle.
+ */
+ if (pkg->payload_version > ND_PDSM_GET_PERF_STAT_VERSION)
+ pkg->payload_version = ND_PDSM_GET_PERF_STAT_VERSION;
+
+ if (pkg->hdr.nd_size_out < copysize) {
+ dev_dbg(&p->pdev->dev, "Truncated payload (%u). Expected (%lu)",
+ pkg->hdr.nd_size_out, copysize);
+ rc = -ENOSPC;
+ goto out;
+ }
+
+ if (!READ_ONCE(p->len_stat_buffer)) {
+ dev_dbg(&p->pdev->dev, "Perf stat: req for unsupported device");
+ rc = -ENOENT;
+ goto out;
+ }
+
+ /* Allocate and setup a PERFORMANCE_STATS request buffer */
+ stat_size = sizeof(struct papr_scm_perf_stats) +
+ sizeof(struct papr_scm_perf_stat);
+ stats_req = kzalloc(stat_size, GFP_KERNEL);
+ if (!stats_req) {
+ dev_err(&p->pdev->dev, "Perf stat: Unable to allocate memory\n");
+ rc = -ENOMEM;
+ goto out;
+ }
+
+ /* Copy the single request statistic_id into the request buffer */
+ memcpy(&stats_req->scm_statistics[0].statistic_id, &stat->stat.id,
+ sizeof(stats_req->scm_statistics[0].statistic_id));
+
+ /* Fetch the stat from PHYP */
+ rc = drc_pmem_query_stats(p, stats_req, stat_size, 1, NULL);
+ if (rc)
+ goto out;
+
+ /* Copy the value of stat to the return payload */
+ memcpy(&stat->stat.id, &stats_req->scm_statistics[0].statistic_id,
+ sizeof(stat->stat.id));
+ stat->stat.val = stats_req->scm_statistics[0].statistic_value;
+
+ pkg->hdr.nd_fw_size = copysize;
+
+ dev_dbg(&p->pdev->dev, "Copying payload size=%u version=0x%x\n",
+ pkg->hdr.nd_fw_size, pkg->payload_version);
+
+out:
+ /*
+ * Put the error in out package and return success from function
+ * so that errors if any are propogated back to userspace.
+ */
+ pkg->cmd_status = rc;
+ dev_dbg(&p->pdev->dev, "completion code = %d\n", rc);
+
+ return 0;
+}
+
/*
* Read the contents of dimm performance statistics buffer at the given
* 'in_offset' and copy 'in_length' number of bytes to the pkg payload.
@@ -755,6 +826,9 @@ static int papr_scm_service_pdsm(struct papr_scm_priv *p,
case PAPR_SCM_PDSM_READ_PERF_STATS:
return papr_scm_read_perf_stats(p, call_pkg);
+ case PAPR_SCM_PDSM_GET_PERF_STAT:
+ return papr_scm_get_perf_stat(p, call_pkg);
+
default:
dev_dbg(&p->pdev->dev, "Unsupported PDSM request 0x%llx\n",
call_pkg->hdr.nd_command);
--
2.26.2
^ permalink raw reply related
* [RFC PATCH 3/4] powerpc/papr_scm: Implement support for PAPR_SCM_PDSM_READ_PERF_STATS
From: Vaibhav Jain @ 2020-05-18 11:08 UTC (permalink / raw)
To: linuxppc-dev, linux-nvdimm
Cc: Santosh Sivaraj, Oliver O'Halloran, Aneesh Kumar K . V,
Vaibhav Jain, Dan Williams
In-Reply-To: <20200518110814.145644-1-vaibhav@linux.ibm.com>
Implement support for pdsm READ_PERF_STATS to be used by libndctl to
fetch all NVDIMM performance statistics. The stats are to be exchanged
via newly introduced 'struct nd_pdsm_get_perf_stats' which is
allocated and sent by libndctl to papr_scm. The struct contains
members 'in_offset' and 'in_length' to provide incremental access to
performance statistics data buffer and workaround 'libnvdimm' limit of
256 bytes evelope size.
The patch introduces new function 'papr_scm_read_perf_stats()' to
service this pdsm and copy the requested chunk of performance stats to
the libndctl provided payload buffer for the given offset and length.
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
---
arch/powerpc/include/uapi/asm/papr_scm_pdsm.h | 35 +++++++
arch/powerpc/platforms/pseries/papr_scm.c | 91 +++++++++++++++++++
2 files changed, 126 insertions(+)
diff --git a/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h b/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h
index 40ec55d06f4c..2db4ffdff285 100644
--- a/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h
+++ b/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h
@@ -115,6 +115,7 @@ enum papr_scm_pdsm {
PAPR_SCM_PDSM_MIN = 0x0,
PAPR_SCM_PDSM_HEALTH,
PAPR_SCM_PDSM_FETCH_PERF_STATS,
+ PAPR_SCM_PDSM_READ_PERF_STATS,
PAPR_SCM_PDSM_MAX,
};
@@ -183,4 +184,38 @@ struct nd_pdsm_fetch_perf_stats_v1 {
#define nd_pdsm_fetch_perf_stats nd_pdsm_fetch_perf_stats_v1
#define ND_PDSM_FETCH_PERF_STATS_VERSION 1
+/*
+ * Holds a single performance stat. papr_scm owns a buffer that holds an array
+ * of all the available stats and their values. Access to the buffer is provided
+ * via PERF_STAT_SIZE and READ_PERF_STATS psdm.
+ * id : id of the performance stat. Usually acsii encode stat name.
+ * val : Non normalized value of the id.
+ */
+
+struct nd_pdsm_perf_stat {
+ __u64 id;
+ __u64 val;
+};
+
+/*
+ * Returns a chunk of performance stats buffer data to libndctl.
+ * This is needed to overcome the 256 byte envelope size limit enforced by
+ * libnvdimm.
+ * in_offset: The starting offset to perf stats data buffer.
+ * in_length: Length of data to be copied to 'stats_data'
+ * stats_data: Holds the chunk of requested perf stats data buffer.
+ *
+ * Note: To prevent races in reading performance stats, in_offset and in_length
+ * should multiple of 16-Bytes. If they are not then papr_scm will return an
+ * -EINVAL error.
+ */
+struct nd_pdsm_read_perf_stats_v1 {
+ __u32 in_offset;
+ __u32 in_length;
+ struct nd_pdsm_perf_stat stats_data[];
+} __packed;
+
+#define nd_pdsm_read_perf_stats nd_pdsm_read_perf_stats_v1
+#define ND_PDSM_READ_PERF_STATS_VERSION 1
+
#endif /* _UAPI_ASM_POWERPC_PAPR_SCM_PDSM_H_ */
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
index f8b37a830aed..06744d7fe727 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -525,6 +525,94 @@ static int is_cmd_valid(struct nvdimm *nvdimm, unsigned int cmd, void *buf,
return 0;
}
+/*
+ * Read the contents of dimm performance statistics buffer at the given
+ * 'in_offset' and copy 'in_length' number of bytes to the pkg payload.
+ * Both 'in_offset' and 'in_length' are expected to be in multiples of
+ * 16-Bytes to prevent a read/write race that may cause malformed values
+ * top be returned as performance statistics buffer content.
+ */
+static int papr_scm_read_perf_stats(struct papr_scm_priv *p,
+ struct nd_pdsm_cmd_pkg *pkg)
+{
+ int rc;
+ struct nd_pdsm_read_perf_stats *stats =
+ (struct nd_pdsm_read_perf_stats *)pdsm_cmd_to_payload(pkg);
+ const size_t copysize = sizeof(struct nd_pdsm_read_perf_stats);
+ off_t offset;
+
+ /*
+ * If the requested payload version is greater than one we know
+ * about, return the payload version we know about and let
+ * caller/userspace handle.
+ */
+ if (pkg->payload_version > ND_PDSM_READ_PERF_STATS_VERSION)
+ pkg->payload_version = ND_PDSM_READ_PERF_STATS_VERSION;
+
+ if (pkg->hdr.nd_size_out < copysize) {
+ dev_dbg(&p->pdev->dev, "Truncated payload (%u). Expected (%lu)",
+ pkg->hdr.nd_size_out, copysize);
+ rc = -ENOSPC;
+ goto out;
+ }
+
+ /* Protect concurrent modifications to papr_scm_priv */
+ rc = mutex_lock_interruptible(&p->health_mutex);
+ if (rc)
+ goto out;
+
+ if (!p->len_stat_buffer) {
+ dev_dbg(&p->pdev->dev, "Perf stats: req for unsupported device");
+ rc = -ENOENT;
+ goto mutex_unlock_out;
+ }
+
+ /* calculate offset skipping the perf_stats buffer header */
+ offset = stats->in_offset + sizeof(*p->perf_stats);
+ /* Cap the copy length to extend of stats buffer */
+ stats->in_length = min(stats->in_length,
+ (__u32)(p->len_stat_buffer - offset));
+
+ /*
+ * Ensure that offset and length are valid and multiples of 16 bytes.
+ * PDSM FETCH_PERF_STATS can interleave in between PDSM READ_PERF_STAT.
+ * Since this is a read/write race hence malformed performance stats
+ * buffer contents that may be returned.
+ * A 16-Byte read alignment constraint forces a read granularity of
+ * same the size of each performance stat and they are guaranteed to
+ * remain stable during 'health_mutex' lock context.
+ */
+ if (offset >= p->len_stat_buffer || (offset % 16) ||
+ (stats->in_length % 16)) {
+ dev_dbg(&p->pdev->dev,
+ "Perf stats: Invalid offset(0x%lx) or length(0x%x)",
+ offset, stats->in_length);
+ rc = -EINVAL;
+ goto mutex_unlock_out;
+ }
+
+ /* Put the stats buffer data in the payload buffer */
+ memcpy(stats->stats_data,
+ (void *)p->perf_stats + offset, stats->in_length);
+
+ pkg->hdr.nd_fw_size = stats->in_length;
+
+ dev_dbg(&p->pdev->dev, "Copying payload size=%u version=0x%x\n",
+ stats->in_length, pkg->payload_version);
+
+mutex_unlock_out:
+ mutex_unlock(&p->health_mutex);
+out:
+ /*
+ * Put the error in out package and return success from function
+ * so that errors if any are propogated back to userspace.
+ */
+ pkg->cmd_status = rc;
+ dev_dbg(&p->pdev->dev, "completion code = %d\n", rc);
+
+ return 0;
+}
+
/* Return the size in bytes for returning all perf stats to libndctl */
static int papr_scm_fetch_perf_stats(struct papr_scm_priv *p,
struct nd_pdsm_cmd_pkg *pkg)
@@ -664,6 +752,9 @@ static int papr_scm_service_pdsm(struct papr_scm_priv *p,
case PAPR_SCM_PDSM_FETCH_PERF_STATS:
return papr_scm_fetch_perf_stats(p, call_pkg);
+ case PAPR_SCM_PDSM_READ_PERF_STATS:
+ return papr_scm_read_perf_stats(p, call_pkg);
+
default:
dev_dbg(&p->pdev->dev, "Unsupported PDSM request 0x%llx\n",
call_pkg->hdr.nd_command);
--
2.26.2
^ permalink raw reply related
* [RFC PATCH 2/4] powerpc/papr_scm: Add support for PAPR_SCM_PDSM_FETCH_PERF_STATS
From: Vaibhav Jain @ 2020-05-18 11:08 UTC (permalink / raw)
To: linuxppc-dev, linux-nvdimm
Cc: Santosh Sivaraj, Oliver O'Halloran, Aneesh Kumar K . V,
Vaibhav Jain, Dan Williams
In-Reply-To: <20200518110814.145644-1-vaibhav@linux.ibm.com>
Add support for pdsm PAPR_SCM_PDSM_FETCH_PERF_STATS that issues HCALL
H_SCM_PERFORMANCE_STATS to PHYP to fetch all the NVDIMM performance
stats and store them in per nvdimm 'struct papr_scm_priv' as member
'perf_stats'. A further PDSM request (introduced later) is needed to
read the contents of this performance stats buffer.
A new uapi struct 'nd_psdm_perf_stats_size' is introduced to be used
by libndctl to retrieve the size of buffer needed to store all NVDIMM
performance stats.
The patch updates papr_scm_service_pdsm() to route
PAPR_SCM_PDSM_FETCH_PERF_STATS to newly introduced
papr_scm_fetch_perf_stats() which then issues the HCALL and copies the
needed size to the PDSM payload.
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
---
arch/powerpc/include/uapi/asm/papr_scm_pdsm.h | 13 ++++
arch/powerpc/platforms/pseries/papr_scm.c | 70 +++++++++++++++++++
2 files changed, 83 insertions(+)
diff --git a/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h b/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h
index db0cf550dabe..40ec55d06f4c 100644
--- a/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h
+++ b/arch/powerpc/include/uapi/asm/papr_scm_pdsm.h
@@ -114,6 +114,7 @@ struct nd_pdsm_cmd_pkg {
enum papr_scm_pdsm {
PAPR_SCM_PDSM_MIN = 0x0,
PAPR_SCM_PDSM_HEALTH,
+ PAPR_SCM_PDSM_FETCH_PERF_STATS,
PAPR_SCM_PDSM_MAX,
};
@@ -170,4 +171,16 @@ struct nd_papr_pdsm_health_v1 {
/* Current version number for the dimm health struct */
#define ND_PAPR_PDSM_HEALTH_VERSION 1
+/*
+ * Return the maximum buffer size needed to hold all performance state.
+ * max_stats_size: The buffer size needed to hold all stat entries
+ */
+struct nd_pdsm_fetch_perf_stats_v1 {
+ __u32 max_stats_size;
+ __u8 reserved[4];
+} __packed;
+
+#define nd_pdsm_fetch_perf_stats nd_pdsm_fetch_perf_stats_v1
+#define ND_PDSM_FETCH_PERF_STATS_VERSION 1
+
#endif /* _UAPI_ASM_POWERPC_PAPR_SCM_PDSM_H_ */
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
index fd9a12275315..f8b37a830aed 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -525,6 +525,73 @@ static int is_cmd_valid(struct nvdimm *nvdimm, unsigned int cmd, void *buf,
return 0;
}
+/* Return the size in bytes for returning all perf stats to libndctl */
+static int papr_scm_fetch_perf_stats(struct papr_scm_priv *p,
+ struct nd_pdsm_cmd_pkg *pkg)
+{
+ int rc = 0;
+ size_t copysize = sizeof(struct nd_pdsm_fetch_perf_stats);
+ struct nd_pdsm_fetch_perf_stats *sz =
+ (struct nd_pdsm_fetch_perf_stats *)pdsm_cmd_to_payload(pkg);
+
+ /*
+ * If the requested payload version is greater than one we know
+ * about, return the payload version we know about and let
+ * caller/userspace handle.
+ */
+ if (pkg->payload_version > ND_PDSM_FETCH_PERF_STATS_VERSION)
+ pkg->payload_version = ND_PDSM_FETCH_PERF_STATS_VERSION;
+
+ if (pkg->hdr.nd_size_out < copysize) {
+ dev_dbg(&p->pdev->dev, "Truncated payload (%u). Expected (%lu)",
+ pkg->hdr.nd_size_out, copysize);
+ rc = -ENOSPC;
+ goto out;
+ }
+
+ rc = mutex_lock_interruptible(&p->health_mutex);
+ if (rc)
+ goto out;
+
+ if (!p->len_stat_buffer) {
+ rc = -ENOENT;
+ goto out_unlock;
+ }
+
+ /* Setup the buffer and request phyp for all dimm perf stats data */
+ rc = drc_pmem_query_stats(p, p->perf_stats, p->len_stat_buffer, 0,
+ NULL);
+ if (rc)
+ goto out_unlock;
+
+ dev_dbg(&p->pdev->dev, "Copying payload size=%lu version=0x%x\n",
+ copysize, pkg->payload_version);
+
+ /*
+ * Put the buffer size needed in the payload buffer subtracting the
+ * perf_stat header size.
+ */
+ if (p->len_stat_buffer > sizeof(struct papr_scm_perf_stats))
+ sz->max_stats_size = p->len_stat_buffer -
+ sizeof(struct papr_scm_perf_stats);
+ else
+ sz->max_stats_size = 0;
+
+ pkg->hdr.nd_fw_size = copysize;
+
+out_unlock:
+ mutex_unlock(&p->health_mutex);
+out:
+ /*
+ * Put the error in out package and return success from function
+ * so that errors if any are propogated back to userspace.
+ */
+ pkg->cmd_status = rc;
+ dev_dbg(&p->pdev->dev, "completion code = %d\n", rc);
+
+ return 0;
+}
+
/* Fetch the DIMM health info and populate it in provided package. */
static int papr_scm_get_health(struct papr_scm_priv *p,
struct nd_pdsm_cmd_pkg *pkg)
@@ -594,6 +661,9 @@ static int papr_scm_service_pdsm(struct papr_scm_priv *p,
case PAPR_SCM_PDSM_HEALTH:
return papr_scm_get_health(p, call_pkg);
+ case PAPR_SCM_PDSM_FETCH_PERF_STATS:
+ return papr_scm_fetch_perf_stats(p, call_pkg);
+
default:
dev_dbg(&p->pdev->dev, "Unsupported PDSM request 0x%llx\n",
call_pkg->hdr.nd_command);
--
2.26.2
^ permalink raw reply related
* [RFC PATCH 0/4] powerpc/papr_scm: Add support for reporting NVDIMM performance statistics
From: Vaibhav Jain @ 2020-05-18 11:08 UTC (permalink / raw)
To: linuxppc-dev, linux-nvdimm
Cc: Santosh Sivaraj, Oliver O'Halloran, Aneesh Kumar K . V,
Vaibhav Jain, Dan Williams
The patch-set proposes to add support for fetching and reporting
performance statistics for PAPR compliant NVDIMMs as described in
documentation for H_SCM_PERFORMANCE_STATS hcall Ref[1]. The patch-set
also implements mechanisms to expose NVDIMM performance stats via
sysfs and newly introduced PDSMs[2] for libndctl.
This patch-set combined with corresponding ndctl and libndctl changes
proposed at Ref[3] should enable user to fetch PAPR compliant NVDIMMs
using following command:
# ndctl list -D --stats
[
{
"dev":"nmem0",
"stats":{
"Controller Reset Count":2,
"Controller Reset Elapsed Time":603331,
"Power-on Seconds":603931,
"Life Remaining":"100%",
"Critical Resource Utilization":"0%",
"Host Load Count":5781028,
"Host Store Count":8966800,
"Host Load Duration":975895365,
"Host Store Duration":716230690,
"Media Read Count":0,
"Media Write Count":6313,
"Media Read Duration":0,
"Media Write Duration":9679615,
"Cache Read Hit Count":5781028,
"Cache Write Hit Count":8442479,
"Fast Write Count":8969912
}
}
]
The patchset is dependent on existing patch-set "[PATCH v7 0/5]
powerpc/papr_scm: Add support for reporting nvdimm health" available
at Ref[2] that adds support for reporting PAPR compliant NVDIMMs in
'papr_scm' kernel module.
Structure of the patch-set
==========================
The patch-set starts with implementing functionality in papr_scm
module to issue H_SCM_PERFORMANCE_STATS hcall, fetch & parse dimm
performance stats and exposing them as a PAPR specific libnvdimm
attribute named 'perf_stats'
Patch-2 introduces a new PDSM named FETCH_PERF_STATS that can be
issued by libndctl asking papr_scm to issue the
H_SCM_PERFORMANCE_STATS hcall using helpers introduced earlier and
storing the results in a dimm specific perf-stats-buffer.
Patch-3 introduces a new PDSM named READ_PERF_STATS that can be
issued by libndctl to read the perf-stats-buffer in an incremental
manner to workaround the 256-bytes envelop limitation of libnvdimm.
Finally Patch-4 introduces a new PDSM named GET_PERF_STAT that can be
issued by libndctl to read values of a specific NVDIMM performance
stat like "Life Remaining".
References
==========
[1] Documentation/powerpc/papr_hcals.rst
[2] https://lore.kernel.org/linux-nvdimm/20200508104922.72565-1-vaibhav@linux.ibm.com/
[3] https://github.com/vaibhav92/ndctl/tree/papr_scm_stats_v1
Vaibhav Jain (4):
powerpc/papr_scm: Fetch nvdimm performance stats from PHYP
powerpc/papr_scm: Add support for PAPR_SCM_PDSM_FETCH_PERF_STATS
powerpc/papr_scm: Implement support for PAPR_SCM_PDSM_READ_PERF_STATS
powerpc/papr_scm: Add support for PDSM GET_PERF_STAT
Documentation/ABI/testing/sysfs-bus-papr-scm | 27 ++
arch/powerpc/include/uapi/asm/papr_scm_pdsm.h | 60 +++
arch/powerpc/platforms/pseries/papr_scm.c | 391 ++++++++++++++++++
3 files changed, 478 insertions(+)
--
2.26.2
^ permalink raw reply
* [RFC PATCH 1/4] powerpc/papr_scm: Fetch nvdimm performance stats from PHYP
From: Vaibhav Jain @ 2020-05-18 11:08 UTC (permalink / raw)
To: linuxppc-dev, linux-nvdimm
Cc: Santosh Sivaraj, Oliver O'Halloran, Aneesh Kumar K . V,
Vaibhav Jain, Dan Williams
In-Reply-To: <20200518110814.145644-1-vaibhav@linux.ibm.com>
Update papr_scm.c to query dimm performance statistics from PHYP via
H_SCM_PERFORMANCE_STATS hcall and export them to userspace as PAPR
specific NVDIMM attribute 'perf_stats' in sysfs. The patch also
provide a sysfs ABI documentation for the stats being reported and
their meanings.
During NVDIMM probe time in papr_scm_nvdimm_init() a special variant
of H_SCM_PERFORMANCE_STATS hcall is issued to check if collection of
performance statistics is supported or not. If yes then a per-nvdimm
performance stats buffer is of size as returned by PHYP is allocated
and stored along with its length in two newly introduced NVDIMM
private struct members 'perf_stats' and 'len_stat_buffer'.
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
---
Documentation/ABI/testing/sysfs-bus-papr-scm | 27 ++++
arch/powerpc/platforms/pseries/papr_scm.c | 156 +++++++++++++++++++
2 files changed, 183 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-papr-scm b/Documentation/ABI/testing/sysfs-bus-papr-scm
index 6143d06072f1..ad06b3e9c315 100644
--- a/Documentation/ABI/testing/sysfs-bus-papr-scm
+++ b/Documentation/ABI/testing/sysfs-bus-papr-scm
@@ -25,3 +25,30 @@ Description:
NVDIMM have been scrubbed.
* "locked" : Indicating that NVDIMM contents cant
be modified until next power cycle.
+
+What: /sys/bus/nd/devices/nmemX/papr/perf_stats
+Date: May, 2020
+KernelVersion: v5.8
+Contact: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>, linux-nvdimm@lists.01.org,
+Description:
+ (RO) Report various performance stats related to papr-scm NVDIMM
+ device. Each stat is reported on a new line with each line
+ composed of a stat-identifier followed by it value. Below are
+ currently known dimm performance stats which are reported:
+
+ * "CtlResCt" : Controller Reset Count
+ * "CtlResTm" : Controller Reset Elapsed Time
+ * "PonSecs " : Power-on Seconds
+ * "MemLife " : Life Remaining
+ * "CritRscU" : Critical Resource Utilization
+ * "HostLCnt" : Host Load Count
+ * "HostSCnt" : Host Store Count
+ * "HostSDur" : Host Store Duration
+ * "HostLDur" : Host Load Duration
+ * "MedRCnt " : Media Read Count
+ * "MedWCnt " : Media Write Count
+ * "MedRDur " : Media Read Duration
+ * "MedWDur " : Media Write Duration
+ * "CchRHCnt" : Cache Read Hit Count
+ * "CchWHCnt" : Cache Write Hit Count
+ * "FastWCnt" : Fast Write Count
\ No newline at end of file
diff --git a/arch/powerpc/platforms/pseries/papr_scm.c b/arch/powerpc/platforms/pseries/papr_scm.c
index c59bf17ad054..fd9a12275315 100644
--- a/arch/powerpc/platforms/pseries/papr_scm.c
+++ b/arch/powerpc/platforms/pseries/papr_scm.c
@@ -62,6 +62,24 @@
PAPR_SCM_DIMM_HEALTH_FATAL | \
PAPR_SCM_DIMM_HEALTH_UNHEALTHY)
+#define PAPR_SCM_PERF_STATS_EYECATCHER __stringify(SCMSTATS)
+#define PAPR_SCM_PERF_STATS_VERSION 0x1
+
+/* Struct holding a single performance metric */
+struct papr_scm_perf_stat {
+ u8 statistic_id[8];
+ u64 statistic_value;
+};
+
+/* Struct exchanged between kernel and PHYP for fetching drc perf stats */
+struct papr_scm_perf_stats {
+ u8 eye_catcher[8];
+ u32 stats_version; /* Should be 0x01 */
+ u32 num_statistics; /* Number of stats following */
+ /* zero or more performance matrics */
+ struct papr_scm_perf_stat scm_statistics[];
+} __packed;
+
/* private struct associated with each region */
struct papr_scm_priv {
struct platform_device *pdev;
@@ -89,6 +107,12 @@ struct papr_scm_priv {
/* Health information for the dimm */
struct nd_papr_pdsm_health health;
+
+ /* length of the stat buffer as expected by phyp */
+ size_t len_stat_buffer;
+
+ /* Cached version of all performance state */
+ struct papr_scm_perf_stats *perf_stats;
};
static int drc_pmem_bind(struct papr_scm_priv *p)
@@ -194,6 +218,75 @@ static int drc_pmem_query_n_bind(struct papr_scm_priv *p)
return drc_pmem_bind(p);
}
+/*
+ * Query the Dimm performance stats from PHYP and copy them (if returned) to
+ * provided struct papr_scm_perf_stats instance 'stats' of 'size' in bytes.
+ * The value of R4 is copied to 'out' if the pointer is provided.
+ */
+static int drc_pmem_query_stats(struct papr_scm_priv *p,
+ struct papr_scm_perf_stats *buff_stats,
+ size_t size, unsigned int num_stats,
+ uint64_t *out)
+{
+ unsigned long ret[PLPAR_HCALL_BUFSIZE];
+ struct papr_scm_perf_stat *stats;
+ s64 rc, i;
+
+ /* Setup the out buffer */
+ if (buff_stats) {
+ memcpy(buff_stats->eye_catcher,
+ PAPR_SCM_PERF_STATS_EYECATCHER, 8);
+ buff_stats->stats_version =
+ cpu_to_be32(PAPR_SCM_PERF_STATS_VERSION);
+ buff_stats->num_statistics =
+ cpu_to_be32(num_stats);
+ } else {
+ /* In case of no out buffer ignore the size */
+ size = 0;
+ }
+
+ /*
+ * Do the HCALL asking PHYP for info and if R4 was requested
+ * return its value in 'out' variable.
+ */
+ rc = plpar_hcall(H_SCM_PERFORMANCE_STATS, ret, p->drc_index,
+ __pa(buff_stats), size);
+ if (out)
+ *out = ret[0];
+
+ if (rc == H_PARTIAL) {
+ dev_err(&p->pdev->dev,
+ "Unknown performance stats, Err:0x%016lX\n", ret[0]);
+ return -ENOENT;
+ } else if (rc != H_SUCCESS) {
+ dev_err(&p->pdev->dev,
+ "Failed to query performance stats, Err:%lld\n", rc);
+ return -ENXIO;
+ }
+
+ /* Successfully fetched the requested stats from phyp */
+ if (size != 0) {
+ buff_stats->num_statistics =
+ be32_to_cpu(buff_stats->num_statistics);
+
+ /* Transform the stats buffer values from BE to cpu native */
+ for (i = 0, stats = buff_stats->scm_statistics;
+ i < buff_stats->num_statistics; ++i) {
+ stats[i].statistic_value =
+ be64_to_cpu(stats[i].statistic_value);
+ }
+ dev_dbg(&p->pdev->dev,
+ "Performance stats returned %d stats\n",
+ buff_stats->num_statistics);
+ } else {
+ /* Handle case where stat buffer size was requested */
+ dev_dbg(&p->pdev->dev,
+ "Performance stats size %ld\n", ret[0]);
+ }
+
+ return 0;
+}
+
/*
* Issue hcall to retrieve dimm health info and populate papr_scm_priv with the
* health information.
@@ -563,6 +656,47 @@ static int papr_scm_ndctl(struct nvdimm_bus_descriptor *nd_desc,
return *cmd_rc;
}
+static ssize_t perf_stats_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+{
+ int index, rc;
+ struct seq_buf s;
+ struct nvdimm *dimm = to_nvdimm(dev);
+ struct papr_scm_priv *p = nvdimm_provider_data(dimm);
+ struct papr_scm_perf_stat *stats = p->perf_stats->scm_statistics;
+
+ if (!p->len_stat_buffer)
+ return -ENOENT;
+
+ seq_buf_init(&s, buf, PAGE_SIZE);
+
+ /* Protect concurrent modifications to papr_scm_priv */
+ rc = mutex_lock_interruptible(&p->health_mutex);
+ if (rc)
+ return rc;
+
+ /* Ask phyp to return all dimm perf stats */
+ rc = drc_pmem_query_stats(p, p->perf_stats, p->len_stat_buffer, 0,
+ NULL);
+ if (!rc) {
+ /*
+ * Go through the returned output buffer and print stats and
+ * values. Since statistic_id is essentially a char string of
+ * 8 bytes, simply use the string format specifier to print it.
+ */
+ for (index = 0; index < p->perf_stats->num_statistics;
+ ++index) {
+ seq_buf_printf(&s, "%.8s = 0x%016llX\n",
+ stats[index].statistic_id,
+ stats[index].statistic_value);
+ }
+ }
+
+ mutex_unlock(&p->health_mutex);
+ return rc ? rc : seq_buf_used(&s);
+}
+DEVICE_ATTR_RO(perf_stats);
+
static ssize_t flags_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
@@ -615,6 +749,7 @@ DEVICE_ATTR_RO(flags);
/* papr_scm specific dimm attributes */
static struct attribute *papr_scm_nd_attributes[] = {
&dev_attr_flags.attr,
+ &dev_attr_perf_stats.attr,
NULL,
};
@@ -635,6 +770,7 @@ static int papr_scm_nvdimm_init(struct papr_scm_priv *p)
struct nd_region_desc ndr_desc;
unsigned long dimm_flags;
int target_nid, online_nid;
+ u64 stat_size;
p->bus_desc.ndctl = papr_scm_ndctl;
p->bus_desc.module = THIS_MODULE;
@@ -698,6 +834,26 @@ static int papr_scm_nvdimm_init(struct papr_scm_priv *p)
dev_info(dev, "Region registered with target node %d and online node %d",
target_nid, online_nid);
+ /* Try retriving the stat buffer and see if its supported */
+ if (!drc_pmem_query_stats(p, NULL, 0, 0, &stat_size)) {
+ /* Allocate the buffer for phyp where stats are written */
+ p->perf_stats = kzalloc(stat_size, GFP_KERNEL);
+
+ /* Failed allocation is non fatal and results in limited data */
+ if (!p->perf_stats)
+ dev_dbg(&p->pdev->dev,
+ "Unable to allocate %llu bytes for perf-state",
+ stat_size);
+ else
+ p->len_stat_buffer = (size_t)stat_size;
+ } else {
+ dev_dbg(&p->pdev->dev, "Unable to retrieve performace stats\n");
+ }
+
+ /* Check if perf-stats buffer was allocated */
+ if (!p->len_stat_buffer)
+ dev_info(&p->pdev->dev, "Limited dimm info available\n");
+
return 0;
err: nvdimm_bus_unregister(p->bus);
--
2.26.2
^ permalink raw reply related
* Re: [PATCH v2 2/2] powerpc/configs: replace deprecated riva/nvidia with nouveau
From: Emil Velikov @ 2020-05-18 11:00 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linux-fbdev, Antonino Daplas, Bartlomiej Zolnierkiewicz,
ML dri-devel, Paul Mackerras, linuxppc-dev
In-Reply-To: <9b0db95949b973c682b449906573e7b28c6113ef.camel@kernel.crashing.org>
Hi Benjamin,
On Mon, 18 May 2020 at 01:45, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
>
> On Sun, 2020-05-17 at 23:05 +0100, Emil Velikov wrote:
> > As mentioned in earlier commit, the riva and nvidia fbdev drivers
> > have
> > seen no love over the years, are short on features and overall below
> > par
> >
> > Users are encouraged to switch to the nouveau drm driver instead.
> >
> > v2: Split configs to separate patch, enable nouveau (Bartlomiej)
>
> Back when I still had these things to play with (years ago) nouveau
> didn't work properly on these ancient machines.
>
I believe you reported issues due to different page size for the CPU/GPU.
Have you tried nouveau recently, there has been a handful of patches
on the topic since your report.
Alternatively, it would make sense you rebase, cleanup and merge your patch.
-Emil
^ permalink raw reply
* [PATCH] ASoC: fsl_micfil: Fix indentation to put on one line affected code
From: Tang Bin @ 2020-05-18 10:59 UTC (permalink / raw)
To: broonie, timur, nicoleotsuka, Xiubo.Lee, perex
Cc: alsa-devel, linuxppc-dev, linux-kernel, Tang Bin
In the function fsl_micfil_startup(), the two lines of dev_err()
can be shortened to one line.
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
sound/soc/fsl/fsl_micfil.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index f7f2d29f1..79cf488fa 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -217,8 +217,7 @@ static int fsl_micfil_startup(struct snd_pcm_substream *substream,
struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai);
if (!micfil) {
- dev_err(dai->dev,
- "micfil dai priv_data not set\n");
+ dev_err(dai->dev, "micfil dai priv_data not set\n");
return -EINVAL;
}
--
2.20.1.windows.1
^ permalink raw reply related
* Re: [PATCH] ASoC: fsl_micfil: Fix format and unused assignment
From: Tang Bin @ 2020-05-18 10:47 UTC (permalink / raw)
To: Mark Brown
Cc: alsa-devel, timur, Xiubo.Lee, linux-kernel, perex, nicoleotsuka,
linuxppc-dev
In-Reply-To: <20200518102513.GA8699@sirena.org.uk>
On 2020/5/18 18:25, Mark Brown wrote:
> On Mon, May 18, 2020 at 03:44:05PM +0800, Tang Bin wrote:
>> In the function fsl_micfil_startup(), the two lines of dev_err()
>> can be shortened to one line. And delete unused initialized value
>> of 'ret', because it will be assigned by the function
>> fsl_micfil_set_mclk_rate().
> This is two separate changes with no overlap so would have been better
> sent as separate patches.
Got it, Thanks
Tang Bin
^ permalink raw reply
* Re: [PATCH] powerpc/sysdev: fix compile errors
From: Christophe Leroy @ 2020-05-18 10:36 UTC (permalink / raw)
To: Jiri Kosina, Christophe Leroy
Cc: Kate Stewart, linux-kernel, wenhu.pku, Paul Mackerras,
Greg Kroah-Hartman, WANG Wenhu, linuxppc-dev, Thomas Gleixner,
Allison Randal
In-Reply-To: <nycvar.YFH.7.76.2005181232140.25812@cbobk.fhfr.pm>
Le 18/05/2020 à 12:32, Jiri Kosina a écrit :
> On Mon, 18 May 2020, Jiri Kosina wrote:
>
>>>> Include linux/io.h into fsl_85xx_cache_sram.c to fix the
>>>> implicit-declaration compile errors when building Cache-Sram.
>>>>
>>>> arch/powerpc/sysdev/fsl_85xx_cache_sram.c: In function
>>>> ‘instantiate_cache_sram’:
>>>> arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:26: error: implicit declaration
>>>> of function ‘ioremap_coherent’; did you mean ‘bitmap_complement’?
>>>> [-Werror=implicit-function-declaration]
>>>> cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
>>>> ^~~~~~~~~~~~~~~~
>>>> bitmap_complement
>>>> arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:24: error: assignment makes
>>>> pointer from integer without a cast [-Werror=int-conversion]
>>>> cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
>>>> ^
>>>> arch/powerpc/sysdev/fsl_85xx_cache_sram.c:123:2: error: implicit declaration
>>>> of function ‘iounmap’; did you mean ‘roundup’?
>>>> [-Werror=implicit-function-declaration]
>>>> iounmap(cache_sram->base_virt);
>>>> ^~~~~~~
>>>> roundup
>>>> cc1: all warnings being treated as errors
>>>>
>>>> Fixed: commit 6db92cc9d07d ("powerpc/85xx: add cache-sram support")
>>>> Signed-off-by: WANG Wenhu <wenhu.wang@vivo.com>
>>>
>>> Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
>>
>> As this doesn't seem to have been picked up for linux-next yet, I am
>> picking it up now.
>
> Only now I've noticed that this is actually a dead code o_O as this file
> can't be built by any combination of config options. So I am dropping the
> patch again, but why do we keep it in the tree in the first place?
>
There is a series aiming at making use of it, see
https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=172421
Christophe
^ permalink raw reply
* Re: [PATCH] powerpc/sysdev: fix compile errors
From: Jiri Kosina @ 2020-05-18 10:32 UTC (permalink / raw)
To: Christophe Leroy
Cc: Kate Stewart, linux-kernel, wenhu.pku, Paul Mackerras,
Greg Kroah-Hartman, WANG Wenhu, linuxppc-dev, Thomas Gleixner,
Allison Randal
In-Reply-To: <nycvar.YFH.7.76.2005181228480.25812@cbobk.fhfr.pm>
On Mon, 18 May 2020, Jiri Kosina wrote:
> > > Include linux/io.h into fsl_85xx_cache_sram.c to fix the
> > > implicit-declaration compile errors when building Cache-Sram.
> > >
> > > arch/powerpc/sysdev/fsl_85xx_cache_sram.c: In function
> > > ‘instantiate_cache_sram’:
> > > arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:26: error: implicit declaration
> > > of function ‘ioremap_coherent’; did you mean ‘bitmap_complement’?
> > > [-Werror=implicit-function-declaration]
> > > cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
> > > ^~~~~~~~~~~~~~~~
> > > bitmap_complement
> > > arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:24: error: assignment makes
> > > pointer from integer without a cast [-Werror=int-conversion]
> > > cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
> > > ^
> > > arch/powerpc/sysdev/fsl_85xx_cache_sram.c:123:2: error: implicit declaration
> > > of function ‘iounmap’; did you mean ‘roundup’?
> > > [-Werror=implicit-function-declaration]
> > > iounmap(cache_sram->base_virt);
> > > ^~~~~~~
> > > roundup
> > > cc1: all warnings being treated as errors
> > >
> > > Fixed: commit 6db92cc9d07d ("powerpc/85xx: add cache-sram support")
> > > Signed-off-by: WANG Wenhu <wenhu.wang@vivo.com>
> >
> > Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
>
> As this doesn't seem to have been picked up for linux-next yet, I am
> picking it up now.
Only now I've noticed that this is actually a dead code o_O as this file
can't be built by any combination of config options. So I am dropping the
patch again, but why do we keep it in the tree in the first place?
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* Re: [PATCH] powerpc/sysdev: fix compile errors
From: Jiri Kosina @ 2020-05-18 10:29 UTC (permalink / raw)
To: Christophe Leroy
Cc: Kate Stewart, linux-kernel, wenhu.pku, Paul Mackerras,
Greg Kroah-Hartman, WANG Wenhu, linuxppc-dev, Thomas Gleixner,
Allison Randal
In-Reply-To: <62251ec1-dd42-6522-dcb2-613838cd5504@c-s.fr>
On Mon, 2 Mar 2020, Christophe Leroy wrote:
> > Include linux/io.h into fsl_85xx_cache_sram.c to fix the
> > implicit-declaration compile errors when building Cache-Sram.
> >
> > arch/powerpc/sysdev/fsl_85xx_cache_sram.c: In function
> > ‘instantiate_cache_sram’:
> > arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:26: error: implicit declaration
> > of function ‘ioremap_coherent’; did you mean ‘bitmap_complement’?
> > [-Werror=implicit-function-declaration]
> > cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
> > ^~~~~~~~~~~~~~~~
> > bitmap_complement
> > arch/powerpc/sysdev/fsl_85xx_cache_sram.c:97:24: error: assignment makes
> > pointer from integer without a cast [-Werror=int-conversion]
> > cache_sram->base_virt = ioremap_coherent(cache_sram->base_phys,
> > ^
> > arch/powerpc/sysdev/fsl_85xx_cache_sram.c:123:2: error: implicit declaration
> > of function ‘iounmap’; did you mean ‘roundup’?
> > [-Werror=implicit-function-declaration]
> > iounmap(cache_sram->base_virt);
> > ^~~~~~~
> > roundup
> > cc1: all warnings being treated as errors
> >
> > Fixed: commit 6db92cc9d07d ("powerpc/85xx: add cache-sram support")
> > Signed-off-by: WANG Wenhu <wenhu.wang@vivo.com>
>
> Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
As this doesn't seem to have been picked up for linux-next yet, I am
picking it up now.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* Re: [PATCH] ASoC: fsl_micfil: Fix format and unused assignment
From: Mark Brown @ 2020-05-18 10:25 UTC (permalink / raw)
To: Tang Bin
Cc: alsa-devel, timur, Xiubo.Lee, linux-kernel, perex, nicoleotsuka,
linuxppc-dev
In-Reply-To: <20200518074405.14880-1-tangbin@cmss.chinamobile.com>
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
On Mon, May 18, 2020 at 03:44:05PM +0800, Tang Bin wrote:
> In the function fsl_micfil_startup(), the two lines of dev_err()
> can be shortened to one line. And delete unused initialized value
> of 'ret', because it will be assigned by the function
> fsl_micfil_set_mclk_rate().
This is two separate changes with no overlap so would have been better
sent as separate patches.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* Re: [PATCH] powerpc/wii: Fix declaration made after definition
From: Nathan Chancellor @ 2020-05-18 9:32 UTC (permalink / raw)
To: Michael Ellerman
Cc: kbuild test robot, linux-kernel, clang-built-linux,
Paul Mackerras, linuxppc-dev
In-Reply-To: <20200413190644.16757-1-natechancellor@gmail.com>
On Mon, Apr 13, 2020 at 12:06:45PM -0700, Nathan Chancellor wrote:
> A 0day randconfig uncovered an error with clang, trimmed for brevity:
>
> arch/powerpc/platforms/embedded6xx/wii.c:195:7: error: attribute
> declaration must precede definition [-Werror,-Wignored-attributes]
> if (!machine_is(wii))
> ^
>
> The macro machine_is declares mach_##name but define_machine actually
> defines mach_##name, hence the warning.
>
> To fix this, move define_machine after the is_machine usage.
>
> Fixes: 5a7ee3198dfa ("powerpc: wii: platform support")
> Reported-by: kbuild test robot <lkp@intel.com>
> Link: https://github.com/ClangBuiltLinux/linux/issues/989
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
> arch/powerpc/platforms/embedded6xx/wii.c | 25 ++++++++++++------------
> 1 file changed, 12 insertions(+), 13 deletions(-)
>
> diff --git a/arch/powerpc/platforms/embedded6xx/wii.c b/arch/powerpc/platforms/embedded6xx/wii.c
> index 67e48b0a164e..a802ef957d63 100644
> --- a/arch/powerpc/platforms/embedded6xx/wii.c
> +++ b/arch/powerpc/platforms/embedded6xx/wii.c
> @@ -172,19 +172,6 @@ static void wii_shutdown(void)
> flipper_quiesce();
> }
>
> -define_machine(wii) {
> - .name = "wii",
> - .probe = wii_probe,
> - .setup_arch = wii_setup_arch,
> - .restart = wii_restart,
> - .halt = wii_halt,
> - .init_IRQ = wii_pic_probe,
> - .get_irq = flipper_pic_get_irq,
> - .calibrate_decr = generic_calibrate_decr,
> - .progress = udbg_progress,
> - .machine_shutdown = wii_shutdown,
> -};
> -
> static const struct of_device_id wii_of_bus[] = {
> { .compatible = "nintendo,hollywood", },
> { },
> @@ -200,3 +187,15 @@ static int __init wii_device_probe(void)
> }
> device_initcall(wii_device_probe);
>
> +define_machine(wii) {
> + .name = "wii",
> + .probe = wii_probe,
> + .setup_arch = wii_setup_arch,
> + .restart = wii_restart,
> + .halt = wii_halt,
> + .init_IRQ = wii_pic_probe,
> + .get_irq = flipper_pic_get_irq,
> + .calibrate_decr = generic_calibrate_decr,
> + .progress = udbg_progress,
> + .machine_shutdown = wii_shutdown,
> +};
>
> base-commit: 8f3d9f354286745c751374f5f1fcafee6b3f3136
> --
> 2.26.0
>
Gentle ping for review/acceptance.
Cheers,
Nathan
^ permalink raw reply
* [PATCH] ASoC: fsl_micfil: Fix format and unused assignment
From: Tang Bin @ 2020-05-18 7:44 UTC (permalink / raw)
To: broonie, timur, nicoleotsuka, Xiubo.Lee, perex
Cc: alsa-devel, linuxppc-dev, linux-kernel, Tang Bin
In the function fsl_micfil_startup(), the two lines of dev_err()
can be shortened to one line. And delete unused initialized value
of 'ret', because it will be assigned by the function
fsl_micfil_set_mclk_rate().
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
sound/soc/fsl/fsl_micfil.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index f7f2d29f1..a7a6118be 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -217,8 +217,7 @@ static int fsl_micfil_startup(struct snd_pcm_substream *substream,
struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai);
if (!micfil) {
- dev_err(dai->dev,
- "micfil dai priv_data not set\n");
+ dev_err(dai->dev, "micfil dai priv_data not set\n");
return -EINVAL;
}
@@ -296,7 +295,7 @@ static int fsl_set_clock_params(struct device *dev, unsigned int rate)
{
struct fsl_micfil *micfil = dev_get_drvdata(dev);
int clk_div;
- int ret = 0;
+ int ret;
ret = fsl_micfil_set_mclk_rate(micfil, rate);
if (ret < 0)
--
2.20.1.windows.1
^ permalink raw reply related
* Re: [PATCH v2 2/2] powerpc/configs: replace deprecated riva/nvidia with nouveau
From: Michael Ellerman @ 2020-05-18 7:30 UTC (permalink / raw)
To: Emil Velikov, dri-devel
Cc: linux-fbdev, Antonino Daplas, Bartlomiej Zolnierkiewicz,
emil.l.velikov, Paul Mackerras, linuxppc-dev
In-Reply-To: <20200517220524.4036334-2-emil.l.velikov@gmail.com>
Emil Velikov <emil.l.velikov@gmail.com> writes:
> As mentioned in earlier commit, the riva and nvidia fbdev drivers have
> seen no love over the years, are short on features and overall below par
>
> Users are encouraged to switch to the nouveau drm driver instead.
>
> v2: Split configs to separate patch, enable nouveau (Bartlomiej)
>
> Cc: Antonino Daplas <adaplas@gmail.com>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v1)
> ---
> Hi all unless, there are objections I would prefer to merge this via
> the drm tree.
Have you tested that the resulting kernels work on the relevant
hardware?
The old drivers may be crufty but they presumably have been tested by
people and at least somewhat work.
So I'd be inclined to leave the defconfigs alone until someone can test
that the new driver works at all.
I gave it a quick spin on a G5 I have access to and dmesg has a bunch of
errors in it (see below). I can't actually tell if the display is
working because the machine is remote, and I can't go and check it at
the moment because the office is closed.
cheers
[ 128.563251] nouveau 0000:f0:10.0: NVIDIA NV34 (034900b1)
[ 128.565720] nouveau 0000:f0:10.0: bios: version 04.34.20.18.00
[ 128.570994] nouveau 0000:f0:10.0: bios: OOB 1 00000cdd 00000cdd
[ 128.571702] nouveau 0000:f0:10.0: bios: OOB 1 00000ce1 00000ce1
[ 128.571723] nouveau 0000:f0:10.0: bios: OOB 1 00000cde 00000cde
[ 128.571731] nouveau 0000:f0:10.0: bios: OOB 1 00000cdf 00000cdf
[ 128.572438] nouveau 0000:f0:10.0: bios: OOB 1 00000ce5 00000ce5
[ 128.572459] nouveau 0000:f0:10.0: bios: OOB 1 00000ce2 00000ce2
[ 128.572468] nouveau 0000:f0:10.0: bios: OOB 1 00000ce3 00000ce3
[ 128.579187] nouveau 0000:f0:10.0: bios: OOB 1 00000ce9 00000ce9
[ 128.579210] nouveau 0000:f0:10.0: bios: OOB 1 00000ce6 00000ce6
[ 128.579219] nouveau 0000:f0:10.0: bios: OOB 1 00000ce7 00000ce7
[ 128.580230] nouveau 0000:f0:10.0: bios: OOB 1 00000ced 00000ced
[ 128.580252] nouveau 0000:f0:10.0: bios: OOB 1 00000cea 00000cea
[ 128.580261] nouveau 0000:f0:10.0: bios: OOB 1 00000ceb 00000ceb
[ 128.581543] nouveau 0000:f0:10.0: bios: OOB 1 00000cf1 00000cf1
[ 128.581567] nouveau 0000:f0:10.0: bios: OOB 1 00000cee 00000cee
[ 128.581576] nouveau 0000:f0:10.0: bios: OOB 1 00000cef 00000cef
[ 128.582456] nouveau 0000:f0:10.0: bios: OOB 1 00000cf5 00000cf5
[ 128.582479] nouveau 0000:f0:10.0: bios: OOB 1 00000cf2 00000cf2
[ 128.582487] nouveau 0000:f0:10.0: bios: OOB 1 00000cf3 00000cf3
[ 128.583314] nouveau 0000:f0:10.0: bios: OOB 1 00000cf9 00000cf9
[ 128.583336] nouveau 0000:f0:10.0: bios: OOB 1 00000cf6 00000cf6
[ 128.583344] nouveau 0000:f0:10.0: bios: OOB 1 00000cf7 00000cf7
[ 128.584186] nouveau 0000:f0:10.0: bios: OOB 1 00000cfd 00000cfd
[ 128.584208] nouveau 0000:f0:10.0: bios: OOB 1 00000cfa 00000cfa
[ 128.584217] nouveau 0000:f0:10.0: bios: OOB 1 00000cfb 00000cfb
[ 128.585635] nouveau 0000:f0:10.0: bios: OOB 1 00000d01 00000d01
[ 128.585658] nouveau 0000:f0:10.0: bios: OOB 1 00000cfe 00000cfe
[ 128.585666] nouveau 0000:f0:10.0: bios: OOB 1 00000cff 00000cff
[ 128.589405] nouveau 0000:f0:10.0: bios: OOB 1 00000d05 00000d05
[ 128.589428] nouveau 0000:f0:10.0: bios: OOB 1 00000d02 00000d02
[ 128.589436] nouveau 0000:f0:10.0: bios: OOB 1 00000d03 00000d03
[ 128.590316] nouveau 0000:f0:10.0: bios: OOB 1 00000d09 00000d09
[ 128.590338] nouveau 0000:f0:10.0: bios: OOB 1 00000d06 00000d06
[ 128.590346] nouveau 0000:f0:10.0: bios: OOB 1 00000d07 00000d07
[ 128.591173] nouveau 0000:f0:10.0: bios: OOB 1 00000d0d 00000d0d
[ 128.591196] nouveau 0000:f0:10.0: bios: OOB 1 00000d0a 00000d0a
[ 128.591205] nouveau 0000:f0:10.0: bios: OOB 1 00000d0b 00000d0b
[ 128.593513] nouveau 0000:f0:10.0: tmr: unknown input clock freq
[ 128.595886] nouveau 0000:f0:10.0: fb: 64 MiB DDR1
[ 128.609034] [TTM] Zone kernel: Available graphics memory: 500010 KiB
[ 128.609058] [TTM] Initializing pool allocator
[ 128.609106] nouveau 0000:f0:10.0: DRM: VRAM: 63 MiB
[ 128.609115] nouveau 0000:f0:10.0: DRM: GART: 128 MiB
[ 128.609134] nouveau 0000:f0:10.0: DRM: BMP version 5.38
[ 128.609144] nouveau 0000:f0:10.0: DRM: DCB version 2.2
[ 128.609155] nouveau 0000:f0:10.0: DRM: DCB outp 00: 01000122 00000004
[ 128.609168] nouveau 0000:f0:10.0: DRM: DCB outp 01: 02010200 11b088b8
[ 128.609177] nouveau 0000:f0:10.0: DRM: DCB outp 02: 02010201 11b00703
[ 128.609222] nouveau 0000:f0:10.0: DRM: Loading NV17 power sequencing microcode
[ 128.610947] nouveau 0000:f0:10.0: DRM: MM: using M2MF for buffer copies
[ 128.613371] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 128.615065] nouveau 0000:f0:10.0: DRM: Setting dpms mode 3 on TV encoder (output 2)
[ 128.707050] nouveau 0000:f0:10.0: TV-1: EDID is invalid:
[ 128.707075] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 128.707083] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 128.707091] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 128.707099] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 128.707106] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 128.707114] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 128.707121] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 128.707129] [00] ZERO 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[ 128.707144] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[ 128.750558] nouveau 0000:f0:10.0: DRM: allocated 1440x900 fb: 0x9000, bo 000000002677d038
[ 128.825341] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[ 128.885351] nouveau 0000:f0:10.0: DRM: Pixel clock comparison table not found
[ 128.905884] Console: switching to colour frame buffer device 180x56
[ 128.907251] nouveau 0000:f0:10.0: fb0: nouveaudrmfb frame buffer device
[ 128.911832] [drm] Initialized nouveau 1.3.1 20120801 for 0000:f0:10.0 on minor 0
[ 129.168778] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[ 131.014692] Adding 2947556k swap on /dev/sda4. Priority:-2 extents:1 across:2947556k
[ 133.501059] sungem_phy: PHY ID: 4061e4, addr: 0
[ 133.502214] gem 0001:03:0f.0 eth0: Found BCM5221 PHY
[ 135.940863] gem 0001:03:0f.0 eth0: Link is up at 100 Mbps, full-duplex
[ 135.941181] gem 0001:03:0f.0 eth0: Pause is disabled
[ 136.224079] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[ 136.297015] nouveau 0000:f0:10.0: DRM: DDC responded, but no EDID for TV-1
[ 139.465278] nouveau 0000:f0:10.0: DRM: Pixel clock comparison table not found
^ permalink raw reply
* Re: [PATCH] powerpc/64s: Fix early_init_mmu section mismatch
From: Christian Zigotzky @ 2020-05-18 7:05 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Nicholas Piggin
In-Reply-To: <87mu669d9j.fsf@mpe.ellerman.id.au>
OK, thanks.
> On 18. May 2020, at 04:40, Michael Ellerman <mpe@ellerman.id.au> wrote:
>
> Christian Zigotzky <chzigotzky@xenosoft.de> writes:
>> Hi All,
>>
>> This patch wasn't included in the PowerPC fixes 5.7-4. Please add it.
>
> It's not an important bug. I'll take the patch for v5.8
>
> cheers
>
>>> On 29 April 2020 at 09:02 am, Nicholas Piggin wrote:
>>> Christian reports:
>>>
>>> MODPOST vmlinux.o
>>> WARNING: modpost: vmlinux.o(.text.unlikely+0x1a0): Section mismatch in
>>> reference from the function .early_init_mmu() to the function
>>> .init.text:.radix__early_init_mmu()
>>> The function .early_init_mmu() references
>>> the function __init .radix__early_init_mmu().
>>> This is often because .early_init_mmu lacks a __init
>>> annotation or the annotation of .radix__early_init_mmu is wrong.
>>>
>>> WARNING: modpost: vmlinux.o(.text.unlikely+0x1ac): Section mismatch in
>>> reference from the function .early_init_mmu() to the function
>>> .init.text:.hash__early_init_mmu()
>>> The function .early_init_mmu() references
>>> the function __init .hash__early_init_mmu().
>>> This is often because .early_init_mmu lacks a __init
>>> annotation or the annotation of .hash__early_init_mmu is wrong.
>>>
>>> The compiler is uninlining early_init_mmu and not putting it in an init
>>> section because there is no annotation. Add it.
>>>
>>> Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>>> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>>> ---
>>> arch/powerpc/include/asm/book3s/64/mmu.h | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
>>> index bb3deb76c951..3ffe5f967483 100644
>>> --- a/arch/powerpc/include/asm/book3s/64/mmu.h
>>> +++ b/arch/powerpc/include/asm/book3s/64/mmu.h
>>> @@ -208,7 +208,7 @@ void hash__early_init_devtree(void);
>>> void radix__early_init_devtree(void);
>>> extern void hash__early_init_mmu(void);
>>> extern void radix__early_init_mmu(void);
>>> -static inline void early_init_mmu(void)
>>> +static inline void __init early_init_mmu(void)
>>> {
>>> if (radix_enabled())
>>> return radix__early_init_mmu();
^ permalink raw reply
* Re: [PATCH v3] powerpc/64: Option to use ELF V2 ABI for big-endian kernels
From: Michael Ellerman @ 2020-05-18 6:35 UTC (permalink / raw)
To: Nicholas Piggin, linuxppc-dev; +Cc: Nicholas Piggin
In-Reply-To: <20200429011959.1423180-1-npiggin@gmail.com>
Nicholas Piggin <npiggin@gmail.com> writes:
> Provide an option to build big-endian kernels using the ELF V2 ABI. This works
> on GCC and clang (since about 2014). it is is not officially supported by the
> GNU toolchain, but it can give big-endian kernels some useful advantages of
> the V2 ABI (e.g., less stack usage).
>
> Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
> Since v1:
> - Improved the override flavour name suggested by Segher.
> - Improved changelog wording.
>
> Since v2:
> - Improved changelog, help text, to use the name ELF V2 ABI in the spec,
> and clarify things a bit more, suggested by Segher.
> - For option name, match the ELF_ABI_v1/2 which is already in the kernel.
> - Prefix options with PPC64_ to avoid arch clashes or confusion.
> - "elfv2" is the toolchain name of the ABI, so I kept that in the crypto
> perl scripts.
>
> arch/powerpc/Kconfig | 21 +++++++++++++++++++++
> arch/powerpc/Makefile | 15 ++++++++++-----
> arch/powerpc/boot/Makefile | 4 ++++
> drivers/crypto/vmx/Makefile | 8 ++++++--
> drivers/crypto/vmx/ppc-xlate.pl | 10 ++++++----
> 5 files changed, 47 insertions(+), 11 deletions(-)
This doesn't build with clang:
/tmp/aesp8-ppc-dad624.s: Assembler messages:
/tmp/aesp8-ppc-dad624.s: Error: .size expression for aes_p8_set_encrypt_key does not evaluate to a constant
/tmp/aesp8-ppc-dad624.s: Error: .size expression for aes_p8_set_decrypt_key does not evaluate to a constant
/tmp/aesp8-ppc-dad624.s: Error: .size expression for aes_p8_encrypt does not evaluate to a constant
/tmp/aesp8-ppc-dad624.s: Error: .size expression for aes_p8_decrypt does not evaluate to a constant
/tmp/aesp8-ppc-dad624.s: Error: .size expression for aes_p8_cbc_encrypt does not evaluate to a constant
/tmp/aesp8-ppc-dad624.s: Error: .size expression for aes_p8_ctr32_encrypt_blocks does not evaluate to a constant
/tmp/aesp8-ppc-dad624.s: Error: .size expression for aes_p8_xts_encrypt does not evaluate to a constant
/tmp/aesp8-ppc-dad624.s: Error: .size expression for aes_p8_xts_decrypt does not evaluate to a constant
clang: error: assembler command failed with exit code 1 (use -v to see invocation)
make[4]: *** [/linux/scripts/Makefile.build:349: drivers/crypto/vmx/aesp8-ppc.o] Error 1
make[4]: *** Waiting for unfinished jobs....
/tmp/ghashp8-ppc-01aa43.s: Assembler messages:
/tmp/ghashp8-ppc-01aa43.s: Error: .size expression for gcm_init_p8 does not evaluate to a constant
/tmp/ghashp8-ppc-01aa43.s: Error: .size expression for gcm_gmult_p8 does not evaluate to a constant
/tmp/ghashp8-ppc-01aa43.s: Error: .size expression for gcm_ghash_p8 does not evaluate to a constant
clang: error: assembler command failed with exit code 1 (use -v to see invocation)
make[4]: *** [/linux/scripts/Makefile.build:349: drivers/crypto/vmx/ghashp8-ppc.o] Error 1
make[3]: *** [/linux/scripts/Makefile.build:488: drivers/crypto/vmx] Error 2
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [/linux/scripts/Makefile.build:488: drivers/crypto] Error 2
make[2]: *** Waiting for unfinished jobs....
/linux/drivers/scsi/qla2xxx/qla_nx2.c:3226:1: warning: stack frame size of 2208 bytes in function 'qla8044_collect_md_data' [-Wframe-larger-than=]
qla8044_collect_md_data(struct scsi_qla_host *vha)
^
1 warning generated.
make[1]: *** [/linux/Makefile:1722: drivers] Error 2
make: *** [Makefile:180: sub-make] Error 2
I'm not sure if it can work with clang at all, so I'm happy if the
option depends on !CC_IS_CLANG.
cheers
^ permalink raw reply
* Re: [PATCH] powerpc/book3s64/radix/tlb: Determine hugepage flush correctly
From: Michael Ellerman @ 2020-05-18 6:34 UTC (permalink / raw)
To: Nicholas Piggin, Aneesh Kumar K.V, linuxppc-dev; +Cc: Bharata B Rao
In-Reply-To: <1589344088.xrvol2hteg.astroid@bobo.none>
Nicholas Piggin <npiggin@gmail.com> writes:
> Excerpts from Aneesh Kumar K.V's message of May 13, 2020 1:06 pm:
>> With a 64K page size flush with start and end value as below
>> (start, end) = (721f680d0000, 721f680e0000) results in
>> (hstart, hend) = (721f68200000, 721f68000000)
>>
>> Avoid doing a __tlbie_va_range with the wrong hstart and hend value in this
>> case.
>>
>> __tlbie_va_range will skip the actual tlbie operation for start > end.
>> But we still end up doing the tlbie fixup.
>
> Hm, good catch.
>
>> Reported-by: Bharata B Rao <bharata@linux.ibm.com>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
>> ---
>> arch/powerpc/mm/book3s64/radix_tlb.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/powerpc/mm/book3s64/radix_tlb.c b/arch/powerpc/mm/book3s64/radix_tlb.c
>> index 758ade2c2b6e..d592f9e1c037 100644
>> --- a/arch/powerpc/mm/book3s64/radix_tlb.c
>> +++ b/arch/powerpc/mm/book3s64/radix_tlb.c
>> @@ -884,10 +884,10 @@ static inline void __radix__flush_tlb_range(struct mm_struct *mm,
>> if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
>> hstart = (start + PMD_SIZE - 1) & PMD_MASK;
>> hend = end & PMD_MASK;
>> - if (hstart == hend)
>> - hflush = false;
>> - else
>> + if (hstart < hend)
>> hflush = true;
>> + else
>> + hflush = false;
>
> We can probably get rid of the else part since it is already false.
Yeah I can do that when applying.
cheers
^ permalink raw reply
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