The length must be given as bytes and not as 4 bit tuples.
Signed-off-by: Jonas Rabenstein
---
v2:
- use fls64
- shorten loop body
---
block/sed-opal.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 36842bfa572e
Also the values of OPAL_UID_LENGTH and OPAL_METHOD_LENGTH are the same,
it is weird to use OPAL_UID_LENGTH for the definition of the methods.
Signed-off-by: Jonas Rabenstein
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 945f4b8610e0..5aa41744b8f1 100644
--- a/block/sed-opal.c
+++ b
--
Jonas Rabenstein (11):
block: sed-opal: use correct macro for method length
block: sed-opal: unify space check in add_token_*
block: sed-opal: unify cmd start and finalize
block: sed-opal: unify error handling of responses
block: sed-opal: print failed function address
block: sed-opal
Add function address (and if available its symbol) to the message if a
step function fails.
Signed-off-by: Jonas Rabenstein
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 30f6e46518a6..9b6f14e7aeb1 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -394,8 +394,8 @@ static int next
Split the header generation from the (normal) memcpy part if a
bytestring is copied into the command buffer. This allows in-place
generation of the bytestring content. For example, copy_from_user may be
used without an intermediate buffer.
Signed-off-by: Jonas Rabenstein
diff --git a/block/sed
Instead of having multiple places defining the same argument list to get
a specific column of a sed-opal table, provide a generic version and
call it from those functions.
Signed-off-by: Jonas Rabenstein
diff --git a/block/opal_proto.h b/block/opal_proto.h
index e20be8258854..b6e352cfe982
Every opal-sed table is described in the OPAL_TABLE_TABLE. Provide a
function to get desired metadata information out of that table.
Signed-off-by: Jonas Rabenstein
diff --git a/block/opal_proto.h b/block/opal_proto.h
index b6e352cfe982..5e8df3245eb0 100644
--- a/block/opal_proto.h
+++ b/block
Check whether the shadow mbr does fit in the provided space on the
target. Also a proper firmware should handle this case and return an
error we may prevent problems or even damage with crappy firmwares.
Signed-off-by: Jonas Rabenstein
diff --git a/block/sed-opal.c b/block/sed-opal.c
index
Allow modification of the shadow mbr. If the shadow mbr is not marked as
done, this data will be presented read only as the device content. Only
after marking the shadow mbr as done and unlocking a locking range the
actual content is accessible.
Signed-off-by: Jonas Rabenstein
diff --git a
enable the feature if it is already enabled
and one only wants to mark the shadow mbr as done.
Signed-off-by: Jonas Rabenstein
diff --git a/block/sed-opal.c b/block/sed-opal.c
index fc10f81d4892..2c8baff8bf67 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -1988,13 +1988,39 @@ static int
Also response_get_token had already been in place, its functionality had
been duplicated within response_get_{u64,bytestring} with the same error
handling. Unify the handling by reusing response_get_token within the
other functions.
Signed-off-by: Jonas Rabenstein
diff --git a/block/sed-opal.c
functions and thus must not be additionally added.
Signed-off-by: Jonas Rabenstein
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 771b4cfff95c..efe5d2a7f3dc 100644
--- a/block/sed-opal.c
+++ b/block/sed-opal.c
@@ -656,6 +656,9 @@ static int cmd_finalize(struct opal_dev *cmd, u32 hsn, u32
All add_token_* functions have a common set of conditions that have to
be checked. Use a common function for those checks in order to avoid
different behaviour as well as code duplication.
Signed-off-by: Jonas Rabenstein
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 5aa41744b8f1
On Mon, Mar 19, 2018 at 08:52:24PM +0100, Christoph Hellwig wrote:
> On Mon, Mar 19, 2018 at 07:36:50PM +0100, Jonas Rabenstein wrote:
> > Allow modification of the shadow mbr. If the shadow mbr is not marked as
> > done, this data will be presented read only as the device content.
On Mon, Mar 19, 2018 at 09:01:51PM +0100, Christoph Hellwig wrote:
> On Mon, Mar 19, 2018 at 07:36:53PM +0100, Jonas Rabenstein wrote:
> > Check whether the shadow mbr does fit in the provided space on the
> > target. Also a proper firmware should handle this case and return an
&
On Tue, Mar 20, 2018 at 04:09:08PM -0600, Scott Bauer wrote:
> On Tue, Mar 20, 2018 at 10:36:04AM +0100, Jonas Rabenstein wrote:
> > On Mon, Mar 19, 2018 at 08:52:24PM +0100, Christoph Hellwig wrote:
> > > On Mon, Mar 19, 2018 at 07:36:50PM +0100, Jonas Rabenstein wrote:
> >
On Wed, Mar 07, 2018 at 04:24:29PM -0700, Scott Bauer wrote:
> On Wed, Mar 07, 2018 at 05:55:56PM +0100, Jonas Rabenstein wrote:
> > The length must be given as bytes and not as 4 bit tuples.
> >
> > Signed-off-by: Jonas Rabenstein
> > ---
> > v2:
> >
,
Jonas
[0] https://lkml.org/lkml/2018/3/7/534
[1] https://github.com/ghostav/sed-opal-temp
Jonas Rabenstein (8):
block: sed-opal: use correct macro for method length
block: sed-opal: unify space check in add_token_*
block: sed-opal: unify cmd start and finalize
block: sed-opal: unify error
Split the header generation from the (normal) memcpy part if a
bytestring is copied into the command buffer. This allows in-place
generation of the bytestring content. For example, copy_from_user may be
used without an intermediate buffer.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c
Every step starts with resetting the cmd buffer as well as the comid and
constructs the appropriate OPAL_CALL command. Consequently, those
actions may be combined into one generic function.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 243
enable the feature if it is already enabled
and one only wants to mark the shadow mbr as done.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 33 +++--
include/linux/sed-opal.h | 1 +
include/uapi/linux/sed-opal.h | 1 +
3 files changed, 33
Also response_get_token had already been in place, its functionality had
been duplicated within response_get_{u64,bytestring} with the same error
handling. Unify the handling by reusing response_get_token within the
other functions.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 28
Allow modification of the shadow mbr. If the shadow mbr is not marked as
done, this data will be presented read only as the device content. Only
after marking the shadow mbr as done and unlocking a locking range the
actual content is accessible.
Signed-off-by: Jonas Rabenstein
---
block/sed
also the values of OPAL_UID_LENGTH and OPAL_METHOD_LENGTH are the same,
it is weird to use OPAL_UID_LENGTH for the definition of the methods.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/sed-opal.c b/block/sed
add function address (and if available its symbol) to the message if a
step function fails.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 5a448a3ba1df..f7925e6f607c 100644
All add_token_* functions have a common set of conditions that have to
be checked. Use a common function for those checks in order to avoid
different behaviour.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 25 -
1 file changed, 16 insertions(+), 9 deletions
Allow modification of the shadow mbr. If the shadow mbr is not marked as
done, this data will be presented read only as the device content. Only
after marking the shadow mbr as done and unlocking a locking range the
actual content is accessible.
Signed-off-by: Jonas Rabenstein
---
block/sed
instead of having multiple places defining the same argument list to get
a specific column of a sed-opal table, provide a generic version and
call it from those functions.
Signed-off-by: Jonas Rabenstein
---
block/opal_proto.h | 2 +
block/sed-opal.c | 130
practice for such an situation but hope it is okay like this.
Also the userspace exported pointer is replaced with an u64 value.
Jonas Rabenstein (4):
block: sed-opal: ioctl for writing to shadow mbr
block: sed-opal: unify retrieval of table columns
block: sed-opal: get metadata about opal-sed
Check whether the shadow mbr does fit in the provided space on the
target. Also a proper firmware should handle this case and return an
error we may prevent problem with crappy firmwares.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 14 ++
1 file changed, 14 insertions
Every opal-sed table is described in the OPAL_TABLE_TABLE. Provide a
function to get desired information out of that table.
Signed-off-by: Jonas Rabenstein
---
block/opal_proto.h | 16
block/sed-opal.c | 25 +
2 files changed, 41 insertions(+)
diff
Every step starts with resetting the cmd buffer as well as the comid and
constructs the appropriate OPAL_CALL command. Consequently, those
actions may be combined into one generic function.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 250
The length must be given as bytes and not as 4 bit tuples.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 36842bfa572e..d5f565e1557a 100644
--- a/block/sed-opal.c
+++ b/block/sed
Tokens are prefixed by a variable length of bytes. If a bytestring is
not stored in an tiny or short atom, we have to skip more than one byte
in order to have the actual bytes not prefixed by the bytes describing
the actual length of the string.
Signed-off-by: Jonas Rabenstein
---
block/sed
Hi,
On Wed, Mar 21, 2018 at 02:43:21AM +0100, Jonas Rabenstein wrote:
> On Tue, Mar 20, 2018 at 04:09:08PM -0600, Scott Bauer wrote:
> > On Tue, Mar 20, 2018 at 10:36:04AM +0100, Jonas Rabenstein wrote:
> > > On Mon, Mar 19, 2018 at 08:52:24PM +0100, Christoph Hellwig wrote:
>
The documentation comment for vfp_notifier misspelled
THREAD_NOTIFY_SWITCH as THREAD_NOFTIFY_SWITCH.
Signed-off-by: Jonas Rabenstein
---
arch/arm/vfp/vfpmodule.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index
file list depending on always-yes CONFIG_SMP in
arch/arm64/kernel/Makefile.
Signed-off-by: Jonas Rabenstein
---
I found this inconsistency using the undertaker and
undertaker-checkpatch tools (https://undertaker.cs.fau.de/).
arch/arm64/kernel/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --
Commit 4b3dc9679cf7 ("arm64: force CONFIG_SMP=y and remove redundant
#ifdefs") removed UP_LATE_INIT from Kconfig, as it had !SMP as dependency
and therfore can not be selected anymore.
Remove dead #ifdef-block depending on UP_LATE_INIT in
arch/arm64/kernel/setup.c
Signed-off-by: Jonas
e rule for arm-exynos-cpufreq.o from
drivers/cpufreq/Makefile, which - if selectable - would generate an
always empty objectfile.
Signed-off-by: Jonas Rabenstein
---
I found this inconsistency using the undertaker and
undertaker-checkpatch tools (https://undertaker.cs.fau.de/).
drivers/cpufre
ned-off-by: Jonas Rabenstein
---
I found this inconsistency using the undertaker and
undertaker-checkpatch tools (https://undertaker.cs.fau.de/).
drivers/cpufreq/Makefile | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index bbc4a9f..958be2b 10
CONFIG_ARCH_OMAP2PLUS within that directory are superfluous and can
be removed.
Signed-off-by: Jonas Rabenstein
---
arch/arm/mach-omap2/Makefile | 2 +-
arch/arm/mach-omap2/soc.h| 119 ++-
2 files changed, 6 insertions(+), 115 deletions(-)
diff --git a/arch/arm
CONFIG_ARCH_OMAP2PLUS within that directory are superfluous and can
be removed.
Signed-off-by: Jonas Rabenstein
---
changes in v2:
* missed two #endif's
arch/arm/mach-omap2/Makefile | 2 +-
arch/arm/mach-omap2/soc.h| 121 +++
2 files changed, 8 insertions(+)
From: Jonas Rabenstein
The directory arch/arm/mach-omap2 is only selected for compilation if
CONFIG_ARCH_OMAP2PLUS is selected. CONFIG_ARCH_OMAP2PLUS itself is a
silent option and all machines selecting this option are multiplatform
devices. As a consequence checks for CONFIG_ARCH_MULTIPLATFORM
From: Jonas Rabenstein
This patchset removes three unreferenced and unused header files of the ia64
architecture. Also some #include directives would resolve to the files I propose
for removal, the dependencies defined by kconfig for those files do not allow
their usage together with ia64.
I
From: Jonas Rabenstein
The file arch/ia64/include/asm/idle.h can not be included by any file
and as a consequence may be removed from the source tree.
Currently five files have #includes for asm/idle.h:
drivers/cpufreq/loongson2_cpufreq.c:
depends on LOONGSON2 (mips)
drivers/cpuidle
From: Jonas Rabenstein
The file arch/ia64/include/asm/mc146818rtc.h is not used anymore. It
would be included by include/linuxmc146818rtc.h which in fact is
included by the following files:
* sound/core/rtctimer.c:
depends on SND_RTCTIMER -> RTC -> !IA64
* drivers/char/n
From: Jonas Rabenstein
The file arch/ia64/include/asm/segment.h contains only a comment that it
is still in the source tree as it may be referenced from some files.
Actually only 2 files that are not in an arch/* directory include
.
The first is drivers/lguest/x86/switcher_32.S and obviously is
I found that the documentation of the flags section is some how
different from the actual format used and expected by the perf
tools. In this patch the according section of the file format
documentation is updated to conform to the expectations of the
perf tool suite.
Signed-off-by: Jonas
The content of this feature header is a perf_header_string_list of
the argument vector and not a perf_header_string of the commandline.
Acked-by: Jiri Olsa
Signed-off-by: Jonas Rabenstein
---
tools/perf/Documentation/perf.data-file-format.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion
According to the current documentation the flags section is placed after
the file header itself but the code assumes to find the flags section
after the data section. This change updates the documentation to that
assumption.
Acked-by: Jiri Olsa
Signed-off-by: Jonas Rabenstein
---
tools/perf
Whenever a callchain shall be printed search for each address whether
inline information is available and add those symbols to the output
if symbol_conf.inline_name is enabled.
Signed-off-by: Jonas Rabenstein
---
tools/perf/util/evsel_fprintf.c | 46 +
1 file
separate function.
I hope to expand my work to perf-report but thought it might be usefull
to get already early feedback on those patches.
Thank you,
Jonas
Jonas Rabenstein (2):
perf evsel: split sample__fprintf_callchain in output and iteration
perf evsel: add inline functions to sample
Split the iteration over the callchain and the actual output of an
link in the callchain into separate functions. This allows to reuse
the output function in a follow up patch to add inline symbols to
the output.
Signed-off-by: Jonas Rabenstein
---
tools/perf/util/evsel_fprintf.c | 111
On Tue, Feb 19, 2019 at 07:38:10PM +0100, Jonas Rabenstein wrote:
> Whenever a callchain shall be printed search for each address whether
> inline information is available and add those symbols to the output
> if symbol_conf.inline_name is enabled.
>
> Signed-off-by: J
Whenever a callchain shall be printed search for each address whether
inline information is available and add those symbols to the output
if symbol_conf.inline_name is enabled.
Signed-off-by: Jonas Rabenstein
---
v2:
- fix handling of static binaries
tools/perf/util/evsel_fprintf.c | 55
Allow modification of the shadow mbr. If the shadow mbr is not marked as
done, this data will be presented read only as the device content. Only
after marking the shadow mbr as done and unlocking a locking range the
actual content is accessible.
Co-authored-by: David Kozub
Signed-off-by: Jonas
enable the feature if it is already enabled
and one only wants to mark the shadow mbr as done.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 33 +++--
include/linux/sed-opal.h | 1 +
include/uapi/linux/sed-opal.h | 1 +
3 files changed, 33
Also the values of OPAL_UID_LENGTH and OPAL_METHOD_LENGTH are the same,
it is weird to use OPAL_UID_LENGTH for the definition of the methods.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/sed-opal.c b/block/sed
Split the header generation from the (normal) memcpy part if a
bytestring is copied into the command buffer. This allows in-place
generation of the bytestring content. For example, copy_from_user may be
used without an intermediate buffer.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c
Instead of having multiple places defining the same argument list to get
a specific column of a sed-opal table, provide a generic version and
call it from those functions.
Signed-off-by: Jonas Rabenstein
---
block/opal_proto.h | 2 +
block/sed-opal.c | 132
Add function address (and if available its symbol) to the message if a
step function fails.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 1332547e5a99..4225f23b2165 100644
All add_token_* functions have a common set of conditions that have to
be checked. Use a common function for those checks in order to avoid
different behaviour as well as code duplication.
Co-authored-by: David Kozub
Signed-off-by: Jonas Rabenstein
Signed-off-by: David Kozub
---
block/sed
Check whether the shadow mbr does fit in the provided space on the
target. Also a proper firmware should handle this case and return an
error we may prevent problems or even damage with crappy firmwares.
Signed-off-by: Jonas Rabenstein
---
block/opal_proto.h | 16
block/sed
In __hists__add_entry the srcline of the addr_location is duplicated
for the hist_entry. If hists__findnew_entry returns an already existing
hist_entry the srcline has to be freed again as no further reference to
that duplicated srcline would exists anymore.
Signed-off-by: Jonas Rabenstein
On Thu, Feb 21, 2019 at 01:39:09PM +0100, Jiri Olsa wrote:
> On Thu, Feb 21, 2019 at 01:23:06PM +0100, Jonas Rabenstein wrote:
> > In __hists__add_entry the srcline of the addr_location is duplicated
> > for the hist_entry. If hists__findnew_entry returns an already existing
>
Inlined symbols should always be added to the dso's inlined_nodes tree
in order to reuse them for a later lookup for the same address. Instead
of repeating those steps at the different users, provide a central
method to lookup and register inline symbols for a map.
Signed-off-by: Jonas Raben
Use map__inlines to resolve inlined functions for every entry with
an symbol that should be added to a callchain.
Signed-off-by: Jonas Rabenstein
---
tools/perf/util/machine.c | 115 --
1 file changed, 87 insertions(+), 28 deletions(-)
diff --git a/tools
The previous patch provides a generic way to lookup the root node of the
inlined symbols for a specific address. Reuse that implementation
instead of a duplicated version of the required steps.
Signed-off-by: Jonas Rabenstein
---
tools/perf/util/machine.c | 15 ++-
1 file changed, 2
he
88.80% 'Self' are not accounted to main itself but split up for the
inlined baz, bar and foo symbols.
I'm open to any help as well as feedback,
Jonas
[1] https://www.spinics.net/lists/linux-perf-users/msg07792.html
[2] https://www.spinics.net/lists/linux-perf-users/msg07798.html
On Sat, Feb 23, 2019 at 01:21:34PM +0900, Namhyung Kim wrote:
> Hello,
>
> On Fri, Feb 22, 2019 at 1:07 AM Jonas Rabenstein
> wrote:
> >
> > Use map__inlines to resolve inlined functions for every entry with
> > an symbol that should be added to a callchain
On Mon, Feb 18, 2019 at 12:22:46AM +0100, Jiri Olsa wrote:
> On Fri, Feb 15, 2019 at 07:28:23PM +0100, Jonas Rabenstein wrote:
> > I found that the documentation of the flags section is some how
> > different from the actual format used and expected by the perf
> > too
The content of this feature header is a perf_header_string_list of
the argument vector and not a perf_header_string of the commandline.
---
tools/perf/Documentation/perf.data-file-format.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Documentation/perf.data-file
According to the current documentation the flags section is placed after
the file header itself but the code assumes to find the flags section
after the data section. This change updates the documentation to that
assumption.
---
tools/perf/Documentation/perf.data-file-format.txt | 9 -
1 f
CONFIG_MMU in proc-v7-3level.S are superfluous.
Signed-off-by: Jonas Rabenstein
---
I detected the issue with chimaera, a tool I currently develop for my bachelor
thesis extending the undertaker tool suite (https://undertaker.cs.fau.de).
arch/arm/mm/proc-v7-3level.S | 4
1 file changed, 4
On Tue, Mar 29, 2016 at 10:05:58AM +0200, Arnd Bergmann wrote:
> On Tuesday 29 March 2016 09:37:51 Jonas Rabenstein wrote:
> > The file arch/arm/mm/proc-v7-3level.S is only used by the #include
> > directive in arch/arm/mm/proc-v7.S:23. This #include is conditional and
nd may not selected for the same reasons.
Signed-off-by: Jonas Rabenstein
---
I detected the issue with chimaera, a tool I currently develop for my bachelor
thesis extending the undertaker tool suite (https://undertaker.cs.fau.de).
arch/arm/kernel/vmlinux-xip.
nd may not selected for the same reasons.
Signed-off-by: Jonas Rabenstein
---
Changes in v2:
- do not remove CONFIG_CPU_HOTPLUG related parts
- send a patch with one missing item in the first place (line 36)
arch/arm/kernel/vmlinux-xip.lds.S | 73 +--
1 file
The length must be given as bytes and not as 4 bit tuples.
Signed-off-by: Jonas Rabenstein
---
block/sed-opal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/sed-opal.c b/block/sed-opal.c
index 36842bfa572e..d5f565e1557a 100644
--- a/block/sed-opal.c
+++ b/block/sed
Tokens are prefixed by a variable length of bytes. If a bytestring is
not stored in an tiny or short atom, we have to skip more than one byte
in order to have the actual bytes not prefixed by the bytes describing
the actual length of the string.
Signed-off-by: Jonas Rabenstein
---
block/sed
Commit-ID: 7a663c0ff330a068c088ad46bb0130e651a9fec3
Gitweb: https://git.kernel.org/tip/7a663c0ff330a068c088ad46bb0130e651a9fec3
Author: Jonas Rabenstein
AuthorDate: Tue, 19 Feb 2019 16:45:14 +0100
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 19 Feb 2019 13:39:08 -0300
perf doc
Commit-ID: 8c23a522388b34cd7bc8473987eda0c75eb37c0e
Gitweb: https://git.kernel.org/tip/8c23a522388b34cd7bc8473987eda0c75eb37c0e
Author: Jonas Rabenstein
AuthorDate: Tue, 19 Feb 2019 16:45:15 +0100
Committer: Arnaldo Carvalho de Melo
CommitDate: Tue, 19 Feb 2019 13:39:12 -0300
perf doc
81 matches
Mail list logo