Re: [PATCH] mtd: phram: Make phram 64-bit compatible

2013-10-08 Thread Alexander Sverdlin
pollute the library and not really satisfy anyone? I was also irritated re-inventing the wheel here, but the problem is -- millions of people out there have their startup scripts and uboot environments for phram, who expect this just to work with the next kernel upgrade... -- Best regards, Alexan

Re: [PATCH 2/2] i2c-mux-gpio: eliminate i2c channel order assumptions

2013-10-10 Thread Alexander Sverdlin
de array. Otherwise node will not be correctly assigned and i2c-mux will have problems selecting right adapter for the multiplexed devices. > Signed-off-by: Ionut Nicu So, for the code itself Acked-by: Alexander Sverdlin > --- > drivers/i2c/muxes/i2c-mux-gpio.c |4 ++-- > 1 fi

Re: [PATCH 1/1] of: fdt: fix memory initialization for expanded DT

2013-08-16 Thread Alexander Sverdlin
ll crash > attempting to do so on the nodes from FDT -- they are not allocated via > kzmalloc(). > > Signed-off-by: Wladislav Wiebe Acked-by: Alexander Sverdlin > --- > drivers/of/fdt.c |2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/drivers/o

Re: Fwd: Re: [PATCH 1/3] regmap: flat: use the cache_present bitmap

2013-08-19 Thread Alexander Sverdlin
it() to check for this flag in > the same way regmap_bulk_read() does, but I think this is pretty ugly. > > What do you think about moving the check to use_single_rw inside > _regmap_raw_read(), right where the bus accesses are done? > > Something like in the following patch: Acke

[PATCH] serial: earlycon: Extend earlycon command line option to support 64-bit addresses

2016-09-02 Thread Alexander Sverdlin
earlycon implementation used "unsigned long" internally, but there are systems (ARM with LPAE) where sizeof(unsigned long) == 4 and uart is mapped beyond 4GiB address range. Switch to resource_size_t internally and replace obsoleted simple_strtoul() with kstrtoull(). Signed-off-by:

Re: [PATCH 4/6] mips: factor out RapidIO Kconfig entry

2018-07-31 Thread Alexander Sverdlin
O IP block will need to "select HAS_RAPIDIO" > in the platform-/machine-specific "config ARCH_*" Kconfig entry. > > Cc: Andrew Morton > Cc: Alexander Sverdlin > Cc: John Paul Walters > Cc: linux-m...@linux-mips.org > Cc: linux-kernel@vger.kernel.org > S

Re: [PATCH 00/14] MIPS: memblock: Switch arch code to NO_BOOTMEM

2018-01-25 Thread Alexander Sverdlin
#x27;ve only tested startup though. Therefore, Tested-by: Alexander Sverdlin I've noticed one positive effect I cannot explain -- with almost the same physical memory map I observe almost 2 megabytes more available memory after startup: without patches: root@(none):~ >free

Re: [PATCH] i2c-mux-reg: Delete an error message for a failed memory allocation in i2c_mux_reg_probe_dt()

2018-02-01 Thread Alexander Sverdlin
On 01/02/18 17:24, SF Markus Elfring wrote: > Omit an extra message for a memory allocation failure in this function. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring Reviewed-by: Alexander Sverdlin > --- > drivers/i2c/mu

[PATCH v5 3/3] ARM: ftrace: Add MODULE_PLTS support

2018-04-06 Thread Alexander Sverdlin
) [] (load_module) from [] (SyS_finit_module+0x59/0x84) [] (SyS_finit_module) from [] (ret_fast_syscall+0x1/0x18) ---[ end trace e1b64ced7a89adcd ]--- ftrace failed to modify [] 0xe9ef7006 actual: 02:f0:3b:fa ftrace record flags: 0 (0) expected tramp: c0314265 Signed-off-by: Alexander Sverdlin --- arch/arm

[PATCH v5 0/3] ARM: Implement MODULE_PLT support in FTRACE

2018-04-06 Thread Alexander Sverdlin
CE-related handling code if ARRAY_SIZE(fixed_plts) == 0 v3: * Only extend struct dyn_arch_ftrace when ARM_MODULE_PLTS is enabled v2: * As suggested by Steven Rostedt, refrain from tree-wide API modification, save module pointer in struct dyn_arch_ftrace instead (PowerPC way) Alexander Sverdlin

[PATCH v5 1/3] ARM: PLT: Move struct plt_entries definition to header

2018-04-06 Thread Alexander Sverdlin
No functional change, later it will be re-used in several files. Signed-off-by: Alexander Sverdlin --- arch/arm/include/asm/module.h | 9 + arch/arm/kernel/module-plts.c | 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/include/asm/module.h b/arch

[PATCH v5 2/3] ARM: ftrace/recordmcount: filter relocation types

2018-04-06 Thread Alexander Sverdlin
igned-off-by: Alexander Sverdlin --- scripts/recordmcount.c | 17 + 1 file changed, 17 insertions(+) diff --git a/scripts/recordmcount.c b/scripts/recordmcount.c index 16e086d..a4888e9 100644 --- a/scripts/recordmcount.c +++ b/scripts/recordmcount.c @@ -53,6 +53,10 @@ #define R_A

Re: [PATCH] rapidio: fix rio_dma_transfer error handling

