RE: [PATCH] ARCv2: intc: Disable all core interrupts by default

2017-02-09 Thread Yuriy Kolerov
Hi Vineet, > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Wednesday, February 08, 2017 7:08 PM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com>; linux-snps- > a...@lists.infradead.org > Cc: alexey.brod...@synopsys.com; linu

RE: [PATCH] ARCv2: intc: Disable all core interrupts by default

2017-02-09 Thread Yuriy Kolerov
Hi Vineet, > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Wednesday, February 08, 2017 7:08 PM > To: Yuriy Kolerov ; linux-snps- > a...@lists.infradead.org > Cc: alexey.brod...@synopsys.com; linux-kernel@vger.kernel.org; > marc.zyng...@

[PATCH] ARCv2: intc: Disable all core interrupts by default

2017-02-07 Thread Yuriy Kolerov
interrupts. If CPU consists of only 1 core without IDU then it is necessary to disable all interrupts in the core interrupt controller. If CPU contains IDU it means that there are may be more than 1 cores and common interrupts (>= FIRST_EXT_IRQ) must be disabled in IDU. Signed-off-by: Yuriy Kole

[PATCH] ARCv2: intc: Disable all core interrupts by default

2017-02-07 Thread Yuriy Kolerov
interrupts. If CPU consists of only 1 core without IDU then it is necessary to disable all interrupts in the core interrupt controller. If CPU contains IDU it means that there are may be more than 1 cores and common interrupts (>= FIRST_EXT_IRQ) must be disabled in IDU. Signed-off-by: Yuriy Kole

[PATCH 1/2] ARCv2: IDU-intc: Delete deprecated parameters in Device Trees

2017-02-01 Thread Yuriy Kolerov
anywhere. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- .../interrupt-controller/snps,archs-idu-intc.txt | 24 ++ arch/arc/boot/dts/axc003_idu.dtsi | 23 +++-- arch/arc/boot/dts/haps_hs_idu.dts | 10 ++---

[PATCH 1/2] ARCv2: IDU-intc: Delete deprecated parameters in Device Trees

2017-02-01 Thread Yuriy Kolerov
anywhere. Signed-off-by: Yuriy Kolerov --- .../interrupt-controller/snps,archs-idu-intc.txt | 24 ++ arch/arc/boot/dts/axc003_idu.dtsi | 23 +++-- arch/arc/boot/dts/haps_hs_idu.dts | 10 ++--- arch/arc/boot/dts/nsim_hs_idu.dts

[PATCH 0/2] Delete deprecated parameters in Device Trees

2017-02-01 Thread Yuriy Kolerov
. * Some small clean ups. Yuriy Kolerov (2): ARCv2: IDU-intc: Delete deprecated parameters in Device Trees ARCv2: intc: Delete useless comments in Device Trees .../interrupt-controller/snps,archs-idu-intc.txt | 24 ++ arch/arc/boot/dts/axc003_idu.dtsi | 23

[PATCH 0/2] Delete deprecated parameters in Device Trees

2017-02-01 Thread Yuriy Kolerov
. * Some small clean ups. Yuriy Kolerov (2): ARCv2: IDU-intc: Delete deprecated parameters in Device Trees ARCv2: intc: Delete useless comments in Device Trees .../interrupt-controller/snps,archs-idu-intc.txt | 24 ++ arch/arc/boot/dts/axc003_idu.dtsi | 23

[PATCH 2/2] ARCv2: intc: Delete useless comments in Device Trees

2017-02-01 Thread Yuriy Kolerov
Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/boot/dts/haps_hs_idu.dts | 1 - arch/arc/boot/dts/nsimosci_hs_idu.dts | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/arc/boot/dts/haps_hs_idu.dts b/arch/arc/boot/dts/haps_hs_idu.dts index 0a857fa..2

[PATCH 2/2] ARCv2: intc: Delete useless comments in Device Trees

2017-02-01 Thread Yuriy Kolerov
Signed-off-by: Yuriy Kolerov --- arch/arc/boot/dts/haps_hs_idu.dts | 1 - arch/arc/boot/dts/nsimosci_hs_idu.dts | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/arc/boot/dts/haps_hs_idu.dts b/arch/arc/boot/dts/haps_hs_idu.dts index 0a857fa..215cddd 100644 --- a/arch/arc/boot/dts

RE: [PATCH v2 0/4] Use build registers for getting numbers of interrupts

2017-02-01 Thread Yuriy Kolerov
Hi Vineet, I have checked reworked patches. I think it is fine. > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Wednesday, February 01, 2017 11:58 PM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com>; linux-snps- > a...@lists.infradead.

RE: [PATCH v2 0/4] Use build registers for getting numbers of interrupts

