[PATCH v3 5/9] mtd: nand: davinci: move bindings under mtd

2013-12-05 Thread Ivan Khoronzhuk
Move bindings under mtd. Do this in order to make davinci-nand driver usable by keystone architecture. Acked-by: Santosh Shilimkar Reviewed-by: Grygorii Strashko Reviewed-by: Taras Kondratiuk Signed-off-by: Ivan Khoronzhuk --- .../{arm/davinci/nand.txt => mtd/davinci-nand.txt} |0 1 f

[PATCH v3 4/9] mtd: nand: davinci: simplify error handling

2013-12-05 Thread Ivan Khoronzhuk
There is not needed to use a lot of names for err handling. It complicates code support and reading. Acked-by: Santosh Shilimkar Reviewed-by: Grygorii Strashko Reviewed-by: Taras Kondratiuk Signed-off-by: Ivan Khoronzhuk --- drivers/mtd/nand/davinci_nand.c | 46

[PATCH v3 0/9] Reuse davinci-nand driver for Keystone arch

2013-12-05 Thread Ivan Khoronzhuk
ified changeset description - mtd: nand: davinci: reuse driver for Keystone arch removed "ti,keystone-nand" compatible from driver Ivan Khoronzhuk (9): mtd: nand: davinci: fix driver registration mtd: nand: davinci: return ENOMEM if memory allocation is failed mtd: nand:

[PATCH v3 2/9] mtd: nand: davinci: return ENOMEM if memory allocation is failed

2013-12-05 Thread Ivan Khoronzhuk
In case when memory allocation is failed the driver should return ENOMEM instead of ENODEV. Reviewed-by: Grygorii Strashko Reviewed-by: Taras Kondratiuk Signed-off-by: Ivan Khoronzhuk --- drivers/mtd/nand/davinci_nand.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH v3 3/9] mtd: nand: davinci: check required ti,davinci-chipselect property

2013-12-05 Thread Ivan Khoronzhuk
The property "ti,davinci-chipselect" is required. So we have to check if it is set. Reviewed-by: Grygorii Strashko Reviewed-by: Taras Kondratiuk Signed-off-by: Ivan Khoronzhuk --- drivers/mtd/nand/davinci_nand.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/driver

[PATCH v3 8/9] mtd: nand: davinci: reuse driver for Keystone arch

2013-12-05 Thread Ivan Khoronzhuk
The Keystone arch has compatible nand device, so reuse it. In case with Keystone it depends on TI_AEMIF because AEMIF driver is responsible to set timings. See http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf Reviewed-by: Grygorii Strashko Reviewed-by: Taras Kondratiuk Signed-off-by: Ivan

[PATCH v3] ARM: davinci: aemif: get rid of davinci-nand driver dependency on aemif

2013-12-05 Thread Ivan Khoronzhuk
Nori Signed-off-by: Ivan Khoronzhuk --- v3..v2: - rebased on following patch series: [PATCH v3 0/9] Reuse davinci-nand driver for Keystone arch http://www.spinics.net/lists/arm-kernel/msg291723.html - removed AEMIF setup from next boards: arch/arm/mach-davinci/board-dm355-

[Patch v2] nand: davinci: add support for 4K page size nand devices

2014-08-19 Thread Ivan Khoronzhuk
From: Sandeep Paulraj It is needed for k2l keystone2 EVM which uses NAND flash with 4K page size, hence add support for 4K page size nand devices. Signed-off-by: Sandeep Paulraj Signed-off-by: Ivan Khoronzhuk --- Based on l2-mtd/master v1..v2: - fixed comment style, no functional changes

Re: [Patch v2] nand: davinci: add support for 4K page size nand devices

2015-07-20 Thread Ivan Khoronzhuk
On 20.07.15 20:32, Brian Norris wrote: On Tue, Aug 19, 2014 at 03:31:54PM +0300, Ivan Khoronzhuk wrote: From: Sandeep Paulraj It is needed for k2l keystone2 EVM which uses NAND flash with 4K page size, hence add support for 4K page size nand devices. Signed-off-by: Sandeep Paulraj Signed

[Patch] firmware: dmi_scan: split dmisubsystem from dmi-sysfs

2015-03-16 Thread Ivan Khoronzhuk
roposed by Jean Delvare. Signed-off-by: Ivan Khoronzhuk --- This patch is logical continuation of "[dmidecode] [Patch v4] firmware: dmi-sysfs: add SMBIOS entry point area attribute" https://lkml.org/lkml/2015/2/4/475 Pay attention that this includes /sys/firmware/dmi for holding ta

Re: [Patch v4] firmware: dmi-sysfs: add SMBIOS entry point area attribute

2015-02-10 Thread Ivan Khoronzhuk
Hi Matt, On 02/04/2015 07:06 PM, Ivan Khoronzhuk wrote: Some utils, like dmidecode and smbios, need to access SMBIOS entry table area in order to get information like SMBIOS version, size, etc. Currently it's done via /dev/mem. But for situation when /dev/mem usage is disabled, the utils

[Patch v2] firmware: dmi_scan: fix dmi scan to handle "End of Table" structure

