Re: [PATCH AUTOSEL 4.4 4/8] sparc32: Limit memblock allocation to low memory

2021-03-03 Thread Andreas Larsson
On 2021-03-02 12:59, Sasha Levin wrote: From: Andreas Larsson [ Upstream commit bda166930c37604ffa93f2425426af6921ec575a ] Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 changed sparc32 to use memblocks instead of bootmem, but also made high memory available via memblock allocation which

Re: [PATCH AUTOSEL 4.9 05/10] sparc32: Limit memblock allocation to low memory

2021-03-03 Thread Andreas Larsson
On 2021-03-02 12:59, Sasha Levin wrote: From: Andreas Larsson [ Upstream commit bda166930c37604ffa93f2425426af6921ec575a ] Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 changed sparc32 to use memblocks instead of bootmem, but also made high memory available via memblock allocation which

Re: [PATCH AUTOSEL 4.14 06/13] sparc32: Limit memblock allocation to low memory

2021-03-03 Thread Andreas Larsson
On 2021-03-02 12:58, Sasha Levin wrote: From: Andreas Larsson [ Upstream commit bda166930c37604ffa93f2425426af6921ec575a ] Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 changed sparc32 to use memblocks instead of bootmem, but also made high memory available via memblock allocation which

[PATCH v2] sparc32: Limit memblock allocation to low memory

2021-02-05 Thread Andreas Larsson
in the early stages, now using memblock allocation. Signed-off-by: Andreas Larsson Acked-by: Mike Rapoport --- Changes, in commit message, since v1: - Added a missing "not" in "does not work" - Clarified crash to kernel panic. - Added Acked-by arch/sparc/mm/init_32.c | 3 ++

[PATCH] sparc32: Preserve clone syscall flags argument for restarts due to signals

2021-02-04 Thread Andreas Larsson
and the setting %l6 to 0 or 1 was removed. The use of that 0 or 1 value in %l6 was removed in commit 28e6103665301ce60634e8a77f0b657c6cc099de. Signed-off-by: Andreas Larsson --- arch/sparc/kernel/entry.S| 8 +++- arch/sparc/kernel/rtrap_32.S | 2 +- 2 files changed, 4 insertions(+), 6

[PATCH] sparc32: Limit memblock allocation to low memory

2021-02-04 Thread Andreas Larsson
in the early stages, now using memblock allocation. Signed-off-by: Andreas Larsson --- arch/sparc/mm/init_32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c index eb2946b1df8a..6139c5700ccc 100644 --- a/arch/sparc/mm/init_32.c +++ b/arch/sparc/mm

Re: sparc32: boot fails with > 256 MB memory after switch to NO_BOOTMEM

2021-01-28 Thread Andreas Larsson
On 2021-01-28 10:35, Mike Rapoport wrote: On Wed, Jan 27, 2021 at 04:03:00PM +0100, Andreas Larsson wrote: Commit cca079ef8ac29a7c02192d2bad2ffe4c0c5ffdd0 makes sparc32 use memblocks instead of the previous bootmem solution. Unfortunately, due to this: #define PAGE_OFFSET 0xf000 #define

sparc32: boot fails with > 256 MB memory after switch to NO_BOOTMEM

2021-01-27 Thread Andreas Larsson
ress ranges that is done in bootmem_init also looks a bit worrying, but removing the second one does not affect this problem. -- Best regards, Andreas Larsson Cobham Gaisler

Re: [patch 1/4] sparc/mm/highmem: Flush cache and TLB

2021-01-12 Thread Andreas Larsson
ghmem: Switch to generic kmap atomic") Reported-by: Andreas Larsson Signed-off-by: Thomas Gleixner Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org --- arch/sparc/include/asm/highmem.h |9 + 1 file changed, 5 insertions(+), 4 deletions(-) --- a/arch/sparc/include

sparc32: Init process fails to load with generic kmap atomic

2020-12-22 Thread Andreas Larsson
into this in January. If anyone has any ideas how this could stem from this kmap patch, I am all ears. -- Andreas Larsson Software Engineer Cobham Gaisler

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-18 Thread Andreas Larsson
On 2020-12-17 17:43, Arnd Bergmann wrote: It does make sense to require that a single kernel can work on all possible hardware. So if we remove sun4m/sun4d support, all that is left is LEON, and you likely wouldn't need to worry about other CPUs any more. However, there is still the question

Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline'

2020-12-17 Thread Andreas Larsson
ition, non-LTS users are running other mainline kernel versions as well. Best regards, Andreas Larsson Software Engineer Cobham Gaisler

Re: [PATCH] sparc32,leon: Use CASA when available for atomic operations

