Re: [PATCH v11 4/8] powerpc/perf: consolidate valid_user_sp

2020-03-19 Thread Andy Shevchenko
is_32bit_task()) { if (sp & 0x03) return 0; if (sp > STACK_TOP - 16) return 0; } else { ... } return 1; Other possibility: unsigned long align = is_32bit_task() ? 3 : 7; unsigned long top = STACK_TOP - (is_32bit_task() ? 16 : 32); return !(!sp || (sp & align) || sp > top); -- With Best Regards, Andy Shevchenko

Re: [PATCH v1 1/2] PCI/AER: Use for_each_set_bit()

2019-09-30 Thread Andy Shevchenko
On Fri, Sep 27, 2019 at 07:39:13AM -0500, Bjorn Helgaas wrote: > On Tue, Aug 27, 2019 at 06:18:22PM +0300, Andy Shevchenko wrote: > > This simplifies and standardizes slot manipulation code > > by using for_each_set_bit() library function. > > + unsigned long status = info-

Re: [PATCH v1 2/2] PCI/AER: Update parameter descriptions to satisfy kernel-doc validator

2019-08-28 Thread Andy Shevchenko
On Tue, Aug 27, 2019 at 10:06:54AM -0700, Kuppuswamy Sathyanarayanan wrote: > > On 8/27/19 8:18 AM, Andy Shevchenko wrote: > > Kernel-doc validator complains: > > > > aer.c:207: warning: Function parameter or member 'str' not described in > > 'pcie_ecrc_get_p

[PATCH v1 2/2] PCI/AER: Update parameter descriptions to satisfy kernel-doc validator

2019-08-27 Thread Andy Shevchenko
in 'aer_isr' aer.c:1209: warning: Excess function parameter 'work' description in 'aer_isr' Fix the above accordingly. Signed-off-by: Andy Shevchenko --- drivers/pci/pcie/aer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index

[PATCH v1 1/2] PCI/AER: Use for_each_set_bit()

2019-08-27 Thread Andy Shevchenko
This simplifies and standardizes slot manipulation code by using for_each_set_bit() library function. Signed-off-by: Andy Shevchenko --- drivers/pci/pcie/aer.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie

Re: [PATCH v3 06/20] docs: mark orphan documents as such

2019-06-11 Thread Andy Shevchenko
On Tue, Jun 11, 2019 at 8:05 PM Mauro Carvalho Chehab wrote: > > Em Tue, 11 Jun 2019 19:52:04 +0300 > Andy Shevchenko escreveu: > > > On Fri, Jun 7, 2019 at 10:04 PM Mauro Carvalho Chehab > > wrote: > > > Sphinx doesn't like orphan documents: > > > &

Re: [PATCH v3 06/20] docs: mark orphan documents as such

2019-06-11 Thread Andy Shevchenko
n: > + > LG Gram laptop extra features > = > Can we rather create a toc tree there? It was a first document in reST format in that folder. -- With Best Regards, Andy Shevchenko

Re: [PATCH] vsprintf: Do not break early boot with probing addresses

2019-05-13 Thread Andy Shevchenko
)" ? In both cases it should be limited to the size of pointer (8 or 16 characters). Something like "(e:%4d)" would work for error codes. The "(null)" is good enough by itself and already an established practice.. -- With Best Regards, Andy Shevchenko

Re: [PATCH] vsprintf: Do not break early boot with probing addresses

2019-05-10 Thread Andy Shevchenko
; TASK_SIZE ? Original code used PAGE_SIZE. If it needs to be changed, that it might be a separate explanation / patch. -- With Best Regards, Andy Shevchenko

Re: [PATCH] vsprintf: Do not break early boot with probing addresses

2019-05-09 Thread Andy Shevchenko
> [0.100070] cma: Reserved 4 MiB at (efault) > [0.100100] numa: NUMA mode: (efault) > > The reason for this, is that the code assumes that > probe_kernel_address() works very early. This however is not true on > at least s390. Uaccess on KERNEL_DS works only after page tables have

Re: [PATCH 03/16] lib,treewide: add new match_string() helper/macro