2015-02-04 Thread Ivan Khoronzhuk
sizes. So move "end-of-table" check after it's handled by decode. Signed-off-by: Ivan Khoronzhuk --- v2..v1: Move end of table check after it's handled instead of removing Correct commit drivers/firmware/dmi_scan.c | 13 +++-- 1 file changed, 7

[Patch v4] firmware: dmi-sysfs: add SMBIOS entry point area attribute

2015-02-04 Thread Ivan Khoronzhuk
ent SMBIOS entry. So this patch adds SMBIOS area to dmi-sysfs in order to allow utils in question to work correctly with dmi sysfs interface. Reviewed-by: Ard Biesheuvel Signed-off-by: Ivan Khoronzhuk --- v1: https://lkml.org/lkml/2015/1/23/643 v2: https://lkml.org/lkml/2015/1/26/345 v3: https://lkm

Re: [Patch v3] firmware: dmi-sysfs: add SMBIOS entry point area raw attribute

2015-02-03 Thread Ivan Khoronzhuk
On 02/03/2015 12:49 PM, Matt Fleming wrote: On Wed, 28 Jan, at 05:56:25PM, Ivan Khoronzhuk wrote: diff --git a/drivers/firmware/dmi-sysfs.c b/drivers/firmware/dmi-sysfs.c index e0f1cb3..61b6a38 100644 --- a/drivers/firmware/dmi-sysfs.c +++ b/drivers/firmware/dmi-sysfs.c @@ -29,6 +29,8

Re: [Patch v3] firmware: dmi-sysfs: add SMBIOS entry point area raw attribute

2015-02-03 Thread Ivan Khoronzhuk
Hi, Mark On 02/03/2015 04:58 PM, Mark Salter wrote: On Wed, 2015-01-28 at 14:39 +0200, Ivan Khoronzhuk wrote: Some utils, like dmidecode and smbios, needs to access SMBIOS entry table area in order to get information like SMBIOS version, size, etc. Currently it's done via /dev/mem. Bu

[Patch] firmware: dmi_scan: fix dmi scan to handle "End of Table" structure

2015-02-04 Thread Ivan Khoronzhuk
ntry sizes. Of-course, it can be handled in newly introduced libdmifs by adding end entry virtually, but it's brake backward compatibility and don't correspond to SMBIOS DMI table size read from SMBIOS entry point structure. Signed-off-by: Ivan Khoronzhuk --- drivers/firmware/dmi_scan.c |

Re: [Patch] firmware: dmi_scan: fix dmi scan to handle "End of Table" structure

2015-02-04 Thread Ivan Khoronzhuk
On 02/04/2015 04:04 PM, Ard Biesheuvel wrote: On 4 February 2015 at 13:57, Ivan Khoronzhuk wrote: The dmi-sysfs should create "End of Table" entry, that is type 127. But after adding initial SMBIOS v3 support the 127-0 entry is not handled any more, as result it's not created

[Patch 3/3] firmware: dmi_scan: use full dmi version for SMBIOS3

2015-02-11 Thread Ivan Khoronzhuk
omparing, and it's obvious that 0x000208 is less than 0x030201 for example. Signed-off-by: Ivan Khoronzhuk --- drivers/firmware/dmi_scan.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c index 952e95c..e

[Patch 2/3] firmware: dmi_scan: fix dmi_len type

2015-02-11 Thread Ivan Khoronzhuk
n that moment I cannot imagine dmi structure count more than 65535 and it can require changing type of vars that work with it. So I didn't correct it. Signed-off-by: Ivan Khoronzhuk --- drivers/firmware/dmi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/f

[Patch 1/3] firmware: dmi_scan: use direct access to static vars

2015-02-11 Thread Ivan Khoronzhuk
There is no reason to pass static vars to function that can use only them. The dmi_table() can use only dmi_len and dmi_num static vars, so use them directly. In this case we can freely change their type in one place and slightly decrease redundancy. Signed-off-by: Ivan Khoronzhuk --- drivers

[Patch 0/3] firmware: dmi_scan: add some SMBIOSv3 corrections

2015-02-11 Thread Ivan Khoronzhuk
This series adds corrections to dmi_scan: - extends version to be like 3.4.5 format - fix dmi_len to be 32 bit wide Ivan Khoronzhuk (3): firmware: dmi_scan: use direct access to static vars firmware: dmi_scan: fix dmi_len type firmware: dmi_scan: use full dmi version for SMBIOS3 drivers

Re: [Patch 3/3] firmware: dmi_scan: use full dmi version for SMBIOS3

2015-02-11 Thread Ivan Khoronzhuk
On 02/11/2015 11:55 AM, Ard Biesheuvel wrote: On 11 February 2015 at 17:46, Ivan Khoronzhuk wrote: New SMBIOS3 spec adds additional field for versioning - docrev. The docrev identifies the revision of a specification implemented in the table structures, so display SMBIOS version > 3 in for

Re: [Patch 2/3] firmware: dmi_scan: fix dmi_len type

2015-02-11 Thread Ivan Khoronzhuk
On 02/11/2015 11:53 AM, Ard Biesheuvel wrote: On 11 February 2015 at 17:46, Ivan Khoronzhuk wrote: According to SMBIOSv3 specification the length of DMI table can be up to 32bits wide. So use appropriate type to avoid overflow. It's obvious that dmi_num theoretically can be more tha