2017-12-22 Thread Andreas Larsson
On 2017-12-13 23:47, Sam Ravnborg wrote: Hi Andreas. On Mon, Dec 11, 2017 at 03:58:10PM +0100, Andreas Larsson wrote: This probes for CASA support, that is commonly present in LEON processors, and when available, uses the CASA instruction for atomic operations rather than the spinlock based

Re: [PATCH] sparc32,leon: Use CASA when available for atomic operations

2017-12-22 Thread Andreas Larsson
On 2017-12-13 23:47, Sam Ravnborg wrote: Hi Andreas. On Mon, Dec 11, 2017 at 03:58:10PM +0100, Andreas Larsson wrote: This probes for CASA support, that is commonly present in LEON processors, and when available, uses the CASA instruction for atomic operations rather than the spinlock based

Re: [BUG] drivers/gpio: some possible sleep-in-atomic bugs

2017-12-13 Thread Andreas Larsson
c analysis tool (DSAC) and checked by my code review. Hi! Thank you for reporting this. I will take a look at it. -- Best Regards, Andreas Larsson

Re: [BUG] drivers/gpio: some possible sleep-in-atomic bugs

2017-12-13 Thread Andreas Larsson
c analysis tool (DSAC) and checked by my code review. Hi! Thank you for reporting this. I will take a look at it. -- Best Regards, Andreas Larsson

[PATCH] sparc32,leon: Use CASA when available for atomic operations