2019-05-08 Thread Andy Shevchenko
088.c > +++ b/sound/soc/codecs/max98088.c > @@ -1405,7 +1405,7 @@ static int max98088_get_channel(struct > snd_soc_component *component, const char > { > int ret; > > - ret = __match_string(eq_mode_name, ARRAY_SIZE(eq_mode_name), name); > + ret = match_string(eq_mode_name, name); > if (ret < 0) > dev_err(component->dev, "Bad EQ channel name '%s'\n", name); > return ret; > diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c > index cd69916d5dcb..d182d45d0c83 100644 > --- a/sound/soc/codecs/max98095.c > +++ b/sound/soc/codecs/max98095.c > @@ -1636,7 +1636,7 @@ static int max98095_get_bq_channel(struct > snd_soc_component *component, > { > int ret; > > - ret = __match_string(bq_mode_name, ARRAY_SIZE(bq_mode_name), name); > + ret = match_string(bq_mode_name, name); > if (ret < 0) > dev_err(component->dev, "Bad biquad channel name '%s'\n", name); > return ret; > -- > 2.17.1 > -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 00/26] compat_ioctl: cleanups

2019-05-06 Thread Andy Shevchenko
version. > I'll post the patches I made for that later, as they need more > testing and review from the scsi maintainers. > > I hope you can still take these for the coming merge window, unless > new problems come up. > drivers/platform/x86/wmi.c | 2 +-

Re: [PATCH 22/41] drivers: tty: serial: cpm_uart: fix logging calls

2019-04-30 Thread Andy Shevchenko
d-off-by: Enrico Weigelt > > Reviewed-by: Christophe Leroy > > But is that really worth doing those changes ? > > If we want to do something useful, wouldn't it make more sense to introduce > the use of dev_err() in order to identify the faulting device in the message > ? +1 for switching to dev_*(). -- With Best Regards, Andy Shevchenko

Re: [PATCH 36/41] drivers: tty: serial: 8250: store mmio resource size in port struct

2019-04-29 Thread Andy Shevchenko
On Mon, Apr 29, 2019 at 04:55:05PM +0200, Enrico Weigelt, metux IT consult wrote: > On 28.04.19 17:18, Andy Shevchenko wrote: > > On Sat, Apr 27, 2019 at 02:52:17PM +0200, Enrico Weigelt, metux IT consult > > wrote: > >> - int ret = 0; > > > > This and Co i

Re: [PATCH 40/41] drivers: tty: serial: helper for setting mmio range

2019-04-29 Thread Andy Shevchenko
On Mon, Apr 29, 2019 at 12:12:35PM +0200, Enrico Weigelt, metux IT consult wrote: > On 28.04.19 17:39, Andy Shevchenko wrote: > seems I've forgot to add "RFC:" in the subject - I'm not entirely happy > w/ that patch myself, just want to hear your oppinions. > > Moreover

Re: [PATCH 37/41] drivers: tty: serial: 8250: simplify io resource size computation

2019-04-29 Thread Andy Shevchenko
On Mon, Apr 29, 2019 at 08:48:53AM +0200, Enrico Weigelt, metux IT consult wrote: > On 28.04.19 17:21, Andy Shevchenko wrote: > >> +#define SERIAL_RT2880_IOSIZE 0x100 > > > > And why this is in the header file and not in corresponding C one? > > hmm, no

Re: [PATCH 40/41] drivers: tty: serial: helper for setting mmio range

2019-04-28 Thread Andy Shevchenko
rt_driver *uart, > + resource_size_t start, > + resource_size_t len) The comment doesn't tell why this is needed when we have one for struct resource. > +{ > + uart->mapbase = start; > + uart->mapsize = len; > + uart->iotype = UPIO_MEM; Only one type? > +} > + > +/* -- With Best Regards, Andy Shevchenko

Re: [PATCH 37/41] drivers: tty: serial: 8250: simplify io resource size computation

2019-04-28 Thread Andy Shevchenko
== PORT_RT2880) > - return 0x100; > - return 0x1000; > - } > + > if (is_omap1_8250(pt)) > return 0x16 << pt->port.regshift; This is good. We definitely need to get rid of custom stuff in generic 8250_port, etc. -- With Best Regards, Andy Shevchenko

Re: [PATCH 36/41] drivers: tty: serial: 8250: store mmio resource size in port struct

2019-04-28 Thread Andy Shevchenko
port->mapsize); You may increase readability by introducing temporary variables ... mapbase = port->mapbase; ... mapsize = port->mapsize; ... port->membase = ioremap_nocache(mapbase, mapsize); ... -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 5/5] Lib: sort.h: remove the size argument from the swap function

2019-04-03 Thread Andy Shevchenko
ned-off-by: Andrey Abramov > Reviewed by: George Spelvin FWIW, Reviewed-by: Andy Shevchenko > --- > arch/x86/kernel/unwind_orc.c | 2 +- > include/linux/sort.h | 2 +- > kernel/jump_label.c | 2 +- > lib/extable.c| 2 +- > lib/sort.c

Re: [PATCH v2 5/5] Lib: sort.h: replace int size with size_t size in the swap function

2019-04-01 Thread Andy Shevchenko
On Mon, Apr 01, 2019 at 09:56:07AM +, George Spelvin wrote: > On Mon, 1 Apr 2019 at 12:35:55 +0300, Andy Shevchenko wrote: > > Hmm... If (*swap)() is called recursively it means the change might increase > > stack usage on 64-bit platforms. > > > > Am I missing

Re: [PATCH v2 5/5] Lib: sort.h: replace int size with size_t size in the swap function