2018-04-12 Thread Alexander Sverdlin
_dma_req structure members are initialized in > rio_dma_transfer() immediately after the request structure gets > allocated. > > Signed-off-by: Ioan Nicu Tested-by: Alexander Sverdlin > --- > drivers/rapidio/devices/rio_mport_cdev.c | 19 +-- > 1 file changed,

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-20 Thread Alexander Sverdlin
Hello Ard, On 13/03/18 18:32, Alexander Sverdlin wrote: >>>>> u32 get_module_plt(struct module *mod, unsigned long loc, Elf32_Addr val) >>>>> { >>>>> struct mod_plt_sec *

[PATCH v3 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-09 Thread Alexander Sverdlin
) [] (load_module) from [] (SyS_finit_module+0x59/0x84) [] (SyS_finit_module) from [] (ret_fast_syscall+0x1/0x18) ---[ end trace e1b64ced7a89adcd ]--- ftrace failed to modify [] 0xe9ef7006 actual: 02:f0:3b:fa ftrace record flags: 0 (0) expected tramp: c0314265 Signed-off-by: Alexander Sverdlin --- arch/arm

[PATCH v3 0/2] ARM: Implement MODULE_PLT support in FTRACE

2018-03-09 Thread Alexander Sverdlin
dyn_arch_ftrace when ARM_MODULE_PLTS is enabled v2: * As suggested by Steven Rostedt, refrain from tree-wide API modification, save module pointer in struct dyn_arch_ftrace instead (PowerPC way) Alexander Sverdlin (2): ARM: PLT: Move struct plt_entries definition to header ARM: ftrace: Add

[PATCH v3 1/2] ARM: PLT: Move struct plt_entries definition to header

2018-03-09 Thread Alexander Sverdlin
No functional change, later it will be re-used in several files. Change-Id: Icfa32669b3582d713b3ad680c25620d3d4844bdd Signed-off-by: Alexander Sverdlin --- arch/arm/include/asm/module.h | 9 + arch/arm/kernel/module-plts.c | 9 - 2 files changed, 9 insertions(+), 9 deletions

Re: [PATCH v3 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-09 Thread Alexander Sverdlin
} >> + plt = pltsec->plt_ent; >> >> - struct plt_entries *plt = (struct plt_entries *)pltsec->plt->sh_addr; >> - int idx = 0; >> + idx = ARRAY_SIZE(fixed_plts); >> + while (idx) >> + if (plt->lit[--idx] == val) >> + return (u32)&plt->ldr[idx]; >> > Same here. -- Best regards, Alexander Sverdlin.

[PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
) [] (load_module) from [] (SyS_finit_module+0x59/0x84) [] (SyS_finit_module) from [] (ret_fast_syscall+0x1/0x18) ---[ end trace e1b64ced7a89adcd ]--- ftrace failed to modify [] 0xe9ef7006 actual: 02:f0:3b:fa ftrace record flags: 0 (0) expected tramp: c0314265 Signed-off-by: Alexander Sverdlin --- arch/arm

[PATCH v4 0/2] ARM: Implement MODULE_PLT support in FTRACE

2018-03-13 Thread Alexander Sverdlin
n from tree-wide API modification, save module pointer in struct dyn_arch_ftrace instead (PowerPC way) Alexander Sverdlin (2): ARM: PLT: Move struct plt_entries definition to header ARM: ftrace: Add MODULE_PLTS support arch/arm/include/asm/ftrace.h | 3 +++ arch/arm/include/asm/module.h |

[PATCH v4 1/2] ARM: PLT: Move struct plt_entries definition to header

2018-03-13 Thread Alexander Sverdlin
No functional change, later it will be re-used in several files. Signed-off-by: Alexander Sverdlin --- arch/arm/include/asm/module.h | 9 + arch/arm/kernel/module-plts.c | 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/include/asm/module.h b/arch

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
life time of the module. >> + if (!pltsec->plt_count) >> + prealloc_fixed(pltsec, plt); I'll prepare v5 based on your other comments. -- Best regards, Alexander Sverdlin.

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
t's a problem. > > This means that you are relying on get_module_plt() being called at > least once at module load time, which is not guaranteed. This is indeed guaranteed. For FTRACE use case. If it's being called from FTRACE in run time, this would mean there were long calls in this module section, which in turn means, get_module_plt() was called at least once for this module and this section. This doesn't hold in general, though. In any case, if you insist, I can try to rework the whole stuff implementing module_finalize(). -- Best regards, Alexander Sverdlin.

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
On 13/03/18 18:39, Ard Biesheuvel wrote: > if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS)) > module_plt_alloc_fixed(); Do you consider this a legal C code if without module-plts.o the function would not exist at all? That's too much relying on optimizer I think... -- Best regards

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
, symbol references, etc). Thus, you still have to use an #ifdef if the code inside the block references symbols that will not exist if the condition is not met." But we can of course ignore it. -- Best regards, Alexander Sverdlin.

Re: [PATCH v4 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-13 Thread Alexander Sverdlin
hold in general, though. >> >> In any case, if you insist, I can try to rework the whole stuff implementing >> module_finalize(). >> > I think it would be much better to use the module_finalize() hook for > this, given that it is only called once already, and all the data you > need is still available. No problem, but some kind of (*) block would still be required, because get_module_plt() has to work after module_finalize() as well as *before* it. So before module_finalize() we would have to dereference pltsec->plt->sh_addr conditionally. > Note that ARM already has such a function, so you'll need to add a > call there, i.e., > > if (IS_ENABLED(CONFIG_ARM_MODULE_PLTS)) > module_plt_alloc_fixed(); > > or something like that. The CONFIG_FTRACE dependency can be kept local > to module-plts.c > -- Best regards, Alexander Sverdlin.

Re: [PATCH 02/12] perf auxtrace: Include missing asm/bitsperlong.h to get BITS_PER_LONG

2018-10-09 Thread Alexander Sverdlin
Hi! On 09/10/2018 02:54, Arnaldo Carvalho de Melo wrote: > From: Arnaldo Carvalho de Melo > > The auxtrace.h header references BITS_PER_LONG without including the > header where it is defined, getting it by luck from some other header, > fix it. > > Cc: Adrian Hunter >

Re: [PATCH 01/12] tools include: Adopt linux/bits.h

2018-10-09 Thread Alexander Sverdlin
and if any adjustment > needs to be done to the tools/{include,arch}/ copies. > > Cc: Adrian Hunter > Cc: Alexander Sverdlin > Cc: David Ahern > Cc: Jiri Olsa > Cc: Namhyung Kim > Cc: Wang Nan > Link: https://lkml.kernel.org/n/tip-y1sqyydvfzo0bjjoj4zsl.

Re: [PATCH v2] i2c: i2c-mux-gpio: remove error messages for probe deferrals

2015-04-02 Thread Alexander Sverdlin
these error prints. > > This patch removes the error messages for these deferral cases. > > Signed-off-by: Ionut Nicu Acked-by: Alexander Sverdlin > --- > drivers/i2c/muxes/i2c-mux-gpio.c | 10 +++--- > 1 files changed, 3 insertions(+), 7 deletions(-) > >

Re: [PATCH 5/5] i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery

2015-04-01 Thread Alexander Sverdlin
s and reimplemented ICPFUNC bus recovery using I2C > bus recovery infrastructure] > Signed-off-by: Grygorii Strashko We have tested it on a custom Keystone2-based board, recovery seems to work when SDA is held low externally. Acked-by: Alexander Sverdlin Tested-by: Michael Lawnick > --