2017-12-11 Thread Andreas Larsson
-by: Andreas Larsson <andr...@gaisler.com> --- This the followup version to the "sparc32,leon: Allow and use CAS for atomic operations for LEON" patch series that did not do any runtime detection. There are a number of style warnings from checkpatch for this patch (and even errors

[PATCH] sparc32,leon: Use CASA when available for atomic operations

2017-12-11 Thread Andreas Larsson
-by: Andreas Larsson --- This the followup version to the "sparc32,leon: Allow and use CAS for atomic operations for LEON" patch series that did not do any runtime detection. There are a number of style warnings from checkpatch for this patch (and even errors for space after parenthesis) an

[PATCH 2/2] sparc32,leon: Add support for atomic operations with CAS

2017-11-14 Thread Andreas Larsson
e 100644 index 000..5637606 --- /dev/null +++ b/arch/sparc/lib/atomic_cas_32.S @@ -0,0 +1,69 @@ +/* atomic_cas_32.S + * + * Copyright (C) 1999, 2007 2012 David S. Miller (da...@davemloft.net) + * + * Adaption for LEON with CAS from atomic_64.S, by Andreas Larsson + * (andr...@gaisler.com). + */ + +#in

[PATCH 2/2] sparc32,leon: Add support for atomic operations with CAS

2017-11-14 Thread Andreas Larsson
.5637606 --- /dev/null +++ b/arch/sparc/lib/atomic_cas_32.S @@ -0,0 +1,69 @@ +/* atomic_cas_32.S + * + * Copyright (C) 1999, 2007 2012 David S. Miller (da...@davemloft.net) + * + * Adaption for LEON with CAS from atomic_64.S, by Andreas Larsson + * (andr...@gaisler.com). + */ + +#include +#include +#includ

[PATCH 0/2] sparc32,leon: Allow and use CAS for atomic operations for LEON

2017-11-14 Thread Andreas Larsson
The first patch makes sure that CAS can be assembled and the second patch adds the configurable possibility to use the CASA instruction rather than spinlock based emulation for atomic operations. Andreas Larsson (2): sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON sparc32,leon: Add

[PATCH 0/2] sparc32,leon: Allow and use CAS for atomic operations for LEON

2017-11-14 Thread Andreas Larsson
The first patch makes sure that CAS can be assembled and the second patch adds the configurable possibility to use the CASA instruction rather than spinlock based emulation for atomic operations. Andreas Larsson (2): sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON sparc32,leon: Add

[PATCH 1/2] sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON

2017-11-14 Thread Andreas Larsson
Apart from using LEON3 instruction timing it allows for usage of the CASA instruction. Signed-off-by: Andreas Larsson <andr...@gaisler.com> --- arch/sparc/Makefile | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile

[PATCH 1/2] sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON

2017-11-14 Thread Andreas Larsson
Apart from using LEON3 instruction timing it allows for usage of the CASA instruction. Signed-off-by: Andreas Larsson --- arch/sparc/Makefile | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index 8496a07..673ee73 100644

Re: [PATCH 27/44] sparc: remove leon_dma_ops

2017-06-12 Thread Andreas Larsson
AMBA buses. Some LEON systems have PCI bridges, but in general CONFIG_PCI is not a given. -- Andreas Larsson Software Engineer Cobham Gaisler

Re: [PATCH 27/44] sparc: remove leon_dma_ops

2017-06-12 Thread Andreas Larsson
AMBA buses. Some LEON systems have PCI bridges, but in general CONFIG_PCI is not a given. -- Andreas Larsson Software Engineer Cobham Gaisler

[PATCH] sparc32: Fix inverted invalid_frame_pointer checks on sigreturns

2016-11-09 Thread Andreas Larsson
Signed-off-by: Andreas Larsson <andr...@gaisler.com> --- arch/sparc/kernel/signal_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index c3c12ef..9c0c8fd 100644 --- a/arch/sparc/kernel/signal_32.c +++

[PATCH] sparc32: Fix inverted invalid_frame_pointer checks on sigreturns

2016-11-09 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- arch/sparc/kernel/signal_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index c3c12ef..9c0c8fd 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel

[PATCH] MAINTAINERS: net: Change maintainer for GRETH 10/100/1G Ethernet MAC device driver

2016-04-27 Thread Andreas Larsson
Signed-off-by: Andreas Larsson <andr...@gaisler.com> --- MAINTAINERS |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1d5b4be..08ffebd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4903,7 +4903,7 @@ F:net/ipv4/gre_offloa

[PATCH] MAINTAINERS: net: Change maintainer for GRETH 10/100/1G Ethernet MAC device driver

2016-04-27 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- MAINTAINERS |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 1d5b4be..08ffebd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4903,7 +4903,7 @@ F:net/ipv4/gre_offload.c F: include/net/gre.h

[PATCH] sparc32: destroy_context() and switch_mm() needs to disable interrupts.

2014-12-18 Thread Andreas Larsson
interrupt while taking srmmu_context_spinlock in destroy_context() and switch_mm() so we don't deadlock. See also commit 77b838fa1ef0 ("[SPARC64]: destroy_context() needs to disable interrupts.") Signed-off-by: Andreas Larsson --- arch/sparc/mm/srmmu.c | 11 +++ 1 file changed, 7

[PATCH] sparc32: destroy_context() and switch_mm() needs to disable interrupts.

2014-12-18 Thread Andreas Larsson
interrupt while taking srmmu_context_spinlock in destroy_context() and switch_mm() so we don't deadlock. See also commit 77b838fa1ef0 ([SPARC64]: destroy_context() needs to disable interrupts.) Signed-off-by: Andreas Larsson andr...@gaisler.com --- arch/sparc/mm/srmmu.c | 11 +++ 1 file

[PATCH] sparc32,leon: Align ccall_info to prevent unaligned traps on crosscall

2014-12-05 Thread Andreas Larsson
It is being filled in using std in leon_cross_call. Signed-off-by: Andreas Larsson --- arch/sparc/kernel/leon_smp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index ea2bad3..71e16f2 100644 --- a/arch/sparc

[PATCH] sparc32,leon: Align ccall_info to prevent unaligned traps on crosscall

2014-12-05 Thread Andreas Larsson
It is being filled in using std in leon_cross_call. Signed-off-by: Andreas Larsson andr...@gaisler.com --- arch/sparc/kernel/leon_smp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index ea2bad3..71e16f2 100644

[PATCH] soc: Include drivers/soc/Kconfig only once

2014-11-05 Thread Andreas Larsson
Signed-off-by: Andreas Larsson --- drivers/Kconfig |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/Kconfig b/drivers/Kconfig index 1a693d3..622fa26 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -148,8 +148,6 @@ source "drivers/remoteproc/Kconfig" source &quo

[PATCH] sparc32: Implement xchg and atomic_xchg using ATOMIC_HASH locks

2014-11-05 Thread Andreas Larsson
Atomicity between xchg and cmpxchg cannot be guaranteed when xchg is implemented with a swap and cmpxchg is implemented with locks. Without this, e.g. mcs_spin_lock and mcs_spin_unlock are broken. Signed-off-by: Andreas Larsson --- arch/sparc/include/asm/atomic_32.h |2 +- arch/sparc

[PATCH] sparc32: Implement xchg and atomic_xchg using ATOMIC_HASH locks

2014-11-05 Thread Andreas Larsson
Atomicity between xchg and cmpxchg cannot be guaranteed when xchg is implemented with a swap and cmpxchg is implemented with locks. Without this, e.g. mcs_spin_lock and mcs_spin_unlock are broken. Signed-off-by: Andreas Larsson andr...@gaisler.com --- arch/sparc/include/asm/atomic_32.h |2

[PATCH] soc: Include drivers/soc/Kconfig only once

2014-11-05 Thread Andreas Larsson
Signed-off-by: Andreas Larsson andr...@gaisler.com --- drivers/Kconfig |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/Kconfig b/drivers/Kconfig index 1a693d3..622fa26 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -148,8 +148,6 @@ source drivers/remoteproc/Kconfig

Re: [PATCH] usb: gadget: udc_core: Use right kobj when calling sysfs_notify

2014-09-16 Thread Andreas Larsson
On 2014-09-16 07:15, Felipe Balbi wrote: Hi, On Tue, Sep 16, 2014 at 10:02:25AM +0800, Peter Chen wrote: On Mon, Sep 15, 2014 at 12:42:27PM +0200, Andreas Larsson wrote: The state attribute is connected to the kobj of the udc, not the gadget. Signed-off-by: Andreas Larsson --- drivers/usb

Re: [PATCH] usb: gadget: udc_core: Use right kobj when calling sysfs_notify

2014-09-16 Thread Andreas Larsson
On 2014-09-16 07:15, Felipe Balbi wrote: Hi, On Tue, Sep 16, 2014 at 10:02:25AM +0800, Peter Chen wrote: On Mon, Sep 15, 2014 at 12:42:27PM +0200, Andreas Larsson wrote: The state attribute is connected to the kobj of the udc, not the gadget. Signed-off-by: Andreas Larsson andr

[PATCH] usb: gadget: udc_core: Use right kobj when calling sysfs_notify

2014-09-15 Thread Andreas Larsson
The state attribute is connected to the kobj of the udc, not the gadget. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/udc/udc-core.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc

[PATCH] usb: gadget: gr_udc: Add bounce buffer to handle odd sized OUT requests

2014-09-15 Thread Andreas Larsson
This adds a bounce buffer that handles the end of OUT requests where req.length is not divisible by ep->ep.maxpacket. Before this, such requests were rejected as the DMA engine cannot restrict itself to buffers that are smaller than ep->ep.maxpacket. Signed-off-by: Andreas Larsson --- d

[PATCH] usb: gadget: gr_udc: Add bounce buffer to handle odd sized OUT requests

2014-09-15 Thread Andreas Larsson
This adds a bounce buffer that handles the end of OUT requests where req.length is not divisible by ep-ep.maxpacket. Before this, such requests were rejected as the DMA engine cannot restrict itself to buffers that are smaller than ep-ep.maxpacket. Signed-off-by: Andreas Larsson andr

[PATCH] usb: gadget: udc_core: Use right kobj when calling sysfs_notify

2014-09-15 Thread Andreas Larsson
The state attribute is connected to the kobj of the udc, not the gadget. Signed-off-by: Andreas Larsson andr...@gaisler.com --- drivers/usb/gadget/udc/udc-core.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb

[PATCH v2] sparc32, leon: Make leon_dma_ops avaiable when !CONFIG_PCI

2014-09-08 Thread Andreas Larsson
The leon_dma_ops struct is needed for leon regardless of PCI configuration. Signed-off-by: Andreas Larsson --- Changes from v1: Fixed typo in commit message arch/sparc/include/asm/dma-mapping.h |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm

[PATCH v2] sparc32, leon: Make leon_dma_ops avaiable when !CONFIG_PCI

2014-09-08 Thread Andreas Larsson
The leon_dma_ops struct is needed for leon regardless of PCI configuration. Signed-off-by: Andreas Larsson andr...@gaisler.com --- Changes from v1: Fixed typo in commit message arch/sparc/include/asm/dma-mapping.h |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch

[PATCH] sparc32, leon: Make leom_dma_ops avaiable when !CONFIG_PCI

2014-09-02 Thread Andreas Larsson
The leon_dma_ops struct is needed for leon regardless of PCI configuration. Signed-off-by: Andreas Larsson --- arch/sparc/include/asm/dma-mapping.h |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma

[PATCH] sparc32, leon: Make leom_dma_ops avaiable when !CONFIG_PCI

2014-09-02 Thread Andreas Larsson
The leon_dma_ops struct is needed for leon regardless of PCI configuration. Signed-off-by: Andreas Larsson andr...@gaisler.com --- arch/sparc/include/asm/dma-mapping.h |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc

[PATCH] sparc: Let memset return the address argument

2014-08-29 Thread Andreas Larsson
This makes memset follow the standard (instead of returning 0 on success). This is needed when certain versions of gcc optimizes around memset calls and assume that the address argument is preserved in %o0. Signed-off-by: Andreas Larsson --- arch/sparc/lib/memset.S | 18 ++ 1

[PATCH] sparc: leon: Fix race condition between leon_cycles_offset and timer_interrupt

2014-08-29 Thread Andreas Larsson
backwards. Signed-off-by: Andreas Larsson --- arch/sparc/kernel/leon_kernel.c | 31 --- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 683c4af..9bbb8f2 100644 --- a/arch/sparc

[PATCH] sparc: leon: Fix race condition between leon_cycles_offset and timer_interrupt

2014-08-29 Thread Andreas Larsson
backwards. Signed-off-by: Andreas Larsson andr...@gaisler.com --- arch/sparc/kernel/leon_kernel.c | 31 --- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c index 683c4af..9bbb8f2 100644

[PATCH] sparc: Let memset return the address argument

2014-08-29 Thread Andreas Larsson
This makes memset follow the standard (instead of returning 0 on success). This is needed when certain versions of gcc optimizes around memset calls and assume that the address argument is preserved in %o0. Signed-off-by: Andreas Larsson andr...@gaisler.com --- arch/sparc/lib/memset.S | 18

Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()

2014-06-16 Thread Andreas Larsson
, but that could change in the future. I personally don't see a problem with using devm_of_parse_and_map solution as long as there is a SPARC-specific one as discussed above. Best regards, Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [PATCH 20/21] usb: use devm_irq_of_parse_and_map() where appropriate

2014-06-16 Thread Andreas Larsson
ot of -EBUSY being returned in drivers/usb/host - not just in these error cases, maybe it is better to not touch this in this patch set. Best regards, Andreas Larsson -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord

Re: [PATCH 20/21] usb: use devm_irq_of_parse_and_map() where appropriate

2014-06-16 Thread Andreas Larsson
On 2014-06-04 13:13, nyushche...@dev.rtsoft.ru wrote: From: Nikita Yushchenko This avoids leak of IRQ mapping on error paths, and makes it possible to use devm_request_irq() without facing unmap-while-handler-installed issues. Signed-off-by: Nikita Yushchenko ---

Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()

2014-06-16 Thread Andreas Larsson
with having a SPARC version of devm_irq_of_parse_and_map that just calls irq_of_parse_and_map as there are no mappings that needs to be disposed of. (The empty dummy for irq_dispose_mapping is used if any irq_dispose_mapping calls are made from drivers). Best regards, Andreas Larsson

Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()

2014-06-16 Thread Andreas Larsson
with having a SPARC version of devm_irq_of_parse_and_map that just calls irq_of_parse_and_map as there are no mappings that needs to be disposed of. (The empty dummy for irq_dispose_mapping is used if any irq_dispose_mapping calls are made from drivers). Best regards, Andreas Larsson

Re: [PATCH 20/21] usb: use devm_irq_of_parse_and_map() where appropriate

2014-06-16 Thread Andreas Larsson
On 2014-06-04 13:13, nyushche...@dev.rtsoft.ru wrote: From: Nikita Yushchenko nyushche...@dev.rtsoft.ru This avoids leak of IRQ mapping on error paths, and makes it possible to use devm_request_irq() without facing unmap-while-handler-installed issues. Signed-off-by: Nikita Yushchenko

Re: [PATCH 20/21] usb: use devm_irq_of_parse_and_map() where appropriate

2014-06-16 Thread Andreas Larsson
in drivers/usb/host - not just in these error cases, maybe it is better to not touch this in this patch set. Best regards, Andreas Larsson -- 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

Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()

2014-06-16 Thread Andreas Larsson
, but that could change in the future. I personally don't see a problem with using devm_of_parse_and_map solution as long as there is a SPARC-specific one as discussed above. Best regards, Andreas Larsson -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()

2014-06-12 Thread Andreas Larsson
several are currently only used on SPARC platforms). Best regards, Andreas Larsson -- 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 P

