Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1431951 > unrolled thread
| Started by | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| First post | 2016-06-27 13:30 +0200 |
| Last post | 2016-06-28 18:20 +0200 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
[RFC PATCH 0/4] ARM: remove big.LITTLE switcher support Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2016-06-27 13:30 +0200
[RFC PATCH 4/4] irqchip/gic: remove big.LITTLE switcher support Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2016-06-27 13:30 +0200
Re: [RFC PATCH 0/4] ARM: remove big.LITTLE switcher support Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-06-27 21:50 +0200
Re: [RFC PATCH 0/4] ARM: remove big.LITTLE switcher support Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2016-06-28 10:20 +0200
Re: [RFC PATCH 0/4] ARM: remove big.LITTLE switcher support Nicolas Pitre <nicolas.pitre@linaro.org> - 2016-06-28 18:20 +0200
| From | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| Date | 2016-06-27 13:30 +0200 |
| Subject | [RFC PATCH 0/4] ARM: remove big.LITTLE switcher support |
| Message-ID | <rOCTL-809-3@gated-at.bofh.it> |
Hi, It seems that in mainline kernel big.LITTLE switcher support may be usable only on ARM Versatile Express TC2 platform (but even this platform doesn't enable it in its defconfig). The following patchset removes big.LITTLE switcher support (from both ARM core and arm_big_little CPUfreq driver) in favor of using HMP. Since HMP support at scheduler level is not yet merged this patchset is probably premature and thus is marked as RFC. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics Bartlomiej Zolnierkiewicz (4): ARM: remove big.LITTLE switcher support cpufreq: arm_big_little: remove big.LITTLE switcher support cpufreq: exynos: remove big.LITTLE switcher dependency irqchip/gic: remove big.LITTLE switcher support arch/arm/Kconfig | 19 +- arch/arm/common/Makefile | 2 - arch/arm/common/bL_switcher.c | 802 --------------------------------- arch/arm/common/bL_switcher_dummy_if.c | 71 --- arch/arm/include/asm/bL_switcher.h | 77 ---- drivers/cpufreq/arm_big_little.c | 379 +--------------- drivers/cpufreq/cpufreq-dt-platdev.c | 2 - drivers/irqchip/irq-gic.c | 137 ------ 8 files changed, 25 insertions(+), 1464 deletions(-) delete mode 100644 arch/arm/common/bL_switcher.c delete mode 100644 arch/arm/common/bL_switcher_dummy_if.c delete mode 100644 arch/arm/include/asm/bL_switcher.h -- 1.9.1
[toc] | [next] | [standalone]
| From | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| Date | 2016-06-27 13:30 +0200 |
| Subject | [RFC PATCH 4/4] irqchip/gic: remove big.LITTLE switcher support |
| Message-ID | <rOCTM-809-31@gated-at.bofh.it> |
| In reply to | #1431951 |
Remove no longer needed big.LITTLE switcher support.
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
drivers/irqchip/irq-gic.c | 137 ----------------------------------------------
1 file changed, 137 deletions(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 1de07eb..9237dd2 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -788,144 +788,7 @@ static void gic_raise_softirq(const struct cpumask *mask, unsigned int irq)
}
#endif
-#ifdef CONFIG_BL_SWITCHER
-/*
- * gic_send_sgi - send a SGI directly to given CPU interface number
- *
- * cpu_id: the ID for the destination CPU interface
- * irq: the IPI number to send a SGI for
- */
-void gic_send_sgi(unsigned int cpu_id, unsigned int irq)
-{
- BUG_ON(cpu_id >= NR_GIC_CPU_IF);
- cpu_id = 1 << cpu_id;
- /* this always happens on GIC0 */
- writel_relaxed((cpu_id << 16) | irq, gic_data_dist_base(&gic_data[0]) + GIC_DIST_SOFTINT);
-}
-
-/*
- * gic_get_cpu_id - get the CPU interface ID for the specified CPU
- *
- * @cpu: the logical CPU number to get the GIC ID for.
- *
- * Return the CPU interface ID for the given logical CPU number,
- * or -1 if the CPU number is too large or the interface ID is
- * unknown (more than one bit set).
- */
-int gic_get_cpu_id(unsigned int cpu)
-{
- unsigned int cpu_bit;
-
- if (cpu >= NR_GIC_CPU_IF)
- return -1;
- cpu_bit = gic_cpu_map[cpu];
- if (cpu_bit & (cpu_bit - 1))
- return -1;
- return __ffs(cpu_bit);
-}
-
-/*
- * gic_migrate_target - migrate IRQs to another CPU interface
- *
- * @new_cpu_id: the CPU target ID to migrate IRQs to
- *
- * Migrate all peripheral interrupts with a target matching the current CPU
- * to the interface corresponding to @new_cpu_id. The CPU interface mapping
- * is also updated. Targets to other CPU interfaces are unchanged.
- * This must be called with IRQs locally disabled.
- */
-void gic_migrate_target(unsigned int new_cpu_id)
-{
- unsigned int cur_cpu_id, gic_irqs, gic_nr = 0;
- void __iomem *dist_base;
- int i, ror_val, cpu = smp_processor_id();
- u32 val, cur_target_mask, active_mask;
-
- BUG_ON(gic_nr >= CONFIG_ARM_GIC_MAX_NR);
-
- dist_base = gic_data_dist_base(&gic_data[gic_nr]);
- if (!dist_base)
- return;
- gic_irqs = gic_data[gic_nr].gic_irqs;
-
- cur_cpu_id = __ffs(gic_cpu_map[cpu]);
- cur_target_mask = 0x01010101 << cur_cpu_id;
- ror_val = (cur_cpu_id - new_cpu_id) & 31;
-
- raw_spin_lock(&irq_controller_lock);
-
- /* Update the target interface for this logical CPU */
- gic_cpu_map[cpu] = 1 << new_cpu_id;
-
- /*
- * Find all the peripheral interrupts targetting the current
- * CPU interface and migrate them to the new CPU interface.
- * We skip DIST_TARGET 0 to 7 as they are read-only.
- */
- for (i = 8; i < DIV_ROUND_UP(gic_irqs, 4); i++) {
- val = readl_relaxed(dist_base + GIC_DIST_TARGET + i * 4);
- active_mask = val & cur_target_mask;
- if (active_mask) {
- val &= ~active_mask;
- val |= ror32(active_mask, ror_val);
- writel_relaxed(val, dist_base + GIC_DIST_TARGET + i*4);
- }
- }
-
- raw_spin_unlock(&irq_controller_lock);
-
- /*
- * Now let's migrate and clear any potential SGIs that might be
- * pending for us (cur_cpu_id). Since GIC_DIST_SGI_PENDING_SET
- * is a banked register, we can only forward the SGI using
- * GIC_DIST_SOFTINT. The original SGI source is lost but Linux
- * doesn't use that information anyway.
- *
- * For the same reason we do not adjust SGI source information
- * for previously sent SGIs by us to other CPUs either.
- */
- for (i = 0; i < 16; i += 4) {
- int j;
- val = readl_relaxed(dist_base + GIC_DIST_SGI_PENDING_SET + i);
- if (!val)
- continue;
- writel_relaxed(val, dist_base + GIC_DIST_SGI_PENDING_CLEAR + i);
- for (j = i; j < i + 4; j++) {
- if (val & 0xff)
- writel_relaxed((1 << (new_cpu_id + 16)) | j,
- dist_base + GIC_DIST_SOFTINT);
- val >>= 8;
- }
- }
-}
-
-/*
- * gic_get_sgir_physaddr - get the physical address for the SGI register
- *
- * REturn the physical address of the SGI register to be used
- * by some early assembly code when the kernel is not yet available.
- */
-static unsigned long gic_dist_physaddr;
-
-unsigned long gic_get_sgir_physaddr(void)
-{
- if (!gic_dist_physaddr)
- return 0;
- return gic_dist_physaddr + GIC_DIST_SOFTINT;
-}
-
-void __init gic_init_physaddr(struct device_node *node)
-{
- struct resource res;
- if (of_address_to_resource(node, 0, &res) == 0) {
- gic_dist_physaddr = res.start;
- pr_info("GIC physical location is %#lx\n", gic_dist_physaddr);
- }
-}
-
-#else
#define gic_init_physaddr(node) do { } while (0)
-#endif
static int gic_irq_domain_map(struct irq_domain *d, unsigned int irq,
irq_hw_number_t hw)
--
1.9.1
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Pitre <nicolas.pitre@linaro.org> |
|---|---|
| Date | 2016-06-27 21:50 +0200 |
| Message-ID | <rOKHE-4FX-11@gated-at.bofh.it> |
| In reply to | #1431951 |
On Mon, 27 Jun 2016, Bartlomiej Zolnierkiewicz wrote: > Hi, > > It seems that in mainline kernel big.LITTLE switcher support > may be usable only on ARM Versatile Express TC2 platform > (but even this platform doesn't enable it in its defconfig). It is also used on some Samsung targets. > The following patchset removes big.LITTLE switcher support > (from both ARM core and arm_big_little CPUfreq driver) in > favor of using HMP. > > Since HMP support at scheduler level is not yet merged this > patchset is probably premature and thus is marked as RFC. It is premature indeed. And before this is removed, comparison with power/performance benchmark numbers will have to be provided as well to justify this removal. At the moment there is nothing else in mainline that can achieve what this code does. We all agree that the scheduler based solution is the best way to do it. But this has been a couple years already and this is still work in progress. Nicolas
[toc] | [prev] | [next] | [standalone]
| From | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> |
|---|---|
| Date | 2016-06-28 10:20 +0200 |
| Message-ID | <rOWpr-4kK-5@gated-at.bofh.it> |
| In reply to | #1432280 |
Hi, On Monday, June 27, 2016 03:49:44 PM Nicolas Pitre wrote: > On Mon, 27 Jun 2016, Bartlomiej Zolnierkiewicz wrote: > > > Hi, > > > > It seems that in mainline kernel big.LITTLE switcher support > > may be usable only on ARM Versatile Express TC2 platform > > (but even this platform doesn't enable it in its defconfig). > > It is also used on some Samsung targets. Could you please explain this more? AFAIK mainline never had working IKS solution (big.LITTLE switcher support + arm_big_little CPUfreq driver support) on any Samsung SoC. > > The following patchset removes big.LITTLE switcher support > > (from both ARM core and arm_big_little CPUfreq driver) in > > favor of using HMP. > > > > Since HMP support at scheduler level is not yet merged this > > patchset is probably premature and thus is marked as RFC. > > It is premature indeed. > > And before this is removed, comparison with power/performance benchmark > numbers will have to be provided as well to justify this removal. At > the moment there is nothing else in mainline that can achieve what this > code does. I agree given that this code has real users and according to my research on mainline kernel it seems that the IKS functionality (bL switcher core code together with arm_bit_little CPUfreq driver support) is usable only on TC2 and even this platform doesn't enable it by default. IOW I would really like to get the confirmation that there are platforms that are making use of IKS functionality currently with the mainline kernel. Otherwise we should either consider its removal or enable it on platforms that are supposed to use it. > We all agree that the scheduler based solution is the best way to do it. > But this has been a couple years already and this is still work in > progress. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics
[toc] | [prev] | [next] | [standalone]
| From | Nicolas Pitre <nicolas.pitre@linaro.org> |
|---|---|
| Date | 2016-06-28 18:20 +0200 |
| Message-ID | <rP3TY-Uy-7@gated-at.bofh.it> |
| In reply to | #1432618 |
On Tue, 28 Jun 2016, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On Monday, June 27, 2016 03:49:44 PM Nicolas Pitre wrote: > > On Mon, 27 Jun 2016, Bartlomiej Zolnierkiewicz wrote: > > > > > Hi, > > > > > > It seems that in mainline kernel big.LITTLE switcher support > > > may be usable only on ARM Versatile Express TC2 platform > > > (but even this platform doesn't enable it in its defconfig). > > > > It is also used on some Samsung targets. > > Could you please explain this more? AFAIK mainline never > had working IKS solution (big.LITTLE switcher support + > arm_big_little CPUfreq driver support) on any Samsung SoC. You might be right about mainline. Out-of-tree support for some Samsung targets certainly exists though. > > > The following patchset removes big.LITTLE switcher support > > > (from both ARM core and arm_big_little CPUfreq driver) in > > > favor of using HMP. > > > > > > Since HMP support at scheduler level is not yet merged this > > > patchset is probably premature and thus is marked as RFC. > > > > It is premature indeed. > > > > And before this is removed, comparison with power/performance benchmark > > numbers will have to be provided as well to justify this removal. At > > the moment there is nothing else in mainline that can achieve what this > > code does. > > I agree given that this code has real users and according > to my research on mainline kernel it seems that the IKS > functionality (bL switcher core code together with > arm_bit_little CPUfreq driver support) is usable only on > TC2 and even this platform doesn't enable it by default. It is not enabled by default because it used to be experimental. And given that it pairs two A15's with two A7's leaving the third A7 completely unused, some people didn't consider a good default for showing the complete platform capacity. But if you want predictable scheduler results right now with mainline on a b.L system then IKS is the only available solution. It also provides a good reference to do performance/power comparison against any solution meant to replace it. Enabling it by default on TC2 might not be such a bad idea at this point. I certainly have it enabled in my local config. Nicolas
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web