Re: [PATCH] i2c: octeon: remove unused signal handling

2015-06-12 Thread Alexander Sverdlin
forgot to > drop the signal handling case in the return handling. This just removes > this dead code. While at it the return variable is adjusted to the type > expected. > > Signed-off-by: Nicholas Mc Guire Looks good, Reviewed-by: Alexander Sverdlin > --- > >

Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg

2015-06-17 Thread Alexander Sverdlin
hink this MODULE_ALIAS() isn't > needed, as I couldn't find such a corresponding platform_device. You do not see the platform_device, because there are no users yet, put this MODULE_ALIAS() is perfectly fine, it will allow automatic module loading in non-DT case. -- Best regards, Alexande

Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg

2015-06-17 Thread Alexander Sverdlin
uot;GPL"); > +MODULE_ALIAS("platform:i2c-mux-reg"); > diff --git a/drivers/i2c/muxes/i2c-mux-reg.h b/drivers/i2c/muxes/i2c-mux-reg.h > new file mode 100644 > index 000..e213988 > --- /dev/null > +++ b/drivers/i2c/muxes/i2c-mux-reg.h > @@ -0,0 +1,38 @@ > +/* > + * I2C multiplexer using a single register > + * > + * Copyright 2015 Freescale Semiconductor > + * York Sun > + * > + * This program is free software; you can redistribute it and/or modify > + * it under the terms of the GNU General Public License version 2 as > + * published by the Free Software Foundation. > + */ > + > +#ifndef __LINUX_I2C_MUX_REG_H > +#define __LINUX_I2C_MUX_REG_H > + > +/* MUX has no specific idel mode */ > +#define I2C_MUX_REG_NO_IDLE ((unsigned)-1) What if the idle state is exactly "all ones"? Quite important corner case actually... > + > +/** > + * struct i2c_mux_reg_platform_data - Platform-dependent data for i2c-mux-reg > + * @parent: Parent I2C bus adapter number > + * @base_nr: Base I2C bus number to number adapters from or zero for dynamic > + * @values: Array of value for each channel > + * @n_values: Number of multiplexer channels > + * @classes: Optional I2C auto-detection classes > + * @idle: Value to write to mux when idle > + * @reg: Virtual address of the register to switch channel > + */ > +struct i2c_mux_reg_platform_data { > + int parent; > + int base_nr; > + const unsigned int *values; > + int n_values; > + const unsigned int *classes; > + unsigned int idle; > + unsigned int *reg; Yeah, this is really bad idea. You maybe want something like __iomem "cookie" here instead of this bare pointer. > +}; > + > +#endif /* __LINUX_I2C_MUX_REG_H */ > Other than the mentioned above, this is a useful code. -- Best regards, Alexander Sverdlin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg

2015-06-18 Thread Alexander Sverdlin
ow automatic module loading once the patch > that adds a struct platform_device with a "i2c-mux-reg" name lands? Any platform code which will register the platform_device will trigger uevent and udevd will be able to find the module with this macro. This is a legacy alternative to d

Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg

2015-06-18 Thread Alexander Sverdlin
via additional DT property... -- Best regards, Alexander Sverdlin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

[PATCH] of: acpi: Rename of_node() and acpi_node() to to_of_node() and to_acpi_node()

2015-06-22 Thread Alexander Sverdlin
of_node() instead) it became clear that the names for the functions are too short and too generic for global scope. Signed-off-by: Alexander Sverdlin --- Compile-tested on x86_64 with ACPI and ARM with OF. drivers/base/property.c | 26 +- drivers/gpio/gpiolib.c | 4

Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg

2015-06-18 Thread Alexander Sverdlin
ad (but modinfo) and make the module "complete" in a sense that it supports both types of binding. There is a legacy probe function in it, all the support for legacy binding with platform_data in it and this modalias is simply the last part of it. -- Best regards, Alexander Sverdlin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH] driver/i2c/mux: Add register based mux i2c-mux-reg

2015-06-18 Thread Alexander Sverdlin
ist. Most of the usual drivers in the Kernel have this line. Until now no animal was hurt with it. -- Best regards, Alexander Sverdlin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [Patch v2] driver/i2c/mux: Add register based mux i2c-mux-reg

2015-06-18 Thread Alexander Sverdlin
in the Documentation/ file?), that write will be little-Endian, therefore BE users must take care... Other than that it looks good to me... -- Best regards, Alexander Sverdlin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord

Re: [Patch v3] driver/i2c/mux: Add register-based mux i2c-mux-reg

2015-06-18 Thread Alexander Sverdlin
be specified in device > tree if used, or in platform data. > > Signed-off-by: York Sun > CC: Wolfram Sang > CC: Paul Bolle > CC: Peter Korsgaard > CC: Alexander Sverdlin I can think about external FPGA applications performing MUX function, so the code looks useful to