Re: [PATCH 00/21] add and use devm_irq_of_parse_and_map()

2014-06-12 Thread Andreas Larsson
several are currently only used on SPARC platforms). Best regards, Andreas Larsson -- 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

Re: [PATCH v3] usb: host: uhci-grlib.c : use devm_ functions

2014-06-11 Thread Andreas Larsson
free functions are removed and two labels are done away with. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. Signed-off-by: Himangi Saraogi Looks and works fine now! Acked-by: Andreas Larsson Best regards, Andreas Larsson

Re: [PATCH v3] usb: host: uhci-grlib.c : use devm_ functions

2014-06-11 Thread Andreas Larsson
free functions are removed and two labels are done away with. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. Signed-off-by: Himangi Saraogi himangi...@gmail.com Looks and works fine now! Acked-by: Andreas Larsson andr...@gaisler.com

Re: [PATCH] usb: host: uhci-grlib.c : use devm_ functions

2014-06-10 Thread Andreas Larsson
. The call to devm_ioremap_resource should rather be: hcd->regs = devm_ioremap_resource(>dev, ); @@ -139,17 +134,13 @@ static int uhci_hcd_grlib_probe(struct platform_device *op) rv = usb_add_hcd(hcd, irq, 0); if (rv) - goto err_uhci; + goto err_ioremap;

