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.

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 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 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 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 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-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.

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 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 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

[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] 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.

[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] 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 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 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 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] 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 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 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 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 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 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 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 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 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 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 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: [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 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 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 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 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 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 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 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/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 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 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 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 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 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 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 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 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] 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(+)

[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: 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] MIPS: reserve the memblock right after the kernel

2020-11-17 Thread Alexander Sverdlin
e claims the rest of the last page, and I'm going to fix this). -- Best regards, Alexander Sverdlin.

Re: [PATCH] MIPS: reserve the memblock right after the kernel

2020-11-13 Thread Alexander Sverdlin
Hello Serge, Thomas, On 13/11/2020 10:17, Alexander Sverdlin wrote: >> So IMHO what could be the best conclusion in the framework of this patch: >> 1) As Thomas said any platform-specific reservation should be done in the >> platform-specific code. That means if octeon needs

Re: [PATCH] MIPS: reserve the memblock right after the kernel

2020-11-13 Thread Alexander Sverdlin
of platforms this patch is required for? -- Best regards, Alexander Sverdlin.

Re: [PATCH] MIPS: reserve the memblock right after the kernel

2020-11-13 Thread Alexander Sverdlin
c, that's why we only noticed recently, that is breaks Octeon platform. -- Best regards, Alexander Sverdlin.

Re: [PATCH] MIPS: reserve the memblock right after the kernel

2020-11-13 Thread Alexander Sverdlin
(). > 2) The check_kernel_sections_mem() method can be removed. But it > should be done carefully. We at least need to try to find all the > platforms, which rely on its functionality. Thanks for looking into this! I agree with your analysis, I'll try to rework, removing check_kernel_sections_mem(). -- Best regards, Alexander Sverdlin.

Re: [PATCH] MIPS: reserve the memblock right after the kernel

2020-11-10 Thread Alexander Sverdlin
ion_mem()). As I understood, the issue is that memblock API operates internally on the page granularity (at least there are many ROUND_DOWN() inside for the size or upper boundary), so for request_resource() to success one has to claim the rest of the .bss last page. And with current memblock API memblock_reserve() must appear somewhere, being this ARCH or platform code. -- Best regards, Alexander Sverdlin.

Re: [PATCH] MIPS: reserve the memblock right after the kernel

2020-11-09 Thread Alexander Sverdlin
Hi Thomas, On 09/11/2020 11:34, Alexander Sverdlin wrote: >>> Linux doesn't own the memory immediately after the kernel image. On Octeon >>> bootloader places a shared structure right close after the kernel _end, >>> refer to "struct cvmx_bootinfo *octe

Re: [PATCH] MIPS: reserve the memblock right after the kernel

2020-11-09 Thread Alexander Sverdlin
by memblock allocator and re-used somewhere in Linux is in MIPS-generic check_kernel_sections_mem(). I personally will be fine with repairing Octeon only as I don't have other MIPS targets to care about, but maybe someone else in the MIPS community will find this fix useful... -- Best regards, Alexander Sverdlin.

Re: [PATCH] arm: Add clk_get_rate input parameter null check

2020-11-05 Thread Alexander Sverdlin
Hello Wang! On Fri, 2020-11-06 at 09:46 +0800, Wang Qing wrote: > The input parameter of clk_get_rate() is checked with IS_ERR(), > so here we need to check null on clk. Thank you for the patch! > Signed-off-by: Wang Qing Acked-by: Alexander Sverdlin > --- > arch/arm/mach-ep9

Re: [PATCH] mtd: spi-nor: Don't copy self-pointing struct around

2020-10-07 Thread Alexander Sverdlin
Hello Tudor, On 07/10/2020 10:48, tudor.amba...@microchip.com wrote: >> From: Alexander Sverdlin >> >> spi_nor_parse_sfdp() modifies the passed structure so that it points to >> itself (params.erase_map.regions to params.erase_map.uniform_region). This >> makes i

Re: [PATCH] mtd: revert "spi-nor: intel: provide a range for poll_timout"

2020-07-23 Thread Alexander Sverdlin
Hello Tudor, On 22/07/2020 19:03, tudor.amba...@microchip.com wrote: > On 7/22/20 7:37 PM, Alexander Sverdlin wrote: [...] >> I've performed my testing as well and got the following results: >> >> Vanilla Linux 4.9 (i.e. before the introduction of the offending >>

Re: [PATCH] mtd: spi-nor: intel-spi: Simulate WRDI command