2017-02-01 Thread Yuriy Kolerov
Hi Vineet, I have checked reworked patches. I think it is fine. > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Wednesday, February 01, 2017 11:58 PM > To: Yuriy Kolerov ; linux-snps- > a...@lists.infradead.org > Cc: alexey.brod...@s

RE: [PATCH v2 4/4] ARCv2: IRQ: Set a default priority for all core interrupts

2017-02-01 Thread Yuriy Kolerov
Hi Vineet, > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, January 31, 2017 8:54 PM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com>; linux-snps- > a...@lists.infradead.org > Cc: marc.zyng...@arm.com; alexey.brod...@sy

RE: [PATCH v2 4/4] ARCv2: IRQ: Set a default priority for all core interrupts

2017-02-01 Thread Yuriy Kolerov
Hi Vineet, > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, January 31, 2017 8:54 PM > To: Yuriy Kolerov ; linux-snps- > a...@lists.infradead.org > Cc: marc.zyng...@arm.com; alexey.brod...@synopsys.com; linux- > ker...@vger.ker

[PATCH v2 2/4] ARCv2: IRQ: Remove option for setting number of interrupts

2017-01-31 Thread Yuriy Kolerov
interrupts. * Increase a maximum number of virtual IRQs to 512. ARCv2 can support 240 interrupts in the core interrupts controllers and 128 interrupts in IDU. Thus 512 virtual IRQs must be enough for most configurations of boards. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.

[PATCH v2 2/4] ARCv2: IRQ: Remove option for setting number of interrupts

2017-01-31 Thread Yuriy Kolerov
interrupts. * Increase a maximum number of virtual IRQs to 512. ARCv2 can support 240 interrupts in the core interrupts controllers and 128 interrupts in IDU. Thus 512 virtual IRQs must be enough for most configurations of boards. Signed-off-by: Yuriy Kolerov --- arch/arc/Kconfig

[PATCH v2 3/4] ARCv2: IRQ: Use build registers for getting numbers of interrupts