Re: [PATCH] usb: host: uhci-grlib.c : use devm_ functions

2014-06-10 Thread Andreas Larsson
err_ioremap; Here the label name also does not make sense anymore. Best regards, Andreas Larsson Software Engineer Aeroflex Gaisler AB Aeroflex Microelectronic Solutions – HiRel device_wakeup_enable(hcd-self.controller); return 0; -err_uhci: - iounmap(hcd-regs

Re: [PATCH] usb: gadget: gr_udc: unconditionally use GFP_ATOMIC in gr_queue_ext()

2014-05-08 Thread Andreas Larsson
On 2014-05-07 22:26, Alexey Khoroshilov wrote: As far as gr_queue() is called with spinlock held, we have to pass GFP_ATOMIC regardless of gfp argument. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov Acked-by: Andreas Larsson

Re: [PATCH] usb: gadget: gr_udc: unconditionally use GFP_ATOMIC in gr_queue_ext()

2014-05-08 Thread Andreas Larsson
On 2014-05-07 22:26, Alexey Khoroshilov wrote: As far as gr_queue() is called with spinlock held, we have to pass GFP_ATOMIC regardless of gfp argument. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov khoroshi...@ispras.ru Acked-by: Andreas

Re: [PATCH v2 0/7] usb: gadget: gr_udc: OF and ep.maxpacket_limit improvements and fix of GFP_KERNEL in atomic context

2014-04-15 Thread Andreas Larsson
On 2014-03-27 16:15, Andreas Larsson wrote: This patchset: - Adds some OF related improvements suggested by Mark Rutland. - Adds ep.maxpacket_limit to the debugfs file and adds a check if gr_ep_enable is called with a maxpacket value greater than ep.maxpacket_limit. - Fixes

Re: [PATCH v2 0/7] usb: gadget: gr_udc: OF and ep.maxpacket_limit improvements and fix of GFP_KERNEL in atomic context

2014-04-15 Thread Andreas Larsson
On 2014-03-27 16:15, Andreas Larsson wrote: This patchset: - Adds some OF related improvements suggested by Mark Rutland. - Adds ep.maxpacket_limit to the debugfs file and adds a check if gr_ep_enable is called with a maxpacket value greater than ep.maxpacket_limit. - Fixes

[PATCH v2 7/7] usb: gadget: gr_udc: Use GFP_ATOMIC when allocating under held spinlock

2014-04-01 Thread Andreas Larsson
As gr_ep_init must be called with dev->lock held, GFP_KERNEL must not be used. Reported-by: Dan Carpenter Signed-off-by: Andreas Larsson --- Differences since v1: Fixed typo in commit message drivers/usb/gadget/gr_udc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

[PATCH v2 7/7] usb: gadget: gr_udc: Use GFP_ATOMIC when allocating under held spinlock

2014-04-01 Thread Andreas Larsson
As gr_ep_init must be called with dev-lock held, GFP_KERNEL must not be used. Reported-by: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Andreas Larsson andr...@gaisler.com --- Differences since v1: Fixed typo in commit message drivers/usb/gadget/gr_udc.c |4 ++-- 1 file changed, 2

[PATCH v2 3/7] usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map

2014-03-27 Thread Andreas Larsson
Use platform_get_irq as no mapping needs to be done. No functional difference for SPARC which is the typical environment for the driver though. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Differences since v1: none drivers/usb/gadget/gr_udc.c | 14 -- 1 file

[PATCH v2 5/7] usb: gadget: gr_udc: Add ep.maxpacket_limit to debugfs information

2014-03-27 Thread Andreas Larsson
Add information on ep.maxpacket_limit for each endpoint in the debugfs information. Signed-off-by: Andreas Larsson --- Differences since v1: none drivers/usb/gadget/gr_udc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c index

[PATCH v2 2/7] usb: gadget: gr_udc: Expand devicetree documentation

2014-03-27 Thread Andreas Larsson
Provide more information on the two different interrupt cases and more information of endpoint buffer sizes. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Differences since v1: none Documentation/devicetree/bindings/usb/gr-udc.txt | 22 ++ 1 file changed

[PATCH v2 1/7] usb: gadget: gr_udc: Make struct platform_device variable name clearer and use platform_set/get_drvdata

2014-03-27 Thread Andreas Larsson
Rename struct platform_device pointers from ofdev to pdev for clarity. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Differences since v1: use platform_set/get_drvdata drivers/usb/gadget/gr_udc.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff

[PATCH v2 6/7] usb: gadget: gr_udc: Return error code when trying to set ep.maxpacket > ep.maxpacket_limit

2014-03-27 Thread Andreas Larsson
Make gr_ep_enable fail properly when a call requests a larger ep.maxpacket than ep.maxpacket_limit. Signed-off-by: Andreas Larsson --- Differences since v1: none drivers/usb/gadget/gr_udc.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb

[PATCH 7/7] usb: gadget: gr_udc: Use GFP_ATOMIC when allocating under help spinlock

2014-03-27 Thread Andreas Larsson
As gr_ep_init must be called with dev->lock held, GFP_KERNEL must not be used. Reported-by: Dan Carpenter Signed-off-by: Andreas Larsson --- New patch but needs patch 1/7 to apply drivers/usb/gadget/gr_udc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH v2 0/7] usb: gadget: gr_udc: OF and ep.maxpacket_limit improvements and fix of GFP_KERNEL in atomic context