[PATCH v2 2/2] ARM: ftrace: Add MODULE_PLTS support

2018-03-01 Thread Alexander Sverdlin
) [] (load_module) from [] (SyS_finit_module+0x59/0x84) [] (SyS_finit_module) from [] (ret_fast_syscall+0x1/0x18) ---[ end trace e1b64ced7a89adcd ]--- ftrace failed to modify [] 0xe9ef7006 actual: 02:f0:3b:fa ftrace record flags: 0 (0) expected tramp: c0314265 Signed-off-by: Alexander Sverdlin --- arch/arm

[PATCH v2 0/2] ARM: Implement MODULE_PLT support in FTRACE

2018-03-01 Thread Alexander Sverdlin
ven Rostedt, refrain from tree-wide API modification, save module pointer in dyn ftrace entry struct instead (PowerPC way) Alexander Sverdlin (2): ARM: PLT: Move struct plt_entries definition to header ARM: ftrace: Add MODULE_PLTS support arch/arm/include/asm/ftrace.h | 1 + arch/arm/inclu

[PATCH v2 1/2] ARM: PLT: Move struct plt_entries definition to header

2018-03-01 Thread Alexander Sverdlin
No functional change, later it will be re-used in several files. Signed-off-by: Alexander Sverdlin --- arch/arm/include/asm/module.h | 9 + arch/arm/kernel/module-plts.c | 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/arm/include/asm/module.h b/arch

Re: [PATCH 3/4] ARM: ep93xx: move pinctrl interfaces into include/linux/soc

2019-04-15 Thread Alexander Sverdlin
ude/linux/soc/. This is far from great, but gets the job > done here, without the need for a proper pinctrl driver. Acked-by: Alexander Sverdlin > Signed-off-by: Arnd Bergmann > --- > arch/arm/mach-ep93xx/clock.c | 1 + > arch/arm/mach-ep93xx/core.c