2019-04-01 Thread Andy Shevchenko
- swap_func(a, b, (int)size); > + swap_func(a, b, size); > } > > /** > @@ -187,7 +187,7 @@ static size_t parent(size_t i, unsigned int lsbit, size_t > size) > */ > void sort(void *base, size_t num, size_t size, > int (*cmp_func)(co

Re: [PATCH 0/5] simple sort swap function usage improvements

2019-03-30 Thread Andy Shevchenko
ifs: find.c: replace swap function with built-in one > Lib: sort.h: replace int size with size_t size in the swap function You have to do something about Cc list. 50 people is complete overkill. Seems as your series is a set of independent fixes. Why not to split and Cc based on individual case? -- With Best Regards, Andy Shevchenko

Re: serial driver cleanups v2

2019-03-15 Thread Andy Shevchenko
On Fri, Mar 15, 2019 at 8:44 PM Enrico Weigelt, metux IT consult wrote: > On 15.03.19 19:11, Andy Shevchenko wrote: > OTOH, the name, IMHO, is a bit misleading. Any chance of ever changing > it to a more clear name (eg. devm_request_and_ioremap_resource()) ? Compare iomap vs

Re: serial driver cleanups v2

2019-03-15 Thread Andy Shevchenko
On Fri, Mar 15, 2019 at 11:36:04AM +0100, Enrico Weigelt, metux IT consult wrote: > On 15.03.19 10:12, Andy Shevchenko wrote: > > >> Part II will be about moving the mmio range from mapbase and > >> mapsize (which are used quite inconsistently) to a struct resourc

Re: serial driver cleanups v2

2019-03-15 Thread Andy Shevchenko
On Fri, Mar 15, 2019 at 11:12 AM Andy Shevchenko wrote: > On Fri, Mar 15, 2019 at 12:40 AM Enrico Weigelt, metux IT consult > wrote: > > > here's v2 of my serial cleanups queue - part I: > > > > essentially using helpers to code more compact and switching to >

Re: serial driver cleanups v2

2019-03-15 Thread Andy Shevchenko
ounce here as an RFC, since this was neither tested nor correct. And selling point for many of them is not true: it doesn't make any difference in the size in code, but increases a time to run (devm_ioremap_resource() does more than plain devm_iomap() call). -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 45/45] drivers: tty: serial: mux: use devm_* functions

2019-03-15 Thread Andy Shevchenko
>membase); > + devm_iounmap(port->dev, port->membase); > } > > - release_mem_region(dev->hpa.start + MUX_OFFSET, port_count * > MUX_LINE_OFFSET); > + devm_release_mem_region(>dev, > + dev->hpa.start + MUX_OFFSET, > + port_count * MUX_LINE_OFFSET); > return 0; > } -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 02/45] drivers: tty: serial: 8250_dw: use devm_ioremap_resource()

2019-03-15 Thread Andy Shevchenko
ap(dev, regs->start, resource_size(regs)); > + p->membase = devm_ioremap_resource(dev, regs); > if (!p->membase) And how did you test this? devm_ioremap_resource() returns error pointer in case of error. > return -ENOMEM; -- With Best Regards, Andy Shevchenko

[PATCH v1] PCI/AER: use match_string() helper to simplify the code

2019-01-28 Thread Andy Shevchenko
match_string() returns the index of an array for a matching string, which can be used intead of open coded implementation. Signed-off-by: Andy Shevchenko --- drivers/pci/pcie/aer.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci

Re: [PATCH 0/7] serial: Finish kgdb on qcom_geni; fix many lockdep splats w/ kgdb

2018-10-30 Thread Andy Shevchenko
tty/serial/qcom_geni_serial.c | 10 -- > include/linux/kgdb.h| 9 ++--- > include/linux/serial_core.h | 38 - > kernel/debug/debug_core.c | 2 +- > kernel/smp.c| 4 ++- > 18 files changed, 80 insertions(+), 53 deletions(-) > > -- > 2.19.1.568.g152ad8e336-goog > -- With Best Regards, Andy Shevchenko

Re: [PATCH 0/9] PCI hotplug diet

2018-08-30 Thread Andy Shevchenko
atch is not accepted or other pciehp-related patches are merged > before this series, I'll have to rebase patch [4/9] ("PCI: pciehp: Unify > controller and slot structs"). No big deal, just a heads-up. > Acked-by: Andy Shevchenko for PDx86 bits > Thanks, > > Lukas >

Re: [PATCH] ASoC: Convert to using %pOFn instead of device_node.name

2018-08-28 Thread Andy Shevchenko
np); One line? -- With Best Regards, Andy Shevchenko

Re: [PATCH] sound: Convert to using %pOFn instead of device_node.name

2018-08-28 Thread Andy Shevchenko
return 0; > + if (strncmp(np, "i2s-", 4)) > return 0; Shouldn't be node_name here? -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 1/8] seq_file: introduce seq_open_data helper

2018-08-19 Thread Andy Shevchenko
On Sat, Aug 18, 2018 at 4:26 PM Rasmus Villemoes wrote: > > There are quite a few callers of seq_open that could be simplified by > setting the ->private member via the seq_open call instead of fetching > file->private_data afterwards. > I like this series, Reviewed-by:

Re: [PATCH] lib/test_hexdump: fix failure on big endian cpu

2018-08-09 Thread Andy Shevchenko
> it because you never merged it :P Hmm... I (as an author of the test case) never saw that patch. > Sorry, I wasn't sure who should merge it, and never followed up. lib/* most of the time under Andrew's responsibility, though since it's orphaned in MAINTAINERS, anyone can push, though, I thin

Re: [PATCH] lib/test_hexdump: fix failure on big endian cpu