2020-07-22 Thread Alexander Sverdlin
gt; sense for WRDI. >>>> >>>> Cc: sta...@vger.kernel.org >>>> Fixes: bce679e5ae3a ("mtd: spi-nor: Check for errors after each Register >>>> Operation") >>>> Signed-off-by: Alexander Sverdlin >>>> --- >>>&

Re: [PATCH] mtd: revert "spi-nor: intel: provide a range for poll_timout"

2020-07-22 Thread Alexander Sverdlin
ut 5242880 bytes (5.2 MB, 5.0 MiB) copied, 3.90503 s, 1.3 MB/s Therefore it looks good from my PoV: Tested-by: Alexander Sverdlin > Signed-off-by: Luis Alberto Herrera > Acked-by: Mika Westerberg > --- > drivers/mtd/spi-nor/controllers/intel-spi.c | 4 ++-- > 1 file changed, 2 in

[PATCH] mtd: spi-nor: intel-spi: Simulate WRDI command

2020-07-22 Thread Alexander Sverdlin
From: Alexander Sverdlin After spi_nor_write_disable() return code checks were introduced in the spi-nor front end intel-spi backend stopped to work because WRDI was never supported and always failed. Just pretend it was sucessful and ignore the command itself. HW sequencer shall do the right

Re: [PATCH v3] watchdog: initialize device before misc_register

2020-07-16 Thread Alexander Sverdlin
; watchdog_core_data and cdev") > Reviewed-by: Guenter Roeck Reviewed-by: Alexander Sverdlin > Signed-off-by: Krzysztof Sobota > --- > v1 -> v2: > * removed Change-Id tag > * added Review-by tag > v2 -> v3 > * convert spaces to tabs > * convert (hopeful

Re: [PATCH] Replace HTTP links with HTTPS ones: EP93XX

2020-07-06 Thread Alexander Sverdlin
line: > If doesn't contain `\bxmlns\b`: > For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`: > If both the HTTP and HTTPS versions > return 200 OK and serve the same content: > Replace HTTP with HTTPS. > > Signed-off-by:

Multicast from underlying MACVLAN interface towards MACVLAN

2020-05-12 Thread Alexander Sverdlin
0x10/0x10 ? trace_hardirqs_on+0x2c/0xe0 ? __sys_sendmsg+0x63/0xa0 __sys_sendmsg+0x63/0xa0 do_syscall_64+0x6c/0x1e0 entry_SYSCALL_64_after_hwframe+0x49/0xbe I would appreciate any hint, how to approach this problem! I can try to come up with a patch, but as this is so central thing in the

Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

2019-10-20 Thread Alexander Sverdlin
^^^ >> Previous patch (selecting IRQ_DOMAIN_HIERARCHY) is not >> required. >> >> If you re-spin all 3 ep93xx-relevant patches together, you can put my >> Tested-by: Alexander Sverdlin >> on them. > Awesome, thanks for testing. > > I o

Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

2019-10-19 Thread Alexander Sverdlin
> > Ah, that makes sense. so all interrupt numbers need to > be shifted by a fixed number (e.g. 1) like we did for > other platforms (see attachment). Yes, the below patch resolved both GPIO and DMA issues. Previous patch (selecting IRQ_DOMAIN_HIERARCHY) is not required. If you re-spi

Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

2019-10-19 Thread Alexander Sverdlin
VIC code itself, which assumes 0 means "auto assignment" (refer to vic_init()). But there are more problems I didn't resolve yet. -- Alexander Sverdlin.

Re: [PATCH 2/6] ARM: ep93xx: enable SPARSE_IRQ

2019-10-19 Thread Alexander Sverdlin
s, no idea what else is needed > here or if this is correct at all. > > Cc: Hartley Sweeten > Cc: Alexander Sverdlin > Cc: Hubert Feurstein > Cc: Lukasz Majewski > Signed-off-by: Arnd Bergmann > --- > arch/arm/Kconfig | 2 ++ > ar

Re: [PATCH] ARM: ep93xx: Mark expected switch fall-through

2019-08-12 Thread Alexander Sverdlin
de comment is modified in accordance with what GCC is expecting to find. Reported-by: kbuild test robot Acked-by: Alexander Sverdlin Signed-off-by: Gustavo A. R. Silva --- arch/arm/mach-ep93xx/crunch.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-ep93xx/crunch.c b/arc

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 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 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: kmsg: lseek errors confuse glibc's dprintf

2019-03-21 Thread Alexander Sverdlin
> break; > + case SEEK_CUR: > + /* For compatibility with userspace expecting SEEK_CUR > + * to not yield EINVAL. */ > + ret = -ESPIPE; > + break; > default: > ret = -EINVAL; > } > > Either makes dprintf work, but is either the right solution? > > Thanks. > > Mike. -- Alexander Sverdlin.

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