Re: [Patch v4] firmware: dmi-sysfs: add SMBIOS entry point area attribute

2015-02-11 Thread Ivan Khoronzhuk
On 02/11/2015 04:43 PM, Matt Fleming wrote: On Wed, 11 Feb, at 02:17:03PM, Matt Fleming wrote: On Tue, 10 Feb, at 11:51:44AM, Ivan Khoronzhuk wrote: If you are Ok with this patch, could you please pickup it? Applied, thanks Ivan! Btw this patch doesn't apply cleanly, the reject looks

Re: [Patch 2/3] firmware: dmi_scan: fix dmi_len type

2015-02-14 Thread Ivan Khoronzhuk
On 02/13/2015 06:12 PM, Matt Fleming wrote: On Wed, 11 Feb, at 06:12:59PM, Ard Biesheuvel wrote: Good point. Actually, I don't really see the need for patch #1, even if I agree that it would have been better to write it like you have in the first place. But leaving the dmi_len as u16 is clearly

Re: [Patch v3] firmware: dmi-sysfs: add SMBIOS entry point area raw attribute

2015-01-28 Thread Ivan Khoronzhuk
+ linux-...@vger.kernel.org + linux-...@vger.kernel.org On 01/28/2015 02:39 PM, Ivan Khoronzhuk wrote: Some utils, like dmidecode and smbios, needs to access SMBIOS entry table area in order to get information like SMBIOS version, size, etc. Currently it's done via /dev/mem. But for situ

[PATCH] firmware: efi: remove unneeded guid unparse

2015-01-29 Thread Ivan Khoronzhuk
There is no reason to translate guid number to string here. So remove it in order to not do unneeded work. Signed-off-by: Ivan Khoronzhuk --- drivers/firmware/efi/efi.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index 9035c1b

Re: [PATCH] firmware: efi: remove unneeded guid unparse

2015-01-29 Thread Ivan Khoronzhuk
Oh, sorry. Just didn't note that it's picked up from linaro list. On 01/29/2015 04:47 PM, Matt Fleming wrote: On Thu, 2015-01-29 at 16:35 +0200, Ivan Khoronzhuk wrote: There is no reason to translate guid number to string here. So remove it in order to not do unneeded work. Sig

Re: [Patch v2] firmware: dmi_scan: fix dmi scan to handle "End of Table" structure

2015-02-18 Thread Ivan Khoronzhuk
Hi, Matt Could you please pick up this patch. On 02/05/2015 12:36 PM, Ard Biesheuvel wrote: On 4 February 2015 at 14:22, Ivan Khoronzhuk wrote: The dmi-sysfs should create "End of Table" entry, that is type 127. But after adding initial SMBIOS v3 support the 127-0 entry is not h

[Patch v2 3/3] firmware: dmi_scan: use direct access to static vars

2015-02-18 Thread Ivan Khoronzhuk
There is no reason to pass static vars to function that can use only them. The dmi_table() can use only dmi_len and dmi_num static vars, so use them directly. In this case we can freely change their type in one place and slightly decrease redundancy. Signed-off-by: Ivan Khoronzhuk --- drivers

[Patch v2 0/3] firmware: dmi_scan: add some SMBIOSv3 corrections

2015-02-18 Thread Ivan Khoronzhuk
SMBIOS3 - use shifted dmi_ver var for all versions - display docrev version for 32 bit 3+ versions like 3.2.x - don't display docrev for versions < 3 firmware: dmi_scan: use direct access to static vars - move as the last patch and leave only correctio

[Patch v2 1/3] firmware: dmi_scan: fix dmi_len type

2015-02-18 Thread Ivan Khoronzhuk
n that moment I cannot imagine dmi structure count more than 65535 and it can require changing type of vars that work with it. So I didn't correct it. Acked-by: Ard Biesheuvel Signed-off-by: Ivan Khoronzhuk --- drivers/firmware/dmi_scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deleti

[Patch v2 2/3] firmware: dmi_scan: use full dmi version for SMBIOS3

2015-02-18 Thread Ivan Khoronzhuk
like "3.22.x" as we don't know the docrev. In other cases display version like it was. Signed-off-by: Ivan Khoronzhuk --- drivers/firmware/dmi_scan.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmw

Re: [Patch v2] firmware: dmi_scan: fix dmi scan to handle "End of Table" structure

2015-02-18 Thread Ivan Khoronzhuk
Ok, I'll correct commit msg like: But after adding initial SMBIOS v3 support (fc43026278b23b3515cf8f909ec29df94b3ae1a2) the 127-0 entry is nothandled any more, as result it's not created in sysfs. On 02/18/2015 03:04 PM, Matt Fleming wrote: On Wed, 04 Feb, at 04:22:05PM, Ivan

[Patch v3] firmware: dmi_scan: fix dmi scan to handle "End of Table" structure

2015-02-18 Thread Ivan Khoronzhuk
portant because the size of whole DMI table must correspond to sum of all DMI entry sizes. So move the end-of-table check after it's handled by dmi_table. Reviewed-by: Ard Biesheuvel Signed-off-by: Ivan Khoronzhuk --- v3..v2: Include regression commit in commit msg v2..v1:

Re: [Patch v2] firmware: dmi_scan: fix dmi scan to handle "End of Table" structure

2015-02-18 Thread Ivan Khoronzhuk
On 02/18/2015 03:38 PM, Matt Fleming wrote: On 18 February 2015 at 13:20, Ivan Khoronzhuk wrote: Ok, I'll correct commit msg like: But after adding initial SMBIOS v3 support (fc43026278b23b3515cf8f909ec29df94b3ae1a2) the 127-0 entry is nothandled any more, as result it's not create

Re: [PATCH bpf-next 2/8] samples: bpf: Makefile: remove target for native build

2019-09-06 Thread Ivan Khoronzhuk
On Fri, Sep 06, 2019 at 04:31:39PM -0700, Alexei Starovoitov wrote: On Thu, Sep 05, 2019 at 12:22:06AM +0300, Ivan Khoronzhuk wrote: No need to set --target for native build, at least for arm, the default target will be used anyway. In case of arm, for at least clang 5 - 10 it causes error like

Re: [PATCH bpf-next 2/8] samples: bpf: Makefile: remove target for native build

2019-09-06 Thread Ivan Khoronzhuk
On Fri, Sep 06, 2019 at 05:04:08PM -0700, Alexei Starovoitov wrote: On Fri, Sep 6, 2019 at 4:52 PM Ivan Khoronzhuk wrote: On Fri, Sep 06, 2019 at 04:31:39PM -0700, Alexei Starovoitov wrote: >On Thu, Sep 05, 2019 at 12:22:06AM +0300, Ivan Khoronzhuk wrote: >> No need to set --target f

Re: [PATCH bpf-next 8/8] samples: bpf: Makefile: base progs build on Makefile.progs

2019-09-06 Thread Ivan Khoronzhuk
On Fri, Sep 06, 2019 at 04:34:31PM -0700, Alexei Starovoitov wrote: On Thu, Sep 05, 2019 at 12:22:12AM +0300, Ivan Khoronzhuk wrote: + +If need to use environment of target board, the SYSROOT also can be set, +pointing on FS of target board: + +make samples/bpf/ LLC=~/git/llvm/build/bin/llc

[PATCH bpf-next 03/11] samples: bpf: makefile: use --target from cross-compile

2019-09-10 Thread Ivan Khoronzhuk
For cross compiling the target triple can be inherited from cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile. So copy-paste this decision from kernel Makefile. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH bpf-next 01/11] samples: bpf: makefile: fix HDR_PROBE "echo"

2019-09-10 Thread Ivan Khoronzhuk
echo should be replaced on echo -e to handle \n correctly, but instead, replace it on printf as some systems can't handle echo -e. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/Makefile b/sample

[PATCH bpf-next 11/11] samples: bpf: makefile: add sysroot support

2019-09-10 Thread Ivan Khoronzhuk
ts headers ofc. Useful when working with NFC or virtual machine. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 5 + samples/bpf/README.rst | 10 ++ 2 files changed, 15 insertions(+) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 4edc5232cfc1..68ba78d1d

[PATCH bpf-next 10/11] libbpf: makefile: add C/CXX/LDFLAGS to libbpf.so and test_libpf targets

2019-09-10 Thread Ivan Khoronzhuk
. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 8 +++- tools/lib/bpf/Makefile | 11 --- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 79c9aa41832e..4edc5232cfc1 100644 --- a/samples/bpf/Makefile +++ b

[PATCH bpf-next 08/11] samples: bpf: makefile: base progs build on makefile.progs

2019-09-10 Thread Ivan Khoronzhuk
samples/bpf progs with CC while auxialry tools running on host built with HOSTCC. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 138 +++ 1 file changed, 73 insertions(+), 65 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile

[PATCH bpf-next 05/11] samples: bpf: makefile: use D vars from KBUILD_CFLAGS to handle headers

2019-09-10 Thread Ivan Khoronzhuk
The kernel headers are reused from samples bpf, and autoconf.h is not enough to reflect complete arch configuration for clang. But CLANG-bpf cmds are sensitive for assembler part taken from linux headers and -D vars, usually used in CFLAGS, should be carefully added for each arch. For that, for CLA

[PATCH bpf-next 06/11] samples: bpf: makefile: drop unnecessarily inclusion for bpf_load

2019-09-10 Thread Ivan Khoronzhuk
Drop inclusion for bpf_load -I$(objtree)/usr/include as it is included for all objects anyway, with above line: KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf

[PATCH bpf-next 09/11] samples: bpf: makefile: use CC environment for HDR_PROBE

2019-09-10 Thread Ivan Khoronzhuk
No need in hacking HOSTCC to be cross-compiler any more, so drop this trick and use CC for HDR_PROBE Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 625a71f2e9d2

[PATCH bpf-next 07/11] samples: bpf: add makefile.prog for separate CC build

2019-09-10 Thread Ivan Khoronzhuk
le.host. This allows later add cross-compilation to samples/bpf with minimum changes. Makefile.prog contains only stuff needed for samples/bpf, potentially can be reused and extended for other prog sets later and now needed only for unblocking tricky samples/bpf cross compilation. Signed-off

