* Re: [PATCH V4 11/11] docs: arm64: Add layout and 52-bit info to memory document
From: Will Deacon @ 2019-08-07 14:55 UTC (permalink / raw)
To: Steve Capper
Cc: crecklin@redhat.com, ard.biesheuvel@linaro.org, Catalin Marinas,
bhsharma@redhat.com, maz@kernel.org, nd,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <20190807132935.GB17012@capper-ampere.manchester.arm.com>
On Wed, Aug 07, 2019 at 01:29:38PM +0000, Steve Capper wrote:
> Many thanks for going through this series Catalin. Would you like me to post
> a V5 of the series?
/me does best Catalin impression...
"Yes, please."
Uncanny, eh?
Will
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v3 0/4] perf: Use capabilities instead of uid and euid
From: Igor Lubashev @ 2019-08-07 14:44 UTC (permalink / raw)
To: linux-kernel, Arnaldo Carvalho de Melo, Jiri Olsa,
Alexey Budankov
Cc: Mathieu Poirier, Suzuki K Poulose, Peter Zijlstra, Igor Lubashev,
James Morris, Alexander Shishkin, Ingo Molnar, Namhyung Kim,
linux-arm-kernel
Series v1: https://lkml.kernel.org/lkml/1562112605-6235-1-git-send-email-ilubashe@akamai.com
Kernel is using capabilities instead of uid and euid to restrict access to
kernel pointers and tracing facilities. This patch series updates the perf to
better match the security model used by the kernel.
This series enables instructions in Documentation/admin-guide/perf-security.rst
to actually work, even when kernel.perf_event_paranoid=2 and
kernel.kptr_restrict=1.
The series consists of four patches:
01: perf: Add capability-related utilities
Add utility functions to check capabilities and perf_event_paranoid checks,
if libcap-dev[el] is available. (Otherwise, assume no capabilities.)
02: perf: Use CAP_SYS_ADMIN with perf_event_paranoid checks
Replace the use of euid==0 with a check for CAP_SYS_ADMIN whenever
perf_event_paranoid level is verified.
03: perf: Use CAP_SYSLOG with kptr_restrict checks
Replace the use of uid and euid with a check for CAP_SYSLOG when
kptr_restrict is verified (similar to kernel/kallsyms.c and lib/vsprintf.c).
Consult perf_event_paranoid when kptr_restrict==0 (see kernel/kallsyms.c).
04: perf: Use CAP_SYS_ADMIN instead of euid==0 with ftrace
Replace the use of euid==0 with a check for CAP_SYS_ADMIN before mounting
debugfs for ftrace.
I tested this by following Documentation/admin-guide/perf-security.rst
guidelines and setting sysctls:
kernel.perf_event_paranoid=2
kernel.kptr_restrict=1
As an unprivileged user who is in perf_users group (setup via instructions
above), I executed:
perf record -a -- sleep 1
Without the patch, perf record did not capture any kernel functions.
With the patch, perf included all kernel functions.
Changelog:
v3: * Fix arm64 compilation (thanks, Alexey and Jiri)
v2: * Added a build feature check for libcap-dev[el] as suggested by Arnaldo
Igor Lubashev (4):
perf: Add capability-related utilities
perf: Use CAP_SYS_ADMIN with perf_event_paranoid checks
perf: Use CAP_SYSLOG with kptr_restrict checks
perf: Use CAP_SYS_ADMIN instead of euid==0 with ftrace
tools/build/Makefile.feature | 2 ++
tools/build/feature/Makefile | 4 ++++
tools/build/feature/test-libcap.c | 20 ++++++++++++++++++++
tools/perf/Makefile.config | 11 +++++++++++
tools/perf/Makefile.perf | 2 ++
tools/perf/arch/arm/util/cs-etm.c | 3 ++-
tools/perf/arch/arm64/util/arm-spe.c | 3 ++-
tools/perf/arch/x86/util/intel-bts.c | 3 ++-
tools/perf/arch/x86/util/intel-pt.c | 2 +-
tools/perf/builtin-ftrace.c | 4 +++-
tools/perf/util/Build | 2 ++
tools/perf/util/cap.c | 29 +++++++++++++++++++++++++++++
tools/perf/util/cap.h | 24 ++++++++++++++++++++++++
tools/perf/util/event.h | 1 +
tools/perf/util/evsel.c | 2 +-
tools/perf/util/python-ext-sources | 1 +
tools/perf/util/symbol.c | 15 +++++++++++----
tools/perf/util/util.c | 9 +++++++++
18 files changed, 127 insertions(+), 10 deletions(-)
create mode 100644 tools/build/feature/test-libcap.c
create mode 100644 tools/perf/util/cap.c
create mode 100644 tools/perf/util/cap.h
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v3 1/4] perf: Add capability-related utilities
From: Igor Lubashev @ 2019-08-07 14:44 UTC (permalink / raw)
To: linux-kernel, Arnaldo Carvalho de Melo, Jiri Olsa,
Alexey Budankov
Cc: Mathieu Poirier, Suzuki K Poulose, Peter Zijlstra, Igor Lubashev,
James Morris, Alexander Shishkin, Ingo Molnar, Namhyung Kim,
linux-arm-kernel
In-Reply-To: <cover.1565188228.git.ilubashe@akamai.com>
Add utilities to help checking capabilities of the running procss.
Make perf link with libcap, if it is available. If no libcap-dev[el],
assume no capabilities.
Signed-off-by: Igor Lubashev <ilubashe@akamai.com>
---
tools/build/Makefile.feature | 2 ++
tools/build/feature/Makefile | 4 ++++
tools/build/feature/test-libcap.c | 20 ++++++++++++++++++++
tools/perf/Makefile.config | 11 +++++++++++
tools/perf/Makefile.perf | 2 ++
tools/perf/util/Build | 2 ++
tools/perf/util/cap.c | 29 +++++++++++++++++++++++++++++
tools/perf/util/cap.h | 24 ++++++++++++++++++++++++
tools/perf/util/event.h | 1 +
tools/perf/util/python-ext-sources | 1 +
tools/perf/util/util.c | 9 +++++++++
11 files changed, 105 insertions(+)
create mode 100644 tools/build/feature/test-libcap.c
create mode 100644 tools/perf/util/cap.c
create mode 100644 tools/perf/util/cap.h
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 86b793dffbc4..8a19753cc26a 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -42,6 +42,7 @@ FEATURE_TESTS_BASIC := \
gtk2-infobar \
libaudit \
libbfd \
+ libcap \
libelf \
libelf-getphdrnum \
libelf-gelf_getnote \
@@ -110,6 +111,7 @@ FEATURE_DISPLAY ?= \
gtk2 \
libaudit \
libbfd \
+ libcap \
libelf \
libnuma \
numa_num_possible_cpus \
diff --git a/tools/build/feature/Makefile b/tools/build/feature/Makefile
index 0658b8cd0e53..8499385365c0 100644
--- a/tools/build/feature/Makefile
+++ b/tools/build/feature/Makefile
@@ -20,6 +20,7 @@ FILES= \
test-libbfd-liberty.bin \
test-libbfd-liberty-z.bin \
test-cplus-demangle.bin \
+ test-libcap.bin \
test-libelf.bin \
test-libelf-getphdrnum.bin \
test-libelf-gelf_getnote.bin \
@@ -105,6 +106,9 @@ $(OUTPUT)test-fortify-source.bin:
$(OUTPUT)test-bionic.bin:
$(BUILD)
+$(OUTPUT)test-libcap.bin:
+ $(BUILD) -lcap
+
$(OUTPUT)test-libelf.bin:
$(BUILD) -lelf
diff --git a/tools/build/feature/test-libcap.c b/tools/build/feature/test-libcap.c
new file mode 100644
index 000000000000..d2a2e152195f
--- /dev/null
+++ b/tools/build/feature/test-libcap.c
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0
+#include <sys/capability.h>
+#include <linux/capability.h>
+
+int main(void)
+{
+ cap_flag_value_t val;
+ cap_t caps = cap_get_proc();
+
+ if (!caps)
+ return 1;
+
+ if (cap_get_flag(caps, CAP_SYS_ADMIN, CAP_EFFECTIVE, &val) != 0)
+ return 1;
+
+ if (cap_free(caps) != 0)
+ return 1;
+
+ return 0;
+}
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index e4988f49ea79..9a06787fedc6 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -824,6 +824,17 @@ ifndef NO_LIBZSTD
endif
endif
+ifndef NO_LIBCAP
+ ifeq ($(feature-libcap), 1)
+ CFLAGS += -DHAVE_LIBCAP_SUPPORT
+ EXTLIBS += -lcap
+ $(call detected,CONFIG_LIBCAP)
+ else
+ msg := $(warning No libcap found, disables capability support, please install libcap-devel/libcap-dev);
+ NO_LIBCAP := 1
+ endif
+endif
+
ifndef NO_BACKTRACE
ifeq ($(feature-backtrace), 1)
CFLAGS += -DHAVE_BACKTRACE_SUPPORT
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 67512a12276b..f9807d8c005b 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -88,6 +88,8 @@ include ../scripts/utilities.mak
#
# Define NO_LIBBPF if you do not want BPF support
#
+# Define NO_LIBCAP if you do not want process capabilities considered by perf
+#
# Define NO_SDT if you do not want to define SDT event in perf tools,
# note that it doesn't disable SDT scanning support.
#
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 7abf05131889..7cda749059a9 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -148,6 +148,8 @@ perf-$(CONFIG_ZLIB) += zlib.o
perf-$(CONFIG_LZMA) += lzma.o
perf-$(CONFIG_ZSTD) += zstd.o
+perf-$(CONFIG_LIBCAP) += cap.o
+
perf-y += demangle-java.o
perf-y += demangle-rust.o
diff --git a/tools/perf/util/cap.c b/tools/perf/util/cap.c
new file mode 100644
index 000000000000..c3ba841bbf37
--- /dev/null
+++ b/tools/perf/util/cap.c
@@ -0,0 +1,29 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Capability utilities
+ */
+
+#ifdef HAVE_LIBCAP_SUPPORT
+
+#include "cap.h"
+#include <stdbool.h>
+#include <sys/capability.h>
+
+bool perf_cap__capable(cap_value_t cap)
+{
+ cap_flag_value_t val;
+ cap_t caps = cap_get_proc();
+
+ if (!caps)
+ return false;
+
+ if (cap_get_flag(caps, cap, CAP_EFFECTIVE, &val) != 0)
+ val = CAP_CLEAR;
+
+ if (cap_free(caps) != 0)
+ return false;
+
+ return val == CAP_SET;
+}
+
+#endif /* HAVE_LIBCAP_SUPPORT */
diff --git a/tools/perf/util/cap.h b/tools/perf/util/cap.h
new file mode 100644
index 000000000000..514b1f8992f6
--- /dev/null
+++ b/tools/perf/util/cap.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __PERF_CAP_H
+#define __PERF_CAP_H
+
+#include <stdbool.h>
+#include <linux/capability.h>
+#include <linux/compiler.h>
+
+#ifdef HAVE_LIBCAP_SUPPORT
+
+#include <sys/capability.h>
+
+bool perf_cap__capable(cap_value_t cap);
+
+#else
+
+static inline bool perf_cap__capable(int cap __maybe_unused)
+{
+ return false;
+}
+
+#endif /* HAVE_LIBCAP_SUPPORT */
+
+#endif /* __PERF_CAP_H */
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index 70841d115349..0e164e8ae28d 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -851,6 +851,7 @@ void cpu_map_data__synthesize(struct cpu_map_data *data, struct perf_cpu_map *m
void event_attr_init(struct perf_event_attr *attr);
int perf_event_paranoid(void);
+bool perf_event_paranoid_check(int max_level);
extern int sysctl_perf_event_max_stack;
extern int sysctl_perf_event_max_contexts_per_stack;
diff --git a/tools/perf/util/python-ext-sources b/tools/perf/util/python-ext-sources
index 235bd9803390..c6dd478956f1 100644
--- a/tools/perf/util/python-ext-sources
+++ b/tools/perf/util/python-ext-sources
@@ -7,6 +7,7 @@
util/python.c
../lib/ctype.c
+util/cap.c
util/evlist.c
util/evsel.c
util/cpumap.c
diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c
index 9c3c97697387..6fd130a5d8f2 100644
--- a/tools/perf/util/util.c
+++ b/tools/perf/util/util.c
@@ -16,10 +16,12 @@
#include <string.h>
#include <errno.h>
#include <limits.h>
+#include <linux/capability.h>
#include <linux/kernel.h>
#include <linux/log2.h>
#include <linux/time64.h>
#include <unistd.h>
+#include "cap.h"
#include "strlist.h"
#include "string2.h"
@@ -403,6 +405,13 @@ int perf_event_paranoid(void)
return value;
}
+
+bool perf_event_paranoid_check(int max_level)
+{
+ return perf_cap__capable(CAP_SYS_ADMIN) ||
+ perf_event_paranoid() <= max_level;
+}
+
static int
fetch_ubuntu_kernel_version(unsigned int *puint)
{
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH v2] arm64: dts: allwinner: a64: Enable eMMC on A64-OLinuXino
From: Maxime Ripard @ 2019-08-07 14:45 UTC (permalink / raw)
To: Chen-Yu Tsai; +Cc: Sunil Mohan Adapa, Martin Ayotte, linux-arm-kernel
In-Reply-To: <CAGb2v66vcQxjoi-0hhCOesT59Loo7Bw5M9fX8eCBWv-wM1CnoA@mail.gmail.com>
Hi,
On Wed, Aug 07, 2019 at 08:09:19PM +0800, Chen-Yu Tsai wrote:
> On Wed, Aug 7, 2019 at 8:01 PM Maxime Ripard <maxime.ripard@bootlin.com> wrote:
> >
> > On Tue, Aug 06, 2019 at 02:25:17PM +0800, Chen-Yu Tsai wrote:
> > > On Mon, Aug 5, 2019 at 8:58 PM Martin Ayotte <martinayotte@gmail.com> wrote:
> > > >
> > > > Fine for me too.
> > > >
> > > > Thanks .
> > > >
> > > > -----Message d'origine-----
> > > > De : Sunil Mohan Adapa [mailto:sunil@medhas.org]
> > > > Envoyé : Monday, August 05, 2019 1:25 AM
> > > > Ą : Chen-Yu Tsai
> > > > Cc : Maxime Ripard; Martin Ayotte; linux-arm-kernel
> > > > Objet : Re: [PATCH v2] arm64: dts: allwinner: a64: Enable eMMC on
> > > > A64-OLinuXino
> > > >
> > > > On 04/08/19 8:33 pm, Chen-Yu Tsai wrote:
> > > > > On Fri, Aug 2, 2019 at 2:47 AM Sunil Mohan Adapa <sunil@medhas.org> wrote:
> > > > >>
> > > > >> On 01/08/19 6:49 am, Martin Ayotte wrote:
> > > > >>> If my SOB could help here, I don't mind since I've done the commit
> > > > >>> more than a year ago for Armbian ...
> > > > >>>
> > > > >>> Signed-off-by: Martin Ayotte <martinayotte@gmai.com>
> > > > >>> Tested-by: Martin Ayotte <martinayotte@gmai.com>
> > > > >> gmai.com is likely a typo.
> > > > >>
> > > > >>> On Wed, Jul 31, 2019 at 10:42 PM Chen-Yu Tsai <wens@csie.org
> > > > >>>
> > > > >>>> Thanks. The patch looks good overall. The authorship is a little
> > > > >>>> confusing though. If it was initially done by Martin (CC-ed), then
> > > > >>>> he should be the author, and we should get his Signed-off-by if
> > > > >>>> possible.
> > > > >>
> > > > >> Martin is indeed the original author of the patch. Thank you for
> > > > reviewing.
> > > > >
> > > > > I'd like to apply this patch with Martin as the author, if that's OK with
> > > > you
> > > > > both?
> > > >
> > > > That is completely okay with me.
> > >
> > > Applied for 5.4.
> > >
> > > I reordered the tags so they make more sense:
> > >
> > > https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git/commit/?h=sunxi/dt-for-5.4&id=0834887732df5af41b59b2e4d530fc1f5478965f
> >
> > Sorry for being late on this, but it looks like the eMMC, NAND and SPI
> > pins are conflicting on the A64-Olinuxino design.
> >
> > There's no configuration with a NAND, so we don't really need to worry
> > about that, but if we merge this in the main DT, we'll prevent anyone
> > from using that DT on an olinuxino with a SPI flash.
> >
> > I think we should just create emmc and SPI-flash variants of that DT.
>
> Actually they aren't. Olimex specifically uses eMMC modules that don't
> use the data strobe line, so SPI can be used together.
Ah, right.
Still, this creates a precedent that I'm not really comfortable
with. Three actually.
Merging this in the main DT means three things:
- We're not consistent anymore, including within the olinuxino
boards only. A20 Olinuxino is pretty much in the same situation,
yet we dealt with it differently.
- This means that this will create a spurious device and report
errors in the kernel message and whenever someone will try to
access the device on boards that don't have it wired. This
shouldn't happen and we really shouldn't expose devices that just
aren't there, just like you don't have all the devices that are
not connected on your USB connector.
- Finally, this means that in order to keep it somewhat consistent,
we would have to merge the SPI flash in the main DT too. This will
prevent people without a SPI flash to use the SPI signals on the
UEXT connector for something else, which again goes against the
policy we've had for basically any other board.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v3 3/4] perf: Use CAP_SYSLOG with kptr_restrict checks
From: Igor Lubashev @ 2019-08-07 14:44 UTC (permalink / raw)
To: linux-kernel, Arnaldo Carvalho de Melo, Jiri Olsa,
Alexey Budankov
Cc: Mathieu Poirier, Suzuki K Poulose, Peter Zijlstra, Igor Lubashev,
James Morris, Alexander Shishkin, Ingo Molnar, Namhyung Kim,
linux-arm-kernel
In-Reply-To: <cover.1565188228.git.ilubashe@akamai.com>
Kernel is using CAP_SYSLOG capability instead of uid==0 and euid==0 when
checking kptr_restrict. Make perf do the same.
Also, the kernel is a more restrictive than "no restrictions" in case of
kptr_restrict==0, so add the same logic to perf.
Signed-off-by: Igor Lubashev <ilubashe@akamai.com>
---
tools/perf/util/symbol.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 173f3378aaa0..046271103499 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -4,6 +4,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <linux/capability.h>
#include <linux/kernel.h>
#include <linux/mman.h>
#include <linux/time64.h>
@@ -15,8 +16,10 @@
#include <inttypes.h>
#include "annotate.h"
#include "build-id.h"
+#include "cap.h"
#include "util.h"
#include "debug.h"
+#include "event.h"
#include "machine.h"
#include "map.h"
#include "symbol.h"
@@ -890,7 +893,11 @@ bool symbol__restricted_filename(const char *filename,
{
bool restricted = false;
- if (symbol_conf.kptr_restrict) {
+ /* Per kernel/kallsyms.c:
+ * we also restrict when perf_event_paranoid > 1 w/o CAP_SYSLOG
+ */
+ if (symbol_conf.kptr_restrict ||
+ (perf_event_paranoid() > 1 && !perf_cap__capable(CAP_SYSLOG))) {
char *r = realpath(filename, NULL);
if (r != NULL) {
@@ -2190,9 +2197,9 @@ static bool symbol__read_kptr_restrict(void)
char line[8];
if (fgets(line, sizeof(line), fp) != NULL)
- value = ((geteuid() != 0) || (getuid() != 0)) ?
- (atoi(line) != 0) :
- (atoi(line) == 2);
+ value = perf_cap__capable(CAP_SYSLOG) ?
+ (atoi(line) >= 2) :
+ (atoi(line) != 0);
fclose(fp);
}
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH v3 2/4] perf: Use CAP_SYS_ADMIN with perf_event_paranoid checks
From: Igor Lubashev @ 2019-08-07 14:44 UTC (permalink / raw)
To: linux-kernel, Arnaldo Carvalho de Melo, Jiri Olsa,
Alexey Budankov
Cc: Mathieu Poirier, Suzuki K Poulose, Peter Zijlstra, Igor Lubashev,
James Morris, Alexander Shishkin, Ingo Molnar, Namhyung Kim,
linux-arm-kernel
In-Reply-To: <cover.1565188228.git.ilubashe@akamai.com>
The kernel is using CAP_SYS_ADMIN instead of euid==0 to override
perf_event_paranoid check. Make perf do the same.
Signed-off-by: Igor Lubashev <ilubashe@akamai.com>
---
tools/perf/arch/arm/util/cs-etm.c | 3 ++-
tools/perf/arch/arm64/util/arm-spe.c | 3 ++-
tools/perf/arch/x86/util/intel-bts.c | 3 ++-
tools/perf/arch/x86/util/intel-pt.c | 2 +-
tools/perf/util/evsel.c | 2 +-
5 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/tools/perf/arch/arm/util/cs-etm.c b/tools/perf/arch/arm/util/cs-etm.c
index 5cb07e8cb296..b87a1ca2968f 100644
--- a/tools/perf/arch/arm/util/cs-etm.c
+++ b/tools/perf/arch/arm/util/cs-etm.c
@@ -18,6 +18,7 @@
#include "../../perf.h"
#include "../../util/auxtrace.h"
#include "../../util/cpumap.h"
+#include "../../util/event.h"
#include "../../util/evlist.h"
#include "../../util/evsel.h"
#include "../../util/pmu.h"
@@ -254,7 +255,7 @@ static int cs_etm_recording_options(struct auxtrace_record *itr,
struct perf_pmu *cs_etm_pmu = ptr->cs_etm_pmu;
struct evsel *evsel, *cs_etm_evsel = NULL;
struct perf_cpu_map *cpus = evlist->core.cpus;
- bool privileged = (geteuid() == 0 || perf_event_paranoid() < 0);
+ bool privileged = perf_event_paranoid_check(-1);
int err = 0;
ptr->evlist = evlist;
diff --git a/tools/perf/arch/arm64/util/arm-spe.c b/tools/perf/arch/arm64/util/arm-spe.c
index 00915b8fd05b..29275a0544cd 100644
--- a/tools/perf/arch/arm64/util/arm-spe.c
+++ b/tools/perf/arch/arm64/util/arm-spe.c
@@ -12,6 +12,7 @@
#include <time.h>
#include "../../util/cpumap.h"
+#include "../../util/event.h"
#include "../../util/evsel.h"
#include "../../util/evlist.h"
#include "../../util/session.h"
@@ -66,7 +67,7 @@ static int arm_spe_recording_options(struct auxtrace_record *itr,
container_of(itr, struct arm_spe_recording, itr);
struct perf_pmu *arm_spe_pmu = sper->arm_spe_pmu;
struct evsel *evsel, *arm_spe_evsel = NULL;
- bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
+ bool privileged = perf_event_paranoid_check(-1);
struct evsel *tracking_evsel;
int err;
diff --git a/tools/perf/arch/x86/util/intel-bts.c b/tools/perf/arch/x86/util/intel-bts.c
index 7b23318ebd7b..56a76142e9fd 100644
--- a/tools/perf/arch/x86/util/intel-bts.c
+++ b/tools/perf/arch/x86/util/intel-bts.c
@@ -12,6 +12,7 @@
#include <linux/zalloc.h>
#include "../../util/cpumap.h"
+#include "../../util/event.h"
#include "../../util/evsel.h"
#include "../../util/evlist.h"
#include "../../util/session.h"
@@ -107,7 +108,7 @@ static int intel_bts_recording_options(struct auxtrace_record *itr,
struct perf_pmu *intel_bts_pmu = btsr->intel_bts_pmu;
struct evsel *evsel, *intel_bts_evsel = NULL;
const struct perf_cpu_map *cpus = evlist->core.cpus;
- bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
+ bool privileged = perf_event_paranoid_check(-1);
btsr->evlist = evlist;
btsr->snapshot_mode = opts->auxtrace_snapshot_mode;
diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
index 218a4e694618..43d5088ee824 100644
--- a/tools/perf/arch/x86/util/intel-pt.c
+++ b/tools/perf/arch/x86/util/intel-pt.c
@@ -558,7 +558,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
bool have_timing_info, need_immediate = false;
struct evsel *evsel, *intel_pt_evsel = NULL;
const struct perf_cpu_map *cpus = evlist->core.cpus;
- bool privileged = geteuid() == 0 || perf_event_paranoid() < 0;
+ bool privileged = perf_event_paranoid_check(-1);
u64 tsc_bit;
int err;
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 64bc32ed6dfa..eafc134bf17c 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -279,7 +279,7 @@ struct evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx)
static bool perf_event_can_profile_kernel(void)
{
- return geteuid() == 0 || perf_event_paranoid() == -1;
+ return perf_event_paranoid_check(-1);
}
struct evsel *perf_evsel__new_cycles(bool precise)
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCH v3 4/4] perf: Use CAP_SYS_ADMIN instead of euid==0 with ftrace
From: Igor Lubashev @ 2019-08-07 14:44 UTC (permalink / raw)
To: linux-kernel, Arnaldo Carvalho de Melo, Jiri Olsa,
Alexey Budankov
Cc: Mathieu Poirier, Suzuki K Poulose, Peter Zijlstra, Igor Lubashev,
James Morris, Alexander Shishkin, Ingo Molnar, Namhyung Kim,
linux-arm-kernel
In-Reply-To: <cover.1565188228.git.ilubashe@akamai.com>
Kernel requires CAP_SYS_ADMIN instead of euid==0 to mount debugfs for ftrace.
Make perf do the same.
Signed-off-by: Igor Lubashev <ilubashe@akamai.com>
---
tools/perf/builtin-ftrace.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index ae1466aa3b26..d09eac8a6d57 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -13,6 +13,7 @@
#include <signal.h>
#include <fcntl.h>
#include <poll.h>
+#include <linux/capability.h>
#include "debug.h"
#include <subcmd/parse-options.h>
@@ -21,6 +22,7 @@
#include "target.h"
#include "cpumap.h"
#include "thread_map.h"
+#include "util/cap.h"
#include "util/config.h"
@@ -281,7 +283,7 @@ static int __cmd_ftrace(struct perf_ftrace *ftrace, int argc, const char **argv)
.events = POLLIN,
};
- if (geteuid() != 0) {
+ if (!perf_cap__capable(CAP_SYS_ADMIN)) {
pr_err("ftrace only works for root!\n");
return -1;
}
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH] arm64: Disable big endian builds with clang
From: Robin Murphy @ 2019-08-07 14:41 UTC (permalink / raw)
To: Mark Brown, Nick Desaulniers
Cc: Tri Vo, Catalin Marinas, Nathan Huckleberry, clang-built-linux,
Nathan Chancellor, Will Deacon, Linux ARM
In-Reply-To: <20190807123809.GA4048@sirena.co.uk>
On 07/08/2019 13:38, Mark Brown wrote:
> On Tue, Aug 06, 2019 at 04:47:23PM -0700, Nick Desaulniers wrote:
>> On Tue, Aug 6, 2019 at 2:25 PM Nick Desaulniers <ndesaulniers@google.com> wrote:
>>> On Tue, Aug 6, 2019 at 11:39 AM Mark Brown <broonie@kernel.org> wrote:
>
>> +Huck
>> Huck notes that the device eventually boots in qemu, it just takes on
>> the order of 165 seconds to boot. What's the timeout on KernelCI?
>
> It's not a timeout in kernelci, it's the kernel timing out being unable
> to find something in userspace being booted it can use as /init (there's
> a timeout in that process to cope with network filesystems). IIRC it's
> about 2 minutes. You can see this clearly in the logs I pointed you at:
>
> | You can see a bunch of reports here (all the big endian failures):
>
> | https://kernelci.org/boot/all/job/next/branch/master/kernel/next-20190730/
>
> For example:
>
> https://storage.kernelci.org/next/master/next-20190730/arm64/defconfig+CONFIG_CPU_BIG_ENDIAN=y/clang-8/lab-baylibre/boot-meson-gxbb-nanopi-k2.html
I thought it looked suspicious that there were EFI messages in that boot
log; from that job's config:
https://storage.kernelci.org/next/master/next-20190730/arm64/defconfig+CONFIG_CPU_BIG_ENDIAN=y/clang-8/kernel.config
...
# CONFIG_CPU_BIG_ENDIAN is not set
...
I think that's a kernelci problem...
Robin.
>
>> I think if we can determine why we see:
>> [ 144.626755] request_module: kmod_concurrent_max (0) close to 0
>> (max_modprobes: 50), for module binfmt-4c46, throttling...
>> [ 149.752826] request_module: modprobe binfmt-4c46 cannot be
>> processed, kmod busy with 50 threads for more than 5 seconds now
>
>> a lot, then we don't actually need to disable this outright when
>> building w/ Clang?
>
> Those error messages are happening because the kernel can't figure out
> how to execute a binary it's trying to run, like I say the module it's
> trying to load is binfmt_misc. If the kernel can't work out how to
> execute userspace it's not terribly useful.
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [Sound-open-firmware] [PATCH v2 3/5] ASoC: SOF: Add DT DSP device support
From: Daniel Baluta @ 2019-08-07 14:39 UTC (permalink / raw)
To: Pierre-Louis Bossart
Cc: Mark Rutland, Aisheng Dong, Peng Fan, Fabio Estevam, Anson Huang,
Devicetree List, Daniel Baluta, S.j. Wang, Marco Felsch,
Linux Kernel Mailing List, Paul Olaru, Rob Herring, dl-linux-imx,
Pengutronix Kernel Team, Leonard Crestez, Shawn Guo,
linux-arm-kernel, sound-open-firmware
In-Reply-To: <CAEnQRZDr+gj_eiESLNbVUVy1rreRE1nnDgtb3g=CjaRF5Aq9Vw@mail.gmail.com>
On Wed, Jul 24, 2019 at 10:04 AM Daniel Baluta <daniel.baluta@gmail.com> wrote:
>
> On Tue, Jul 23, 2019 at 6:19 PM Pierre-Louis Bossart
> <pierre-louis.bossart@linux.intel.com> wrote:
> >
> >
> > > diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig
> > > index 61b97fc55bb2..2aa3a1cdf60c 100644
> > > --- a/sound/soc/sof/Kconfig
> > > +++ b/sound/soc/sof/Kconfig
> > > @@ -36,6 +36,15 @@ config SND_SOC_SOF_ACPI
> > > Say Y if you need this option
> > > If unsure select "N".
> > >
> > > +config SND_SOC_SOF_DT
> > > + tristate "SOF DT enumeration support"
> > > + select SND_SOC_SOF
> > > + select SND_SOC_SOF_OPTIONS
> > > + help
> > > + This adds support for Device Tree enumeration. This option is
> > > + required to enable i.MX8 devices.
> > > + Say Y if you need this option. If unsure select "N".
> > > +
> >
> > [snip]
> >
> > > diff --git a/sound/soc/sof/imx/Kconfig b/sound/soc/sof/imx/Kconfig
> > > index fff64a9970f0..fa35994a79c4 100644
> > > --- a/sound/soc/sof/imx/Kconfig
> > > +++ b/sound/soc/sof/imx/Kconfig
> > > @@ -12,6 +12,7 @@ if SND_SOC_SOF_IMX_TOPLEVEL
> > >
> > > config SND_SOC_SOF_IMX8
> > > tristate "SOF support for i.MX8"
> > > + select SND_SOC_SOF_DT
> >
> > This looks upside down. You should select SOF_DT first then include the
> > NXP stuff.
> >
> > > help
> > > This adds support for Sound Open Firmware for NXP i.MX8 platforms
> > > Say Y if you have such a device.
> > > diff --git a/sound/soc/sof/sof-dt-dev.c b/sound/soc/sof/sof-dt-dev.c
> > > new file mode 100644
> > > index 000000000000..31429bbb5c7e
> > > --- /dev/null
> > > +++ b/sound/soc/sof/sof-dt-dev.c
> > > @@ -0,0 +1,159 @@
> > > +// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause)
> > > +//
> > > +// Copyright 2019 NXP
> > > +//
> > > +// Author: Daniel Baluta <daniel.baluta@nxp.com>
> > > +//
> > > +
> > > +#include <linux/firmware.h>
> > > +#include <linux/module.h>
> > > +#include <linux/pm_runtime.h>
> > > +#include <sound/sof.h>
> > > +
> > > +#include "ops.h"
> > > +
> > > +extern struct snd_sof_dsp_ops sof_imx8_ops;
> > > +
> > > +static char *fw_path;
> > > +module_param(fw_path, charp, 0444);
> > > +MODULE_PARM_DESC(fw_path, "alternate path for SOF firmware.");
> > > +
> > > +static char *tplg_path;
> > > +module_param(tplg_path, charp, 0444);
> > > +MODULE_PARM_DESC(tplg_path, "alternate path for SOF topology.");
> > > +
> > > +/* platform specific devices */
> > > +#if IS_ENABLED(CONFIG_SND_SOC_SOF_IMX8)
> > > +static struct sof_dev_desc sof_dt_imx8qxp_desc = {
> > > + .default_fw_path = "imx/sof",
> > > + .default_tplg_path = "imx/sof-tplg",
> > > + .nocodec_fw_filename = "sof-imx8.ri",
> > > + .nocodec_tplg_filename = "sof-imx8-nocodec.tplg",
> > > + .ops = &sof_imx8_ops,
> > > +};
> > > +#endif
> > > +
> > > +static const struct dev_pm_ops sof_dt_pm = {
> > > + SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume)
> > > + SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume,
> > > + NULL)
> > > +};
> > > +
> > > +static void sof_dt_probe_complete(struct device *dev)
> > > +{
> > > + /* allow runtime_pm */
> > > + pm_runtime_set_autosuspend_delay(dev, SND_SOF_SUSPEND_DELAY_MS);
> > > + pm_runtime_use_autosuspend(dev);
> > > + pm_runtime_enable(dev);
> > > +}
> > > +
> > > +static int sof_dt_probe(struct platform_device *pdev)
> > > +{
> > > + struct device *dev = &pdev->dev;
> > > + const struct sof_dev_desc *desc;
> > > + /*TODO: create a generic snd_soc_xxx_mach */
> > > + struct snd_soc_acpi_mach *mach;
> >
> > I wonder if you really need to use the same structures. For Intel we get
> > absolutely zero info from the firmware so rely on an ACPI codec ID as a
> > key to find information on which firmware and topology to use, and which
> > machine driver to load. You could have all this information in a DT blob?
>
> Yes. I see your point. I will still need to make a generic structure for
> snd_soc_acpi_mach so that everyone can use sof_nocodec_setup function.
>
> Maybe something like this:
>
> struct snd_soc_mach {
> union {
> struct snd_soc_acpi_mach acpi_mach;
> struct snd_soc_of_mach of_mach;
> }
> };
>
> and then change the prototype of sof_nocodec_setup.
Hi Pierre,
I fixed all the comments except the one above. Replacing snd_soc_acpi_mach
with a generic snd_soc_mach is not trivial task.
I wonder if it is acceptable to get the initial patches as they are
now and later switch to
generic ACPI/OF abstraction.
Asking this because for the moment on the i.MX side I have only
implemented no codec
version and we don't probe any of the machine drivers we have.
So, there is this only one member of snd_soc_acpi_mach that imx
version is making use of:
mach->drv_name = "sof-nocodec";
That's all.
I think the change as it is now is very clean and non-intrusive. Later
we will get options to
read firmware name and stuff from DT.
Anyhow, I don't think we can get rid of snd_dev_desc structure on
i.MX. This will be used
to store the information read from DT:
static struct sof_dev_desc sof_of_imx8qxp_desc = {
» .default_fw_path = "imx/sof",
» .default_tplg_path = "imx/sof-tplg",
» .nocodec_fw_filename = "sof-imx8.ri",
» .nocodec_tplg_filename = "sof-imx8-nocodec.tplg",
» .ops = &sof_imx8_ops,
};
For the moment we will only use the default values.
thanks,
Daniel.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] firmware: arm_scmi: Use {get,put}_unaligned_le32 accessors
From: Sudeep Holla @ 2019-08-07 14:37 UTC (permalink / raw)
To: Robin Murphy; +Cc: linux-arm-kernel, linux-kernel, Philipp Zabel
In-Reply-To: <4e6de98c-833b-a80b-acef-6e88391e80f2@arm.com>
On Wed, Aug 07, 2019 at 03:07:39PM +0100, Robin Murphy wrote:
> On 07/08/2019 14:57, Sudeep Holla wrote:
> > On Wed, Aug 07, 2019 at 03:36:11PM +0200, Philipp Zabel wrote:
> > > Hi Sudeep,
> > >
> > > On Wed, 2019-08-07 at 14:00 +0100, Sudeep Holla wrote:
> > > > Instead of type-casting the {tx,rx}.buf all over the place while
> > > > accessing them to read/write __le32 from/to the firmware, let's use
> > > > the nice existing {get,put}_unaligned_le32 accessors to hide all the
> > > > type cast ugliness.
> > > >
> > > > Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
> > > > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > > > ---
> > > > drivers/firmware/arm_scmi/base.c | 2 +-
> > > > drivers/firmware/arm_scmi/clock.c | 10 ++++------
> > > > drivers/firmware/arm_scmi/common.h | 2 ++
> > > > drivers/firmware/arm_scmi/perf.c | 8 ++++----
> > > > drivers/firmware/arm_scmi/power.c | 6 +++---
> > > > drivers/firmware/arm_scmi/reset.c | 2 +-
> > > > drivers/firmware/arm_scmi/sensors.c | 12 +++++-------
> > > > 7 files changed, 20 insertions(+), 22 deletions(-)
> > > >
> > > > diff --git a/drivers/firmware/arm_scmi/base.c b/drivers/firmware/arm_scmi/base.c
> > > > index 204390297f4b..f804e8af6521 100644
> > > > --- a/drivers/firmware/arm_scmi/base.c
> > > > +++ b/drivers/firmware/arm_scmi/base.c
> > > [...]
> > > > @@ -204,14 +204,12 @@ scmi_clock_rate_get(const struct scmi_handle *handle, u32 clk_id, u64 *value)
> > > > if (ret)
> > > > return ret;
> > > >
> > > > - *(__le32 *)t->tx.buf = cpu_to_le32(clk_id);
> > > > + put_unaligned_le32(clk_id, t->tx.buf);
> > > >
> > > > ret = scmi_do_xfer(handle, t);
> > > > if (!ret) {
> > > > - __le32 *pval = t->rx.buf;
> > > > -
> > > > - *value = le32_to_cpu(*pval);
> > > > - *value |= (u64)le32_to_cpu(*(pval + 1)) << 32;
> > > > + *value = get_unaligned_le32(t->rx.buf);
> > > > + *value |= (u64)get_unaligned_le32(t->rx.buf + 1) << 32;
> > >
> > > Isn't t->rx.buf a void pointer? If I am not mistaken, you'd either have
> > > to keep the pval local variables, or cast to (__le32 *) before doing
> > > pointer arithmetic.
> > >
> >
> > Ah right, that's the reason I added it at the first place. I will fix that.
>
> Couldn't you just use get_unaligned_le64() here anyway?
Indeed, that's what I found as I wanted to avoid pval, testing now.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [RFCv2 1/9] dt-bindings: mailbox: meson-mhu: convert to yaml
From: Maxime Ripard @ 2019-08-07 14:34 UTC (permalink / raw)
To: Neil Armstrong
Cc: linux-amlogic, robh+dt, jassisinghbrar, linux-arm-kernel,
devicetree
In-Reply-To: <20190805120320.32282-2-narmstrong@baylibre.com>
Hi,
On Mon, Aug 05, 2019 at 02:03:12PM +0200, Neil Armstrong wrote:
> Now that we have the DT validation in place, let's convert the device tree
> bindings for the Amlogic MHU controller over to a YAML schemas.
>
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> .../mailbox/amlogic,meson-gxbb-mhu.yaml | 53 +++++++++++++++++++
> .../devicetree/bindings/mailbox/meson-mhu.txt | 34 ------------
> 2 files changed, 53 insertions(+), 34 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mailbox/amlogic,meson-gxbb-mhu.yaml
> delete mode 100644 Documentation/devicetree/bindings/mailbox/meson-mhu.txt
>
> diff --git a/Documentation/devicetree/bindings/mailbox/amlogic,meson-gxbb-mhu.yaml b/Documentation/devicetree/bindings/mailbox/amlogic,meson-gxbb-mhu.yaml
> new file mode 100644
> index 000000000000..2536a0082cff
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mailbox/amlogic,meson-gxbb-mhu.yaml
> @@ -0,0 +1,53 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +# Copyright 2019 BayLibre, SAS
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/mailbox/amlogic,meson-gxbb-mhu.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Amlogic Meson Message-Handling-Unit Controller
> +
> +maintainers:
> + - Neil Armstrong <narmstrong@baylibre.com>
> +
> +description: |
> + The Amlogic's Meson SoCs Message-Handling-Unit (MHU) is a mailbox controller
> + that has 3 independent channels/links to communicate with remote processor(s).
> + MHU links are hardwired on a platform. A link raises interrupt for any
> + received data. However, there is no specified way of knowing if the sent
> + data has been read by the remote. This driver assumes the sender polls
> + STAT register and the remote clears it after having read the data.
> +
> +properties:
> + compatible:
> + enum:
> + - amlogic,meson-gxbb-mhu
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + minItems: 3
> + maxItems: 3
You don't need to specify both here. If one is missing, the tools will
fill it automatically with the other's value.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH] arm64: dts: fsl: add support for Hummingboard Pulse
From: Baruch Siach @ 2019-08-07 14:32 UTC (permalink / raw)
To: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
NXP Linux Team
Cc: Baruch Siach, Jon Nettleton, linux-arm-kernel
From: Jon Nettleton <jon@solid-run.com>
The SolidRun Hummingboard Pulse carrier board carries the SolidRun
i.MX8MQ based SOM.
Notably missing is PCIe support that depends on analog PLLOUT clock.
Current imx clk driver does not support this clock.
Signed-off-by: Jon Nettleton <jon@solid-run.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
arch/arm64/boot/dts/freescale/Makefile | 1 +
.../freescale/imx8mq-hummingboard-pulse.dts | 237 ++++++++++++++
.../boot/dts/freescale/imx8mq-sr-som.dtsi | 309 ++++++++++++++++++
3 files changed, 547 insertions(+)
create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-hummingboard-pulse.dts
create mode 100644 arch/arm64/boot/dts/freescale/imx8mq-sr-som.dtsi
diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index c043aca66572..6833b23e2dd2 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -22,6 +22,7 @@ dtb-$(CONFIG_ARCH_LAYERSCAPE) += fsl-lx2160a-rdb.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mm-evk.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mq-evk.dtb
+dtb-$(CONFIG_ARCH_MXC) += imx8mq-hummingboard-pulse.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mq-librem5-devkit.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-rmb3.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mq-zii-ultra-zest.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-hummingboard-pulse.dts b/arch/arm64/boot/dts/freescale/imx8mq-hummingboard-pulse.dts
new file mode 100644
index 000000000000..653cad30deb7
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mq-hummingboard-pulse.dts
@@ -0,0 +1,237 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2018 Jon Nettleton <jon@solid-run.com>
+ */
+
+/dts-v1/;
+
+#include "imx8mq.dtsi"
+#include "imx8mq-sr-som.dtsi"
+
+/ {
+ model = "SolidRun i.MX8MQ HummingBoard Pulse";
+ compatible = "solidrun,hummingboard-pulse", "fsl,imx8mq";
+
+ chosen {
+ stdout-path = &uart1;
+ };
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ reg_usdhc2_vmmc: usdhc2_vmmc {
+ compatible = "regulator-fixed";
+ regulator-name = "VSD_3V3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ v_5v0: regulator-v-5v0 {
+ compatible = "regulator-fixed";
+ regulator-always-on;
+ regulator-max-microvolt = <5000000>;
+ regulator-min-microvolt = <5000000>;
+ regulator-name = "v_5v0";
+ };
+ };
+};
+
+&iomuxc {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_hog>;
+
+ imx8mq-sr-hb {
+ pinctrl_hog: hoggrp {
+ fsl,pins = <
+ /* MikroBus Analog */
+ MX8MQ_IOMUXC_NAND_DATA05_GPIO3_IO11 0x41
+ /* MikroBus Reset */
+ MX8MQ_IOMUXC_SAI2_RXD0_GPIO4_IO23 0x41
+ /* The following 2 pins need to be commented out and
+ * reconfigured to enable RTS/CTS on UART3
+ */
+ /* MikroBus PWM */
+ MX8MQ_IOMUXC_ECSPI1_MISO_GPIO5_IO8 0x41
+ /* MikroBus INT */
+ MX8MQ_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x41
+ >;
+ };
+
+ pinctrl_i2c2: i2c2grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_I2C2_SCL_I2C2_SCL 0x4000007f
+ MX8MQ_IOMUXC_I2C2_SDA_I2C2_SDA 0x4000007f
+ >;
+ };
+
+ pinctrl_i2c3: i2c3grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_I2C3_SCL_I2C3_SCL 0x4000007f
+ MX8MQ_IOMUXC_I2C3_SDA_I2C3_SDA 0x4000007f
+ >;
+ };
+
+ pinctrl_typec: typecgrp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_NAND_RE_B_GPIO3_IO15 0x16
+ MX8MQ_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x17059
+ >;
+ };
+
+ pinctrl_uart2: uart2grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_UART2_TXD_UART2_DCE_TX 0x49
+ MX8MQ_IOMUXC_UART2_RXD_UART2_DCE_RX 0x49
+ /* These pins are currently allocated to the
+ * uBLOX module on the SOM
+ */
+ /* MX8MQ_IOMUXC_UART4_RXD_UART2_DCE_CTS_B 0x49 */
+ /* MX8MQ_IOMUXC_UART4_TXD_UART2_DCE_RTS_B 0x49 */
+ >;
+ };
+
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_UART3_TXD_UART3_DCE_TX 0x49
+ MX8MQ_IOMUXC_UART3_RXD_UART3_DCE_RX 0x49
+ /* These pins are by default GPIO on the Mikro Bus
+ * Header. To use RTS/CTS on UART3 comment them out
+ * of the hoggrp and enable them here
+ */
+ /* MX8MQ_IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B 0x49 */
+ /* MX8MQ_IOMUXC_ECSPI1_SS0_UART3_DCE_RTS_B 0x49 */
+ >;
+ };
+
+ pinctrl_usdhc2_gpio: usdhc2grpgpio {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SD2_CD_B_GPIO2_IO12 0x41
+ >;
+ };
+
+ pinctrl_usdhc2: usdhc2grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK 0x83
+ MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD 0xc3
+ MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0 0xc3
+ MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1 0xc3
+ MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2 0xc3
+ MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3 0xc3
+ MX8MQ_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_100mhz: usdhc2grp100mhz {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK 0x8d
+ MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD 0xcd
+ MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0 0xcd
+ MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1 0xcd
+ MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2 0xcd
+ MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3 0xcd
+ MX8MQ_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0xc1
+ >;
+ };
+
+ pinctrl_usdhc2_200mhz: usdhc2grp200mhz {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK 0x9f
+ MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD 0xdf
+ MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0 0xdf
+ MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1 0xdf
+ MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2 0xdf
+ MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3 0xdf
+ MX8MQ_IOMUXC_GPIO1_IO04_USDHC2_VSELECT 0xc1
+ >;
+ };
+ };
+};
+
+&i2c2 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c2>;
+ status = "okay";
+
+ typec_ptn5100: ptn5110@50 {
+ compatible = "usb,tcpci";
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_typec>;
+ reg = <0x50>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <6 8>;
+ ss-sel-gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
+ src-pdos = <0x380190c8>;
+ snk-pdos = <0x380190c8 0x3802d0c8>;
+ max-snk-mv = <9000>;
+ max-snk-ma = <2000>;
+ op-snk-mw = <9000>;
+ max-snk-mw = <18000>;
+ port-type = "drp";
+ default-role = "sink";
+ };
+};
+
+&i2c3 {
+ clock-frequency = <100000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c3>;
+ status = "okay";
+
+ rtc@69 {
+ compatible = "abracon,ab1805";
+ reg = <0x69>;
+ abracon,tc-diode = "schottky";
+ abracon,tc-resistor = <3>;
+ };
+};
+
+&uart2 { /* J35 header */
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart2>;
+ assigned-clocks = <&clk IMX8MQ_CLK_UART2>;
+ assigned-clock-parents = <&clk IMX8MQ_CLK_25M>;
+ status = "okay";
+};
+
+&uart3 { /* Mikrobus */
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ assigned-clocks = <&clk IMX8MQ_CLK_UART3>;
+ assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_80M>;
+ fsl,uart-has-rtscts;
+ status = "okay";
+};
+
+&usdhc2 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc2>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-1 = <&pinctrl_usdhc2_100mhz>, <&pinctrl_usdhc2_gpio>;
+ pinctrl-2 = <&pinctrl_usdhc2_200mhz>, <&pinctrl_usdhc2_gpio>;
+ cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+ vmmc-supply = <®_usdhc2_vmmc>;
+ status = "okay";
+};
+
+&usb_dwc3_0 {
+ status = "okay";
+ extcon = <&typec_ptn5100>;
+ dr_mode = "otg";
+};
+
+&usb_dwc3_1 {
+ status = "okay";
+ dr_mode = "host";
+};
+
+&usb3_phy0 {
+ status = "okay";
+};
+
+&usb3_phy1 {
+ status = "okay";
+};
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-sr-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-sr-som.dtsi
new file mode 100644
index 000000000000..c19956ad4921
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mq-sr-som.dtsi
@@ -0,0 +1,309 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2018 Jon Nettleton <jon@solid-run.com>
+ */
+
+/ {
+ vdd_3v3: regulator-vdd-3v3 {
+ compatible = "regulator-fixed";
+ regulator-always-on;
+ regulator-name = "vdd_3v3";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ };
+};
+
+&pgc_gpu{
+ power-supply = <&sw1a_reg>;
+};
+
+&fec1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_fec1>;
+ phy-mode = "rgmii-id";
+ phy-handle = <ðphy0>;
+ phy-reset-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
+ phy-reset-duration = <2>;
+ fsl,magic-packet;
+ status = "okay";
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethphy0: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <4>;
+ };
+ };
+};
+
+&iomuxc {
+ microsom {
+ pinctrl_fec1: fec1grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_ENET_MDC_ENET1_MDC 0x3
+ MX8MQ_IOMUXC_ENET_MDIO_ENET1_MDIO 0x23
+ MX8MQ_IOMUXC_ENET_TD3_ENET1_RGMII_TD3 0x1f
+ MX8MQ_IOMUXC_ENET_TD2_ENET1_RGMII_TD2 0x1f
+ MX8MQ_IOMUXC_ENET_TD1_ENET1_RGMII_TD1 0x1f
+ MX8MQ_IOMUXC_ENET_TD0_ENET1_RGMII_TD0 0x1f
+ MX8MQ_IOMUXC_ENET_RD3_ENET1_RGMII_RD3 0x91
+ MX8MQ_IOMUXC_ENET_RD2_ENET1_RGMII_RD2 0x91
+ MX8MQ_IOMUXC_ENET_RD1_ENET1_RGMII_RD1 0x91
+ MX8MQ_IOMUXC_ENET_RD0_ENET1_RGMII_RD0 0x91
+ MX8MQ_IOMUXC_ENET_TXC_ENET1_RGMII_TXC 0x1f
+ MX8MQ_IOMUXC_ENET_RXC_ENET1_RGMII_RXC 0x91
+ MX8MQ_IOMUXC_ENET_RX_CTL_ENET1_RGMII_RX_CTL 0x91
+ MX8MQ_IOMUXC_ENET_TX_CTL_ENET1_RGMII_TX_CTL 0x1f
+ MX8MQ_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x19
+ >;
+ };
+
+ pinctrl_i2c1: i2c1grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_I2C1_SCL_I2C1_SCL 0x4000007f
+ MX8MQ_IOMUXC_I2C1_SDA_I2C1_SDA 0x4000007f
+ >;
+ };
+
+ pinctrl_pcie0: pcie0grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_I2C4_SCL_PCIE1_CLKREQ_B 0x74
+ MX8MQ_IOMUXC_SPDIF_EXT_CLK_GPIO5_IO5 0x16
+ MX8MQ_IOMUXC_SAI2_RXFS_GPIO4_IO21 0x16
+ >;
+ };
+
+ pinctrl_qspi: qspigrp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_NAND_ALE_QSPI_A_SCLK 0x82
+ MX8MQ_IOMUXC_NAND_CE0_B_QSPI_A_SS0_B 0x82
+ MX8MQ_IOMUXC_NAND_DATA00_QSPI_A_DATA0 0x82
+ MX8MQ_IOMUXC_NAND_DATA01_QSPI_A_DATA1 0x82
+ MX8MQ_IOMUXC_NAND_DATA02_QSPI_A_DATA2 0x82
+ MX8MQ_IOMUXC_NAND_DATA03_QSPI_A_DATA3 0x82
+
+ >;
+ };
+
+ pinctrl_uart1: uart1grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX 0x49
+ MX8MQ_IOMUXC_UART1_TXD_UART1_DCE_TX 0x49
+ MX8MQ_IOMUXC_NAND_CE1_B_GPIO3_IO2 0x19
+ >;
+ };
+
+ pinctrl_uart4: uart4grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_UART4_TXD_UART4_DCE_TX 0x49
+ MX8MQ_IOMUXC_UART4_RXD_UART4_DCE_RX 0x49
+ MX8MQ_IOMUXC_SAI3_TXD_GPIO5_IO1 0x19
+ >;
+ };
+
+ pinctrl_usdhc1: usdhc1grp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK 0x83
+ MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD 0xc3
+ MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xc3
+ MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xc3
+ MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xc3
+ MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xc3
+ MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4 0xc3
+ MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5 0xc3
+ MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6 0xc3
+ MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7 0xc3
+ MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE 0x83
+ MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B 0xc1
+ >;
+ };
+
+ pinctrl_usdhc1_100mhz: usdhc1grp100mhz {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK 0x8d
+ MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD 0xcd
+ MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xcd
+ MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xcd
+ MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xcd
+ MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xcd
+ MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4 0xcd
+ MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5 0xcd
+ MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6 0xcd
+ MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7 0xcd
+ MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE 0x8d
+ MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B 0xc1
+ >;
+ };
+
+ pinctrl_usdhc1_200mhz: usdhc1grp200mhz {
+ fsl,pins = <
+ MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK 0x9f
+ MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD 0xdf
+ MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xdf
+ MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xdf
+ MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xdf
+ MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xdf
+ MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4 0xdf
+ MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5 0xdf
+ MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6 0xdf
+ MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7 0xdf
+ MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE 0x9f
+ MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B 0xc1
+ >;
+ };
+
+ pinctrl_wdog: wdoggrp {
+ fsl,pins = <
+ MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0xc6
+ >;
+ };
+ };
+};
+
+&i2c1 {
+ clock-frequency = <400000>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_i2c1>;
+ status = "okay";
+
+ pmic: pfuze100@8 {
+ compatible = "fsl,pfuze100";
+ reg = <0x08>;
+
+ regulators {
+ sw1a_reg: sw1ab {
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1875000>;
+ };
+
+ sw1c_reg: sw1c {
+ regulator-min-microvolt = <300000>;
+ regulator-max-microvolt = <1875000>;
+ };
+
+ sw2_reg: sw2 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ sw3a_reg: sw3ab {
+ regulator-min-microvolt = <400000>;
+ regulator-max-microvolt = <1975000>;
+ regulator-always-on;
+ };
+
+ sw4_reg: sw4 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ swbst_reg: swbst {
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5150000>;
+ };
+
+ snvs_reg: vsnvs {
+ regulator-min-microvolt = <1000000>;
+ regulator-max-microvolt = <3000000>;
+ regulator-always-on;
+ };
+
+ vref_reg: vrefddr {
+ regulator-always-on;
+ };
+
+ vgen1_reg: vgen1 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1550000>;
+ };
+
+ vgen2_reg: vgen2 {
+ regulator-min-microvolt = <800000>;
+ regulator-max-microvolt = <1550000>;
+ regulator-always-on;
+ };
+
+ vgen3_reg: vgen3 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ vgen4_reg: vgen4 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ vgen5_reg: vgen5 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-always-on;
+ };
+
+ vgen6_reg: vgen6 {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ };
+ };
+ };
+};
+
+&qspi0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_qspi>;
+ status = "okay";
+
+ /* SPI flash; not assembled by default */
+ n25q256a@0 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ reg = <0>;
+ compatible = "micron,n25q256a", "jedec,spi-nor";
+ spi-max-frequency = <29000000>;
+ status = "disabled";
+ };
+};
+
+&uart1 { /* console */
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart1>;
+ assigned-clocks = <&clk IMX8MQ_CLK_UART1>;
+ assigned-clock-parents = <&clk IMX8MQ_CLK_25M>;
+ assigned-clock-rates = <25000000>;
+ status = "okay";
+};
+
+&uart4 { /* ublox BT */
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart4>;
+ assigned-clocks = <&clk IMX8MQ_CLK_UART4>;
+ assigned-clock-parents = <&clk IMX8MQ_SYS1_PLL_80M>;
+ assigned-clock-rates = <80000000>;
+ status = "okay";
+};
+
+&usdhc1 {
+ pinctrl-names = "default", "state_100mhz", "state_200mhz";
+ pinctrl-0 = <&pinctrl_usdhc1>;
+ pinctrl-1 = <&pinctrl_usdhc1_100mhz>;
+ pinctrl-2 = <&pinctrl_usdhc1_200mhz>;
+ bus-width = <8>;
+ non-removable;
+ status = "okay";
+};
+
+&pgc_vpu {
+ power-supply = <&sw1c_reg>;
+};
+
+&wdog1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_wdog>;
+ fsl,ext-reset-output;
+ status = "okay";
+};
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [RFC PATCH 09/11] devfreq: exynos-bus: Add interconnect functionality to exynos-bus
From: Georgi Djakov @ 2019-08-07 14:21 UTC (permalink / raw)
To: Artur Świgoń, devicetree, linux-arm-kernel,
linux-samsung-soc, linux-kernel, linux-pm, dri-devel
Cc: Bartłomiej Żołnierkiewicz, sw0312.kim, krzk,
inki.dae, cw00.choi, myungjoo.ham, m.szyprowski
In-Reply-To: <62557522be4924a01d3822d4734c30f2965c608b.camel@partner.samsung.com>
Hi Artur,
On 8/1/19 10:59, Artur Świgoń wrote:
> Hi Georgi,
>
> On Fri, 2019-07-26 at 11:05 +0300, Georgi Djakov wrote:
>> Hi Artur,
>>
>> On 7/23/19 15:20, Artur Świgoń wrote:
>>> This patch adds interconnect functionality to the exynos-bus devfreq
>>> driver.
>>>
>>> The SoC topology is a graph (or, more specifically, a tree) and most of its
>>> edges are taken from the devfreq parent-child hierarchy (cf.
>>> Documentation/devicetree/bindings/devfreq/exynos-bus.txt). The previous
>>> patch adds missing edges to the DT (under the name 'parent'). Due to
>>> unspecified relative probing order, -EPROBE_DEFER may be propagated to
>>> guarantee that a child is probed before its parent.
>>>
>>> Each bus is now an interconnect provider and an interconnect node as well
>>> (cf. Documentation/interconnect/interconnect.rst), i.e. every bus registers
>>> itself as a node. Node IDs are not hardcoded but rather assigned at
>>> runtime, in probing order (subject to the above-mentioned exception
>>> regarding relative order). This approach allows for using this driver with
>>> various Exynos SoCs.
>>
>> I am not familiar with the Exynos bus topology, but it seems to me that it's not
>> represented correctly. An interconnect provider with just a single node (port)
>> is odd. I would expect that each provider consists of multiple master and slave
>> nodes. This data would be used by a framework to understand what are the links
>> and how the traffic flows between the IP blocks and through which buses.
>
> To summarize the exynos-bus topology[1] used by the devfreq driver: There are
> many data buses for data transfer in Samsung Exynos SoC. Every bus has its own
> clock. Buses often share power lines, in which case one of the buses on the
> power line is referred to as 'parent' (or as 'devfreq' in the DT). In the
> particular case of Exynos4412[1][2], the topology can be expressed as follows:
>
> bus_dmc
> -- bus_acp
> -- bus_c2c
>
> bus_leftbus
> -- bus_rightbus
> -- bus_display
> -- bus_fsys
> -- bus_peri
> -- bus_mfc
>
> Where bus_dmc and bus_leftbus probably could be referred to as masters, and the
> following indented nodes as slaves. Patch 08/11 of this RFC additionally adds
> the following to the DT:
>
> bus_dmc
> -- bus_leftbus
>
> Which makes the topology a valid tree.
>
> The exynos-bus concept in devfreq[3] is designed in such a way that every bus is
> probed separately as a platform device, and is a largely independent entity.
>
> This RFC proposes an extension to the existing devfreq driver that basically
> provides a simple QoS to ensure minimum clock frequency for selected buses
> (possibly overriding devfreq governor calculations) using the interconnect
> framework.
>
> The hierarchy is modelled in such a way that every bus is an interconnect node.
> On the other hand, what is considered an interconnect provider here is quite
> arbitrary, but for the reasons mentioned in the above paragraph, this RFC
> assumes that every bus is a provider of itself as a node. Using an alternative
IIUC, in case we want to transfer data between the display and the memory
controller, the path would look like this:
display --> bus_display --> bus_leftbus --> bus_dmc --> memory
But the bus_display for example would have not one, but two nodes (ports),
right? One representing the link to the display controller and another one
representing the link to bus_leftbus? So i think that all the buses should
have at least two nodes, to represent each end of the wire.
> singleton provider approach was deemed more complicated since the 'dev' field in
> 'struct icc_provider' has to be set to something meaningful and we are tied to
> the 'samsung,exynos-bus' compatible string in the driver (and multiple instances
> of exynos-bus probed in indeterminate relative order).
>
Sure, the rest makes sense to me.
Thanks,
Georgi
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH] arm64: KVM: hyp: debug-sr: Mark expected switch fall-throughs
From: Gustavo A. R. Silva @ 2019-08-07 14:18 UTC (permalink / raw)
To: Marc Zyngier, James Morse, Julien Thierry, Suzuki K Poulose,
Catalin Marinas, Will Deacon
Cc: Gustavo A. R. Silva, kvmarm, linux-arm-kernel, linux-kernel
Mark switch cases where we are expecting to fall through.
This patch fixes the following warnings (Building: allmodconfig arm64):
arch/arm64/kvm/hyp/debug-sr.c:20:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:21:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:22:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:23:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:24:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:25:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:26:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:27:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:28:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:29:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:30:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:31:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:32:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:33:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
arch/arm64/kvm/hyp/debug-sr.c:34:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
arch/arm64/kvm/hyp/debug-sr.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/kvm/hyp/debug-sr.c b/arch/arm64/kvm/hyp/debug-sr.c
index 26781da3ad3e..0fc9872a1467 100644
--- a/arch/arm64/kvm/hyp/debug-sr.c
+++ b/arch/arm64/kvm/hyp/debug-sr.c
@@ -18,40 +18,70 @@
#define save_debug(ptr,reg,nr) \
switch (nr) { \
case 15: ptr[15] = read_debug(reg, 15); \
+ /* Fall through */ \
case 14: ptr[14] = read_debug(reg, 14); \
+ /* Fall through */ \
case 13: ptr[13] = read_debug(reg, 13); \
+ /* Fall through */ \
case 12: ptr[12] = read_debug(reg, 12); \
+ /* Fall through */ \
case 11: ptr[11] = read_debug(reg, 11); \
+ /* Fall through */ \
case 10: ptr[10] = read_debug(reg, 10); \
+ /* Fall through */ \
case 9: ptr[9] = read_debug(reg, 9); \
+ /* Fall through */ \
case 8: ptr[8] = read_debug(reg, 8); \
+ /* Fall through */ \
case 7: ptr[7] = read_debug(reg, 7); \
+ /* Fall through */ \
case 6: ptr[6] = read_debug(reg, 6); \
+ /* Fall through */ \
case 5: ptr[5] = read_debug(reg, 5); \
+ /* Fall through */ \
case 4: ptr[4] = read_debug(reg, 4); \
+ /* Fall through */ \
case 3: ptr[3] = read_debug(reg, 3); \
+ /* Fall through */ \
case 2: ptr[2] = read_debug(reg, 2); \
+ /* Fall through */ \
case 1: ptr[1] = read_debug(reg, 1); \
+ /* Fall through */ \
default: ptr[0] = read_debug(reg, 0); \
}
#define restore_debug(ptr,reg,nr) \
switch (nr) { \
case 15: write_debug(ptr[15], reg, 15); \
+ /* Fall through */ \
case 14: write_debug(ptr[14], reg, 14); \
+ /* Fall through */ \
case 13: write_debug(ptr[13], reg, 13); \
+ /* Fall through */ \
case 12: write_debug(ptr[12], reg, 12); \
+ /* Fall through */ \
case 11: write_debug(ptr[11], reg, 11); \
+ /* Fall through */ \
case 10: write_debug(ptr[10], reg, 10); \
+ /* Fall through */ \
case 9: write_debug(ptr[9], reg, 9); \
+ /* Fall through */ \
case 8: write_debug(ptr[8], reg, 8); \
+ /* Fall through */ \
case 7: write_debug(ptr[7], reg, 7); \
+ /* Fall through */ \
case 6: write_debug(ptr[6], reg, 6); \
+ /* Fall through */ \
case 5: write_debug(ptr[5], reg, 5); \
+ /* Fall through */ \
case 4: write_debug(ptr[4], reg, 4); \
+ /* Fall through */ \
case 3: write_debug(ptr[3], reg, 3); \
+ /* Fall through */ \
case 2: write_debug(ptr[2], reg, 2); \
+ /* Fall through */ \
case 1: write_debug(ptr[1], reg, 1); \
+ /* Fall through */ \
default: write_debug(ptr[0], reg, 0); \
}
--
2.22.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH] arm64: Disable big endian builds with clang
From: Mark Rutland @ 2019-08-07 14:14 UTC (permalink / raw)
To: Mark Brown
Cc: Tri Vo, Catalin Marinas, Nick Desaulniers, clang-built-linux,
Nathan Chancellor, Will Deacon, linux-arm-kernel
In-Reply-To: <20190807135618.GF54191@lakrids.cambridge.arm.com>
On Wed, Aug 07, 2019 at 02:56:19PM +0100, Mark Rutland wrote:
> On Wed, Aug 07, 2019 at 02:05:27PM +0100, Mark Brown wrote:
> > On Wed, Aug 07, 2019 at 02:01:11PM +0100, Mark Rutland wrote:
> > > On Tue, Aug 06, 2019 at 07:39:18PM +0100, Mark Brown wrote:
> >
> > > Judging by the kernel log linked in a reply, this is with:
> >
> > > * clang version 8.0.1-svn359952-1~exp1~20190504004501.65 (branches/release_80)
> >
> > > Is that the llvm.org binary release, or a custom build of clang?
> >
> > It's from a llvm.org .deb.
> >
> > > * Linux 5.3.0-rc2-next-20190730
> >
> > > Could we previously build a BE kernel with clang? If so, what's the
> > > last working kernel?
> >
> > As far as I know this has been broken for as long as we tried building
> > and booting big endian kernels in clang. The compile works fine, it's
> > just that the resulting binary doesn't seem to be working so well.
>
> I've just had a go, and it works for me. Log below from a BE busybox,
> but I also have a BE buildroot filesystem working.
>
> For reference, I'm using:
>
> * Linux v5.3-rc3 defconfig
> * LLVM 8.0.0 (x86_64) from llvm.org
> * GCC 8.1.0 (x86_64) from kernel.org crosstool
>
> ... so I don't think we should blacklist this just yet, but we certainly
> need to better understand the issue you're seeing. I'll have a go with
> LLVM 8.0.1 in case there's a regression from 8.0.0 to 8.0.1.
FWIW, using LLVM 8.0.1 also works for me, everything else being
unchanged.
Thanks,
Mark.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] ARM: dts: socfpga: Fix up button mapping on VINING FPGA
From: Dinh Nguyen @ 2019-08-07 14:10 UTC (permalink / raw)
To: Marek Vasut, linux-arm-kernel
In-Reply-To: <a7c317e9-22d2-965e-7143-b07014cb5dfe@denx.de>
Hi Marek,
On 8/7/19 6:13 AM, Marek Vasut wrote:
> On 6/28/19 2:19 AM, Marek Vasut wrote:
>> Add missing buttons and signals to the VINING FPGA device tree,
>> so they are presented to the userspace via gpio-keys evdev.
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Dinh Nguyen <dinguyen@kernel.org>
>
> Bump ?
>
Sorry for being late on this. I've applied it and it was queued for
v5.3, but I missed the merged window. It's queued for v5.4.
Dinh
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 3/6] drivers: firmware: psci: Decouple checker from generic ARM CPUidle
From: Daniel Lezcano @ 2019-08-07 14:09 UTC (permalink / raw)
To: Lorenzo Pieralisi, linux-pm
Cc: Mark Rutland, Ulf Hansson, Catalin Marinas, Rafael J. Wysocki,
LKML, Sudeep Holla, Will Deacon, LAKML
In-Reply-To: <20190722153745.32446-4-lorenzo.pieralisi@arm.com>
On 22/07/2019 17:37, Lorenzo Pieralisi wrote:
> The PSCI checker currently relies on the generic ARM CPUidle
> infrastructure to enter an idle state, which in turn creates
> a dependency that is not really needed.
>
> The PSCI checker code to test PSCI CPU suspend is built on
> top of the CPUidle framework and can easily reuse the
> struct cpuidle_state.enter() function (previously initialized
> by an idle driver, with a PSCI back-end) to trigger an entry
> into an idle state, decoupling the PSCI checker from the
> generic ARM CPUidle infrastructure and simplyfing the code
> in the process.
>
> Convert the PSCI checker suspend entry function to use
> the struct cpuidle_state.enter() function callback.
>
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> ---
> drivers/firmware/psci/psci_checker.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/firmware/psci/psci_checker.c b/drivers/firmware/psci/psci_checker.c
> index f3659443f8c2..6a445397771c 100644
> --- a/drivers/firmware/psci/psci_checker.c
> +++ b/drivers/firmware/psci/psci_checker.c
> @@ -228,8 +228,11 @@ static int hotplug_tests(void)
>
> static void dummy_callback(struct timer_list *unused) {}
>
> -static int suspend_cpu(int index, bool broadcast)
> +static int suspend_cpu(struct cpuidle_device *dev,
> + struct cpuidle_driver *drv, int index)
> {
> + struct cpuidle_state *state = &drv->states[index];
> + bool broadcast = state->flags & CPUIDLE_FLAG_TIMER_STOP;
> int ret;
>
> arch_cpu_idle_enter();
> @@ -254,11 +257,7 @@ static int suspend_cpu(int index, bool broadcast)
> }
> }
>
> - /*
> - * Replicate the common ARM cpuidle enter function
> - * (arm_enter_idle_state).
> - */
> - ret = CPU_PM_CPU_IDLE_ENTER(arm_cpuidle_suspend, index);
> + ret = state->enter(dev, drv, index);
>
> if (broadcast)
> tick_broadcast_exit();
> @@ -301,9 +300,8 @@ static int suspend_test_thread(void *arg)
> * doesn't use PSCI).
> */
> for (index = 1; index < drv->state_count; ++index) {
> - struct cpuidle_state *state = &drv->states[index];
> - bool broadcast = state->flags & CPUIDLE_FLAG_TIMER_STOP;
> int ret;
> + struct cpuidle_state *state = &drv->states[index];
>
> /*
> * Set the timer to wake this CPU up in some time (which
> @@ -318,7 +316,7 @@ static int suspend_test_thread(void *arg)
> /* IRQs must be disabled during suspend operations. */
> local_irq_disable();
>
> - ret = suspend_cpu(index, broadcast);
> + ret = suspend_cpu(dev, drv, index);
>
> /*
> * We have woken up. Re-enable IRQs to handle any
>
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] firmware: arm_scmi: Use {get,put}_unaligned_le32 accessors
From: Robin Murphy @ 2019-08-07 14:07 UTC (permalink / raw)
To: Sudeep Holla, Philipp Zabel; +Cc: linux-kernel, linux-arm-kernel
In-Reply-To: <20190807135757.GA27278@e107155-lin>
On 07/08/2019 14:57, Sudeep Holla wrote:
> On Wed, Aug 07, 2019 at 03:36:11PM +0200, Philipp Zabel wrote:
>> Hi Sudeep,
>>
>> On Wed, 2019-08-07 at 14:00 +0100, Sudeep Holla wrote:
>>> Instead of type-casting the {tx,rx}.buf all over the place while
>>> accessing them to read/write __le32 from/to the firmware, let's use
>>> the nice existing {get,put}_unaligned_le32 accessors to hide all the
>>> type cast ugliness.
>>>
>>> Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
>>> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
>>> ---
>>> drivers/firmware/arm_scmi/base.c | 2 +-
>>> drivers/firmware/arm_scmi/clock.c | 10 ++++------
>>> drivers/firmware/arm_scmi/common.h | 2 ++
>>> drivers/firmware/arm_scmi/perf.c | 8 ++++----
>>> drivers/firmware/arm_scmi/power.c | 6 +++---
>>> drivers/firmware/arm_scmi/reset.c | 2 +-
>>> drivers/firmware/arm_scmi/sensors.c | 12 +++++-------
>>> 7 files changed, 20 insertions(+), 22 deletions(-)
>>>
>>> diff --git a/drivers/firmware/arm_scmi/base.c b/drivers/firmware/arm_scmi/base.c
>>> index 204390297f4b..f804e8af6521 100644
>>> --- a/drivers/firmware/arm_scmi/base.c
>>> +++ b/drivers/firmware/arm_scmi/base.c
>> [...]
>>> @@ -204,14 +204,12 @@ scmi_clock_rate_get(const struct scmi_handle *handle, u32 clk_id, u64 *value)
>>> if (ret)
>>> return ret;
>>>
>>> - *(__le32 *)t->tx.buf = cpu_to_le32(clk_id);
>>> + put_unaligned_le32(clk_id, t->tx.buf);
>>>
>>> ret = scmi_do_xfer(handle, t);
>>> if (!ret) {
>>> - __le32 *pval = t->rx.buf;
>>> -
>>> - *value = le32_to_cpu(*pval);
>>> - *value |= (u64)le32_to_cpu(*(pval + 1)) << 32;
>>> + *value = get_unaligned_le32(t->rx.buf);
>>> + *value |= (u64)get_unaligned_le32(t->rx.buf + 1) << 32;
>>
>> Isn't t->rx.buf a void pointer? If I am not mistaken, you'd either have
>> to keep the pval local variables, or cast to (__le32 *) before doing
>> pointer arithmetic.
>>
>
> Ah right, that's the reason I added it at the first place. I will fix that.
Couldn't you just use get_unaligned_le64() here anyway?
Robin.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH] ARM: defconfig: lpc32xx: enable lpc32xx GPIO driver
From: Sylvain Lemieux @ 2019-08-07 14:04 UTC (permalink / raw)
To: vz, arnd; +Cc: Sylvain Lemieux, linux-arm-kernel
From: Sylvain Lemieux <slemieux@tycoint.com>
The change that allow the multiplatform build for the lpc32xx
platform add a new kernel config for the LPC32XX GPIO driver.
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com>
---
Note:
* This patch depend on the following patchset:
ARM: move lpc32xx and dove to multiplatform
https://www.spinics.net/lists/linux-usb/msg183095.html
arch/arm/configs/lpc32xx_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/configs/lpc32xx_defconfig b/arch/arm/configs/lpc32xx_defconfig
index 2d75bd8..09deb57 100644
--- a/arch/arm/configs/lpc32xx_defconfig
+++ b/arch/arm/configs/lpc32xx_defconfig
@@ -94,6 +94,7 @@ CONFIG_SERIAL_HS_LPC32XX_CONSOLE=y
# CONFIG_HW_RANDOM is not set
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_PNX=y
+CONFIG_GPIO_LPC32XX=y
CONFIG_SPI=y
CONFIG_SPI_PL022=y
CONFIG_GPIO_SYSFS=y
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH] firmware: arm_scmi: Use {get,put}_unaligned_le32 accessors
From: Sudeep Holla @ 2019-08-07 13:57 UTC (permalink / raw)
To: Philipp Zabel; +Cc: linux-kernel, linux-arm-kernel, Sudeep Holla
In-Reply-To: <1565184971.5048.8.camel@pengutronix.de>
On Wed, Aug 07, 2019 at 03:36:11PM +0200, Philipp Zabel wrote:
> Hi Sudeep,
>
> On Wed, 2019-08-07 at 14:00 +0100, Sudeep Holla wrote:
> > Instead of type-casting the {tx,rx}.buf all over the place while
> > accessing them to read/write __le32 from/to the firmware, let's use
> > the nice existing {get,put}_unaligned_le32 accessors to hide all the
> > type cast ugliness.
> >
> > Suggested-by: Philipp Zabel <p.zabel@pengutronix.de>
> > Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> > ---
> > drivers/firmware/arm_scmi/base.c | 2 +-
> > drivers/firmware/arm_scmi/clock.c | 10 ++++------
> > drivers/firmware/arm_scmi/common.h | 2 ++
> > drivers/firmware/arm_scmi/perf.c | 8 ++++----
> > drivers/firmware/arm_scmi/power.c | 6 +++---
> > drivers/firmware/arm_scmi/reset.c | 2 +-
> > drivers/firmware/arm_scmi/sensors.c | 12 +++++-------
> > 7 files changed, 20 insertions(+), 22 deletions(-)
> >
> > diff --git a/drivers/firmware/arm_scmi/base.c b/drivers/firmware/arm_scmi/base.c
> > index 204390297f4b..f804e8af6521 100644
> > --- a/drivers/firmware/arm_scmi/base.c
> > +++ b/drivers/firmware/arm_scmi/base.c
> [...]
> > @@ -204,14 +204,12 @@ scmi_clock_rate_get(const struct scmi_handle *handle, u32 clk_id, u64 *value)
> > if (ret)
> > return ret;
> >
> > - *(__le32 *)t->tx.buf = cpu_to_le32(clk_id);
> > + put_unaligned_le32(clk_id, t->tx.buf);
> >
> > ret = scmi_do_xfer(handle, t);
> > if (!ret) {
> > - __le32 *pval = t->rx.buf;
> > -
> > - *value = le32_to_cpu(*pval);
> > - *value |= (u64)le32_to_cpu(*(pval + 1)) << 32;
> > + *value = get_unaligned_le32(t->rx.buf);
> > + *value |= (u64)get_unaligned_le32(t->rx.buf + 1) << 32;
>
> Isn't t->rx.buf a void pointer? If I am not mistaken, you'd either have
> to keep the pval local variables, or cast to (__le32 *) before doing
> pointer arithmetic.
>
Ah right, that's the reason I added it at the first place. I will fix that.
--
Regards,
Sudeep
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] arm64: Disable big endian builds with clang
From: Mark Rutland @ 2019-08-07 13:56 UTC (permalink / raw)
To: Mark Brown
Cc: Tri Vo, Catalin Marinas, Nick Desaulniers, clang-built-linux,
Nathan Chancellor, Will Deacon, linux-arm-kernel
In-Reply-To: <20190807130527.GD4048@sirena.co.uk>
On Wed, Aug 07, 2019 at 02:05:27PM +0100, Mark Brown wrote:
> On Wed, Aug 07, 2019 at 02:01:11PM +0100, Mark Rutland wrote:
> > On Tue, Aug 06, 2019 at 07:39:18PM +0100, Mark Brown wrote:
>
> > Judging by the kernel log linked in a reply, this is with:
>
> > * clang version 8.0.1-svn359952-1~exp1~20190504004501.65 (branches/release_80)
>
> > Is that the llvm.org binary release, or a custom build of clang?
>
> It's from a llvm.org .deb.
>
> > * Linux 5.3.0-rc2-next-20190730
>
> > Could we previously build a BE kernel with clang? If so, what's the
> > last working kernel?
>
> As far as I know this has been broken for as long as we tried building
> and booting big endian kernels in clang. The compile works fine, it's
> just that the resulting binary doesn't seem to be working so well.
I've just had a go, and it works for me. Log below from a BE busybox,
but I also have a BE buildroot filesystem working.
For reference, I'm using:
* Linux v5.3-rc3 defconfig
* LLVM 8.0.0 (x86_64) from llvm.org
* GCC 8.1.0 (x86_64) from kernel.org crosstool
... so I don't think we should blacklist this just yet, but we certainly
need to better understand the issue you're seeing. I'll have a go with
LLVM 8.0.1 in case there's a regression from 8.0.0 to 8.0.1.
From your log, it looks like the kernel is trying to launch init via
binfmt_misc, using binfmt-464c. It could be that the file is corrupted
somehow, or something's going wrong with binfmt. I haven't delved into
that.
Are you using the right filesystem (and is the kernel definitely
identifying itself as BE in the Image header flags)?
This could be a dynamic loader issue -- my busybox is statically linked,
and I'm not sure about my buildroot filesystem.
This could be platform-specific; I'm booting under a KVM/QEMU VM on
ThunderX2, using virtio-block for storage.
Thanks,
Mark.
---->8----
[mark@gravadlaks:~/repro]% ./vmboot.sh ~/Image.be-clang
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x431f0af1]
[ 0.000000] Linux version 5.3.0-rc3-00001-g9b0f179cd3d1-dirty (mark@lakrids) (clang version 8.0.0 (tags/RELEASE_800/final)) #2 SMP PREEMPT Wed Aug 7 14:20:53 BST 2019
[ 0.000000] Machine model: linux,dummy-virt
[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')
[ 0.000000] printk: bootconsole [pl11] enabled
[ 0.000000] cma: Reserved 32 MiB at 0x00000000be000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xbdbf1840-0xbdbf2fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] On node 0 totalpages: 524288
[ 0.000000] DMA32 zone: 8192 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 524288 pages, LIFO batch:63
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] percpu: Embedded 23 pages/cpu s56216 r8192 d29800 u94208
[ 0.000000] pcpu-alloc: s56216 r8192 d29800 u94208 alloc=23*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: detected: GIC system register CPU interface
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: loglevel=9 rodata=full earlycon root=/dev/vda init=/sbin/reboot -- -f
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1964648K/2097152K available (11582K kernel code, 1860K rwdata, 5752K rodata, 38848K init, 411K bss, 99736K reserved, 32768K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: Distributor has no Range Selector support
[ 0.000000] GICv3: no VLPI support, no direct LPI support
[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000
[ 0.000000] ITS [mem 0x08080000-0x0809ffff]
[ 0.000000] ITS@0x0000000008080000: allocated 8192 Devices @bb030000 (indirect, esz 8, psz 64K, shr 1)
[ 0.000000] ITS@0x0000000008080000: allocated 8192 Interrupt Collections @bb040000 (flat, esz 8, psz 64K, shr 1)
[ 0.000000] GICv3: using LPI property table @0x00000000bb050000
[ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x00000000bb060000
[ 0.000000] random: get_random_bytes called from start_kernel+0x1d4/0x394 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
[ 0.000002] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[ 0.002284] Console: colour dummy device 80x25
[ 0.003215] printk: console [tty0] enabled
[ 0.004070] printk: bootconsole [pl11] disabled
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x431f0af1]
[ 0.000000] Linux version 5.3.0-rc3-00001-g9b0f179cd3d1-dirty (mark@lakrids) (clang version 8.0.0 (tags/RELEASE_800/final)) #2 SMP PREEMPT Wed Aug 7 14:20:53 BST 2019
[ 0.000000] Machine model: linux,dummy-virt
[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')
[ 0.000000] printk: bootconsole [pl11] enabled
[ 0.000000] cma: Reserved 32 MiB at 0x00000000be000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xbdbf1840-0xbdbf2fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] On node 0 totalpages: 524288
[ 0.000000] DMA32 zone: 8192 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 524288 pages, LIFO batch:63
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] percpu: Embedded 23 pages/cpu s56216 r8192 d29800 u94208
[ 0.000000] pcpu-alloc: s56216 r8192 d29800 u94208 alloc=23*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: detected: GIC system register CPU interface
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: loglevel=9 rodata=full earlycon root=/dev/vda init=/sbin/reboot -- -f
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1964648K/2097152K available (11582K kernel code, 1860K rwdata, 5752K rodata, 38848K init, 411K bss, 99736K reserved, 32768K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: Distributor has no Range Selector support
[ 0.000000] GICv3: no VLPI support, no direct LPI support
[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000
[ 0.000000] ITS [mem 0x08080000-0x0809ffff]
[ 0.000000] ITS@0x0000000008080000: allocated 8192 Devices @bb030000 (indirect, esz 8, psz 64K, shr 1)
[ 0.000000] ITS@0x0000000008080000: allocated 8192 Interrupt Collections @bb040000 (flat, esz 8, psz 64K, shr 1)
[ 0.000000] GICv3: using LPI property table @0x00000000bb050000
[ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x00000000bb060000
[ 0.000000] random: get_random_bytes called from start_kernel+0x1d4/0x394 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
[ 0.000002] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[ 0.002284] Console: colour dummy device 80x25
[ 0.003215] printk: console [tty0] enabled
[ 0.004070] printk: bootconsole [pl11] disabled
[ 0.005050] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
[ 0.005058] pid_max: default: 32768 minimum: 301
[ 0.005081] LSM: Security Framework initializing
[ 0.005102] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.005111] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.026434] ASID allocator initialised with 32768 entries
[ 0.034467] rcu: Hierarchical SRCU implementation.
[ 0.042554] Platform MSI: its@8080000 domain created
[ 0.042576] PCI/MSI: /intc@8000000/its@8080000 domain created
[ 0.050567] smp: Bringing up secondary CPUs ...
[ 0.050575] smp: Brought up 1 node, 1 CPU
[ 0.050580] SMP: Total of 1 processors activated.
[ 0.050586] CPU features: detected: Privileged Access Never
[ 0.050591] CPU features: detected: LSE atomic instructions
[ 0.050597] CPU features: detected: RAS Extension Support
[ 0.050602] CPU features: detected: CRC32 instructions
[ 0.050631] CPU: All CPU(s) started at EL1
[ 0.050641] alternatives: patching kernel code
[ 0.053527] devtmpfs: initialized
[ 0.054721] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.054737] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.055078] pinctrl core: initialized pinctrl subsystem
[ 0.055567] NET: Registered protocol family 16
[ 0.055653] audit: initializing netlink subsys (disabled)
[ 0.056035] audit: type=2000 audit(0.056:1): state=initialized audit_enabled=0 res=1
[ 0.058627] cpuidle: using governor menu
[ 0.058683] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.059634] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.059852] Serial: AMBA PL011 UART driver
[ 0.062444] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 39, base_baud = 0) is a PL011 rev1
[ 0.167037] printk: console [ttyAMA0] enabled
[ 0.172543] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.173847] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.175162] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.176469] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.184501] cryptd: max_cpu_qlen set to 1000
[ 0.200632] vgaarb: loaded
[ 0.201203] SCSI subsystem initialized
[ 0.204589] libata version 3.00 loaded.
[ 0.205301] usbcore: registered new interface driver usbfs
[ 0.206212] usbcore: registered new interface driver hub
[ 0.207093] usbcore: registered new device driver usb
[ 0.208092] pps_core: LinuxPPS API ver. 1 registered
[ 0.209064] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.210567] PTP clock support registered
[ 0.211254] EDAC MC: Ver: 3.0.0
[ 0.217131] FPGA manager framework
[ 0.217742] Advanced Linux Sound Architecture Driver Initialized.
[ 0.219023] clocksource: Switched to clocksource arch_sys_counter
[ 0.220083] VFS: Disk quotas dquot_6.6.0
[ 0.220766] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.223534] thermal_sys: Registered thermal governor 'step_wise'
[ 0.223536] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.224622] NET: Registered protocol family 2
[ 0.226944] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.228829] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.230225] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 0.232057] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.233295] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.234698] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.236598] NET: Registered protocol family 1
[ 0.249815] RPC: Registered named UNIX socket transport module.
[ 0.250897] RPC: Registered udp transport module.
[ 0.251908] RPC: Registered tcp transport module.
[ 0.252777] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.254086] PCI: CLS 0 bytes, default 64
[ 0.989340] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[ 1.018960] kvm [1]: HYP mode not available
[ 1.024106] Initialise system trusted keyrings
[ 1.025048] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[ 1.027932] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 1.033139] NFS: Registering the id_resolver key type
[ 1.033995] Key type id_resolver registered
[ 1.034688] Key type id_legacy registered
[ 1.035492] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 1.036697] 9p: Installing v9fs 9p2000 file system support
[ 1.047121] Key type asymmetric registered
[ 1.047876] Asymmetric key parser 'x509' registered
[ 1.048738] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 1.049943] io scheduler mq-deadline registered
[ 1.050760] io scheduler kyber registered
[ 1.054072] pl061_gpio 9030000.pl061: PL061 GPIO chip registered
[ 1.055778] pci-host-generic 4010000000.pcie: host bridge /pcie@10000000 ranges:
[ 1.057333] pci-host-generic 4010000000.pcie: IO 0x3eff0000..0x3effffff -> 0x00000000
[ 1.058946] pci-host-generic 4010000000.pcie: MEM 0x10000000..0x3efeffff -> 0x10000000
[ 1.061017] pci-host-generic 4010000000.pcie: MEM 0x8000000000..0xffffffffff -> 0x8000000000
[ 1.062688] pci-host-generic 4010000000.pcie: ECAM at [mem 0x4010000000-0x401fffffff] for [bus 00-ff]
[ 1.064960] pci-host-generic 4010000000.pcie: PCI host bridge to bus 0000:00
[ 1.066392] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.067670] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 1.068949] pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff]
[ 1.070353] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff]
[ 1.072113] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
[ 1.073775] pci 0000:00:01.0: [1af4:1000] type 00 class 0x020000
[ 1.075144] pci 0000:00:01.0: reg 0x10: [io 0x0000-0x001f]
[ 1.076269] pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x00000fff]
[ 1.077693] pci 0000:00:01.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[ 1.079303] pci 0000:00:01.0: reg 0x30: [mem 0x00000000-0x0003ffff pref]
[ 1.081194] pci 0000:00:02.0: [1af4:1001] type 00 class 0x010000
[ 1.082575] pci 0000:00:02.0: reg 0x10: [io 0x0000-0x007f]
[ 1.083914] pci 0000:00:02.0: reg 0x14: [mem 0x00000000-0x00000fff]
[ 1.085043] pci 0000:00:02.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[ 1.086849] pci 0000:00:01.0: BAR 6: assigned [mem 0x10000000-0x1003ffff pref]
[ 1.088499] pci 0000:00:01.0: BAR 4: assigned [mem 0x8000000000-0x8000003fff 64bit pref]
[ 1.089860] pci 0000:00:02.0: BAR 4: assigned [mem 0x8000004000-0x8000007fff 64bit pref]
[ 1.091294] pci 0000:00:01.0: BAR 1: assigned [mem 0x10040000-0x10040fff]
[ 1.092446] pci 0000:00:02.0: BAR 1: assigned [mem 0x10041000-0x10041fff]
[ 1.093565] pci 0000:00:02.0: BAR 0: assigned [io 0x1000-0x107f]
[ 1.094566] pci 0000:00:01.0: BAR 0: assigned [io 0x1080-0x109f]
[ 1.098710] virtio-pci 0000:00:01.0: enabling device (0000 -> 0003)
[ 1.102352] virtio-pci 0000:00:02.0: enabling device (0000 -> 0003)
[ 1.106588] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.108458] SuperH (H)SCI(F) driver initialized
[ 1.109419] msm_serial: driver initialized
[ 1.110369] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 1.113573] loop: module loaded
[ 1.115477] virtio_blk virtio1: [vda] 12000000 512-byte logical blocks (6.14 GB/5.72 GiB)
[ 1.124324] libphy: Fixed MDIO Bus: probed
[ 1.125080] tun: Universal TUN/TAP device driver, 1.6
[ 1.127819] thunder_xcv, ver 1.0
[ 1.128424] thunder_bgx, ver 1.0
[ 1.129002] nicpf, ver 1.0
[ 1.129678] hclge is initializing
[ 1.130237] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 1.131904] hns3: Copyright (c) 2017 Huawei Corporation.
[ 1.133059] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 1.134258] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 1.135636] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k
[ 1.136827] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 1.137988] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 1.139748] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 1.141114] sky2: driver version 1.30
[ 1.142173] VFIO - User Level meta-driver version: 0.3
[ 1.147966] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.149338] ehci-pci: EHCI PCI platform driver
[ 1.150270] ehci-platform: EHCI generic platform driver
[ 1.151947] ehci-orion: EHCI orion driver
[ 1.152845] ehci-exynos: EHCI EXYNOS driver
[ 1.153749] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.155091] ohci-pci: OHCI PCI platform driver
[ 1.156033] ohci-platform: OHCI generic platform driver
[ 1.157177] ohci-exynos: OHCI EXYNOS driver
[ 1.158240] usbcore: registered new interface driver usb-storage
[ 1.160629] rtc-pl031 9010000.pl031: registered as rtc0
[ 1.162033] i2c /dev entries driver
[ 1.164599] sdhci: Secure Digital Host Controller Interface driver
[ 1.165925] sdhci: Copyright(c) Pierre Ossman
[ 1.166961] Synopsys Designware Multimedia Card Interface Driver
[ 1.168936] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.170752] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.172920] usbcore: registered new interface driver usbhid
[ 1.174083] usbhid: USB HID core driver
[ 1.176164] NET: Registered protocol family 17
[ 1.177116] 9pnet: Installing 9P2000 support
[ 1.177848] Key type dns_resolver registered
[ 1.178701] registered taskstats version 1
[ 1.179536] Loading compiled-in X.509 certificates
[ 1.180717] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 1.181917] rtc-pl031 9010000.pl031: setting system clock to 2019-08-07T13:23:53 UTC (1565184233)
[ 1.184596] ALSA device list:
[ 1.185165] No soundcards found.
[ 1.185836] uart-pl011 9000000.pl011: no DMA platform data
[ 1.200058] Freeing unused kernel memory: 38848K
[ 1.201303] Run /init as init process
Please press Enter to activate this console.
/bin/sh: can't access tty; job control turned off
/ # busybox --version
--version: applet not found
/ # busybox help
help: applet not found
/ # busybox --help
BusyBox v1.22.1 (2014-09-25 18:26:52 BST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed
copyright notices.
Usage: busybox [function [arguments]...]
or: busybox --list[-full]
or: busybox --install [-s] [DIR]
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash,
awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl,
bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod,
chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm,
conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd,
deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff,
dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap,
dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake,
expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat,
fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk,
fsck, fsck.minix, fstrim, fsync, ftpd, ftpget, ftpput, fuser, getopt,
getty, grep, groups, gunzip, gzip, halt, hd, hdparm, head, hexdump,
hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown,
ifenslave, ifplugd, ifup, inetd, init, insmod, install, ionice, iostat,
ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel,
kbd_mode, kill, killall, killall5, klogd, last, less, linux32, linux64,
linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread,
losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lsof, lspci, lsusb, lzcat,
lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg,
microcom, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix,
mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more,
mount, mountpoint, mpstat, mt, mv, nameif, nanddump, nandwrite,
nbd-client, nc, netstat, nice, nmeter, nohup, nslookup, ntpd, od,
openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress,
pivot_root, pkill, pmap, popmaildir, poweroff, powertop, printenv,
printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdate, rdev,
readahead, readlink, readprofile, realpath, reboot, reformime,
remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm,
rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script,
scriptreplay, sed, sendmail, seq, setarch, setconsole, setfont,
setkeycodes, setlogcons, setserial, setsid, setuidgid, sh, sha1sum,
sha256sum, sha3sum, sha512sum, showkey, slattach, sleep, smemcap,
softlimit, sort, split, start-stop-daemon, stat, strings, stty, su,
sulogin, sum, sv, svlogd, swapoff, swapon, switch_root, sync, sysctl,
syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp,
tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true,
tty, ttysize, tunctl, ubiattach, ubidetach, ubimkvol, ubirmvol,
ubirsvol, ubiupdatevol, udhcpc, udhcpd, udpsvd, umount, uname,
unexpand, uniq, unix2dos, unlzma, unlzop, unxz, unzip, uptime, users,
usleep, uudecode, uuencode, vconfig, vi, vlock, volname, wall, watch,
watchdog, wc, wget, which, who, whoami, whois, xargs, xz, xzcat, yes,
zcat, zcip
/ #
/ #
Please press Enter to activate this console.
/bin/sh: can't access tty; job control turned off
/ # poweroff
swapoff: /etc/fstab: No such file or directory
umount: can't umount /: Invalid argument
The system is going down NOW!
Sent SIGTERM to all processes
Terminated
Sent SIGKILL to all processes
Requesting system poweroff
[ 229.194564] reboot: Power down
[mark@gravadlaks:~/repro]%
[mark@gravadlaks:~/repro]% ./vmboot.sh ~/Image.be-clang
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x431f0af1]
[ 0.000000] Linux version 5.3.0-rc3-00001-g9b0f179cd3d1-dirty (mark@lakrids) (clang version 8.0.0 (tags/RELEASE_800/final)) #2 SMP PREEMPT Wed Aug 7 14:20:53 BST 2019
[ 0.000000] Machine model: linux,dummy-virt
[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')
[ 0.000000] printk: bootconsole [pl11] enabled
[ 0.000000] cma: Reserved 32 MiB at 0x00000000be000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xbdbf1840-0xbdbf2fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] On node 0 totalpages: 524288
[ 0.000000] DMA32 zone: 8192 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 524288 pages, LIFO batch:63
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] percpu: Embedded 23 pages/cpu s56216 r8192 d29800 u94208
[ 0.000000] pcpu-alloc: s56216 r8192 d29800 u94208 alloc=23*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: detected: GIC system register CPU interface
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: loglevel=9 rodata=full earlycon root=/dev/vda init=/sbin/reboot -- -f
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1964648K/2097152K available (11582K kernel code, 1860K rwdata, 5752K rodata, 38848K init, 411K bss, 99736K reserved, 32768K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: Distributor has no Range Selector support
[ 0.000000] GICv3: no VLPI support, no direct LPI support
[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000
[ 0.000000] ITS [mem 0x08080000-0x0809ffff]
[ 0.000000] ITS@0x0000000008080000: allocated 8192 Devices @bb030000 (indirect, esz 8, psz 64K, shr 1)
[ 0.000000] ITS@0x0000000008080000: allocated 8192 Interrupt Collections @bb040000 (flat, esz 8, psz 64K, shr 1)
[ 0.000000] GICv3: using LPI property table @0x00000000bb050000
[ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x00000000bb060000
[ 0.000000] random: get_random_bytes called from start_kernel+0x1d4/0x394 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
[ 0.000002] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[ 0.002392] Console: colour dummy device 80x25
[ 0.003317] printk: console [tty0] enabled
[ 0.004171] printk: bootconsole [pl11] disabled
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x431f0af1]
[ 0.000000] Linux version 5.3.0-rc3-00001-g9b0f179cd3d1-dirty (mark@lakrids) (clang version 8.0.0 (tags/RELEASE_800/final)) #2 SMP PREEMPT Wed Aug 7 14:20:53 BST 2019
[ 0.000000] Machine model: linux,dummy-virt
[ 0.000000] earlycon: pl11 at MMIO 0x0000000009000000 (options '')
[ 0.000000] printk: bootconsole [pl11] enabled
[ 0.000000] cma: Reserved 32 MiB at 0x00000000be000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0xbdbf1840-0xbdbf2fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[ 0.000000] On node 0 totalpages: 524288
[ 0.000000] DMA32 zone: 8192 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 524288 pages, LIFO batch:63
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.0 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] percpu: Embedded 23 pages/cpu s56216 r8192 d29800 u94208
[ 0.000000] pcpu-alloc: s56216 r8192 d29800 u94208 alloc=23*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: detected: GIC system register CPU interface
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 516096
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: loglevel=9 rodata=full earlycon root=/dev/vda init=/sbin/reboot -- -f
[ 0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 1964648K/2097152K available (11582K kernel code, 1860K rwdata, 5752K rodata, 38848K init, 411K bss, 99736K reserved, 32768K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=1.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: Distributor has no Range Selector support
[ 0.000000] GICv3: no VLPI support, no direct LPI support
[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000
[ 0.000000] ITS [mem 0x08080000-0x0809ffff]
[ 0.000000] ITS@0x0000000008080000: allocated 8192 Devices @bb030000 (indirect, esz 8, psz 64K, shr 1)
[ 0.000000] ITS@0x0000000008080000: allocated 8192 Interrupt Collections @bb040000 (flat, esz 8, psz 64K, shr 1)
[ 0.000000] GICv3: using LPI property table @0x00000000bb050000
[ 0.000000] GICv3: CPU0: using allocated LPI pending table @0x00000000bb060000
[ 0.000000] random: get_random_bytes called from start_kernel+0x1d4/0x394 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 200.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049d3e8, max_idle_ns: 440795210634 ns
[ 0.000002] sched_clock: 56 bits at 200MHz, resolution 5ns, wraps every 4398046511102ns
[ 0.002392] Console: colour dummy device 80x25
[ 0.003317] printk: console [tty0] enabled
[ 0.004171] printk: bootconsole [pl11] disabled
[ 0.005144] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=800000)
[ 0.005151] pid_max: default: 32768 minimum: 301
[ 0.005175] LSM: Security Framework initializing
[ 0.005198] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.005206] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[ 0.026500] ASID allocator initialised with 32768 entries
[ 0.034531] rcu: Hierarchical SRCU implementation.
[ 0.042612] Platform MSI: its@8080000 domain created
[ 0.042629] PCI/MSI: /intc@8000000/its@8080000 domain created
[ 0.050617] smp: Bringing up secondary CPUs ...
[ 0.050624] smp: Brought up 1 node, 1 CPU
[ 0.050627] SMP: Total of 1 processors activated.
[ 0.050632] CPU features: detected: Privileged Access Never
[ 0.050636] CPU features: detected: LSE atomic instructions
[ 0.050640] CPU features: detected: RAS Extension Support
[ 0.050644] CPU features: detected: CRC32 instructions
[ 0.050664] CPU: All CPU(s) started at EL1
[ 0.050670] alternatives: patching kernel code
[ 0.053393] devtmpfs: initialized
[ 0.054728] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.054739] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.054952] pinctrl core: initialized pinctrl subsystem
[ 0.055293] NET: Registered protocol family 16
[ 0.055355] audit: initializing netlink subsys (disabled)
[ 0.055610] audit: type=2000 audit(0.056:1): state=initialized audit_enabled=0 res=1
[ 0.058679] cpuidle: using governor menu
[ 0.058739] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 0.059505] DMA: preallocated 256 KiB pool for atomic allocations
[ 0.059761] Serial: AMBA PL011 UART driver
[ 0.062404] 9000000.pl011: ttyAMA0 at MMIO 0x9000000 (irq = 39, base_baud = 0) is a PL011 rev1
[ 0.154551] printk: console [ttyAMA0] enabled
[ 0.159532] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.160704] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 0.161945] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.163014] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 0.172396] cryptd: max_cpu_qlen set to 1000
[ 0.188541] vgaarb: loaded
[ 0.189257] SCSI subsystem initialized
[ 0.192493] libata version 3.00 loaded.
[ 0.193251] usbcore: registered new interface driver usbfs
[ 0.194165] usbcore: registered new interface driver hub
[ 0.195048] usbcore: registered new device driver usb
[ 0.196037] pps_core: LinuxPPS API ver. 1 registered
[ 0.197052] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.198675] PTP clock support registered
[ 0.199402] EDAC MC: Ver: 3.0.0
[ 0.205125] FPGA manager framework
[ 0.205734] Advanced Linux Sound Architecture Driver Initialized.
[ 0.206909] clocksource: Switched to clocksource arch_sys_counter
[ 0.207941] VFS: Disk quotas dquot_6.6.0
[ 0.208604] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 0.211337] thermal_sys: Registered thermal governor 'step_wise'
[ 0.211339] thermal_sys: Registered thermal governor 'power_allocator'
[ 0.212372] NET: Registered protocol family 2
[ 0.214371] tcp_listen_portaddr_hash hash table entries: 1024 (order: 2, 16384 bytes, linear)
[ 0.216248] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[ 0.217712] TCP bind hash table entries: 16384 (order: 6, 262144 bytes, linear)
[ 0.218979] TCP: Hash tables configured (established 16384 bind 16384)
[ 0.220071] UDP hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.221208] UDP-Lite hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.222501] NET: Registered protocol family 1
[ 0.235747] RPC: Registered named UNIX socket transport module.
[ 0.236757] RPC: Registered udp transport module.
[ 0.237513] RPC: Registered tcp transport module.
[ 0.238273] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.239486] PCI: CLS 0 bytes, default 64
[ 0.847684] hw perfevents: enabled with armv8_pmuv3 PMU driver, 7 counters available
[ 0.877150] kvm [1]: HYP mode not available
[ 0.882051] Initialise system trusted keyrings
[ 0.882941] workingset: timestamp_bits=44 max_order=19 bucket_order=0
[ 0.885650] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.890850] NFS: Registering the id_resolver key type
[ 0.892011] Key type id_resolver registered
[ 0.892718] Key type id_legacy registered
[ 0.893379] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.894617] 9p: Installing v9fs 9p2000 file system support
[ 0.905232] Key type asymmetric registered
[ 0.906003] Asymmetric key parser 'x509' registered
[ 0.906827] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 0.908506] io scheduler mq-deadline registered
[ 0.909330] io scheduler kyber registered
[ 0.912451] pl061_gpio 9030000.pl061: PL061 GPIO chip registered
[ 0.913982] pci-host-generic 4010000000.pcie: host bridge /pcie@10000000 ranges:
[ 0.915435] pci-host-generic 4010000000.pcie: IO 0x3eff0000..0x3effffff -> 0x00000000
[ 0.916768] pci-host-generic 4010000000.pcie: MEM 0x10000000..0x3efeffff -> 0x10000000
[ 0.918077] pci-host-generic 4010000000.pcie: MEM 0x8000000000..0xffffffffff -> 0x8000000000
[ 0.919721] pci-host-generic 4010000000.pcie: ECAM at [mem 0x4010000000-0x401fffffff] for [bus 00-ff]
[ 0.921262] pci-host-generic 4010000000.pcie: PCI host bridge to bus 0000:00
[ 0.922467] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.923675] pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
[ 0.924709] pci_bus 0000:00: root bus resource [mem 0x10000000-0x3efeffff]
[ 0.925828] pci_bus 0000:00: root bus resource [mem 0x8000000000-0xffffffffff]
[ 0.927207] pci 0000:00:00.0: [1b36:0008] type 00 class 0x060000
[ 0.928607] pci 0000:00:01.0: [1af4:1000] type 00 class 0x020000
[ 0.929792] pci 0000:00:01.0: reg 0x10: [io 0x0000-0x001f]
[ 0.930721] pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x00000fff]
[ 0.932208] pci 0000:00:01.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[ 0.933542] pci 0000:00:01.0: reg 0x30: [mem 0x00000000-0x0003ffff pref]
[ 0.935114] pci 0000:00:02.0: [1af4:1001] type 00 class 0x010000
[ 0.936226] pci 0000:00:02.0: reg 0x10: [io 0x0000-0x007f]
[ 0.937177] pci 0000:00:02.0: reg 0x14: [mem 0x00000000-0x00000fff]
[ 0.938298] pci 0000:00:02.0: reg 0x20: [mem 0x00000000-0x00003fff 64bit pref]
[ 0.940275] pci 0000:00:01.0: BAR 6: assigned [mem 0x10000000-0x1003ffff pref]
[ 0.941465] pci 0000:00:01.0: BAR 4: assigned [mem 0x8000000000-0x8000003fff 64bit pref]
[ 0.942849] pci 0000:00:02.0: BAR 4: assigned [mem 0x8000004000-0x8000007fff 64bit pref]
[ 0.944866] pci 0000:00:01.0: BAR 1: assigned [mem 0x10040000-0x10040fff]
[ 0.945974] pci 0000:00:02.0: BAR 1: assigned [mem 0x10041000-0x10041fff]
[ 0.947193] pci 0000:00:02.0: BAR 0: assigned [io 0x1000-0x107f]
[ 0.948277] pci 0000:00:01.0: BAR 0: assigned [io 0x1080-0x109f]
[ 0.952525] virtio-pci 0000:00:01.0: enabling device (0000 -> 0003)
[ 0.956538] virtio-pci 0000:00:02.0: enabling device (0000 -> 0003)
[ 0.960969] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 0.962824] SuperH (H)SCI(F) driver initialized
[ 0.964039] msm_serial: driver initialized
[ 0.965015] cacheinfo: Unable to detect cache hierarchy for CPU 0
[ 0.968075] loop: module loaded
[ 0.969973] virtio_blk virtio1: [vda] 12000000 512-byte logical blocks (6.14 GB/5.72 GiB)
[ 0.982789] libphy: Fixed MDIO Bus: probed
[ 0.983945] tun: Universal TUN/TAP device driver, 1.6
[ 0.988551] thunder_xcv, ver 1.0
[ 0.989117] thunder_bgx, ver 1.0
[ 0.989633] nicpf, ver 1.0
[ 0.990238] hclge is initializing
[ 0.990759] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 0.992237] hns3: Copyright (c) 2017 Huawei Corporation.
[ 0.993104] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 0.993996] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.994903] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k
[ 0.996375] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 0.997265] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 0.998460] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 0.999655] sky2: driver version 1.30
[ 1.000473] VFIO - User Level meta-driver version: 0.3
[ 1.005825] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.006832] ehci-pci: EHCI PCI platform driver
[ 1.007770] ehci-platform: EHCI generic platform driver
[ 1.008627] ehci-orion: EHCI orion driver
[ 1.009279] ehci-exynos: EHCI EXYNOS driver
[ 1.009956] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.010908] ohci-pci: OHCI PCI platform driver
[ 1.011619] ohci-platform: OHCI generic platform driver
[ 1.012459] ohci-exynos: OHCI EXYNOS driver
[ 1.013286] usbcore: registered new interface driver usb-storage
[ 1.015000] rtc-pl031 9010000.pl031: registered as rtc0
[ 1.016050] i2c /dev entries driver
[ 1.017949] sdhci: Secure Digital Host Controller Interface driver
[ 1.018894] sdhci: Copyright(c) Pierre Ossman
[ 1.019919] Synopsys Designware Multimedia Card Interface Driver
[ 1.021121] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.022399] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.023827] usbcore: registered new interface driver usbhid
[ 1.024703] usbhid: USB HID core driver
[ 1.026302] NET: Registered protocol family 17
[ 1.027116] 9pnet: Installing 9P2000 support
[ 1.027802] Key type dns_resolver registered
[ 1.028633] registered taskstats version 1
[ 1.029277] Loading compiled-in X.509 certificates
[ 1.030352] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 1.031659] rtc-pl031 9010000.pl031: setting system clock to 2019-08-07T13:27:45 UTC (1565184465)
[ 1.034034] ALSA device list:
[ 1.034499] No soundcards found.
[ 1.035197] uart-pl011 9000000.pl011: no DMA platform data
[ 1.058358] Freeing unused kernel memory: 38848K
[ 1.059303] Run /init as init process
Please press Enter to activate this console.
/bin/sh: can't access tty; job control turned off
/ # busybox --help
BusyBox v1.22.1 (2014-09-25 18:26:52 BST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed
copyright notices.
Usage: busybox [function [arguments]...]
or: busybox --list[-full]
or: busybox --install [-s] [DIR]
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, acpid, add-shell, addgroup, adduser, adjtimex, arp, arping, ash,
awk, base64, basename, beep, blkid, blockdev, bootchartd, brctl,
bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod,
chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp, comm,
conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date, dc, dd,
deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay, diff,
dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap,
dumpleases, echo, ed, egrep, eject, env, envdir, envuidgid, ether-wake,
expand, expr, fakeidentd, false, fbset, fbsplash, fdflush, fdformat,
fdisk, fgconsole, fgrep, find, findfs, flock, fold, free, freeramdisk,
fsck, fsck.minix, fstrim, fsync, ftpd, ftpget, ftpput, fuser, getopt,
getty, grep, groups, gunzip, gzip, halt, hd, hdparm, head, hexdump,
hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown,
ifenslave, ifplugd, ifup, inetd, init, insmod, install, ionice, iostat,
ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule, iptunnel,
kbd_mode, kill, killall, killall5, klogd, last, less, linux32, linux64,
linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread,
losetup, lpd, lpq, lpr, ls, lsattr, lsmod, lsof, lspci, lsusb, lzcat,
lzma, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg,
microcom, mkdir, mkdosfs, mke2fs, mkfifo, mkfs.ext2, mkfs.minix,
mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more,
mount, mountpoint, mpstat, mt, mv, nameif, nanddump, nandwrite,
nbd-client, nc, netstat, nice, nmeter, nohup, nslookup, ntpd, od,
openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress,
pivot_root, pkill, pmap, popmaildir, poweroff, powertop, printenv,
printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdate, rdev,
readahead, readlink, readprofile, realpath, reboot, reformime,
remove-shell, renice, reset, resize, rev, rm, rmdir, rmmod, route, rpm,
rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script,
scriptreplay, sed, sendmail, seq, setarch, setconsole, setfont,
setkeycodes, setlogcons, setserial, setsid, setuidgid, sh, sha1sum,
sha256sum, sha3sum, sha512sum, showkey, slattach, sleep, smemcap,
softlimit, sort, split, start-stop-daemon, stat, strings, stty, su,
sulogin, sum, sv, svlogd, swapoff, swapon, switch_root, sync, sysctl,
syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp,
tftpd, time, timeout, top, touch, tr, traceroute, traceroute6, true,
tty, ttysize, tunctl, ubiattach, ubidetach, ubimkvol, ubirmvol,
ubirsvol, ubiupdatevol, udhcpc, udhcpd, udpsvd, umount, uname,
unexpand, uniq, unix2dos, unlzma, unlzop, unxz, unzip, uptime, users,
usleep, uudecode, uuencode, vconfig, vi, vlock, volname, wall, watch,
watchdog, wc, wget, which, who, whoami, whois, xargs, xz, xzcat, yes,
zcat, zcip
/ # uname -a
Linux (none) 5.3.0-rc3-00001-g9b0f179cd3d1-dirty #2 SMP PREEMPT Wed Aug 7 14:20:53 BST 2019 aarch64_be GNU/Linux
/ # poweroff
swapoff: /etc/fstab: No such file or directory
umount: can't umount /: Invalid argument
The system is going down NOW!
Sent SIGTERM to all processes
Terminated
Sent SIGKILL to all processes
Requesting system poweroff
[ 12.838390] reboot: Power down
[
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 6/9] KVM: arm64: Provide a PV_TIME device to user space
From: Marc Zyngier @ 2019-08-07 13:51 UTC (permalink / raw)
To: Steven Price
Cc: kvm, linux-doc, Catalin Marinas, Russell King, linux-kernel,
Paolo Bonzini, Will Deacon, kvmarm, linux-arm-kernel
In-Reply-To: <5aa54066-b9f6-22d1-fa2b-ce5cbf244ab5@arm.com>
On 07/08/2019 14:39, Steven Price wrote:
> On 03/08/2019 18:34, Marc Zyngier wrote:
>> On Sat, 3 Aug 2019 13:51:13 +0100
>> Marc Zyngier <maz@kernel.org> wrote:
>>
>> [forgot that one]
>>
>>> On Fri, 2 Aug 2019 15:50:14 +0100
>>> Steven Price <steven.price@arm.com> wrote:
>>
>> [...]
>>
>>>> +static int __init kvm_pvtime_init(void)
>>>> +{
>>>> + kvm_register_device_ops(&pvtime_ops, KVM_DEV_TYPE_ARM_PV_TIME);
>>>> +
>>>> + return 0;
>>>> +}
>>>> +
>>>> +late_initcall(kvm_pvtime_init);
>>
>> Why is it an initcall? So far, the only initcall we've used is the one
>> that initializes KVM itself. Can't we just the device_ops just like we
>> do for the vgic?
>
> So would you prefer a direct call from init_subsystems() in
> virt/kvm/arm/arm.c?
Yes. Consistency is important.
> The benefit of initcall is just that it keeps the code self-contained.
> In init_subsystems() I'd either need a #ifdef CONFIG_ARM64 or a dummy
> function for arm.
Having a dummy function for 32bit ARM is fine. Most of the code we add
to the 32bit port is made of empty stubs anyway.
Thanks,
M.
--
Jazz is not dead, it just smells funny...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v3 07/21] ARM: dts: imx7-colibri: fix 1.8V/UHS support
From: Philippe Schenker @ 2019-08-07 13:41 UTC (permalink / raw)
To: festevam@gmail.com
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
michal.vokac@ysoft.com, kernel@pengutronix.de, Stefan Agner,
Marcel Ziswiler, s.hauer@pengutronix.de,
linux-kernel@vger.kernel.org, stefan@agner.ch, robh+dt@kernel.org,
linux-imx@nxp.com, Max Krummenacher, shawnguo@kernel.org,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <CAOMZO5CdWmVKXmNSLdbsmnU6_ZKwbeVArtOQzuTg_gtqTUnVag@mail.gmail.com>
On Wed, 2019-08-07 at 08:19 -0300, Fabio Estevam wrote:
> Hi Philippe,
>
> On Wed, Aug 7, 2019 at 5:26 AM Philippe Schenker
> <philippe.schenker@toradex.com> wrote:
> > From: Stefan Agner <stefan.agner@toradex.com>
> >
> > Add pinmuxing and do not specify voltage restrictions for the usdhc
> > instance available on the modules edge connector. This allows to use
> > SD-cards with higher transfer modes if supported by the carrier
> > board.
> >
> > Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
> > Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
> >
> > ---
> >
> > Changes in v3:
> > - Add new commit message from Stefan's proposal on ML
>
> The commit message has been improved, but there is also another point
> I mentioned earlier:
>
> > Changes in v2: None
> >
> > arch/arm/boot/dts/imx7-colibri.dtsi | 23 ++++++++++++++++++++++-
> > 1 file changed, 22 insertions(+), 1 deletion(-)
> >
> > diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi
> > b/arch/arm/boot/dts/imx7-colibri.dtsi
> > index 16d1a1ed1aff..67f5e0c87fdc 100644
> > --- a/arch/arm/boot/dts/imx7-colibri.dtsi
> > +++ b/arch/arm/boot/dts/imx7-colibri.dtsi
> > @@ -326,7 +326,6 @@
> > &usdhc1 {
> > pinctrl-names = "default";
> > pinctrl-0 = <&pinctrl_usdhc1 &pinctrl_cd_usdhc1>;
> > - no-1-8-v;
> > cd-gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
> > disable-wp;
> > vqmmc-supply = <®_LDO2>;
> > @@ -671,6 +670,28 @@
> > >;
> > };
> >
> > + pinctrl_usdhc1_100mhz: usdhc1grp_100mhz {
>
> This new entry has been added and it is not referenced.
Sorry, I probably could have mentioned that in this commit. I want, if
possible, to let this commmit as is. That's why I added another on top
of this patchset. Please see patch 21/21 that makes use of this change.
>
> > + fsl,pins = <
> > + MX7D_PAD_SD1_CMD__SD1_CMD 0x5a
> > + MX7D_PAD_SD1_CLK__SD1_CLK 0x1a
> > + MX7D_PAD_SD1_DATA0__SD1_DATA0 0x5a
> > + MX7D_PAD_SD1_DATA1__SD1_DATA1 0x5a
> > + MX7D_PAD_SD1_DATA2__SD1_DATA2 0x5a
> > + MX7D_PAD_SD1_DATA3__SD1_DATA3 0x5a
> > + >;
> > + };
> > +
> > + pinctrl_usdhc1_200mhz: usdhc1grp_200mhz {
>
> Same here.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 6/9] KVM: arm64: Provide a PV_TIME device to user space
From: Steven Price @ 2019-08-07 13:39 UTC (permalink / raw)
To: Marc Zyngier
Cc: kvm, linux-doc, Catalin Marinas, Russell King, linux-kernel,
Paolo Bonzini, Will Deacon, kvmarm, linux-arm-kernel
In-Reply-To: <20190803183335.149e0113@why>
On 03/08/2019 18:34, Marc Zyngier wrote:
> On Sat, 3 Aug 2019 13:51:13 +0100
> Marc Zyngier <maz@kernel.org> wrote:
>
> [forgot that one]
>
>> On Fri, 2 Aug 2019 15:50:14 +0100
>> Steven Price <steven.price@arm.com> wrote:
>
> [...]
>
>>> +static int __init kvm_pvtime_init(void)
>>> +{
>>> + kvm_register_device_ops(&pvtime_ops, KVM_DEV_TYPE_ARM_PV_TIME);
>>> +
>>> + return 0;
>>> +}
>>> +
>>> +late_initcall(kvm_pvtime_init);
>
> Why is it an initcall? So far, the only initcall we've used is the one
> that initializes KVM itself. Can't we just the device_ops just like we
> do for the vgic?
So would you prefer a direct call from init_subsystems() in
virt/kvm/arm/arm.c?
The benefit of initcall is just that it keeps the code self-contained.
In init_subsystems() I'd either need a #ifdef CONFIG_ARM64 or a dummy
function for arm.
Steve
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH v5 0/4] add coupled regulators for Exynos5422/5800
From: k.konieczny @ 2019-08-07 13:38 UTC (permalink / raw)
To: k.konieczny
Cc: Mark Rutland, Nishanth Menon, linux-samsung-soc, Rob Herring,
linux-arm-kernel, Bartlomiej Zolnierkiewicz, Stephen Boyd,
Viresh Kumar, linux-pm, linux-kernel, Krzysztof Kozlowski,
Chanwoo Choi, Kyungmin Park, Kukjin Kim, MyungJoo Ham, devicetree,
Marek Szyprowski
In-Reply-To: <CGME20190807133855eucas1p1cab425b791262e8dee1b17cbe8b1b3da@eucas1p1.samsung.com>
Hi,
The main purpose of this patch series is to add coupled regulators for
Exynos5422/5800 to keep constrain on voltage difference between vdd_arm
and vdd_int to be at most 300mV. In exynos-bus instead of using
regulator_set_voltage_tol() with default voltage tolerance it should be
used regulator_set_voltage_triplet() with volatege range, and this is
already present in opp/core.c code, so it can be reused. While at this,
move setting regulators into opp/core.
This patchset was tested on Odroid XU3.
The DTS coupled regulators patch depends on previous patches.
Changes:
v5:
- squashed last patch "remove exynos_bus_passive_target()" into second
- added Acked-by to patch "correct clock enable sequence"
v4:
- removed "opp: core: add regulators enable and disable" from patchset
as it was applied by Viresh Kumar and changed cover letter
- fix patch "devfreq: exynos-bus: correct clock enable sequence" to
correct order of enable/disable
- removed unrelated changes in "devfreq: exynos-bus: convert to use
dev_pm_opp_set_rate()"
- added new patch "devfreq: exynos-bus: remove exynos_bus_passive_target()"
as suggested by Chanwoo Choi
v3:
- added new exynos-bus patch to correct clock and regulator enabling
and disabling sequence as suggested by Chanwoo Choi
- corrected error path in enable and improved commit message in opp/core
- improve comment in devfreq/exynos-bus.c before devfreq_recommended_opp()
- change cover letter as there is new patch
- added note before Signed-off-by in 4th patch
v2:
- improve regulators enable/disable code in opp/core as suggested by
Viresh Kumar
- add new patch for remove unused dt-bindings as suggested by Krzysztof
Kozlowski
Kamil Konieczny (3):
devfreq: exynos-bus: correct clock enable sequence
devfreq: exynos-bus: convert to use dev_pm_opp_set_rate()
dt-bindings: devfreq: exynos-bus: remove unused property
Marek Szyprowski (1):
ARM: dts: exynos: add initial data for coupled regulators for
Exynos5422/5800
.../bindings/devfreq/exynos-bus.txt | 2 -
arch/arm/boot/dts/exynos5420.dtsi | 34 ++--
arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 4 +
arch/arm/boot/dts/exynos5800-peach-pi.dts | 4 +
arch/arm/boot/dts/exynos5800.dtsi | 32 ++--
drivers/devfreq/exynos-bus.c | 153 +++++-------------
6 files changed, 78 insertions(+), 151 deletions(-)
--
2.22.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ 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