Re: [PATCH v1 3/3] drivers/tty: increase priority for tty_buffer_worker

2019-03-11 Thread Alexander Sverdlin
Hello Oleksij, On Thu, 10 Jan 2019 11:12:32 +0100 Oleksij Rempel wrote: > sched_priority = 1 is enough to dramatically reduce latency > on have system load produced by tasks with default user space prio. > > Signed-off-by: Oleksij Rempel Tested-by: Alexander Sverdlin > ---

Re: [PATCH v1 2/3] drivers/tty: convert tty_port to use kthread_worker

2019-03-11 Thread Alexander Sverdlin
ond high-priority kthread worker. > > Even without a second worker this patch allows to give a higher priority > to tty processing by modifying the priority of the corresponding > kthread. > > Signed-off-by: Steven Walter > Tested-by: Oleksij Rempel Tested-by: Alexander Sv

Re: [PATCH v1 1/3] drivers/tty: refactor functions for flushing/queuing work

2019-03-11 Thread Alexander Sverdlin
Hello Oleksij, On Thu, 10 Jan 2019 11:12:30 +0100 Oleksij Rempel wrote: > From: Steven Walter > > Preparation for converting to kthread_worker > > Signed-off-by: Steven Walter > Tested-by: Oleksij Rempel Tested-by: Alexander Sverdlin > --- > drive

Re: [PATCH] arch/arm/mach-ep93xx: Remove duplicate header

2019-01-17 Thread Alexander Sverdlin
On 17/01/2019 15:37, Brajeswar Ghosh wrote: > Remove mach/gpio-ep93xx.h which is included more than once > > Signed-off-by: Brajeswar Ghosh Acked-by: Alexander Sverdlin Arnd, would you take it into one of your ARM trees? > --- > arch/arm/mach-ep93xx/ts72xx.c | 1 - >

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 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] tools: Remove conflicting BITS_PER_LONG define

2018-09-24 Thread Alexander Sverdlin
Hello Arnaldo, >>>> Em Wed, Sep 12, 2018 at 07:02:32PM +0200, Alexander Sverdlin escreveu: >>>>> CC .../tools/objtool/builtin-check.o >>>>> ... >>>>> In file included from >>>>> .../tools/arch/x86/include/uapi/a

Re: [PATCH] tools: Remove conflicting BITS_PER_LONG define

2018-09-19 Thread Alexander Sverdlin
ular order of includes but not opposite. > I'll try and get one for building a x86_64 tools/perf, > tools/lib/{api,bpf,traceevent} to see if I manage to reproduce the > problem you're reporting. -- Best regards, Alexander Sverdlin.

Re: [PATCH] tools: Remove conflicting BITS_PER_LONG define

2018-09-19 Thread Alexander Sverdlin
On 12/09/2018 21:21, Arnaldo Carvalho de Melo wrote: > Em Wed, Sep 12, 2018 at 04:01:07PM -0300, Arnaldo Carvalho de Melo escreveu: >> Em Wed, Sep 12, 2018 at 07:02:32PM +0200, Alexander Sverdlin escreveu: >>> CC .../tools/objtool/builtin-check.o >>> ..

Re: [PATCH] tools: Remove conflicting BITS_PER_LONG define

2018-09-19 Thread Alexander Sverdlin
test building all tools in tools/ > > This broke make -C tools/perf/ I agree, this brakes perf, so we need to work further on that... -- Best regards, Alexander Sverdlin.

[PATCH] tools: Remove conflicting BITS_PER_LONG define

2018-09-12 Thread Alexander Sverdlin
] #define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__) Include instead as other headers do. Signed-off-by: Alexander Sverdlin --- Seen during x86_64 build. Seems that most of the compilers do not define __SIZEOF_LONG__, but my does. tools/include/linux/bitops.h | 5 + 1 file changed, 1

Re: [PATCH v2] serial: 8250_of: Fix for lack of interrupt support

2018-08-30 Thread Alexander Sverdlin
; defer probe, instead of assuming it. > > Fixes: c58caaab3bf8 ("serial: 8250: of: Defer probe on missing IRQ") > Signed-off-by: John Garry This indeed looks like a proper way to handle both cases: Reviewed-by: Alexander Sverdlin Tested-by: Alexander Sverdlin > --- &

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] 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,

[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

[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 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 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

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 *

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 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
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
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
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.

  1   2   >