Re: [PATCH 4/4] ARM: ep93xx: move private headers out of mach/*

2019-04-15 Thread Alexander Sverdlin
On 15/04/2019 21:31, Arnd Bergmann wrote: > gpio-ep93xx.h, hardware.h, and platform.h are only used in > arch/arm/mach-ep93xx, so we can move them one there and no > longer expose them to device drivers. Acked-by: Alexander Sverdlin > Signed-off-by: Arnd Bergmann > --- > ar

Re: [PATCH 2/4] ARM: ep93xx: keypad: stop using mach/platform.h

2019-04-15 Thread Alexander Sverdlin
Hi! On 15/04/2019 21:47, Arnd Bergmann wrote: >>> We can communicate the clock rate using platform data rather than setting a >>> flag to use a particular value in the driver, which is cleaner and avoids >>> the dependency. >>> >>> No platform in the kernel currently defines the ep93xx keypad dev

Re: [PATCH] arch: arm: Kconfig: pedantic formatting

2019-03-13 Thread Alexander Sverdlin
board. > + bool "Support Simplemachines Sim.One board" > + help > + Say 'Y' here if you want your kernel to support the > + Simplemachines Sim.One board. > > config MACH_SNAPPER_CL15 > bool "Support Bluewater Systems Snapper CL15

[PATCH] leds: trigger: timer: Optionally stop timer trigger on reboot

2021-02-13 Thread Alexander Sverdlin
This functionality is similar to heartbeat and activity triggers and turns the timer-triggered LEDs off right before reboot. It's configurable via new module parameter "reboot_off" to preserve original behaviour. Signed-off-by: Alexander Sverdlin --- drivers/leds/trigger/ledtr

Re: [PATCH v3 1/7] gpio: gpio-ep93xx: fix BUG_ON port F usage

2021-01-28 Thread Alexander Sverdlin
yesterday. It just adds another level on confusion into the code, which even the author got wrong :) Array with holes would be more obvious, but one can also embedd the necessary values into struct ep93xx_gpio_bank. -- Alexander Sverdlin.

Re: [PATCH v3 7/7] gpiod: ep93xx: refactor base IRQ number

2021-01-28 Thread Alexander Sverdlin
Hi! On Thu, 2021-01-28 at 15:21 +0300, Nikita Shubin wrote: > - use predefined constants instead of plain numbers > - use provided bank IRQ number instead of defined constant >   for port F > > Signed-off-by: Nikita Shubin Acked-by: Alexander Sverdlin > --- >  drivers/gp

Re: [PATCH v3 3/7] gpio: gpio-ep93xx: Fix wrong irq numbers in port F

2021-01-28 Thread Alexander Sverdlin
lly on the fly" > > And that's not the thing we want. > > Signed-off-by: Nikita Shubin Acked-by: Alexander Sverdlin > --- >  drivers/gpio/gpio-ep93xx.c | 1 + >  1 file changed, 1 insertion(+) > > diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpi

Re: [PATCH v3 6/7] gpio: ep93xx: refactor ep93xx_gpio_add_bank

2021-01-28 Thread Alexander Sverdlin
setting handler's into single loop > > Signed-off-by: Nikita Shubin Acked-by: Alexander Sverdlin > --- > v2->v3 > - use ->num_parents instead of ARRAY_SIZE() > --- >  drivers/gpio/gpio-ep93xx.c | 9 - >  1 file changed, 4 insertions(+), 5 deletions(-) &

Re: [PATCH v3 4/7] gpio: ep93xx: drop to_irq binding

2021-01-28 Thread Alexander Sverdlin
Hi! On Thu, 2021-01-28 at 15:21 +0300, Nikita Shubin wrote: > As ->to_irq is redefined in gpiochip_add_irqchip, having it defined > in > driver is useless, so let's drop it. > > Signed-off-by: Nikita Shubin Acked-by: Alexander Sverdlin > --- >  drivers/gpio/gpio-

Re: [PATCH v3 1/7] gpio: gpio-ep93xx: fix BUG_ON port F usage

2021-02-04 Thread Alexander Sverdlin
_bank. This option can probably simplify the handling of the names for irq chips as well.   > 28.01.2021, 19:19, "Alexander Sverdlin" : > > Hello Nikita, > > > > On Thu, 2021-01-28 at 18:11 +0200, Andy Shevchenko wrote: > > >  > +/* > > >  > + * F

Re: [PATCH v3 1/7] gpio: gpio-ep93xx: fix BUG_ON port F usage

2021-02-04 Thread Alexander Sverdlin
ep93xx_gpio_chip gc[8]; > }; > > static const u8 int_register_offset[8]   = { 0x90, 0xac, [5] = 0x4c }; > #define EP93XX_INT_TYPE1_OFFSET        0x00 > #define EP93XX_INT_TYPE2_OFFSET        0x04 > #define EP93XX_INT_EOI_OFFSET          0x08 > #define EP93XX_INT_EN_OFFSET           0x0c > #define EP93XX_INT_STATUS_OFFSET       0x10 > #define EP93XX_INT_RAW_STATUS_OFFSET   0x14 > #define EP93XX_INT_DEBOUNCE_OFFSET     0x18 Makes sense to me. -- Alexander Sverdlin.

Re: [PATCH v4 2/7] gpio: gpio-ep93xx: Fix single irqchip with multi gpiochips

2021-02-05 Thread Alexander Sverdlin
_BASE + offset; >  } >   > +static void ep93xx_init_irq_chip(struct irq_chip *ic, const char *irq_name) > +{ > +   ic->name = irq_name; Assuming you pass "label" here, you could do something like ic->name = kasprintf(GFP_KERNEL, "gpio-irq-%s", irq_name); > +   ic->irq_ack = ep93xx_gpio_irq_ack; > +   ic->irq_mask_ack = ep93xx_gpio_irq_mask_ack; > +   ic->irq_mask = ep93xx_gpio_irq_mask; > +   ic->irq_unmask = ep93xx_gpio_irq_unmask; > +   ic->irq_set_type = ep93xx_gpio_irq_type; > +} -- Alexander Sverdlin.

Re: [PATCH v4 1/7] gpio: gpio-ep93xx: fix BUG_ON port F usage

2021-02-05 Thread Alexander Sverdlin
set) > return EP93XX_GPIO_F_IRQ_BASE + offset; >  } >   > -static int ep93xx_gpio_add_bank(struct gpio_chip *gc, > +static int ep93xx_gpio_add_bank(struct ep93xx_gpio_chip *egc, > struct platform_device *pdev, > struct ep93xx_gpio *epg, > struct ep93xx_gpio_bank *bank) >  { > void __iomem *data = epg->base + bank->data; > void __iomem *dir = epg->base + bank->dir; > +   struct gpio_chip *gc = &egc->gc; > struct device *dev = &pdev->dev; > struct gpio_irq_chip *girq; > int err; > @@ -347,6 +353,12 @@ static int ep93xx_gpio_add_bank(struct gpio_chip *gc, > girq = &gc->irq; > if (bank->has_irq || bank->has_hierarchical_irq) { > gc->set_config = ep93xx_gpio_set_config; > +   egc->eic = devm_kcalloc(dev, 1, > +   sizeof(*egc->eic), > +   GFP_KERNEL); > +   if (!egc->eic) > +   return -ENOMEM; > +   egc->eic->irq_offset = bank->irq; > girq->chip = &ep93xx_gpio_irq_chip; > } >   > @@ -415,7 +427,7 @@ static int ep93xx_gpio_probe(struct platform_device *pdev) > return PTR_ERR(epg->base); >   > for (i = 0; i < ARRAY_SIZE(ep93xx_gpio_banks); i++) { > -   struct gpio_chip *gc = &epg->gc[i]; > +   struct ep93xx_gpio_chip *gc = &epg->gc[i]; > struct ep93xx_gpio_bank *bank = &ep93xx_gpio_banks[i]; >   > if (ep93xx_gpio_add_bank(gc, pdev, epg, bank)) -- Alexander Sverdlin.

Re: [PATCH v5 1/7] gpio: ep93xx: fix BUG_ON port F usage

2021-02-08 Thread Alexander Sverdlin
fd935fc421e74 ("gpio: ep93xx: Do not pingpong irq numbers") > Signed-off-by: Nikita Shubin I performed a bootup with the whole patch-series and confirm that the BUG is gone. Reviewed-by: Alexander Sverdlin Tested-by: Alexander Sverdlin > --- > v4->v5: > - make to_e

Re: [PATCH v5 2/7] gpio: ep93xx: Fix single irqchip with multi gpiochips

2021-02-08 Thread Alexander Sverdlin
chip") > Signed-off-by: Nikita Shubin I performed a bootup with the whole patch-series and confirm that the warning is gone. Thank you for looking into this! Reviewed-by: Alexander Sverdlin Tested-by: Alexander Sverdlin > --- > v4->v5: > - generate IRQ chip's na

Re: [PATCH v6 2/7] gpio: ep93xx: Fix single irqchip with multi gpiochips

2021-02-09 Thread Alexander Sverdlin
t;) > Signed-off-by: Nikita Shubin Tested-by: Alexander Sverdlin > --- > v5->v6: > - add devm_kasprintf() return value check and move it out from > ep93xx_init_irq_chip() > - removed ep93xx_gpio_irq_chip > - pass girq->chip instead of removed ep93xx_gpio_irq_chip to

Re: [PATCH] ARM: ep93xx: don't use clang IAS for crunch

2021-02-26 Thread Alexander Sverdlin
a,-mcpu=ep9312 > +AFLAGS_crunch-bits.o   := -Wa,-mcpu=ep9312 $(cc-option, > -fno-integrated-as) >   >  obj-$(CONFIG_MACH_ADSSPHERE)   += adssphere.o >  obj-$(CONFIG_MACH_EDB93XX) += edb93xx.o -- Alexander Sverdlin.

Re: [PATCH] MIPS: OCTEON: fix unreachable code in octeon_irq_init_ciu

2021-01-11 Thread Alexander Sverdlin
it 99fbc70f8547 ("MIPS: Octeon: irq: Alloc desc before configuring IRQ"). With "Fixes:" tag corrected, you can put my Reviewed-by: Alexander Sverdlin > Signed-off-by: Menglong Dong > --- > arch/mips/cavium-octeon/octeon-irq.c | 2 +- > 1 file changed, 1 insertion(+)

Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support

2021-03-24 Thread Alexander Sverdlin
428. > Encoding A2 Even numbers in the range –33554432 to 33554430. > > which matches what's in the code (T1 for thumb2 and A1 for arm). > > Why do you think it's wrong? thanks for checking this! I'll re-send v8 with your proposal. -- Best regards, Alexander Sverdlin.

Re: [PATCH v3] gpio: pl061: Support implementations without GPIOINTR line

2021-03-19 Thread Alexander Sverdlin
Hello Andy, >> From: Alexander Sverdlin >> >> There are several implementations of PL061 which lack GPIOINTR signal in >> hardware and only have individual GPIOMIS[7:0] interrupts. Use the >> hierarchical interrupt support of the gpiolib in these cases (if at leas

Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support

2021-03-24 Thread Alexander Sverdlin
better remain encapsulated there. could you please check the negative limits? I have an opinion, my limits are correct. I could add extra parameter to arm_gen_branch_link(), but for this I first need to fix its negative limits, which, I believe, well... Approximate :) -- Best regards, Alexander Sverdlin.

Re: [PATCH v3] gpio: pl061: Support implementations without GPIOINTR line

2021-03-22 Thread Alexander Sverdlin
; This is a side effect of the essentially per-soc pecularities around > interrupts. The interrupt is not cascaded so it need special > handling. > > I think it can be done with quite little code. Guys, have you actually looked onto my patch before these reviews? -- Best regards, Alexander Sverdlin.

Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support

2021-03-22 Thread Alexander Sverdlin
er than two years and I actually hope these patches to be finally merged at some point. But you are welcome to optimize them with follow up patches :) -- Best regards, Alexander Sverdlin.

Re: [PATCH v8 0/3] ARM: Implement MODULE_PLT support in FTRACE

2021-04-11 Thread Alexander Sverdlin
e new warn arg visible all the way to > ftrace_call_repalce() and all of its users. > > FWIW > > Tested-by: Qais Yousef -- Best regards, Alexander Sverdlin.

[PATCH] spi: omap2-mcspi: Activate pinctrl idle state during runtime suspend

2021-02-21 Thread Alexander Sverdlin
Set the (optional) idle pinctrl state during runtime suspend. This is the same schema used in PL022 driver and can help with HW designs sharing the SPI lines for different purposes. Signed-off-by: Alexander Sverdlin --- drivers/spi/spi-omap2-mcspi.c | 24 ++-- 1 file changed

[PATCH] serial: 8250_omap: Avoid FIFO corruption caused by MDR1 access

2020-12-09 Thread Alexander Sverdlin
access of MDR1. After removing the read access from omap_8250_mdr1_errataset() the data corruption never happened any more. Link: https://www.ti.com/lit/er/sprz360i/sprz360i.pdf Fixes: 61929cf0169d ("tty: serial: Add 8250-core based omap driver") Cc: sta...@vger.kernel.org Signed-off-by

Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support

2021-03-15 Thread Alexander Sverdlin
trary chosen to not fit into our module space and we have more modules already loaded. But you are free to adjust the amount of NOPs! :) -- Best regards, Alexander Sverdlin.

Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support

2021-03-10 Thread Alexander Sverdlin
of these real world "proprietary" modules (which of course were the real trigger for the patch): https://www.spinics.net/lists/arm-kernel/msg878599.html -- Best regards, Alexander Sverdlin.

[PATCH] gpio: omap: Honor "aliases" node

2021-03-01 Thread Alexander Sverdlin
Currently the naming of the GPIO chips depends on their order in the DT, but also on the kernel version (I've noticed the change from v5.10.x to v5.11). Honor the persistent enumeration in the "aliases" node like other GPIO drivers do. Signed-off-by: Alexander Sverdlin ---

Re: [PATCH v7 0/2] ARM: Implement MODULE_PLT support in FTRACE

2021-03-02 Thread Alexander Sverdlin
es it manifest at modprobe? And then I use this module to test for the problem: /** * Author: Alexander Sverdlin * * Copyright (c) 2018 Nokia * * SPDX-License-Identifier: GPL-2.0 * * Th

Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support

2021-03-07 Thread Alexander Sverdlin
ddr)); >> +new = ftrace_call_replace(ip, aaddr); >> + >> +#ifdef CONFIG_ARM_MODULE_PLTS >> +if (!new) { >> +struct module *mod = rec->arch.mod; >> + >> +if (mod) { > > What would happen if !new and !mod? I believe, that's exactly what happens in the dump you experience with your kernel. This is not covered by this patch, this patch covers the issue with modules in vmalloc area. >> +aaddr = get_module_plt(mod, ip, aaddr); >> +new = ftrace_call_replace(ip, aaddr); > > I assume we're guaranteed to have a sensible value returned in 'new' here? Otherwise you'd see the dump you see :) It relies on the already existing error handling. >> +} >> +} >> +#endif -- Best regards, Alexander Sverdlin.

Re: [PATCH v7 2/2] ARM: ftrace: Add MODULE_PLTS support

2021-03-09 Thread Alexander Sverdlin
s when I convert all modules to be built-in > > sed -i 's/=m/=y/' .config > > FWIW, I see the problem with your patch applied too. Trying to dig more into > it.. Then it's definitely the problem explained in the second link. If you have THUMB2 kernel, maybe you have to switch to ARM. -- Best regards, Alexander Sverdlin.

Re: [PATCH] staging: octeon: remove braces from single-line block

2021-02-07 Thread Alexander Sverdlin
t;, 0); > - if (!phy_node && of_phy_is_fixed_link(priv->of_node)) { > + if (!phy_node && of_phy_is_fixed_link(priv->of_node)) > phy_node = of_node_get(priv->of_node); > - } > if (!phy_node) > goto no_phy; > -- Best regards, Alexander Sverdlin.

Re: [PATCH v6 0/2] ARM: Implement MODULE_PLT support in FTRACE

2021-01-27 Thread Alexander Sverdlin
ed-by: tag. This would probably wake more interest from maintainers side. Of course I can re-send them because I personally re-base them regularly. -- Best regards, Alexander Sverdlin.

Re: [PATCH v2 9/9] gpio: ep93xx: replace bools with idx for IRQ ports

2021-01-27 Thread Alexander Sverdlin
x_gpio_port(epg, gc); > girq->chip = &epg->ic[port]; > } >   > -   if (bank->has_irq) { > -   err = ep93xx_gpio_add_ab_irq_chip(pdev, girq, bank- > >irq_base); > +   if (bank->idx == EP93XX_GPIO_A_PORT_INDEX || > +   bank->idx == EP93XX_GPIO_B_PORT_INDEX) { > +   err = ep93xx_gpio_add_ab_irq_chip(pdev, gc, bank- > >irq_base); > if (err) > return err; > } >   > /* Only bank F has especially funky IRQ handling */ > -   if (bank->has_hierarchical_irq) { > -   err = ep93xx_gpio_add_f_irq_chip(pdev, girq, bank- > >irq_base); > +   if (bank->idx == EP93XX_GPIO_F_PORT_INDEX) { > +   err = ep93xx_gpio_add_f_irq_chip(pdev, gc, bank- > >irq_base); > if (err) > return err; > } -- Alexander Sverdlin.

Re: [PATCH v2 8/9] gpio: ep93xx: refactor base IRQ number

2021-01-27 Thread Alexander Sverdlin
Hi! On Wed, 2021-01-27 at 13:46 +0300, Nikita Shubin wrote: > - use predefined constants instead of plain numbers > - use provided bank IRQ number instead of defined constant >   for port F > > Signed-off-by: Nikita Shubin Reviewed-by: Alexander Sverdlin > --- >  drive

Re: [PATCH v2 4/9] gpio: ep93xx: drop to_irq binding

2021-01-27 Thread Alexander Sverdlin
Hi! On Wed, 2021-01-27 at 13:46 +0300, Nikita Shubin wrote: > As ->to_irq is redefined in gpiochip_add_irqchip, having it defined > in > driver is useless, so let's drop it. > > Signed-off-by: Nikita Shubin Reviewed-by: Alexander Sverdlin > --- >  drivers/gpio/

Re: [PATCH v2 5/9] gpio: ep93xx: Fix typo s/hierarchial/hierarchical

2021-01-27 Thread Alexander Sverdlin
Hi! On Wed, 2021-01-27 at 13:46 +0300, Nikita Shubin wrote: > Fix typo in comment. > > Signed-off-by: Nikita Shubin Acked-by: Alexander Sverdlin > --- >  drivers/gpio/gpio-ep93xx.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio

Re: [PATCH v2 6/9] gpio: ep93xx: refactor ep93xx_gpio_add_bank

2021-01-27 Thread Alexander Sverdlin
++) { > +   for (i = 0; i < ARRAY_SIZE(girq->parents); i++) { Why do you use ARRAY_SIZE() here instead of ->num_parents like above? > +   girq->parents[i] = platform_get_irq(pdev, i + > 1); > gpio_irq = EP93XX_GPIO_F_IRQ_BASE + i; > irq_set_chip_data(gpio_irq, &epg->gc[5]); > irq_set_chip_and_handler(gpio_irq, -- Alexander Sverdlin.

Re: [PATCH v2 7/9] gpio: ep93xx: separate IRQ's setup

2021-01-27 Thread Alexander Sverdlin
   > &ep93xx_gpio_irq_chip, > -    handle_level_irq); > -   irq_clear_status_flags(gpio_irq, > IRQ_NOREQUEST); > -   } > -   girq->default_type = IRQ_TYPE_NONE; > -   girq->handler = handle_level_irq; > -   girq->first = EP93XX_GPIO_F_IRQ_BASE; > +   err = ep93xx_gpio_add_f_irq_chip(pdev, girq, > EP93XX_GPIO_F_IRQ_BASE); > +   if (err) > +   return err; > } >   > return devm_gpiochip_add_data(dev, gc, epg); -- Alexander Sverdlin.