2014-03-27 Thread Andreas Larsson
Andreas Larsson (7): usb: gadget: gr_udc: Make struct platform_device variable name clearer and use platform_set/get_drvdata usb: gadget: gr_udc: Expand devicetree documentation usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map usb: gadget: gr_udc: Use

[PATCH v2 4/7] usb: gadget: gr_udc: Use of_property_read_u32_index to access arrays

2014-03-27 Thread Andreas Larsson
Use an appropriate accessor function for property arrays to make the code nicer and make the code correct if it would ever run on little endian architectures. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Differences since v1: none drivers/usb/gadget/gr_udc.c | 12

[PATCH v2 4/7] usb: gadget: gr_udc: Use of_property_read_u32_index to access arrays

2014-03-27 Thread Andreas Larsson
Use an appropriate accessor function for property arrays to make the code nicer and make the code correct if it would ever run on little endian architectures. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson andr...@gaisler.com --- Differences since v1: none drivers/usb/gadget/gr_udc.c

[PATCH v2 0/7] usb: gadget: gr_udc: OF and ep.maxpacket_limit improvements and fix of GFP_KERNEL in atomic context

2014-03-27 Thread Andreas Larsson
Andreas Larsson (7): usb: gadget: gr_udc: Make struct platform_device variable name clearer and use platform_set/get_drvdata usb: gadget: gr_udc: Expand devicetree documentation usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map usb: gadget: gr_udc: Use