2018-08-08 Thread Andy Shevchenko
> This patch fixes it. I like this approach because in the future we might introduce something to print be data on le cpu or otherwise and thus test data will be used independently of cpu endianess. Reviewed-by: Andy Shevchenko Thanks for adding the BE support. > > Fixes: 64d1d77a44697 (&q

Re: [PATCH v7 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-18 Thread Andy Shevchenko
On Wed, Jul 18, 2018 at 7:36 PM, Andy Shevchenko wrote: > On Wed, Jul 18, 2018 at 5:49 AM, Baoquan He wrote: >> reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c >> and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c >> so that it's sh

Re: [PATCH v7 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-18 Thread Andy Shevchenko
} > + return 0; > +} > +EXPORT_SYMBOL(reparent_resources); > + > static void __init __reserve_region_with_split(struct resource *root, > resource_size_t start, resource_size_t end, > const char *name) > -- > 2.13.6 > -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 2/4] resource: Use list_head to link sibling resource

2018-07-08 Thread Andy Shevchenko
}; >> 73b4390f Ralf Baechle 2008-07-16 59 >> >> :: The code at line 57 was first introduced by commit >> :: 73b4390fb23456964201abda79f1210fe337d01a [MIPS] Routerboard 532: >> Support for base system >> >> :: TO: Ralf Baechle >> :: CC: Ralf Baechle >> >> --- >> 0-DAY kernel test infrastructureOpen Source Technology Center >> https://lists.01.org/pipermail/kbuild-all Intel Corporation > > -- With Best Regards, Andy Shevchenko

Re: [PATCH v6 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-04 Thread Andy Shevchenko
On Wed, Jul 4, 2018 at 7:10 AM, Baoquan He wrote: > reparent_resources() is duplicated in arch/microblaze/pci/pci-common.c > and arch/powerpc/kernel/pci-common.c, so move it to kernel/resource.c > so that it's shared. With couple of comments below, Reviewed-by: Andy Shevchenko P.S

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-07-03 Thread Andy Shevchenko
On Tue, Jul 3, 2018 at 5:55 PM, Baoquan He wrote: > On 06/12/18 at 05:24pm, Andy Shevchenko wrote: >> On Tue, Jun 12, 2018 at 5:20 PM, Andy Shevchenko >> wrote: >> > I briefly looked at the code and error codes we have, so, my proposal >> > is one of the fo

Re: [PATCHv3 2/4] drivers/base: utilize device tree info to shutdown devices

2018-07-03 Thread Andy Shevchenko
ct device, > + dev = list_entry(devices_kset->list.next, struct device, > kobj.entry); > - __device_shutdown(dev); > + device_for_each_child_shutdown(dev); > } > spin_unlock(_kset->list_lock)

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-06-12 Thread Andy Shevchenko
On Tue, Jun 12, 2018 at 5:20 PM, Andy Shevchenko wrote: > On Tue, Jun 12, 2018 at 12:38 PM, Baoquan He wrote: >> On 06/12/18 at 11:29am, Andy Shevchenko wrote: >>> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He wrote: > >>> > +{ >>> >>> > +

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-06-12 Thread Andy Shevchenko
On Tue, Jun 12, 2018 at 12:38 PM, Baoquan He wrote: > On 06/12/18 at 11:29am, Andy Shevchenko wrote: >> On Tue, Jun 12, 2018 at 6:28 AM, Baoquan He wrote: >> > +{ >> >> > + for (pp = >child; (p = *pp) != NULL; pp = >sibling) { >&

Re: [PATCH v5 1/4] resource: Move reparent_resources() to kernel/resource.c and make it public

2018-06-12 Thread Andy Shevchenko
contained */ Usually we are expecting real eeror codes. > + if (firstpp == NULL) > + firstpp = pp; > + } > + if (firstpp == NULL) > + return -1; /* didn't find any conflicting entries? */ Ditto. > +} > +EXPORT_SYMBOL(reparent_resources); -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Andy Shevchenko
On Wed, Mar 14, 2018 at 7:41 PM, Andy Shevchenko <andy.shevche...@gmail.com> wrote: > I would rather name it _NO_PCI_REALIGN_MSG I meant _NO_REALIGN_MSG of course (PCI is already at the beginning). -- With Best Regards, Andy Shevchenko

Re: [PATCH 1/2, pci] pci: Addition of PCI_DEV_FLAGS_QUIET_PCI_REALIGN attribute to the PCI subsystem

2018-03-14 Thread Andy Shevchenko
N = (__force pci_dev_flags_t) (1 << 12), I would rather name it _NO_PCI_REALIGN_MSG > }; -- With Best Regards, Andy Shevchenko

Re: [PATCH 01/21] powerpc: Remove warning on array size when empty

2018-02-28 Thread Andy Shevchenko
On Tue, Feb 27, 2018 at 10:42 PM, Segher Boessenkool <seg...@kernel.crashing.org> wrote: > On Tue, Feb 27, 2018 at 05:52:06PM +0200, Andy Shevchenko wrote: >> On Tue, Feb 27, 2018 at 9:44 AM, Mathieu Malaterre <ma...@debian.org> wrote: >> > On Tue, Feb 27, 201