[PATCH bpf-next 00/11] samples: bpf: improve/fix cross-compilation

2019-09-10 Thread Ivan Khoronzhuk
obj build" - limited -D option filter only for arm - improved comments - added couple instructions to verify cross compilation for arm and arm64 arches based on TI am57xx and am65xx sdks. - corrected include a little order Ivan Khoronzhuk (11): samples: bpf: makefile: fix HDR_PROBE "echo

[PATCH bpf-next 02/11] samples: bpf: makefile: fix cookie_uid_helper_example obj build

2019-09-10 Thread Ivan Khoronzhuk
t. So correct it, as it breaks cross-compiling at least. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index f50ca852c2a8..43dee90dffa4 100644 --- a/samples/bpf/Makefile +++ b/samples

[PATCH bpf-next 04/11] samples: bpf: use own EXTRA_CFLAGS for clang commands

2019-09-10 Thread Ivan Khoronzhuk
It can overlap with CFLAGS used for libraries built with gcc if not now then in next patches. Correct it here for simplicity. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf

[PATCH RFC bpf-next 08/10] samples: bpf: Makefile: base progs build on Makefile.progs

2019-08-29 Thread Ivan Khoronzhuk
It's also convenient when debug is with NFC. To cross-compile I've used: export ARCH=arm export CROSS_COMPILE=arm-linux-gnueabihf- make -j4 samples/bpf/ SYSROOT="path/to/sysroot" Sysroot contains correct headers installed ofc. Signed-off-by: Ivan Khoronzhuk --- sam

[PATCH RFC bpf-next 00/10] improve/fix cross-compilation for bpf samples

2019-08-29 Thread Ivan Khoronzhuk
Smth related not only for cross-compilation and can have impact on other archs and build environments, so might be good idea to verify it in order to add appropriate changes, some warn options can be tuned, so comment. Ivan Khoronzhuk (10): samples: bpf: Makefile: use --target from cross-co

[PATCH RFC bpf-next 02/10] samples: bpf: Makefile: remove target for native build

2019-08-29 Thread Ivan Khoronzhuk
better. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 61b7394b811e..a2953357927e 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -197,8 +197,6 @@ BTF_PAHOLE ?= pahole

[PATCH RFC bpf-next 06/10] samples: bpf: makefile: fix HDR_PROBE

2019-08-29 Thread Ivan Khoronzhuk
echo should be replace on echo -e to handle \n correctly, but instead, replace it on printf as some systems can't handle echo -e. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/Makefile b/sample

[PATCH RFC bpf-next 09/10] arm: include: asm: swab: mask rev16 instruction for clang

2019-08-29 Thread Ivan Khoronzhuk
/tc_l2_redirect_kern.o :1:2: error: invalid register/token name rev16 r3, r0 This decision is arguable, probably there is another way, but it doesn't have impact on samples/bpf, so it's easier just ignore it for clang, at least for now. Signed-off-by: Ivan Khoronzhuk --- arch/arm/include/asm/swab.h

[PATCH RFC bpf-next 04/10] samples: bpf: use own EXTRA_CFLAGS for clang commands

2019-08-29 Thread Ivan Khoronzhuk
It can overlap with CFLAGS used for libraries built with gcc if not now then in following patches. Correct it here for simplicity. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/bpf/Makefile b/samples

[PATCH RFC bpf-next 07/10] samples: bpf: add makefile.prog for separate CC build

2019-08-29 Thread Ivan Khoronzhuk
eded for samples/bpf, potentially can be reused and sophisticated for other prog sets later and now needed only for unblocking tricky samples/bpf cross compilation. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile.prog | 77 +++ 1 file changed, 77 insertions(+)

[PATCH RFC bpf-next 01/10] samples: bpf: Makefile: use --target from cross-compile

2019-08-29 Thread Ivan Khoronzhuk
For cross compiling the target triple can be inherited from cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile. So copy-paste this decision from kernel Makefile. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --

[PATCH RFC bpf-next 10/10] arm: include: asm: unified: mask .syntax unified for clang

2019-08-29 Thread Ivan Khoronzhuk
verified it on clang 5, 6 ,7, 8, 9, 10 as on native platform as for cross-compiling. This decision is arguable, but it doesn't have impact on samples/bpf so it's easier just ignore it for clang, at least for now... Signed-off-by: Ivan Khoronzhuk --- arch/arm/include/asm/unified.h | 6

[PATCH RFC bpf-next 03/10] libbpf: Makefile: add C/CXX/LDFLAGS to libbpf.so and test_libpf targets

2019-08-29 Thread Ivan Khoronzhuk
In case of LDFLAGS and EXTRA_CC flags there is no way to pass them correctly to build command, for instance when --sysroot is used or external libraries are used, like -lelf. In follow patches this is used for samples/bpf cross-compiling. Signed-off-by: Ivan Khoronzhuk --- tools/lib/bpf

[PATCH RFC bpf-next 05/10] samples: bpf: Makefile: use vars from KBUILD_CFLAGS to handle linux headers

2019-08-29 Thread Ivan Khoronzhuk
The kernel headers are reused from samples bpf, and autoconf.h is not enough to reflect complete configuration for clang. One of such configurations is __LINUX_ARM_ARCH__ min version used as instruction set selector. In another case an error like "SMP is not supported" for arm and others errors are