[PATCH v2 1/7] usb: gadget: gr_udc: Make struct platform_device variable name clearer and use platform_set/get_drvdata

2014-03-27 Thread Andreas Larsson
Rename struct platform_device pointers from ofdev to pdev for clarity. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson andr...@gaisler.com --- Differences since v1: use platform_set/get_drvdata drivers/usb/gadget/gr_udc.c | 18 +- 1 file changed, 9 insertions(+), 9

[PATCH v2 6/7] usb: gadget: gr_udc: Return error code when trying to set ep.maxpacket ep.maxpacket_limit

2014-03-27 Thread Andreas Larsson
Make gr_ep_enable fail properly when a call requests a larger ep.maxpacket than ep.maxpacket_limit. Signed-off-by: Andreas Larsson andr...@gaisler.com --- Differences since v1: none drivers/usb/gadget/gr_udc.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget

[PATCH 7/7] usb: gadget: gr_udc: Use GFP_ATOMIC when allocating under help spinlock

2014-03-27 Thread Andreas Larsson
As gr_ep_init must be called with dev-lock held, GFP_KERNEL must not be used. Reported-by: Dan Carpenter dan.carpen...@oracle.com Signed-off-by: Andreas Larsson andr...@gaisler.com --- New patch but needs patch 1/7 to apply drivers/usb/gadget/gr_udc.c |4 ++-- 1 file changed, 2 insertions

[PATCH v2 2/7] usb: gadget: gr_udc: Expand devicetree documentation

2014-03-27 Thread Andreas Larsson
Provide more information on the two different interrupt cases and more information of endpoint buffer sizes. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson andr...@gaisler.com --- Differences since v1: none Documentation/devicetree/bindings/usb/gr-udc.txt | 22

[PATCH v2 3/7] usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map

2014-03-27 Thread Andreas Larsson
Use platform_get_irq as no mapping needs to be done. No functional difference for SPARC which is the typical environment for the driver though. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson andr...@gaisler.com --- Differences since v1: none drivers/usb/gadget/gr_udc.c | 14

[PATCH v2 5/7] usb: gadget: gr_udc: Add ep.maxpacket_limit to debugfs information

2014-03-27 Thread Andreas Larsson
Add information on ep.maxpacket_limit for each endpoint in the debugfs information. Signed-off-by: Andreas Larsson andr...@gaisler.com --- Differences since v1: none drivers/usb/gadget/gr_udc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb

Re: [PATCH 1/6] usb: gadget: gr_udc: Make struct platform_device variable name clearer

2014-02-23 Thread Andreas Larsson
On 2014-02-18 16:52, Felipe Balbi wrote: On Thu, Jan 09, 2014 at 11:54:13AM +0100, Andreas Larsson wrote: Rename struct platform_device pointers from ofdev to pdev for clarity. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c | 18

Re: [PATCH 1/6] usb: gadget: gr_udc: Make struct platform_device variable name clearer

2014-02-23 Thread Andreas Larsson
On 2014-02-18 16:52, Felipe Balbi wrote: On Thu, Jan 09, 2014 at 11:54:13AM +0100, Andreas Larsson wrote: Rename struct platform_device pointers from ofdev to pdev for clarity. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson andr...@gaisler.com --- drivers/usb/gadget/gr_udc.c

Re: [PATCH v3 0/5] can: sja1000: cleanups and new OF property

2014-02-04 Thread Andreas Larsson
On 2014-01-31 14:50, Andreas Larsson wrote: On 2014-01-31 14:40, Marc Kleine-Budde wrote: On 01/31/2014 02:34 PM, Florian Vaussard wrote: Hello, (could someone with a SJA1000 on SPARC perform a functional test to see if interrupts are working? it would be great :-) Changes since v2

Re: [PATCH v3 0/5] can: sja1000: cleanups and new OF property

2014-02-04 Thread Andreas Larsson
On 2014-01-31 14:50, Andreas Larsson wrote: On 2014-01-31 14:40, Marc Kleine-Budde wrote: On 01/31/2014 02:34 PM, Florian Vaussard wrote: Hello, (could someone with a SJA1000 on SPARC perform a functional test to see if interrupts are working? it would be great :-) Changes since v2

Re: [PATCH v3 0/5] can: sja1000: cleanups and new OF property

2014-01-31 Thread Andreas Larsson
On 2014-01-31 14:40, Marc Kleine-Budde wrote: On 01/31/2014 02:34 PM, Florian Vaussard wrote: Hello, (could someone with a SJA1000 on SPARC perform a functional test to see if interrupts are working? it would be great :-) Changes since v2: - Dropped patch 1 "can: sja1000: remove unused

Re: [PATCH v3 0/5] can: sja1000: cleanups and new OF property

2014-01-31 Thread Andreas Larsson
On 2014-01-31 14:40, Marc Kleine-Budde wrote: On 01/31/2014 02:34 PM, Florian Vaussard wrote: Hello, (could someone with a SJA1000 on SPARC perform a functional test to see if interrupts are working? it would be great :-) Changes since v2: - Dropped patch 1 can: sja1000: remove unused defines

[PATCH 1/6] usb: gadget: gr_udc: Make struct platform_device variable name clearer

2014-01-09 Thread Andreas Larsson
Rename struct platform_device pointers from ofdev to pdev for clarity. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb

[PATCH 5/6] usb: gadget: gr_udc: Add ep.maxpacket_limit to debugfs information

2014-01-09 Thread Andreas Larsson
Add information on ep.maxpacket_limit for each endpoint in the debugfs information. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c index 8df35fc..55757fc 100644

[PATCH 4/6] usb: gadget: gr_udc: Use of_property_read_u32_index to access arrays

2014-01-09 Thread Andreas Larsson
Use an appropriate accessor function for property arrays to make the code nicer and make the code correct if it would ever run on little endian architectures. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c | 12 1 file changed, 4

[PATCH 6/6] usb: gadget: gr_udc: Return error code when trying to set ep.maxpacket > ep.maxpacket_limit

2014-01-09 Thread Andreas Larsson
Make gr_ep_enable fail properly when a call requests a larger ep.maxpacket than ep.maxpacket_limit. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/usb/gadget/gr_udc.c b/drivers/usb/gadget/gr_udc.c index 55757fc

[PATCH 2/6] usb: gadget: gr_udc: Expand devicetree documentation

2014-01-09 Thread Andreas Larsson
Provide more information on the two different interrupt cases and more information of endpoint buffer sizes. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- Documentation/devicetree/bindings/usb/gr-udc.txt | 22 ++ 1 file changed, 14 insertions(+), 8

[PATCH 3/6] usb: gadget: gr_udc: Use platform_get_irq instead of irq_of_parse_and_map

2014-01-09 Thread Andreas Larsson
Use platform_get_irq as no mapping needs to be done. No functional difference for SPARC which is the typical environment for the driver though. Suggested by Mark Rutland. Signed-off-by: Andreas Larsson --- drivers/usb/gadget/gr_udc.c | 14 -- 1 file changed, 8 insertions(+), 6

  1   2   3   4   >