Re: [PATCH v2 2/9] gpio: ep93xx: Fix single irqchip with multi gpiochips

2021-01-27 Thread Alexander Sverdlin
t; err = bgpio_init(gc, dev, 1, data, NULL, NULL, dir, NULL, 0); > if (err) > @@ -356,7 +380,8 @@ static int ep93xx_gpio_add_bank(struct gpio_chip > *gc, > girq = &gc->irq; > if (bank->has_irq || bank->has_hierarchical_irq) { >   

Re: [PATCH 1/6] MIPS: Octeon: Implement __smp_store_release()

2021-01-27 Thread Alexander Sverdlin
Hello Peter, On 27/01/2021 23:32, Peter Zijlstra wrote: >> Link: https://lore.kernel.org/lkml/5644d08d.4080...@caviumnetworks.com/ please, check the discussion pointed by the link above... >> Signed-off-by: Alexander Sverdlin >> --- >> arch/mips/include/asm/barrier.h

Re: [PATCH 3/6] MIPS: Octeon: qspinlock: Flush write buffer

2021-01-27 Thread Alexander Sverdlin
Hi! On 27/01/2021 23:34, Peter Zijlstra wrote: > On Wed, Jan 27, 2021 at 09:36:24PM +0100, Alexander A Sverdlin wrote: >> From: Alexander Sverdlin >> >> Flushing the write buffer brings aroung 10% performace on the tight >> uncontended spinlock loops on Octeon. R

Re: [PATCH 1/2] qspinlock: Ensure writes are pushed out of core write buffer

2021-01-27 Thread Alexander Sverdlin
Hi! On 27/01/2021 23:21, Will Deacon wrote: > On Wed, Jan 27, 2021 at 09:01:08PM +0100, Alexander A Sverdlin wrote: >> From: Alexander Sverdlin >> >> Ensure writes are pushed out of core write buffer to prevent waiting code >> on another cores from spinning longer than

Re: [PATCH 1/2] qspinlock: Ensure writes are pushed out of core write buffer

2021-01-27 Thread Alexander Sverdlin
Hi! On 27/01/2021 23:43, Peter Zijlstra wrote: > On Wed, Jan 27, 2021 at 09:01:08PM +0100, Alexander A Sverdlin wrote: >> From: Alexander Sverdlin >> >> Ensure writes are pushed out of core write buffer to prevent waiting code >> on another cores from spinning l

Re: [PATCH v2 3/9] gpio: ep93xx: Fix wrong irq numbers in port F

2021-01-28 Thread Alexander Sverdlin
lly on the fly" > > And that's not the thing we want. > > Signed-off-by: Nikita Shubin I have no code out-of-the-box to test the GPIO interrupts on EP93xx, so I just did a bootup with this patch. But the change looks fine to me: Acked-by: Alexander Sverdlin > ---

Re: [PATCH v2 2/9] gpio: ep93xx: Fix single irqchip with multi gpiochips

2021-01-28 Thread Alexander Sverdlin
hips > > Fixes: a8173820f441 ("gpio: gpiolib: Allow GPIO IRQs to lazy > disable") > Signed-off-by: Nikita Shubin Yes, it indeed fixes the warnigs mentioned above, Tested-by: Alexander Sverdlin > --- >  drivers/gpio/gpio-ep93xx.c | 45 ++

Re: [PATCH v2 0/9] gpio: ep93xx: fixes series patch

2021-01-28 Thread Alexander Sverdlin
o fix up but > overall this looks very very good. as we don't have a dedicated EP93xx tree, would you like to take the series in one of your trees? -- Alexander Sverdlin.

Re: [PATCH 1/6] MIPS: Octeon: Implement __smp_store_release()

2021-01-28 Thread Alexander Sverdlin
point to above, says: "Since Octeon does not do speculative reads, this functions as a full barrier." -- Best regards, Alexander Sverdlin.

Re: [PATCH 1/6] MIPS: Octeon: Implement __smp_store_release()

2021-01-28 Thread Alexander Sverdlin
Hi! On 28/01/2021 12:33, Peter Zijlstra wrote: > On Thu, Jan 28, 2021 at 08:27:29AM +0100, Alexander Sverdlin wrote: > >>>> +#define __smp_store_release(p, v)

Re: [PATCH 3/6] MIPS: Octeon: qspinlock: Flush write buffer

2021-01-28 Thread Alexander Sverdlin
ould be to undelete MIPS spinlocks and make these broken qspinlocks a configurable option for MIPS? I don't even mind if they will be default option for those not interested in performance or latency. -- Best regards, Alexander Sverdlin.

Re: ks-sa-rng.c:undefined reference to `devm_platform_ioremap_resource'

2020-11-26 Thread Alexander Sverdlin
s390-linux-ld: drivers/char/hw_random/ks-sa-rng.o: in function >> `ks_sa_rng_probe': >>>> ks-sa-rng.c:(.text+0x2fa): undefined reference to >>>> `devm_platform_ioremap_resource' > > ---8<--- > This patch adds a dependency for KEYSTONE on HAS_IO

Re: [PATCH 1/5] OF: Clear detach flag on attach

2013-11-06 Thread Alexander Sverdlin
l now, after these fixes: 9e401275 of: fdt: fix memory initialization for expanded DT 0640332e of: Fix missing memory initialization on FDT unflattening 92d31610 of/fdt: Remove duplicate memory clearing on FDT unflattening ? -- Best regards, Alexander Sverdlin. -- To unsubscribe from this list: send the

Re: [PATCH 0/3 - V2] Introducing Device Tree Overlays

2013-11-06 Thread Alexander Sverdlin
gain! Will test the whole series on our MIPS64 platforms (currently old patchset from bbxm tree is successfully used for a while). -- Best regards, Alexander Sverdlin. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.k

Re: [PATCH 1/5] OF: Clear detach flag on attach

2013-11-06 Thread Alexander Sverdlin
ng, which is the case in overlay_proc_release(), I suppose. So the call to of_node_clear_flag() is superfluous, but doesn't hurt. > On Nov 6, 2013, at 10:46 AM, Alexander Sverdlin wrote: > >> Hello Pantelis, >> >> On 05/11/13 21:03, ext Pantelis Antoniou wrote: >>

Re: [PATCH] of: i2c: Export single device registration method

2013-11-06 Thread Alexander Sverdlin
plied on each device to a function. > > Signed-off-by: Pantelis Antoniou We use the "same" patch since kernel 3.10.0, so: Acked-by: Alexander Sverdlin Tested-by: Alexander Sverdlin > --- > drivers/i2c/i2c-core.c | 99 > +++-

  1   2   >