Re: [PATCH bpf-next 1/3] libbpf: add asm/unistd.h to xsk to get __NR_mmap2

2019-08-14 Thread Ivan Khoronzhuk
On Wed, Aug 14, 2019 at 03:32:24PM +0200, Björn Töpel wrote: On Wed, 14 Aug 2019 at 13:57, Ivan Khoronzhuk wrote: On Wed, Aug 14, 2019 at 12:24:05PM +0300, Ivan Khoronzhuk wrote: >On Tue, Aug 13, 2019 at 04:38:13PM -0700, Andrii Nakryiko wrote: > >Hi, Andrii > >>On Tue, Au

[PATCH bpf-next v2 0/3] xdpsock: allow mmap2 usage for 32bits

2019-08-15 Thread Ivan Khoronzhuk
e vmap along with page_address to avoid overkill - define mmap syscall trace5 for mmap if defined Ivan Khoronzhuk (3): libbpf: use LFS (_FILE_OFFSET_BITS) instead of direct mmap2 syscall xdp: xdp_umem: replace kmap on vmap for umem map samples: bpf: syscal_nrs: use mmap2 i

[PATCH bpf-next v2 2/3] xdp: xdp_umem: replace kmap on vmap for umem map

2019-08-15 Thread Ivan Khoronzhuk
block and should be used rather for dynamic mm. Signed-off-by: Ivan Khoronzhuk --- net/xdp/xdp_umem.c | 36 ++-- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/net/xdp/xdp_umem.c b/net/xdp/xdp_umem.c index a0607969f8c0..d740c4f8810c 100644 --- a/net

[PATCH bpf-next v2 3/3] samples: bpf: syscal_nrs: use mmap2 if defined

2019-08-15 Thread Ivan Khoronzhuk
For arm32 xdp sockets mmap2 is preferred, so use it if it's defined. Declaration of __NR_mmap can be skipped and it breaks build. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/syscall_nrs.c | 6 ++ samples/bpf/tracex5_kern.c | 13 + 2 files changed, 19 insertions(+)

[PATCH bpf-next v2 1/3] libbpf: use LFS (_FILE_OFFSET_BITS) instead of direct mmap2 syscall