2017-01-31 Thread Yuriy Kolerov
troller { compatible = "snps,archs-idu-intc"; interrupt-controller; interrupt-parent = <_intc>; #interrupt-cells = <2>; }; Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/include/asm/irq.h | 4 arch/arc/ke

[PATCH v2 1/4] ARCv2: IRQ: Move structure for build register of core intc to the header

2017-01-31 Thread Yuriy Kolerov
Also add new macro ARC_REG_STATUS32 for the address of STATUS32 auxiliary register. It is better to use it instead of magic numbers. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/include/asm/arcregs.h | 11 +++ arch/arc/kernel/intc-arcv2.c | 10 ++-

[PATCH v2 4/4] ARCv2: IRQ: Set a default priority for all core interrupts

2017-01-31 Thread Yuriy Kolerov
switching of banks is not used by all interrupts. It is necessary to set a default nonzero priority for all available interrupts to avoid undefined behaviour. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/intc-arcv2.c | 12 +++- 1 file changed, 11 inse

[PATCH v2 3/4] ARCv2: IRQ: Use build registers for getting numbers of interrupts

2017-01-31 Thread Yuriy Kolerov
troller { compatible = "snps,archs-idu-intc"; interrupt-controller; interrupt-parent = <_intc>; #interrupt-cells = <2>; }; Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/irq.h | 4 arch/arc/kernel/intc-arcv2.c

[PATCH v2 1/4] ARCv2: IRQ: Move structure for build register of core intc to the header

2017-01-31 Thread Yuriy Kolerov
Also add new macro ARC_REG_STATUS32 for the address of STATUS32 auxiliary register. It is better to use it instead of magic numbers. Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/arcregs.h | 11 +++ arch/arc/kernel/intc-arcv2.c | 10 ++ 2 files changed, 13 insertions

[PATCH v2 4/4] ARCv2: IRQ: Set a default priority for all core interrupts

2017-01-31 Thread Yuriy Kolerov
switching of banks is not used by all interrupts. It is necessary to set a default nonzero priority for all available interrupts to avoid undefined behaviour. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/intc-arcv2.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

[PATCH v2 0/4] Use build registers for getting numbers of interrupts

2017-01-31 Thread Yuriy Kolerov
since it is used only once. Yuriy Kolerov (4): ARCv2: IRQ: Move structure for build register of core intc to the header ARCv2: IRQ: Remove option for setting number of interrupts ARCv2: IRQ: Use build registers for getting numbers of interrupts ARCv2: IRQ: Set a default priority for all

[PATCH v2 0/4] Use build registers for getting numbers of interrupts

2017-01-31 Thread Yuriy Kolerov
since it is used only once. Yuriy Kolerov (4): ARCv2: IRQ: Move structure for build register of core intc to the header ARCv2: IRQ: Remove option for setting number of interrupts ARCv2: IRQ: Use build registers for getting numbers of interrupts ARCv2: IRQ: Set a default priority for all

[PATCH 3/6] ARCv2: IRQ: Add macro for the first external interrupt number

2017-01-27 Thread Yuriy Kolerov
Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/include/asm/irq.h | 1 + arch/arc/kernel/intc-arcv2.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arc/include/asm/irq.h b/arch/arc/include/asm/irq.h index c0fa0d2..e61ad30 100644 --- a/ar

[PATCH 3/6] ARCv2: IRQ: Add macro for the first external interrupt number

2017-01-27 Thread Yuriy Kolerov
Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/irq.h | 1 + arch/arc/kernel/intc-arcv2.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arc/include/asm/irq.h b/arch/arc/include/asm/irq.h index c0fa0d2..e61ad30 100644 --- a/arch/arc/include/asm/irq.h +++ b

[PATCH 1/6] ARCv2: IRQ: Move structures for core intc to the header

2017-01-27 Thread Yuriy Kolerov
Also add new macro ARC_REG_STATUS32 for the address of STATUS32 auxiliary register. It is better to use it instead of magic numbers. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/include/asm/arcregs.h | 26 ++ arch/arc/kernel/intc-arcv2.c

[PATCH 0/6] Use build registers for getting numbers of interrupts

2017-01-27 Thread Yuriy Kolerov
of interrupts since it does not affect a number of interrupts in IRQ domains and breaks portability since it is impossible to change size of table of interrupts after linkage. Yuriy Kolerov (6): ARCv2: IRQ: Move structures for core intc to the header ARCv2: MCIP: Add structure for build

[PATCH 4/6] ARCv2: IRQ: Remove option for setting number of interrupts

2017-01-27 Thread Yuriy Kolerov
interrupts. * Increase a maximum number of virtual IRQs to 512. ARCv2 can support 240 interrupts in the core interrupts controllers and 128 interrupts in IDU. Thus 512 virtual IRQs must be enough for most configurations of boards. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.

[PATCH 1/6] ARCv2: IRQ: Move structures for core intc to the header

2017-01-27 Thread Yuriy Kolerov
Also add new macro ARC_REG_STATUS32 for the address of STATUS32 auxiliary register. It is better to use it instead of magic numbers. Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/arcregs.h | 26 ++ arch/arc/kernel/intc-arcv2.c | 23 +++ 2

[PATCH 0/6] Use build registers for getting numbers of interrupts

2017-01-27 Thread Yuriy Kolerov
of interrupts since it does not affect a number of interrupts in IRQ domains and breaks portability since it is impossible to change size of table of interrupts after linkage. Yuriy Kolerov (6): ARCv2: IRQ: Move structures for core intc to the header ARCv2: MCIP: Add structure for build

[PATCH 4/6] ARCv2: IRQ: Remove option for setting number of interrupts

2017-01-27 Thread Yuriy Kolerov
interrupts. * Increase a maximum number of virtual IRQs to 512. ARCv2 can support 240 interrupts in the core interrupts controllers and 128 interrupts in IDU. Thus 512 virtual IRQs must be enough for most configurations of boards. Signed-off-by: Yuriy Kolerov --- arch/arc/Kconfig

[PATCH 6/6] ARCv2: IRQ: Set a default priority for all core interrupts

2017-01-27 Thread Yuriy Kolerov
switching of banks is not used by all interrupts. It is necessary to set a default nonzero priority for all available interrupts to avoid undefined behaviour. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/intc-arcv2.c | 12 +++- 1 file changed, 11 inse

[PATCH 6/6] ARCv2: IRQ: Set a default priority for all core interrupts

2017-01-27 Thread Yuriy Kolerov
switching of banks is not used by all interrupts. It is necessary to set a default nonzero priority for all available interrupts to avoid undefined behaviour. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/intc-arcv2.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

[PATCH 2/6] ARCv2: MCIP: Add structure for build register of IDU

2017-01-27 Thread Yuriy Kolerov
This structure is necessary for retrieving of supported number of common interrupts in IDU interrupt controller. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- include/soc/arc/mcip.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/soc/arc/mc

[PATCH 2/6] ARCv2: MCIP: Add structure for build register of IDU

2017-01-27 Thread Yuriy Kolerov
This structure is necessary for retrieving of supported number of common interrupts in IDU interrupt controller. Signed-off-by: Yuriy Kolerov --- include/soc/arc/mcip.h | 17 + 1 file changed, 17 insertions(+) diff --git a/include/soc/arc/mcip.h b/include/soc/arc/mcip.h index

[PATCH 5/6] ARCv2: IRQ: Use build registers for getting numbers of interrupts

2017-01-27 Thread Yuriy Kolerov
troller { compatible = "snps,archs-idu-intc"; interrupt-controller; interrupt-parent = <_intc>; #interrupt-cells = <2>; }; Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/include/asm/irq.h | 3 +++ arch/arc/

[PATCH 5/6] ARCv2: IRQ: Use build registers for getting numbers of interrupts

2017-01-27 Thread Yuriy Kolerov
troller { compatible = "snps,archs-idu-intc"; interrupt-controller; interrupt-parent = <_intc>; #interrupt-cells = <2>; }; Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/irq.h | 3 +++ arch/arc/kernel/intc-arcv2

RE: [PATCH v3 3/3] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2017-01-23 Thread Yuriy Kolerov
> -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, January 03, 2017 9:11 PM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com>; linux-snps- > a...@lists.infradead.org > Cc: alexey.brod...@synopsys.com; linux-kernel@vger

RE: [PATCH v3 3/3] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2017-01-23 Thread Yuriy Kolerov
> -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, January 03, 2017 9:11 PM > To: Yuriy Kolerov ; linux-snps- > a...@lists.infradead.org > Cc: alexey.brod...@synopsys.com; linux-kernel@vger.kernel.org; > marc.zyng...@arm.com >

[PATCH v3 3/3] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-12-28 Thread Yuriy Kolerov
the kernel is not configured with support of SMP. 2. When the kernel is configured with support of SMP but upper interrupt controllers does not support setting of the affinity and cannot propagate it to IDU. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- .../int

[PATCH v3 3/3] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-12-28 Thread Yuriy Kolerov
the kernel is not configured with support of SMP. 2. When the kernel is configured with support of SMP but upper interrupt controllers does not support setting of the affinity and cannot propagate it to IDU. Signed-off-by: Yuriy Kolerov --- .../interrupt-controller/snps,archs-idu

[PATCH v3 0/3] Fixes for IRQ subsystem

2016-12-28 Thread Yuriy Kolerov
then set_affinity() is not called for IDU interrupts and the real affinity of IDU does not correspond to the value in the descriptor of IRQ (irq_default_affinity by default). Yuriy Kolerov (3): ARC: IRQ: Use hwirq instead of virq in mask/unmask ARCv2: IRQ: Call entry/exit functions for chained

[PATCH v3 1/3] ARC: IRQ: Use hwirq instead of virq in mask/unmask

2016-12-28 Thread Yuriy Kolerov
It is necessary to use hwirq instead of virq when you communicate with an interrupt controller since there is no guaranty that virq numbers match hwirq numbers. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/intc-arcv2.c | 6 +++--- arch/arc/kernel/intc-com

[PATCH v3 0/3] Fixes for IRQ subsystem

2016-12-28 Thread Yuriy Kolerov
then set_affinity() is not called for IDU interrupts and the real affinity of IDU does not correspond to the value in the descriptor of IRQ (irq_default_affinity by default). Yuriy Kolerov (3): ARC: IRQ: Use hwirq instead of virq in mask/unmask ARCv2: IRQ: Call entry/exit functions for chained

[PATCH v3 1/3] ARC: IRQ: Use hwirq instead of virq in mask/unmask

2016-12-28 Thread Yuriy Kolerov
It is necessary to use hwirq instead of virq when you communicate with an interrupt controller since there is no guaranty that virq numbers match hwirq numbers. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/intc-arcv2.c | 6 +++--- arch/arc/kernel/intc-compact.c | 4 ++-- 2 files changed

[PATCH v3 2/3] ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP

2016-12-28 Thread Yuriy Kolerov
It is necessary to call entry/exit functions for parent interrupt controllers for proper masking/unmasking of interrupt lines. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/mcip.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/arc/kernel/mc

[PATCH v3 2/3] ARCv2: IRQ: Call entry/exit functions for chained handlers in MCIP

2016-12-28 Thread Yuriy Kolerov
It is necessary to call entry/exit functions for parent interrupt controllers for proper masking/unmasking of interrupt lines. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/mcip.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/arc/kernel/mcip.c b/arch/arc/kernel/mcip.c index

[PATCH v2 1/2] ARC: SMP: Set the default affinity to the boot cpu

2016-12-09 Thread Yuriy Kolerov
of affinity for common interrupt. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/irq.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c index 538b36a..e53bfd5 100644 --- a/arch/arc/kernel/irq.c +++ b/arch/arc/

[PATCH v2 1/2] ARC: SMP: Set the default affinity to the boot cpu

2016-12-09 Thread Yuriy Kolerov
of affinity for common interrupt. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/irq.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arc/kernel/irq.c b/arch/arc/kernel/irq.c index 538b36a..e53bfd5 100644 --- a/arch/arc/kernel/irq.c +++ b/arch/arc/kernel/irq.c @@ -20,6 +20,12

[PATCH v2 2/2] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-12-09 Thread Yuriy Kolerov
common interrupts since it is set to the boot CPU by default. If the kernel is configured without support of SMP then use cpu_online_mask since in this case it must always contain a valid bitmap with only 1 online CPU. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- .../int

[PATCH v2 2/2] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-12-09 Thread Yuriy Kolerov
common interrupts since it is set to the boot CPU by default. If the kernel is configured without support of SMP then use cpu_online_mask since in this case it must always contain a valid bitmap with only 1 online CPU. Signed-off-by: Yuriy Kolerov --- .../interrupt-controller/snps,archs-idu-intc.txt

RE: [RFC] ARC: mm: Restrict definition of pfn_valid() macro for CONFIG_FLATMEM

2016-12-02 Thread Yuriy Kolerov
> -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Wednesday, November 30, 2016 7:55 PM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com>; Michal Hocko > <mho...@kernel.org> > Cc: linux-snps-...@lists.infradead.org; alexey.brod

RE: [RFC] ARC: mm: Restrict definition of pfn_valid() macro for CONFIG_FLATMEM

2016-12-02 Thread Yuriy Kolerov
> -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Wednesday, November 30, 2016 7:55 PM > To: Yuriy Kolerov ; Michal Hocko > > Cc: linux-snps-...@lists.infradead.org; alexey.brod...@synopsys.com; linux- > ker...@vger.kernel.org > Su

RE: [RFC] ARC: mm: Restrict definition of pfn_valid() macro for CONFIG_FLATMEM

2016-11-30 Thread Yuriy Kolerov
> -Original Message- > From: Michal Hocko [mailto:mho...@kernel.org] > Sent: Wednesday, November 30, 2016 12:17 PM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com> > Cc: linux-snps-...@lists.infradead.org; vineet.gup...@synopsys.com; > alexey.brod...@sy

RE: [RFC] ARC: mm: Restrict definition of pfn_valid() macro for CONFIG_FLATMEM

2016-11-30 Thread Yuriy Kolerov
> -Original Message- > From: Michal Hocko [mailto:mho...@kernel.org] > Sent: Wednesday, November 30, 2016 12:17 PM > To: Yuriy Kolerov > Cc: linux-snps-...@lists.infradead.org; vineet.gup...@synopsys.com; > alexey.brod...@synopsys.com; linux-kernel@vger.kernel.org > S

[RFC] ARC: mm: Restrict definition of pfn_valid() macro for CONFIG_FLATMEM

2016-11-29 Thread Yuriy Kolerov
Despite the fact that subtraction of unsigned integers is a defined behaviour however such operations can lead to unexpected results. Thus it is better to check both left and right boundaries to avoid potential bugs as it done in the generic page.h. Signed-off-by: Yuriy Kolerov <yuriy.k

[RFC] ARC: mm: Restrict definition of pfn_valid() macro for CONFIG_FLATMEM

2016-11-29 Thread Yuriy Kolerov
Despite the fact that subtraction of unsigned integers is a defined behaviour however such operations can lead to unexpected results. Thus it is better to check both left and right boundaries to avoid potential bugs as it done in the generic page.h. Signed-off-by: Yuriy Kolerov --- arch/arc

[PATCH v2] ARC: mm: Fix invalid page mapping in kernel with PAE40

2016-11-29 Thread Yuriy Kolerov
then the value of pte will be truncated (0x1000) and the invalid mapping will be created. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/include/asm/pgtable.h b/ar

[PATCH v2] ARC: mm: Fix invalid page mapping in kernel with PAE40

2016-11-29 Thread Yuriy Kolerov
then the value of pte will be truncated (0x1000) and the invalid mapping will be created. Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arc/include/asm/pgtable.h b/arch/arc/include/asm/pgtable.h index

RE: [PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro

2016-11-29 Thread Yuriy Kolerov
-...@lists.infradead.org > Subject: Re: [PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro > > Hi Yuriy, > > Really nice catch! > Though a couple of nitpicks below. > > On Mon, 2016-11-28 at 07:07 +0300, Yuriy Kolerov wrote: > > Originally pfn_pte(pfn, pr

RE: [PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro

2016-11-29 Thread Yuriy Kolerov
; Subject: Re: [PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro > > Hi Yuriy, > > Really nice catch! > Though a couple of nitpicks below. > > On Mon, 2016-11-28 at 07:07 +0300, Yuriy Kolerov wrote: > > Originally pfn_pte(pfn, prot) macro had this de

[PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro

2016-11-27 Thread Yuriy Kolerov
210/0x450 SyS_munmap+0x2c/0x50 EV_Trap+0xfc/0x100 So the value of pfn must be casted to pte_t before shifting to ensure that 40-bit address will not be truncated: __pte(((pte_t) (pfn) << PAGE_SHIFT) | pgprot_val(prot)) Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> ---

[PATCH] ARC: mm: PAE40: Cast pfn to pte_t in pfn_pte() macro

2016-11-27 Thread Yuriy Kolerov
210/0x450 SyS_munmap+0x2c/0x50 EV_Trap+0xfc/0x100 So the value of pfn must be casted to pte_t before shifting to ensure that 40-bit address will not be truncated: __pte(((pte_t) (pfn) << PAGE_SHIFT) | pgprot_val(prot)) Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/pgtable.h

RE: [PATCH] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-11-14 Thread Yuriy Kolerov
Hi Marc, > -Original Message- > From: Marc Zyngier [mailto:marc.zyng...@arm.com] > Sent: Friday, November 11, 2016 6:29 PM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com>; linux-snps- > a...@lists.infradead.org > Cc: vineet.gup...@synopsys.com; alexey.b

RE: [PATCH] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-11-14 Thread Yuriy Kolerov
Hi Marc, > -Original Message- > From: Marc Zyngier [mailto:marc.zyng...@arm.com] > Sent: Friday, November 11, 2016 6:29 PM > To: Yuriy Kolerov ; linux-snps- > a...@lists.infradead.org > Cc: vineet.gup...@synopsys.com; alexey.brod...@synopsys.com; > t...@linutr

[PATCH] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-11-11 Thread Yuriy Kolerov
since irq_set_affinity() does nothing in this case. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- .../interrupt-controller/snps,archs-idu-intc.txt | 3 ++ arch/arc/kernel/mcip.c | 51 +- 2 files changed, 24 insertions(

[PATCH] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-11-11 Thread Yuriy Kolerov
since irq_set_affinity() does nothing in this case. Signed-off-by: Yuriy Kolerov --- .../interrupt-controller/snps,archs-idu-intc.txt | 3 ++ arch/arc/kernel/mcip.c | 51 +- 2 files changed, 24 insertions(+), 30 deletions(-) diff --git

[PATCH v4 1/2] ARC: IRQ: Do not use hwirq as virq and vice versa

2016-11-07 Thread Yuriy Kolerov
form all the above-described manipulations on virtual IRQs. But it is wrong and hardware IRQs must be used instead. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/include/asm/smp.h | 4 ++-- arch/arc/kernel/mcip.c | 20 +--- arch/arc/kernel/smp.c

[PATCH v4 1/2] ARC: IRQ: Do not use hwirq as virq and vice versa

2016-11-07 Thread Yuriy Kolerov
form all the above-described manipulations on virtual IRQs. But it is wrong and hardware IRQs must be used instead. Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/smp.h | 4 ++-- arch/arc/kernel/mcip.c | 20 +--- arch/arc/kernel/smp.c | 13 + 3

[PATCH v4 0/2] ARC: Set of patches for IRQ subsystem

2016-11-07 Thread Yuriy Kolerov
are routed to a single core. Yuriy Kolerov (2): ARC: IRQ: Do not use hwirq as virq and vice versa ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core arch/arc/include/asm/smp.h | 4 ++-- arch/arc/kernel/mcip.c | 33 - arch/arc/kernel

[PATCH v4 2/2] ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core

2016-11-07 Thread Yuriy Kolerov
. However idu_irq_set_affinity() always sets IDU_M_DISTRI_RR for all affinity values. But there is no sense in setting of such mode if only 1 core must handle a common interrupt. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/mcip.c | 13 +++-- 1 file chang

[PATCH v4 0/2] ARC: Set of patches for IRQ subsystem

2016-11-07 Thread Yuriy Kolerov
are routed to a single core. Yuriy Kolerov (2): ARC: IRQ: Do not use hwirq as virq and vice versa ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core arch/arc/include/asm/smp.h | 4 ++-- arch/arc/kernel/mcip.c | 33 - arch/arc/kernel

[PATCH v4 2/2] ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core

2016-11-07 Thread Yuriy Kolerov
. However idu_irq_set_affinity() always sets IDU_M_DISTRI_RR for all affinity values. But there is no sense in setting of such mode if only 1 core must handle a common interrupt. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/mcip.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions

RE: [PATCH v3 2/3] ARCv2: MCIP: Use hwirq instead of virq for resolution of IDU IRQ handlers

2016-11-07 Thread Yuriy Kolerov
Yes, theoretically this may not work with 1/3 and 2/3. I will merge those patches. > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, November 08, 2016 4:59 AM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com>; linux-snps- > a..

RE: [PATCH v3 2/3] ARCv2: MCIP: Use hwirq instead of virq for resolution of IDU IRQ handlers

2016-11-07 Thread Yuriy Kolerov
Yes, theoretically this may not work with 1/3 and 2/3. I will merge those patches. > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, November 08, 2016 4:59 AM > To: Yuriy Kolerov ; linux-snps- > a...@lists.infradead.org &g

[RFC] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-11-04 Thread Yuriy Kolerov
eve this value from /proc/interrupts for AXS103 even if support of hierarchical domains is implemented: /proc/interrupts does not show chained virqs and virqs without actions (e.g. all virqs of IDU). P.S.S. The question is how to solve all those problems properly. Signed-off-by: Yuriy Kole

[RFC] ARCv2: MCIP: Deprecate setting of affinity in Device Tree

2016-11-04 Thread Yuriy Kolerov
eve this value from /proc/interrupts for AXS103 even if support of hierarchical domains is implemented: /proc/interrupts does not show chained virqs and virqs without actions (e.g. all virqs of IDU). P.S.S. The question is how to solve all those problems properly. Signed-off-by: Yuriy Kole

[PATCH v3 1/3] ARC: SMP: Register IPI handler using virq but not hwirq

2016-11-03 Thread Yuriy Kolerov
. It is necessary to find a mapping of hwirq in the root IRQ domain to the actual virq using irq_find_mapping. Also a declaration of smp_ipi_irq_setup is corrected to denote that this function takes a hardware IRQ number but not a virtual IRQ number. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.

[PATCH v3 1/3] ARC: SMP: Register IPI handler using virq but not hwirq

2016-11-03 Thread Yuriy Kolerov
. It is necessary to find a mapping of hwirq in the root IRQ domain to the actual virq using irq_find_mapping. Also a declaration of smp_ipi_irq_setup is corrected to denote that this function takes a hardware IRQ number but not a virtual IRQ number. Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/smp.h

[PATCH v3 0/3] ARC: Set of patches for IRQ subsystem

2016-11-03 Thread Yuriy Kolerov
to a single core. Yuriy Kolerov (3): ARC: SMP: Register IPI handler using virq but not hwirq ARCv2: MCIP: Use hwirq instead of virq for resolution of IDU IRQ handlers ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core arch/arc/include/asm/smp.h | 4

[PATCH v3 3/3] ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core

2016-11-03 Thread Yuriy Kolerov
. However idu_irq_set_affinity always sets IDU_M_DISTRI_RR for all affinity values. But there is no sense in setting of such mode if only 1 core must handle a common interrupt. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/mcip.c | 13 +++-- 1 file chang

[PATCH v3 2/3] ARCv2: MCIP: Use hwirq instead of virq for resolution of IDU IRQ handlers

2016-11-03 Thread Yuriy Kolerov
ibed manipulations on virtual IRQs. But it is wrong and hardware IRQs must be used instead. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/mcip.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/arc/kernel/mcip.c

[PATCH v3 0/3] ARC: Set of patches for IRQ subsystem

2016-11-03 Thread Yuriy Kolerov
to a single core. Yuriy Kolerov (3): ARC: SMP: Register IPI handler using virq but not hwirq ARCv2: MCIP: Use hwirq instead of virq for resolution of IDU IRQ handlers ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core arch/arc/include/asm/smp.h | 4

[PATCH v3 3/3] ARCv2: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core

2016-11-03 Thread Yuriy Kolerov
. However idu_irq_set_affinity always sets IDU_M_DISTRI_RR for all affinity values. But there is no sense in setting of such mode if only 1 core must handle a common interrupt. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/mcip.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions

[PATCH v3 2/3] ARCv2: MCIP: Use hwirq instead of virq for resolution of IDU IRQ handlers

2016-11-03 Thread Yuriy Kolerov
ibed manipulations on virtual IRQs. But it is wrong and hardware IRQs must be used instead. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/mcip.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/arc/kernel/mcip.c b/arch/arc/kernel/mcip.c index 72f91

RE: [PATCH v2 5/5] ARC: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core

2016-10-25 Thread Yuriy Kolerov
> -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, October 25, 2016 8:53 PM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com>; linux-snps- > a...@lists.infradead.org > Cc: marc.zyng...@arm.com; vineet.gup...@synopsys.com; >

RE: [PATCH v2 5/5] ARC: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core

2016-10-25 Thread Yuriy Kolerov
> -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, October 25, 2016 8:53 PM > To: Yuriy Kolerov ; linux-snps- > a...@lists.infradead.org > Cc: marc.zyng...@arm.com; vineet.gup...@synopsys.com; > alexey.brod...@synopsys.com; linux-k

RE: [PATCH v2 1/5] ARC: SMP: Use "unsigned virq" in smp_ipi_irq_setup instead of "signed irq"

2016-10-25 Thread Yuriy Kolerov
Hi Vineet, Yes, I agree with you and I will squash these patches. > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, October 25, 2016 5:29 AM > To: Yuriy Kolerov <yuriy.kole...@synopsys.com>; linux-snps- > a...@lists.infradead.

RE: [PATCH v2 1/5] ARC: SMP: Use "unsigned virq" in smp_ipi_irq_setup instead of "signed irq"

2016-10-25 Thread Yuriy Kolerov
Hi Vineet, Yes, I agree with you and I will squash these patches. > -Original Message- > From: Vineet Gupta [mailto:vgu...@synopsys.com] > Sent: Tuesday, October 25, 2016 5:29 AM > To: Yuriy Kolerov ; linux-snps- > a...@lists.infradead.org > Cc: alexey.brod...@synop

[PATCH v2 5/5] ARC: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core

2016-10-24 Thread Yuriy Kolerov
. However idu_irq_set_affinity always sets IDU_M_DISTRI_RR for all affinity values. But there is no sense in setting of such mode if only 1 core must handle a common interrupt. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/mcip.c | 11 +-- 1 file chan

[PATCH v2 5/5] ARC: MCIP: Use IDU_M_DISTRI_DEST mode if there is only 1 destination core

2016-10-24 Thread Yuriy Kolerov
. However idu_irq_set_affinity always sets IDU_M_DISTRI_RR for all affinity values. But there is no sense in setting of such mode if only 1 core must handle a common interrupt. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/mcip.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions

[PATCH v2 1/5] ARC: SMP: Use "unsigned virq" in smp_ipi_irq_setup instead of "signed irq"

2016-10-24 Thread Yuriy Kolerov
of hwirq instead of virq in future. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/include/asm/smp.h | 4 ++-- arch/arc/kernel/smp.c | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arc/include/asm/smp.h b/arch/arc/include/asm

[PATCH v2 1/5] ARC: SMP: Use "unsigned virq" in smp_ipi_irq_setup instead of "signed irq"

2016-10-24 Thread Yuriy Kolerov
of hwirq instead of virq in future. Signed-off-by: Yuriy Kolerov --- arch/arc/include/asm/smp.h | 4 ++-- arch/arc/kernel/smp.c | 8 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arc/include/asm/smp.h b/arch/arc/include/asm/smp.h index 89fdd1b..3ebebbc 100644

[PATCH v2 3/5] ARC: MCIP: Use hwirq instead of virq for resolution of IDU IRQ handlers

2016-10-24 Thread Yuriy Kolerov
ibed manipulations on virtual IRQs. But it is wrong and hardware IRQs must be used instead. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/mcip.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/arc/kernel/mcip.c

[PATCH v2 2/5] ARC: SMP: Pass virq to smp_ipi_irq_setup instead of hwirq

2016-10-24 Thread Yuriy Kolerov
_setup is used for registering an IRQ handler for a root interrupt controller (a default IRQ domain must be used). Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/mcip.c| 5 +++-- arch/arc/plat-eznps/smp.c | 2 +- 2 files changed, 4 insertions(+), 3 deleti

[PATCH v2 4/5] ARC: MCIP: Set an initial affinity value in idu_irq_map

2016-10-24 Thread Yuriy Kolerov
that it must be rewritten to eliminate usage of the buffer and move all logic to idu_irq_map but I do not know how to do it correctly. Signed-off-by: Yuriy Kolerov <yuriy.kole...@synopsys.com> --- arch/arc/kernel/mcip.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-)

[PATCH v2 3/5] ARC: MCIP: Use hwirq instead of virq for resolution of IDU IRQ handlers

2016-10-24 Thread Yuriy Kolerov
ibed manipulations on virtual IRQs. But it is wrong and hardware IRQs must be used instead. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/mcip.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/arc/kernel/mcip.c b/arch/arc/kernel/mcip.c index 28ff7

[PATCH v2 2/5] ARC: SMP: Pass virq to smp_ipi_irq_setup instead of hwirq

2016-10-24 Thread Yuriy Kolerov
for registering an IRQ handler for a root interrupt controller (a default IRQ domain must be used). Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/mcip.c| 5 +++-- arch/arc/plat-eznps/smp.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/arc/kernel/mcip.c b/arch/arc

[PATCH v2 4/5] ARC: MCIP: Set an initial affinity value in idu_irq_map

2016-10-24 Thread Yuriy Kolerov
that it must be rewritten to eliminate usage of the buffer and move all logic to idu_irq_map but I do not know how to do it correctly. Signed-off-by: Yuriy Kolerov --- arch/arc/kernel/mcip.c | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/arch/arc/kernel

  1   2   >