Re: [PATCH 01/21] powerpc: Remove warning on array size when empty

2018-02-27 Thread Andy Shevchenko
look into object file? In kernel we much rely on the compiling away the code which is deterministically not in use. Here I'm pretty sure it will compile away entire function. -- With Best Regards, Andy Shevchenko

Re: [PATCH 01/21] powerpc: Remove warning on array size when empty

2018-02-26 Thread Andy Shevchenko
On Mon, Feb 26, 2018 at 4:44 PM, Andy Shevchenko <andy.shevche...@gmail.com> wrote: > On Sun, Feb 25, 2018 at 7:22 PM, Mathieu Malaterre <ma...@debian.org> wrote: >> static void __init check_cpu_feature_properties(unsigned long node) >> { >> - u

Re: [PATCH 01/21] powerpc: Remove warning on array size when empty

2018-02-26 Thread Andy Shevchenko
ture_properties); ++i, ++fp) { > + for (; fp != feature_properties + ARRAY_SIZE(feature_properties); > ++fp) { > prop = of_get_flat_dt_prop(node, fp->name, NULL); > if (prop && be32_to_cpup(prop) >= fp->min_value) { > cur_cpu_spec->cpu_features |= fp->cpu_feature; > -- > 2.11.0 > -- With Best Regards, Andy Shevchenko

Re: [PATCH v3 2/4] gpio: Add GPIO driver for Nintendo Wii

2018-02-09 Thread Andy Shevchenko
rt Herranz and the GameCube > Linux Team, file arch/powerpc/platforms/embedded6xx/hlwd-gpio.c, > available at https://github.com/DeltaResero/GC-Wii-Linux-Kernels, but > has grown quite dissimilar. > Fine to me, though one comment below. In any case, Reviewed-by: Andy Shevchenko <and

Re: [PATCH v2 3/6] gpio: Add GPIO driver for Nintendo Wii

2018-01-28 Thread Andy Shevchenko
ENDIAN_BYTE_ORDER); > + Remove this extra line. > + if (res < 0) { > + dev_warn(hlwd->dev, "bgpio_init failed: %d\n", res); > + return res; > + } > + if (of_property_read_u32(pdev->dev.of_node, "ngpios", )) > + ngpios = 32; A nit: I would rather go with res = of_property_read(...); if (res) ngpios = 32; -- With Best Regards, Andy Shevchenko

Re: [trivial PATCH] treewide: Align function definition open/close braces

2017-12-18 Thread Andy Shevchenko
/drivers/rtc/rtc-ab-b5ze-s3.c b/drivers/rtc/rtc-ab-b5ze-s3.c > index a319bf1e49de..ef5c16dfabfa 100644 Acked-by: Andy Shevchenko <andy.shevche...@gmail.com> for PDx86 changes. -- With Best Regards, Andy Shevchenko

[PATCH v2 2/2] powerpc/pci: Unroll two pass loop when scanning bridges

2017-11-10 Thread Andy Shevchenko
erg <mika.westerb...@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- arch/powerpc/kernel/pci-hotplug.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/kernel/pci-hotplug.c b/arch/powerpc/kerne

[PATCH v2 1/2] powerpc/pci: convert to use for_each_pci_bridge() helper

2017-11-10 Thread Andy Shevchenko
...which makes code slightly cleaner. Requires: d43f59ce6c50 ("PCI: Add for_each_pci_bridge() helper") Acked-by: Michael Ellerman <m...@ellerman.id.au> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- arch/powerpc/kernel/pci-hotplug.c | 7 ++

Re: [PATCH v1] powerpc/pci: convert to use for_each_pci_bridge() helper

2017-11-07 Thread Andy Shevchenko
On Tue, 2017-10-31 at 20:40 +0200, Andy Shevchenko wrote: > On Tue, 2017-10-31 at 13:33 -0500, Bjorn Helgaas wrote: > > On Tue, Oct 31, 2017 at 10:12 AM, Andy Shevchenko > > <andriy.shevche...@linux.intel.com> wrote: > > > On Fri, 2017-10-13 at 19:52 +0300, Andy Shev

Re: [PATCH v1] powerpc/pci: convert to use for_each_pci_bridge() helper

2017-10-31 Thread Andy Shevchenko
On Tue, 2017-10-31 at 13:33 -0500, Bjorn Helgaas wrote: > On Tue, Oct 31, 2017 at 10:12 AM, Andy Shevchenko > <andriy.shevche...@linux.intel.com> wrote: > > On Fri, 2017-10-13 at 19:52 +0300, Andy Shevchenko wrote: > > > ...which makes code slightly cleaner. > >

Re: [PATCH v1] powerpc/pci: convert to use for_each_pci_bridge() helper

2017-10-31 Thread Andy Shevchenko
On Fri, 2017-10-13 at 19:52 +0300, Andy Shevchenko wrote: > ...which makes code slightly cleaner. +Cc: Bjorn Perhaps it makes sense to pass this through PCI if no one objects? > > Requires: d43f59ce6c50 ("PCI: Add for_each_pci_bridge() helper") > Signed-off-by: Andy Shev

Re: char/tpm: Improve a size determination in nine functions

2017-10-18 Thread Andy Shevchenko
_might be_ upstream (exception is drivers/staging). Why didn't you listen to what people are telling you? Why are you spending too much time on little sense crap instead of doing real fixes? -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy

Re: char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Andy Shevchenko
ve you talked to Fengguang (0-day LKP)? Have you talked to Arnd (I think he is related to kernel-ci)? -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Andy Shevchenko
that > catch different sorts of errors, BEFORE code is upstreamed, and > patches like these, after the fact. +1. > After the code has been upstreamed, it is a lot more difficult to > justify changes like this. It impacts both code that is being > developed AND backporting bug fixes. -- Andy Shevchenko <andriy.shevche...@linux.intel.com> Intel Finland Oy

Re: [PATCH 3/4] char/tpm: Improve a size determination in nine functions

2017-10-17 Thread Andy Shevchenko
oc(dev, sizeof(struct tpm_tis_tcg_phy), > GFP_KERNEL); > + phy = devm_kzalloc(dev, sizeof(*phy), GFP_KERNEL); > if (phy == NULL) > return -ENOMEM; > > diff --git a/drivers/char/tpm/tpm_tis_spi.c > b/drivers/char/tpm/tpm_tis_spi.c > index 424ff2fde1f2..7cabb1

[PATCH v1] powerpc/pci: convert to use for_each_pci_bridge() helper

2017-10-13 Thread Andy Shevchenko
...which makes code slightly cleaner. Requires: d43f59ce6c50 ("PCI: Add for_each_pci_bridge() helper") Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- arch/powerpc/kernel/pci-hotplug.c | 7 ++- arch/powerpc/kernel/pci_of_scan.c | 7 ++- 2

Re: Linux 4.13: Reported regressions as of Sunday, 2017-07-30

2017-07-30 Thread Andy Shevchenko
nel.org/torvalds/c/a36afb0ab6 > Status: Takashi proposed a patch that fixes the issue Status is outdated as per discussion, Patch is available in upstream as commit ddc9e69b9dc2. > Latest discussion: https://bugzilla.kernel.org/show_bug.cgi?id=196397#c6 > (2017-07-17) ...while this one is correct link. -- With Best Regards, Andy Shevchenko

Re: Today's linux-next build fail on powerpc

2017-07-10 Thread Andy Shevchenko
On Mon, Jul 10, 2017 at 5:37 PM, Abdul Haleem <abdha...@linux.vnet.ibm.com> wrote: > On Fri, 2017-07-07 at 19:36 +0300, Andy Shevchenko wrote: >> On Thu, Jul 6, 2017 at 9:00 AM, Abdul Haleem >> <abdha...@linux.vnet.ibm.com> wrote: >> > next-20170705 fails t

Re: Today's linux-next build fail on powerpc

2017-07-07 Thread Andy Shevchenko
On Thu, Jul 6, 2017 at 9:00 AM, Abdul Haleem <abdha...@linux.vnet.ibm.com> wrote: > Hi Luis, > > next-20170705 fails to build on powerpc with below errors. Hi, I had sent a fix yesterday. Had you chance to test it? -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 4/7] x86: put msr-index.h in uapi

2017-01-06 Thread Andy Shevchenko
On Fri, Jan 6, 2017 at 11:43 AM, Nicolas Dichtel <nicolas.dich...@6wind.com> wrote: > This header file is exported, thus move it to uapi. Just hint for the future: -M (move) -C (copy) -D (delete) [though this is NOT for applying] -- With Best Regards, Andy Shevchenko

Re: [PATCH v2 00/23] ata: sata_dwc_460ex: make it working again

2016-05-10 Thread Andy Shevchenko
immutable. Vinod? > > Please use branch topic/dw. I will not rebase this before sending to > > Linus. > Okay, pulled topic/dw into libata/for-4.7-dw and applied 1-22 on top. Thanks! > Please let me know how patch 23 should be routed. Since Rob Acked you may take it as well. --

Re: [PATCH v2 00/23] ata: sata_dwc_460ex: make it working again

2016-05-09 Thread Andy Shevchenko
On Mon, May 9, 2016 at 10:05 PM, Tejun Heo <t...@kernel.org> wrote: > On Mon, May 09, 2016 at 10:13:59AM +0100, Måns Rullgård wrote: >> Andy Shevchenko <andy.shevche...@gmail.com> writes: >> >> > On Mon, May 9, 2016 at 4:09 AM, Tejun Heo <t...@kernel.org>

Re: [PATCH v2 00/23] ata: sata_dwc_460ex: make it working again

2016-05-09 Thread Andy Shevchenko
On Mon, May 9, 2016 at 4:09 AM, Tejun Heo <t...@kernel.org> wrote: > On Sun, May 08, 2016 at 04:00:08PM -0400, Tejun Heo wrote: >> Hello, Andy. >> >> On Wed, May 04, 2016 at 03:22:51PM +0300, Andy Shevchenko wrote: >> > Tejun, since Vinod applied

Re: [PATCH v2 00/23] ata: sata_dwc_460ex: make it working again

2016-05-04 Thread Andy Shevchenko
On Tue, Apr 26, 2016 at 12:03 PM, Andy Shevchenko <andriy.shevche...@linux.intel.com> wrote: > The last approach in the commit 8b3444852a2b ("sata_dwc_460ex: move to generic > DMA driver") to switch to generic DMA engine API wasn't tested on bare metal. > Besides th

[PATCH v2 18/23] ata: sata_dwc_460ex: switch to new dmaengine_terminate_* API

2016-04-26 Thread Andy Shevchenko
Convert dmaengine_terminate_all() calls to synchronous and asynchronous versions where appropriate. Tested-by: Christian Lamparter <chunk...@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/ata/sata_dwc_460ex.c | 2 +- 1 file changed,

[PATCH v2 01/23] ata: sata_dwc_460ex: remove incorrect locking

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard This lock is already taken in ata_scsi_queuecmd() a few levels up the call stack so attempting to take it here is an error. Moreover, it is pointless in the first place since it only protects a single, atomic assignment. Enabling lock debugging gives the

[PATCH v2 23/23] powerpc/4xx: Device tree update for the 460ex DWC SATA

2016-04-26 Thread Andy Shevchenko
Device tree update for the Applied micro processor 460ex on-chip SATA to use "dmas" property. Acked-by: Rob Herring <r...@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- arch/powerpc/boot/dts/canyonlands.dts | 15 --- 1 file

[PATCH v2 07/23] ata: sata_dwc_460ex: skip dma setup for non-dma commands

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard Calling dmaengine_prep_slave_sg() for non-dma ATA commands is unnecessary at best and could be harmful if the dma driver reacts badly to this. It also causes this driver to print a bogus error message in these cases. This patch changes sata_dwc_qc_issue() to

[PATCH v2 04/23] ata: sata_dwc_460ex: burst size must be in items not bytes

2016-04-26 Thread Andy Shevchenko
The burst size as defined by DMAengine API is in items of address width. Derive burst size from AHB_DMA_BRST_DFLT (64 bytes) by dividing it to DMA_SLAVE_BUSWIDTH_4_BYTES (4 bytes) that gives us 16 items. Tested-by: Christian Lamparter <chunk...@googlemail.com> Signed-off-by: Andy Shev

[PATCH v2 22/23] ata: sata_dwc_460ex: make debug messages neat

2016-04-26 Thread Andy Shevchenko
There is a duplication in the debug messages when accessing SCR registers. Remove duplication to make the messages neat. Tested-by: Christian Lamparter <chunk...@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/ata/sata_dwc_460ex.c | 8

[PATCH v2 16/23] ata: sata_dwc_460ex: add __iomem to register base pointer

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard The pointer to the mmio register base is missing the __iomem annotation. Fix this. Tested-by: Christian Lamparter Signed-off-by: Mans Rullgard --- drivers/ata/sata_dwc_460ex.c | 2 +- 1 file changed, 1

[PATCH v2 11/23] ata: sata_dwc_460ex: get rid of global data

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard This moves all global data into the driver private struct, thus permitting multiple devices of this type to be used. The core_scr_read/write() functions are replaced with equivalent calls to the existing sata_dwc_scr_read/write(). Tested-by: Christian

[PATCH v2 19/23] ata: sata_dwc_460ex: use readl/writel_relaxed()

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard Rename the register access macros and use standard _relaxed() ops instead of __raw variants with explicit byte swapping. The original driver used the ppc-specific in/out_le32(). When it was adapted to other systems, these were added to the driver under

[PATCH v2 17/23] ata: sata_dwc_460ex: supply physical address of FIFO to DMA

2016-04-26 Thread Andy Shevchenko
DMA operates with physical addresses which is not exactly the same as ioremap() returns. Introduce variable to keep physical address of the SATA FIFO register and supply it when prepare DMA channel. Tested-by: Christian Lamparter <chunk...@googlemail.com> Signed-off-by: Andy Shev

[PATCH v2 20/23] ata: sata_dwc_460ex: tidy up sata_dwc_clear_dmacr()

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard This consolidates the reads from each of the if/else branches to one place making the code a lot nicer to look at. Tested-by: Christian Lamparter Signed-off-by: Mans Rullgard --- drivers/ata/sata_dwc_460ex.c | 14

[PATCH v2 13/23] ata: sata_dwc_460ex: remove empty libata callback

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard The sata_dwc_qc_prep() does nothing. Use the default ata_noop_qc_prep instead. Tested-by: Christian Lamparter Signed-off-by: Mans Rullgard --- drivers/ata/sata_dwc_460ex.c | 22 -- 1 file

[PATCH v2 14/23] ata: sata_dwc_460ex: get rid of some pointless casts

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard Casting a pointer to unsigned long only to immediately cast it back to a pointer makes no sense. Fix this. Tested-by: Christian Lamparter Signed-off-by: Mans Rullgard --- drivers/ata/sata_dwc_460ex.c | 30

[PATCH v2 15/23] ata: sata_dwc_460ex: get rid of incorrect cast

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard The (void *__iomem) cast is wrong. Change the target type of the "base" pointer to void __iomem instead and drop the cast. Tested-by: Christian Lamparter Signed-off-by: Mans Rullgard ---

[PATCH v2 12/23] ata: sata_dwc_460ex: correct HOSTDEV{P}_FROM_*() macros

2016-04-26 Thread Andy Shevchenko
Here we refactor HOSTDEV{P}_FROM_*() macros to fit one line and fix the definition of HSDEV_FROM_HSDEVP() where wrong name of the parameter waas used. Tested-by: Christian Lamparter <chunk...@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> ---

[PATCH v2 10/23] ata: sata_dwc_460ex: add phy support

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard This adds support for powering on an optional PHY when activating the device. Tested-by: Christian Lamparter Signed-off-by: Mans Rullgard --- drivers/ata/Kconfig | 1 + drivers/ata/sata_dwc_460ex.c | 22

[PATCH v2 09/23] ata: sata_dwc_460ex: use "dmas" DT property to find dma channel

2016-04-26 Thread Andy Shevchenko
From: Mans Rullgard Currently this driver only works with a DesignWare DMA engine which it registers manually using the second "reg" address range and interrupt number from the DT node. This patch makes the driver instead use the "dmas" property if present, otherwise optionally

[PATCH v2 05/23] ata: sata_dwc_460ex: DMA is always a flow controller

2016-04-26 Thread Andy Shevchenko
In the original code the DMA is always a flow controller. Set this accordingly in updated code. Tested-by: Christian Lamparter <chunk...@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/ata/sata_dwc_460ex.c | 2 +- 1 file changed, 1 ins

[PATCH v2 08/23] ata: sata_dwc_460ex: don't call ata_sff_qc_issue() on DMA commands

2016-04-26 Thread Andy Shevchenko
ata_sff_qc_issue() can't handle DMA commands and thus we have to avoid it for them. Do call ata_bmdma_qc_issue() instead for this case. Note that the former one distinguishes PIO and DMA mode and behaves accordingly. Suggested-by: Christian Lamparter <chunk...@googlemail.com> Signed-off-by

[PATCH v2 06/23] ata: sata_dwc_460ex: select only core part of DMA driver

2016-04-26 Thread Andy Shevchenko
There is no need to have a platform driver compiled since the DMA driver is used as a library. Tested-by: Christian Lamparter <chunk...@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/ata/Kconfig | 2 +- 1 file changed, 1 insertion(+)

[PATCH v2 03/23] ata: sata_dwc_460ex: set dma_boundary to 0x1fff

2016-04-26 Thread Andy Shevchenko
switched to generic DMAengine API we satisfy above by setting dma_boundary value to 0x1fff. Suggested-by: Mans Rullgard <m...@mansr.com> Tested-by: Christian Lamparter <chunk...@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/ata/sa

[PATCH v2 00/23] ata: sata_dwc_460ex: make it working again

2016-04-26 Thread Andy Shevchenko
09250.html [2] https://bitbucket.org/andy-shev/linux/branch/topic%2Fdw%2Fsata Since v1: - simplify patch 8 (David Laight) - add Tested-by and Acked-by tags Andy Shevchenko (11): ata: sata_dwc_460ex: set dma_boundary to 0x1fff ata: sata_dwc_460ex: burst size must be in items not bytes ata:

[PATCH v2 02/23] ata: sata_dwc_460ex: fix crash on offline links without an attached drive

2016-04-26 Thread Andy Shevchenko
From: Christian Lamparter This patch fixes Machine Check "Data Write PLB Error" which happens when libata-sff's ata_sff_dev_select is trying to write into the device_addr in order to select a drive. However, SATA has no master or slave devices like the old ATA Bus,

[PATCH v1 17/23] ata: sata_dwc_460ex: supply physical address of FIFO to DMA

2016-04-21 Thread Andy Shevchenko
DMA operates with physical addresses which is not exactly the same as ioremap() returns. Introduce variable to keep physical address of the SATA FIFO register and supply it when prepare DMA channel. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drive

[PATCH v1 19/23] ata: sata_dwc_460ex: use readl/writel_relaxed()

2016-04-21 Thread Andy Shevchenko
From: Mans Rullgard Rename the register access macros and use standard _relaxed() ops instead of __raw variants with explicit byte swapping. The original driver used the ppc-specific in/out_le32(). When it was adapted to other systems, these were added to the driver under

[PATCH v1 21/23] ata: sata_dwc_460ex: use devm_ioremap

2016-04-21 Thread Andy Shevchenko
This simplifies error handling and cleanup by using devm to manage IO mappings. Signed-off-by: Mans Rullgard --- drivers/ata/sata_dwc_460ex.c | 30 +++--- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/drivers/ata/sata_dwc_460ex.c

[PATCH v1 22/23] ata: sata_dwc_460ex: make debug messages neat

2016-04-21 Thread Andy Shevchenko
There is a duplication in the debug messages when accessing SCR registers. Remove duplication to make the messages neat. Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> --- drivers/ata/sata_dwc_460ex.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

<    1   2   3   4   5   >