2019-08-15 Thread Ivan Khoronzhuk
tems. Signed-off-by: Ivan Khoronzhuk --- tools/lib/bpf/Makefile | 1 + tools/lib/bpf/xsk.c| 49 -- 2 files changed, 15 insertions(+), 35 deletions(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index 9312066a1ae3..844f6cd79c03 100644 --- a/t

Re: [PATCH bpf-next v2 2/3] xdp: xdp_umem: replace kmap on vmap for umem map

2019-08-15 Thread Ivan Khoronzhuk
On Thu, Aug 15, 2019 at 11:23:16AM -0700, Jonathan Lemon wrote: On 15 Aug 2019, at 5:13, Ivan Khoronzhuk wrote: For 64-bit there is no reason to use vmap/vunmap, so use page_address as it was initially. For 32 bits, in some apps, like in samples xdpsock_user.c when number of pgs in use is

[PATCH bpf 1/1] xdp: unpin xdp umem pages in error path

2019-08-15 Thread Ivan Khoronzhuk
Fix mem leak caused by missed unpin routine for umem pages. Fixes: 8aef7340ae9695 ("commit xsk: introduce xdp_umem_page") Signed-off-by: Ivan Khoronzhuk --- Based on bpf/master net/xdp/xdp_umem.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/xdp/xdp_um

[PATCH bpf-next 2/8] samples: bpf: Makefile: remove target for native build

2019-09-04 Thread Ivan Khoronzhuk
-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 -- 1 file changed, 2 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 61b7394b811e..a2953357927e 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf/Makefile @@ -197,8 +197,6 @@ BTF_PAHOLE ?= pahole ifdef CROSS_COMPILE

[PATCH bpf-next 1/8] samples: bpf: Makefile: use --target from cross-compile

2019-09-04 Thread Ivan Khoronzhuk
For cross compiling the target triple can be inherited from cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile. So copy-paste this decision from kernel Makefile. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --

[PATCH bpf-next 5/8] samples: bpf: Makefile: use vars from KBUILD_CFLAGS to handle linux headers

2019-09-04 Thread Ivan Khoronzhuk
The kernel headers are reused from samples bpf, and autoconf.h is not enough to reflect complete configuration for clang. One of such configurations is __LINUX_ARM_ARCH__ min version used as instruction set selector. In another case an error like "SMP is not supported" for arm and others errors are

[PATCH bpf-next 3/8] libbpf: Makefile: add C/CXX/LDFLAGS to libbpf.so and test_libpf targets

2019-09-04 Thread Ivan Khoronzhuk
In case of LDFLAGS and EXTRA_CC flags there is no way to pass them correctly to build command, for instance when --sysroot is used or external libraries are used, like -lelf. In follow up patches this is used for samples/bpf cross-compiling getting elf lib from sysroot. Signed-off-by: Ivan

[PATCH bpf-next 7/8] samples: bpf: add makefile.prog for separate CC build

2019-09-04 Thread Ivan Khoronzhuk
eded for samples/bpf, potentially can be reused and extended for other prog sets later and now needed only for unblocking tricky samples/bpf cross compilation. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile.prog | 77 +++ 1 file changed, 77 insertions(+) create

[PATCH bpf-next 6/8] samples: bpf: makefile: fix HDR_PROBE "echo"

2019-09-04 Thread Ivan Khoronzhuk
echo should be replaced on echo -e to handle \n correctly, but instead, replace it on printf as some systems can't handle echo -e. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/Makefile b/sample

[PATCH bpf-next 8/8] samples: bpf: Makefile: base progs build on Makefile.progs

2019-09-04 Thread Ivan Khoronzhuk
xport ARCH=arm export CROSS_COMPILE=arm-linux-gnueabihf- make samples/bpf/ SYSROOT="path/to/sysroot" Sysroot contains correct headers installed ofc. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 164 - samples/bpf/README.rst | 7 ++

[PATCH bpf-next 4/8] samples: bpf: use own EXTRA_CFLAGS for clang commands

2019-09-04 Thread Ivan Khoronzhuk
It can overlap with CFLAGS used for libraries built with gcc if not now then in next patches. Correct it here for simplicity. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf

[PATCH bpf-next 0/8] samples: bpf: improve/fix cross-compilation

2019-09-04 Thread Ivan Khoronzhuk
, some warn options could be tuned also. Ivan Khoronzhuk (8): samples: bpf: Makefile: use --target from cross-compile samples: bpf: Makefile: remove target for native build libbpf: Makefile: add C/CXX/LDFLAGS to libbpf.so and test_libpf targets samples: bpf: use own EXTRA_CFLAGS for

Re: [PATCH bpf-next 01/11] samples: bpf: makefile: fix HDR_PROBE "echo"

2019-09-10 Thread Ivan Khoronzhuk
On Tue, Sep 10, 2019 at 01:46:48PM +0300, Sergei Shtylyov wrote: Hello! On 10.09.2019 13:38, Ivan Khoronzhuk wrote: echo should be replaced on echo -e to handle \n correctly, but instead, s/on/with/? s/echo/printf/ instead of s/echo/echo -e/ printf looks better. replace it on printf

Re: [PATCH bpf-next 01/11] samples: bpf: makefile: fix HDR_PROBE "echo"

2019-09-13 Thread Ivan Khoronzhuk
On Wed, Sep 11, 2019 at 02:02:11PM +0300, Sergei Shtylyov wrote: On 10.09.2019 17:54, Ivan Khoronzhuk wrote: Hello! On 10.09.2019 13:38, Ivan Khoronzhuk wrote: echo should be replaced on echo -e to handle \n correctly, but instead,  s/on/with/? s/echo/printf/ instead of s/echo/echo -e

Re: [PATCH bpf-next 05/11] samples: bpf: makefile: use D vars from KBUILD_CFLAGS to handle headers

2019-09-13 Thread Ivan Khoronzhuk
On Fri, Sep 13, 2019 at 09:12:01PM +, Yonghong Song wrote: On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote: The kernel headers are reused from samples bpf, and autoconf.h is not enough to reflect complete arch configuration for clang. But CLANG-bpf cmds are sensitive for assembler part taken

Re: [PATCH bpf-next 02/11] samples: bpf: makefile: fix cookie_uid_helper_example obj build

2019-09-13 Thread Ivan Khoronzhuk
On Fri, Sep 13, 2019 at 08:48:37PM +, Yonghong Song wrote: On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote: Don't list userspace "cookie_uid_helper_example" object in list for bpf objects. per_socket_stats_example-opjs is used to list additional dependencies s/opjs/objs

Re: [PATCH bpf-next 07/11] samples: bpf: add makefile.prog for separate CC build

2019-09-13 Thread Ivan Khoronzhuk
On Fri, Sep 13, 2019 at 09:33:58PM +, Yonghong Song wrote: On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote: The makefile.prog is added only, will be used in sample/bpf/Makefile later in order to switch cross-compiling on CC from HOSTCC. The HOSTCC is supposed to build binaries and tools

Re: [PATCH bpf-next 08/11] samples: bpf: makefile: base progs build on makefile.progs

2019-09-13 Thread Ivan Khoronzhuk
On Fri, Sep 13, 2019 at 09:41:25PM +, Yonghong Song wrote: On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote: The main reason for that - HOSTCC and CC have different aims. It was tested for arm cross compilation, based on linaro toolchain, but should work for others. In order to split cross

Re: [PATCH bpf-next 10/11] libbpf: makefile: add C/CXX/LDFLAGS to libbpf.so and test_libpf targets

2019-09-13 Thread Ivan Khoronzhuk
On Fri, Sep 13, 2019 at 09:43:22PM +, Yonghong Song wrote: On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote: In case of LDFLAGS and EXTRA_CC/CXX flags there is no way to pass them correctly to build command, for instance when --sysroot is used or external libraries are used, like -lelf, wich

Re: [PATCH bpf-next 11/11] samples: bpf: makefile: add sysroot support

2019-09-13 Thread Ivan Khoronzhuk
On Fri, Sep 13, 2019 at 09:45:31PM +, Yonghong Song wrote: On 9/10/19 11:38 AM, Ivan Khoronzhuk wrote: Basically it only enables that was added by previous couple fixes. For sure, just make tools/include to be included after sysroot headers. export ARCH=arm export CROSS_COMPILE=arm-linux

[PATCH v3 bpf-next 02/14] samples: bpf: makefile: fix cookie_uid_helper_example obj build

2019-09-16 Thread Ivan Khoronzhuk
;t be in 'always'. Let us remove `always += cookie_uid_helper_example.o`, which avoids breaking cross compilation due to mismatched includes. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Make

[PATCH v3 bpf-next 01/14] samples: bpf: makefile: fix HDR_PROBE "echo"

2019-09-16 Thread Ivan Khoronzhuk
echo should be replaced with echo -e to handle '\n' correctly, but instead, replace it with printf as some systems can't handle echo -e. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf/Makefil

[PATCH v3 bpf-next 08/14] samples: bpf: makefile: base target programs rules on Makefile.target

2019-09-16 Thread Ivan Khoronzhuk
compilation (CC) with host build (HOSTCC), lets base samples on Makefile.target. It allows to cross-compile samples/bpf programs with CC while auxialry tools running on host built with HOSTCC. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 135 ++- 1

[PATCH v3 bpf-next 10/14] samples: bpf: makefile: use target CC environment for HDR_PROBE

2019-09-16 Thread Ivan Khoronzhuk
No need in hacking HOSTCC to be cross-compiler any more, so drop this trick and use target CC for HDR_PROBE. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index

[PATCH v3 bpf-next 07/14] samples: bpf: add makefile.target for separate CC target build

2019-09-16 Thread Ivan Khoronzhuk
pf cross compilation. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile.target | 75 + 1 file changed, 75 insertions(+) create mode 100644 samples/bpf/Makefile.target diff --git a/samples/bpf/Makefile.target b/samples/bpf/Makefile.target new fi

[PATCH v3 bpf-next 11/14] libbpf: makefile: add C/CXX/LDFLAGS to libbpf.so and test_libpf targets

2019-09-16 Thread Ivan Khoronzhuk
. Signed-off-by: Ivan Khoronzhuk --- tools/lib/bpf/Makefile | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index c6f94cffe06e..bccfa556ef4e 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -94,6

[PATCH v3 bpf-next 13/14] samples: bpf: makefile: add sysroot support

2019-09-16 Thread Ivan Khoronzhuk
clean configure and install headers: make ARCH=arm defconfig make ARCH=arm headers_install build samples/bpf: make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- samples/bpf/ \ SYSROOT="path/to/sysroot" Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 5 + 1 fi

[PATCH v3 bpf-next 14/14] samples: bpf: README: add preparation steps and sysroot info

2019-09-16 Thread Ivan Khoronzhuk
Add couple preparation steps: clean and configuration. Also add newly added sysroot support info to cross-compile section. --- samples/bpf/README.rst | 41 - 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/samples/bpf/README.rst b/samples/bpf/

[PATCH v3 bpf-next 05/14] samples: bpf: makefile: use __LINUX_ARM_ARCH__ selector for arm

2019-09-16 Thread Ivan Khoronzhuk
For arm, -D__LINUX_ARM_ARCH__=X is min version used as instruction set selector and is absolutely required while parsing some parts of headers. It's present in KBUILD_CFLAGS but not in autoconf.h, so let's retrieve it from and add to programs cflags. In another case errors like "SMP is not supporte

[PATCH v3 bpf-next 12/14] samples: bpf: makefile: provide C/CXX/LD flags to libbpf

2019-09-16 Thread Ivan Khoronzhuk
In order to build libs using C/CXX/LD flags of target arch, provide them to libbpf make. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 18ec22e7b444

[PATCH v3 bpf-next 09/14] samples: bpf: makefile: use own flags but not host when cross compile

2019-09-16 Thread Ivan Khoronzhuk
potential option mistmatches for existent environments. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 9 + 1 file changed, 9 insertions(+) diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile index 1579cc16a1c2..b5c87a8b8b51 100644 --- a/samples/bpf/Makefile +++ b/samples/bpf

[PATCH v3 bpf-next 04/14] samples: bpf: use own EXTRA_CFLAGS for clang commands

2019-09-16 Thread Ivan Khoronzhuk
It can overlap with CFLAGS used for libraries built with gcc if not now then in next patches. Correct it here for simplicity. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/bpf/Makefile b/samples/bpf

[PATCH v3 bpf-next 06/14] samples: bpf: makefile: drop unnecessarily inclusion for bpf_load

2019-09-16 Thread Ivan Khoronzhuk
Drop inclusion for bpf_load -I$(objtree)/usr/include as it is included for all objects anyway, with above line: KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/bpf

[PATCH v3 bpf-next 03/14] samples: bpf: makefile: use --target from cross-compile

2019-09-16 Thread Ivan Khoronzhuk
For cross compiling the target triple can be inherited from cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile. So copy-paste this decision from kernel Makefile. Signed-off-by: Ivan Khoronzhuk --- samples/bpf/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 del

<    1   2   3   4   5   6   7   8   >