From: Mark Brown <broonie(a)linaro.org>
This helps people spot if they have missed a supply from a device tree or
equivalent data structure.
Suggested-by: Stephen Warren <swarren(a)nvidia.com>
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/regulator/core.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 6333080..13263d1 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1299,13 +1299,8 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
* even if it isn't hooked up and just provide a dummy.
*/
if (has_full_constraints && allow_dummy) {
- /*
- * Log the substitution if regulator configuration is
- * not complete to help development.
- */
- if (!has_full_constraints)
- pr_warn("%s supply %s not found, using dummy regulator\n",
- devname, id);
+ pr_warn("%s supply %s not found, using dummy regulator\n",
+ devname, id);
rdev = dummy_regulator_rdev;
goto found;
--
1.8.4.rc3
Futex uses GUP. Currently on ARM, the default __get_user_pages_fast
being used always returns 0, leading to a forever loop in get_futex_key :(
Implementing GUP solves this problem.
Tested on vexpress-A15 on QEMU.
8<---------------------------------------------------->8
Implement get_user_pages_fast without locking in the fastpath on ARM.
This work is derived from the x86 version and adapted to ARM.
Signed-off-by: Zi Shen Lim <zishen.lim(a)linaro.org>
---
arch/arm/mm/Makefile | 4 +-
arch/arm/mm/gup.c | 330 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 332 insertions(+), 2 deletions(-)
create mode 100644 arch/arm/mm/gup.c
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile
index 224a9cc..26cafd0 100644
--- a/arch/arm/mm/Makefile
+++ b/arch/arm/mm/Makefile
@@ -2,8 +2,8 @@
# Makefile for the linux arm-specific parts of the memory manager.
#
-obj-y := dma-mapping.o extable.o fault.o init.o \
- iomap.o
+obj-y := dma-mapping.o extable.o fault.o gup.o \
+ init.o iomap.o
obj-$(CONFIG_MMU) += fault-armv.o flush.o idmap.o ioremap.o \
mmap.o pgd.o mmu.o
diff --git a/arch/arm/mm/gup.c b/arch/arm/mm/gup.c
new file mode 100644
index 0000000..42dce08
--- /dev/null
+++ b/arch/arm/mm/gup.c
@@ -0,0 +1,330 @@
+/*
+ * Lockless get_user_pages_fast for ARM
+ *
+ * Copyright (C) 2008 Nick Piggin
+ * Copyright (C) 2008 Novell Inc.
+ * Copyright (C) 2013 Zi Shen Lim, Linaro Ltd <zishen.lim(a)linaro.org>
+ */
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/vmstat.h>
+#include <linux/highmem.h>
+#include <linux/swap.h>
+#include <linux/hugetlb.h>
+
+#include <asm/pgtable.h>
+
+static inline pte_t gup_get_pte(pte_t *ptep)
+{
+ return ACCESS_ONCE(*ptep);
+}
+
+/*
+ * The performance critical leaf functions are made noinline otherwise gcc
+ * inlines everything into a single function which results in too much
+ * register pressure.
+ */
+static noinline int gup_pte_range(pmd_t pmd, unsigned long addr,
+ unsigned long end, int write, struct page **pages, int *nr)
+{
+ pte_t *ptep;
+
+ ptep = pte_offset_map(&pmd, addr);
+ do {
+ pte_t pte = gup_get_pte(ptep);
+ struct page *page;
+
+ if (!pte_present_user(pte) || (write && !pte_write(pte)) ||
+ pte_special(pte)) {
+ pte_unmap(ptep);
+ return 0;
+ }
+ VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
+ page = pte_page(pte);
+ get_page(page);
+ SetPageReferenced(page);
+ pages[*nr] = page;
+ (*nr)++;
+
+ } while (ptep++, addr += PAGE_SIZE, addr != end);
+ pte_unmap(ptep - 1);
+
+ return 1;
+}
+
+static inline void get_head_page_multiple(struct page *page, int nr)
+{
+ VM_BUG_ON(page != compound_head(page));
+ VM_BUG_ON(page_count(page) == 0);
+ atomic_add(nr, &page->_count);
+ SetPageReferenced(page);
+}
+
+static noinline int gup_huge_pmd(pmd_t pmd, unsigned long addr,
+ unsigned long end, int write, struct page **pages, int *nr)
+{
+ pte_t pte = *(pte_t *)&pmd;
+ struct page *head, *page;
+ int refs;
+
+ if (!pte_present_user(pte) || (write && !pte_write(pte)))
+ return 0;
+ /* hugepages are never "special" */
+ VM_BUG_ON(pte_special(pte));
+ VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
+
+ refs = 0;
+ head = pte_page(pte);
+ page = head + ((addr & ~PMD_MASK) >> PAGE_SHIFT);
+ do {
+ VM_BUG_ON(compound_head(page) != head);
+ pages[*nr] = page;
+ if (PageTail(page))
+ get_huge_page_tail(page);
+ (*nr)++;
+ page++;
+ refs++;
+ } while (addr += PAGE_SIZE, addr != end);
+ get_head_page_multiple(head, refs);
+
+ return 1;
+}
+
+static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end,
+ int write, struct page **pages, int *nr)
+{
+ unsigned long next;
+ pmd_t *pmdp;
+
+ pmdp = pmd_offset(&pud, addr);
+ do {
+ pmd_t pmd = *pmdp;
+
+ next = pmd_addr_end(addr, end);
+ /*
+ * The pmd_trans_splitting() check below explains why
+ * pmdp_splitting_flush has to flush the tlb, to stop
+ * this gup-fast code from running while we set the
+ * splitting bit in the pmd. Returning zero will take
+ * the slow path that will call wait_split_huge_page()
+ * if the pmd is still in splitting state. gup-fast
+ * can't because it has irq disabled and
+ * wait_split_huge_page() would never return as the
+ * tlb flush IPI wouldn't run.
+ */
+ if (pmd_none(pmd) || pmd_trans_splitting(pmd))
+ return 0;
+ if (unlikely(pmd_huge(pmd))) {
+ if (!gup_huge_pmd(pmd, addr, next, write, pages, nr))
+ return 0;
+ } else {
+ if (!gup_pte_range(pmd, addr, next, write, pages, nr))
+ return 0;
+ }
+ } while (pmdp++, addr = next, addr != end);
+
+ return 1;
+}
+
+static noinline int gup_huge_pud(pud_t pud, unsigned long addr,
+ unsigned long end, int write, struct page **pages, int *nr)
+{
+ pte_t pte = *(pte_t *)&pud;
+ struct page *head, *page;
+ int refs;
+
+ if (!pte_present_user(pte) || (write && !pte_write(pte)))
+ return 0;
+ /* hugepages are never "special" */
+ VM_BUG_ON(pte_special(pte));
+ VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
+
+ refs = 0;
+ head = pte_page(pte);
+ page = head + ((addr & ~PUD_MASK) >> PAGE_SHIFT);
+ do {
+ VM_BUG_ON(compound_head(page) != head);
+ pages[*nr] = page;
+ if (PageTail(page))
+ get_huge_page_tail(page);
+ (*nr)++;
+ page++;
+ refs++;
+ } while (addr += PAGE_SIZE, addr != end);
+ get_head_page_multiple(head, refs);
+
+ return 1;
+}
+
+static int gup_pud_range(pgd_t pgd, unsigned long addr, unsigned long end,
+ int write, struct page **pages, int *nr)
+{
+ unsigned long next;
+ pud_t *pudp;
+
+ pudp = pud_offset(&pgd, addr);
+ do {
+ pud_t pud = *pudp;
+
+ next = pud_addr_end(addr, end);
+ if (pud_none(pud))
+ return 0;
+ if (unlikely(pud_huge(pud))) {
+ if (!gup_huge_pud(pud, addr, next, write, pages, nr))
+ return 0;
+ } else {
+ if (!gup_pmd_range(pud, addr, next, write, pages, nr))
+ return 0;
+ }
+ } while (pudp++, addr = next, addr != end);
+
+ return 1;
+}
+
+/*
+ * Like get_user_pages_fast() except its IRQ-safe in that it won't fall
+ * back to the regular GUP.
+ */
+int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
+ struct page **pages)
+{
+ struct mm_struct *mm = current->mm;
+ unsigned long addr, len, end;
+ unsigned long next;
+ unsigned long flags;
+ pgd_t *pgdp;
+ int nr = 0;
+
+ start &= PAGE_MASK;
+ addr = start;
+ len = (unsigned long) nr_pages << PAGE_SHIFT;
+ end = start + len;
+ if (unlikely(!access_ok(write ? VERIFY_WRITE : VERIFY_READ,
+ (void __user *)start, len)))
+ return 0;
+
+ /*
+ * XXX: batch / limit 'nr', to avoid large irq off latency
+ * needs some instrumenting to determine the common sizes used by
+ * important workloads (eg. DB2), and whether limiting the batch size
+ * will decrease performance.
+ *
+ * It seems like we're in the clear for the moment. Direct-IO is
+ * the main guy that batches up lots of get_user_pages, and even
+ * they are limited to 64-at-a-time which is not so many.
+ */
+ /*
+ * This doesn't prevent pagetable teardown, but does prevent
+ * the pagetables and pages from being freed.
+ *
+ * So long as we atomically load page table pointers versus teardown,
+ * we can follow the address down to the the page and take a ref on it.
+ */
+ local_irq_save(flags);
+ pgdp = pgd_offset(mm, addr);
+ do {
+ pgd_t pgd = *pgdp;
+
+ next = pgd_addr_end(addr, end);
+ if (pgd_none(pgd))
+ break;
+ if (!gup_pud_range(pgd, addr, next, write, pages, &nr))
+ break;
+ } while (pgdp++, addr = next, addr != end);
+ local_irq_restore(flags);
+
+ return nr;
+}
+
+/**
+ * get_user_pages_fast() - pin user pages in memory
+ * @start: starting user address
+ * @nr_pages: number of pages from start to pin
+ * @write: whether pages will be written to
+ * @pages: array that receives pointers to the pages pinned.
+ * Should be at least nr_pages long.
+ *
+ * Attempt to pin user pages in memory without taking mm->mmap_sem.
+ * If not successful, it will fall back to taking the lock and
+ * calling get_user_pages().
+ *
+ * Returns number of pages pinned. This may be fewer than the number
+ * requested. If nr_pages is 0 or negative, returns 0. If no pages
+ * were pinned, returns -errno.
+ */
+int get_user_pages_fast(unsigned long start, int nr_pages, int write,
+ struct page **pages)
+{
+ struct mm_struct *mm = current->mm;
+ unsigned long addr, len, end;
+ unsigned long next;
+ pgd_t *pgdp;
+ int nr = 0;
+
+ start &= PAGE_MASK;
+ addr = start;
+ len = (unsigned long) nr_pages << PAGE_SHIFT;
+
+ end = start + len;
+ if (end < start)
+ goto slow_irqon;
+
+ /*
+ * XXX: batch / limit 'nr', to avoid large irq off latency
+ * needs some instrumenting to determine the common sizes used by
+ * important workloads (eg. DB2), and whether limiting the batch size
+ * will decrease performance.
+ *
+ * It seems like we're in the clear for the moment. Direct-IO is
+ * the main guy that batches up lots of get_user_pages, and even
+ * they are limited to 64-at-a-time which is not so many.
+ */
+ /*
+ * This doesn't prevent pagetable teardown, but does prevent
+ * the pagetables and pages from being freed.
+ *
+ * So long as we atomically load page table pointers versus teardown,
+ * we can follow the address down to the the page and take a ref on it.
+ */
+ local_irq_disable();
+ pgdp = pgd_offset(mm, addr);
+ do {
+ pgd_t pgd = *pgdp;
+
+ next = pgd_addr_end(addr, end);
+ if (pgd_none(pgd))
+ goto slow;
+ if (!gup_pud_range(pgd, addr, next, write, pages, &nr))
+ goto slow;
+ } while (pgdp++, addr = next, addr != end);
+ local_irq_enable();
+
+ VM_BUG_ON(nr != (end - start) >> PAGE_SHIFT);
+ return nr;
+
+ {
+ int ret;
+
+slow:
+ local_irq_enable();
+slow_irqon:
+ /* Try to get the remaining pages with get_user_pages */
+ start += nr << PAGE_SHIFT;
+ pages += nr;
+
+ down_read(&mm->mmap_sem);
+ ret = get_user_pages(current, mm, start,
+ (end - start) >> PAGE_SHIFT, write, 0, pages, NULL);
+ up_read(&mm->mmap_sem);
+
+ /* Have to be a bit careful with return values */
+ if (nr > 0) {
+ if (ret < 0)
+ ret = nr;
+ else
+ ret += nr;
+ }
+
+ return ret;
+ }
+}
--
1.8.1.2
This small series adds support for Transparent Huge Pages and hugetlbfs
pages for KVM on the arm and arm64 architectures.
Measurements have shown that using huge pages in for stage-2 mappings
provides up to more than 15% performance increase for some workloads.
The patch series applies to kvm/next, but depends on the patch sent
earlier:
"ARM: KVM: Fix unaligned unmap_range leak"
Christoffer Dall (3):
KVM: Move gfn_to_index to x86 specific code
KVM: ARM: Get rid of KVM_HPAGE_XXX defines
KVM: ARM: Transparent huge pages and hugetlbfs support
arch/arm/include/asm/kvm_host.h | 5 -
arch/arm/include/asm/kvm_mmu.h | 17 +++-
arch/arm/kvm/mmu.c | 200 ++++++++++++++++++++++++++++++++------
arch/arm64/include/asm/kvm_mmu.h | 12 ++-
arch/x86/include/asm/kvm_host.h | 7 ++
include/linux/kvm_host.h | 7 --
6 files changed, 201 insertions(+), 47 deletions(-)
--
1.7.10.4
This is my biggest patchset ever and it might not happen again in my entire
career. I hope I haven't screwed up here :)
CPUFreq cleanup patches are ready to hit linux-next (I hope it doesn't turn out
into horror stories, where it broke all possible architectures where Linux runs
:))
Most of these are build tested only, Also done by: Fengguang Wu's build bot.
All of these were sent separately in smaller patchsets earlier and now merged
together as a single set. Some parts are reviewed by platform maintainers and
their Acks are included in the patches (Sorry if I missed any)..
These are rebased over today's pm/linux-next:
f74a274 Merge branch 'pm-cpufreq-next' into linux-next
with following patches over it, which I expect to get into Rafael's tree before
these:
cpufreq: use correct values of cpus in __cpufreq_remove_dev_finish()
cpufreq: distinguish drivers that do asynchronous notifications
cpufreq: make sure frequency transitions are serialized
cpufreq: Create cpufreq_transition_complete()
cpufreq: powernow-k8: mark freq transition complete on error cases
There are few new patches here which haven't been sent yet and only came out
after discussions with Maintainers about their platforms:
cpufreq: loongson2: use cpufreq_generic_init() routine
cpufreq: davinci: use cpufreq_generic_init() routine
cpufreq: cris: use cpufreq_generic_init() routine
cpufreq: omap: use cpufreq_generic_init() routine
As suggested by Rafael earlier, he might not apply all at once and will give
people some chance to test sets one by one.. So, first set now, next one after
few days. So, I am marking different sets with patch numbers to make it easier
for Rafael.
- Patch 1->8: Generic cleanup of cpufreq core (First batch)
- Patch 9->54: Mostly about cpufreq_table_validate_and_show() helper (First batch)
- Patch 55->89: New generic routines for cpufreq drivers (First/Second batch)
- Patch 90->126: About calling cpufreq_driver->get() from core (First/Second batch)
- Patch 127->146: Generic init() routine (First/Second batch)
- Patch 147->180: Light weight ->target() routine (Third batch)
- Patch 181->211: Call notifiers from core instead of target() (Third/Fourth batch)
- Patch 212->228: Generic get() (Fifth batch)
As suggested by Amit here, Linaro may try to test linux-next with these patches
on Linaro's board farm (Mostly ARM and X86)..
https://lkml.org/lkml/2013/9/11/346
--
viresh
Hans-Christian Egtvedt (1):
cpufreq: at32ap: add frequency table
Viresh Kumar (227):
cpufreq: Remove extra blank line
cpufreq: don't break string in print statements
cpufreq: remove __cpufreq_remove_dev()
cpufreq: Optimize cpufreq_frequency_table_verify()
cpufreq: rename __cpufreq_set_policy() as cpufreq_set_policy()
cpufreq: rewrite cpufreq_driver->flags using shift operator
cpufreq: use cpufreq_driver->flags to mark
CPUFREQ_HAVE_GOVERNOR_PER_POLICY
cpufreq: add new routine cpufreq_verify_within_cpu_limits()
cpufreq: Add new helper cpufreq_table_validate_and_show()
cpufreq: pxa: call cpufreq_frequency_table_get_attr()
cpufreq: s3cx4xx: call cpufreq_frequency_table_get_attr()
cpufreq: sparc: call cpufreq_frequency_table_get_attr()
cpufreq: acpi-cpufreq: use cpufreq_table_validate_and_show()
cpufreq: arm_big_little: use cpufreq_table_validate_and_show()
cpufreq: blackfin: use cpufreq_table_validate_and_show()
cpufreq: cpufreq-cpu0: use cpufreq_table_validate_and_show()
cpufreq: cris: use cpufreq_table_validate_and_show()
cpufreq: davinci: use cpufreq_table_validate_and_show()
cpufreq: dbx500: use cpufreq_table_validate_and_show()
cpufreq: e_powersaver: use cpufreq_table_validate_and_show()
cpufreq: elanfreq: use cpufreq_table_validate_and_show()
cpufreq: exynos: use cpufreq_table_validate_and_show()
cpufreq: ia64-acpi: use cpufreq_table_validate_and_show()
cpufreq: imx6q: use cpufreq_table_validate_and_show()
cpufreq: kirkwood: use cpufreq_table_validate_and_show()
cpufreq: longhaul: use cpufreq_table_validate_and_show()
cpufreq: loongson2: use cpufreq_table_validate_and_show()
cpufreq: maple: use cpufreq_table_validate_and_show()
cpufreq: omap: use cpufreq_table_validate_and_show()
cpufreq: p4-clockmod: use cpufreq_table_validate_and_show()
cpufreq: pasemi: use cpufreq_table_validate_and_show()
cpufreq: pmac: use cpufreq_table_validate_and_show()
cpufreq: powernow: use cpufreq_table_validate_and_show()
cpufreq: ppc: use cpufreq_table_validate_and_show()
cpufreq: pxa: use cpufreq_table_validate_and_show()
cpufreq: s3cx4xx: use cpufreq_table_validate_and_show()
cpufreq: s5pv210: use cpufreq_table_validate_and_show()
cpufreq: sa11x0: Expose frequency table
cpufreq: sa11x0: let cpufreq core initialize struct policy fields
cpufreq: sc520: use cpufreq_table_validate_and_show()
cpufreq: sh: use cpufreq_table_validate_and_show()
cpufreq: sparc: use cpufreq_table_validate_and_show()
cpufreq: spear: use cpufreq_table_validate_and_show()
cpufreq: speedstep: use cpufreq_table_validate_and_show()
cpufreq: tegra: use cpufreq_table_validate_and_show()
cpufreq: tegra: fix implementation of ->exit()
cpufreq: arm_big_little: call cpufreq_frequency_table_put_attr()
cpufreq: blackfin: call cpufreq_frequency_table_put_attr()
cpufreq: exynos: call cpufreq_frequency_table_put_attr()
cpufreq: loongson2: call cpufreq_frequency_table_put_attr()
cpufreq: omap: call cpufreq_frequency_table_put_attr()
cpufreq: pxa: call cpufreq_frequency_table_put_attr()
cpufreq: sparc: call cpufreq_frequency_table_put_attr()
cpufreq: define generic .attr, .exit() and .verify() routines
cpufreq: acpi: Use generic cpufreq routines
cpufreq: arm_big_little: Use generic cpufreq routines
cpufreq: at32ap: Use generic cpufreq routines
cpufreq: blackfin: Use generic cpufreq routines
cpufreq: cpu0: Use generic cpufreq routines
cpufreq: cris: Use generic cpufreq routines
cpufreq: davinci: Use generic cpufreq routines
cpufreq: dbx500: Use generic cpufreq routines
cpufreq: e_powersaver: Use generic cpufreq routines
cpufreq: elanfreq: Use generic cpufreq routines
cpufreq: exynos: Use generic cpufreq routines
cpufreq: ia64-acpi: Use generic cpufreq routines
cpufreq: imx6q: Use generic cpufreq routines
cpufreq: kirkwood: Use generic cpufreq routines
cpufreq: longhaul: Use generic cpufreq routines
cpufreq: loongson2: Use generic cpufreq routines
cpufreq: maple: Use generic cpufreq routines
cpufreq: omap: Use generic cpufreq routines
cpufreq: p4-clockmod: Use generic cpufreq routines
cpufreq: pasemi: Use generic cpufreq routines
cpufreq: pmac: Use generic cpufreq routines
cpufreq: powernow: Use generic cpufreq routines
cpufreq: ppc-corenet: Use generic cpufreq routines
cpufreq: ppc_cbe: Use generic cpufreq routines
cpufreq: pxa: Use generic cpufreq routines
cpufreq: s3cx4xx: Use generic cpufreq routines
cpufreq: s5pv210: Use generic cpufreq routines
cpufreq: sa11x0: Use generic cpufreq routines
cpufreq: sc520: Use generic cpufreq routines
cpufreq: sh: Use generic cpufreq routines
cpufreq: sparc: Use generic cpufreq routines
cpufreq: spear: Use generic cpufreq routines
cpufreq: speedstep: Use generic cpufreq routines
cpufreq: tegra: Use generic cpufreq routines
cpufreq: call cpufreq_driver->get() after calling ->init()
cpufreq: acpi: don't initialize part of policy that is set by core
too
cpufreq: arm_big_little: don't initialize part of policy that is set
by core too
cpufreq: at32ap: don't initialize part of policy that is set by core
too
cpufreq: blackfin: don't initialize part of policy that is set by
core too
cpufreq: cpu0: don't initialize part of policy that is set by core
too
cpufreq: nforce2: don't initialize part of policy that is set by core
too
cpufreq: cris: don't initialize part of policy that is set by core
too
cpufreq: davinci: don't initialize part of policy that is set by core
too
cpufreq: dbx500: don't initialize part of policy that is set by core
too
cpufreq: e_powersaver: don't initialize part of policy that is set by
core too
cpufreq: elanfreq: don't initialize part of policy that is set by
core too
cpufreq: exynos: don't initialize part of policy that is set by core
too
cpufreq: gx: don't initialize part of policy that is set by core too
cpufreq: ia64-acpi: don't initialize part of policy that is set by
core too
cpufreq: imx6q: don't initialize part of policy that is set by core
too
cpufreq: integrator: don't initialize part of policy that is set by
core too
cpufreq: kirkwood: don't initialize part of policy that is set by
core too
cpufreq: longhaul: don't initialize part of policy that is set by
core too
cpufreq: loongson2: don't initialize part of policy that is set by
core too
cpufreq: maple: don't initialize part of policy that is set by core
too
cpufreq: omap: don't initialize part of policy that is set by core
too
cpufreq: p4: don't initialize part of policy that is set by core too
cpufreq: pcc: don't initialize part of policy that is set by core too
cpufreq: pmac: don't initialize part of policy that is set by core
too
cpufreq: powernow: don't initialize part of policy that is set by
core too
cpufreq: ppc: don't initialize part of policy that is set by core too
cpufreq: pxa: don't initialize part of policy that is set by core too
cpufreq: s3c: don't initialize part of policy that is set by core too
cpufreq: s5pv210: don't initialize part of policy that is set by core
too
cpufreq: sa11x0: don't initialize part of policy that is set by core
too
cpufreq: sc520_freq: don't initialize part of policy that is set by
core too
cpufreq: sh: don't initialize part of policy that is set by core too
cpufreq: spear: don't initialize part of policy that is set by core
too
cpufreq: speedstep: don't initialize part of policy that is set by
core too
cpufreq: tegra: don't initialize part of policy that is set by core
too
cpufreq: unicore2: don't initialize part of policy that is set by
core too
cpufreq: create cpufreq_generic_init() routine
cpufreq: remove CONFIG_CPU_FREQ_TABLE
cpufreq: cpu0: use cpufreq_generic_init() routine
cpufreq: cris: use cpufreq_generic_init() routine
cpufreq: davinci: use cpufreq_generic_init() routine
cpufreq: dbx500: use cpufreq_generic_init() routine
cpufreq: exynos: use cpufreq_generic_init() routine
cpufreq: imx6q: use cpufreq_generic_init() routine
cpufreq: kirkwood: use cpufreq_generic_init() routine
cpufreq: loongson2: use cpufreq_generic_init() routine
cpufreq: maple: use cpufreq_generic_init() routine
cpufreq: omap: use cpufreq_generic_init() routine
cpufreq: pasemi: use cpufreq_generic_init() routine
cpufreq: pmac32: use cpufreq_generic_init() routine
cpufreq: pmac64: use cpufreq_generic_init() routine
cpufreq: s3c: use cpufreq_generic_init() routine
cpufreq: s5pv210: use cpufreq_generic_init() routine
cpufreq: sa11x0: use cpufreq_generic_init() routine
cpufreq: spear: use cpufreq_generic_init() routine
cpufreq: tegra: use cpufreq_generic_init() routine
cpufreq: Implement light weight ->target_index() routine
cpufreq: acpi: Convert to light weight ->target_index() routine
cpufreq: arm_big_little: Convert to light weight ->target_index()
routine
cpufreq: at32ap: Convert to light weight ->target_index() routine
cpufreq: blackfin: Convert to light weight ->target_index() routine
cpufreq: cpu0: Convert to light weight ->target_index() routine
cpufreq: cris: Convert to light weight ->target_index() routine
cpufreq: davinci: Convert to light weight ->target_index() routine
cpufreq: dbx500: Convert to light weight ->target_index() routine
cpufreq: e_powersaver: Convert to light weight ->target_index()
routine
cpufreq: elanfreq: Convert to light weight ->target_index() routine
cpufreq: exynos: Convert to light weight ->target_index() routine
cpufreq: ia64: Convert to light weight ->target_index() routine
cpufreq: imx6q: Convert to light weight ->target_index() routine
cpufreq: kirkwood: Convert to light weight ->target_index() routine
cpufreq: longhaul: Convert to light weight ->target_index() routine
cpufreq: loongson2: Convert to light weight ->target_index() routine
cpufreq: maple: Convert to light weight ->target_index() routine
cpufreq: omap: Convert to light weight ->target_index() routine
cpufreq: p4: Convert to light weight ->target_index() routine
cpufreq: pasemi: Convert to light weight ->target_index() routine
cpufreq: pmac32: Convert to light weight ->target_index() routine
cpufreq: powernow: Convert to light weight ->target_index() routine
cpufreq: ppc: Convert to light weight ->target_index() routine
cpufreq: pxa: Convert to light weight ->target_index() routine
cpufreq: s3c2416: Convert to light weight ->target_index() routine
cpufreq: s3c64xx: Convert to light weight ->target_index() routine
cpufreq: s5pv210: Convert to light weight ->target_index() routine
cpufreq: sa11x0: Convert to light weight ->target_index() routine
cpufreq: sc520: Convert to light weight ->target_index() routine
cpufreq: sparc: Convert to light weight ->target_index() routine
cpufreq: SPEAr: Convert to light weight ->target_index() routine
cpufreq: speedstep: Convert to light weight ->target_index() routine
cpufreq: tegra: Convert to light weight ->target_index() routine
cpufreq: move freq change notifications to cpufreq core
cpufreq: acpi: remove calls to cpufreq_notify_transition()
cpufreq: arm_big_little: remove calls to cpufreq_notify_transition()
cpufreq: at32ap: remove calls to cpufreq_notify_transition()
cpufreq: blackfin: remove calls to cpufreq_notify_transition()
cpufreq: cpu0: remove calls to cpufreq_notify_transition()
cpufreq: cris: remove calls to cpufreq_notify_transition()
cpufreq: davinci: remove calls to cpufreq_notify_transition()
cpufreq: dbx500: remove calls to cpufreq_notify_transition()
cpufreq: e_powersaver: remove calls to cpufreq_notify_transition()
cpufreq: elanfreq: remove calls to cpufreq_notify_transition()
cpufreq: exynos: remove calls to cpufreq_notify_transition()
cpufreq: ia64-acpi: remove calls to cpufreq_notify_transition()
cpufreq: imx6q: remove calls to cpufreq_notify_transition()
cpufreq: kirkwood: remove calls to cpufreq_notify_transition()
cpufreq: loongson2: remove calls to cpufreq_notify_transition()
cpufreq: maple: remove calls to cpufreq_notify_transition()
cpufreq: omap: remove calls to cpufreq_notify_transition()
cpufreq: p4-clockmod: remove calls to cpufreq_notify_transition()
cpufreq: pasemi: remove calls to cpufreq_notify_transition()
cpufreq: pmac: remove calls to cpufreq_notify_transition()
cpufreq: ppc: remove calls to cpufreq_notify_transition()
cpufreq: pxa: remove calls to cpufreq_notify_transition()
cpufreq: s3c: remove calls to cpufreq_notify_transition()
cpufreq: s5pv210: remove calls to cpufreq_notify_transition()
cpufreq: sa11x0: remove calls to cpufreq_notify_transition()
cpufreq: sc520: remove calls to cpufreq_notify_transition()
cpufreq: sparc: remove calls to cpufreq_notify_transition()
cpufreq: SPEAr: remove calls to cpufreq_notify_transition()
cpufreq: speedstep: remove calls to cpufreq_notify_transition()
cpufreq: tegra: remove calls to cpufreq_notify_transition()
cpufreq: tegra: remove target_cpu_speed[] array
cpufreq: create cpufreq_generic_get() routine
cpufreq: arm_big_little: use cpufreq_generic_get() routine
cpufreq: at32ap: use cpufreq_generic_get() routine
cpufreq: cpu0: use cpufreq_generic_get() routine
cpufreq: davinci: use cpufreq_generic_get() routine
cpufreq: dbx500: use cpufreq_generic_get() routine
cpufreq: exynos: use cpufreq_generic_get() routine
cpufreq: imx6q: use cpufreq_generic_get() routine
cpufreq: loongson2: use cpufreq_generic_get() routine
cpufreq: omap: use cpufreq_generic_get() routine
cpufreq: ppc: use cpufreq_generic_get() routine
cpufreq: s3c: use cpufreq_generic_get() routine
cpufreq: s5pv210: use cpufreq_generic_get() routine
cpufreq: spear: use cpufreq_generic_get() routine
cpufreq: tegra: use cpufreq_generic_get() routine
cpufreq: unicore2: use cpufreq_generic_get() routine
Documentation/cpu-freq/cpu-drivers.txt | 27 ++--
Documentation/cpu-freq/governors.txt | 4 +-
arch/arm/mach-davinci/Kconfig | 1 -
arch/arm/mach-pxa/Kconfig | 3 -
arch/arm/mach-sa1100/generic.c | 81 +++---------
arch/arm/mach-sa1100/generic.h | 4 +-
arch/arm/mach-ux500/Kconfig | 1 -
arch/blackfin/Kconfig | 1 -
arch/cris/Kconfig | 2 -
drivers/cpufreq/Kconfig | 11 --
drivers/cpufreq/Kconfig.arm | 11 --
drivers/cpufreq/Kconfig.powerpc | 6 -
drivers/cpufreq/Kconfig.x86 | 13 --
drivers/cpufreq/Makefile | 5 +-
drivers/cpufreq/acpi-cpufreq.c | 45 ++-----
drivers/cpufreq/arm_big_little.c | 75 ++----------
drivers/cpufreq/at32ap-cpufreq.c | 119 +++++++++---------
drivers/cpufreq/blackfin-cpufreq.c | 54 ++------
drivers/cpufreq/cpufreq-cpu0.c | 103 +++-------------
drivers/cpufreq/cpufreq-nforce2.c | 5 +-
drivers/cpufreq/cpufreq.c | 217 +++++++++++++++++++++++++--------
drivers/cpufreq/cpufreq_governor.h | 5 +-
drivers/cpufreq/cris-artpec3-cpufreq.c | 64 +---------
drivers/cpufreq/cris-etraxfs-cpufreq.c | 61 +--------
drivers/cpufreq/davinci-cpufreq.c | 87 +++----------
drivers/cpufreq/dbx500-cpufreq.c | 97 ++-------------
drivers/cpufreq/e_powersaver.c | 59 ++-------
drivers/cpufreq/elanfreq.c | 88 ++-----------
drivers/cpufreq/exynos-cpufreq.c | 93 +++-----------
drivers/cpufreq/exynos5440-cpufreq.c | 84 ++++---------
drivers/cpufreq/freq_table.c | 59 ++++++---
drivers/cpufreq/gx-suspmod.c | 5 +-
drivers/cpufreq/ia64-acpi-cpufreq.c | 71 +----------
drivers/cpufreq/imx6q-cpufreq.c | 99 ++++-----------
drivers/cpufreq/integrator-cpufreq.c | 14 +--
drivers/cpufreq/intel_pstate.c | 4 +-
drivers/cpufreq/kirkwood-cpufreq.c | 107 ++++------------
drivers/cpufreq/longhaul.c | 45 +------
drivers/cpufreq/longrun.c | 4 +-
drivers/cpufreq/loongson2_cpufreq.c | 72 ++---------
drivers/cpufreq/maple-cpufreq.c | 56 +--------
drivers/cpufreq/omap-cpufreq.c | 158 ++++++------------------
drivers/cpufreq/p4-clockmod.c | 53 ++------
drivers/cpufreq/pasemi-cpufreq.c | 51 +-------
drivers/cpufreq/pcc-cpufreq.c | 10 +-
drivers/cpufreq/pmac32-cpufreq.c | 53 ++------
drivers/cpufreq/pmac64-cpufreq.c | 57 +--------
drivers/cpufreq/powernow-k6.c | 67 ++--------
drivers/cpufreq/powernow-k7.c | 42 ++-----
drivers/cpufreq/powernow-k8.c | 53 ++------
drivers/cpufreq/ppc-corenet-cpufreq.c | 69 ++---------
drivers/cpufreq/ppc_cbe_cpufreq.c | 50 +-------
drivers/cpufreq/pxa2xx-cpufreq.c | 70 +++--------
drivers/cpufreq/pxa3xx-cpufreq.c | 46 ++-----
drivers/cpufreq/s3c2416-cpufreq.c | 67 ++--------
drivers/cpufreq/s3c24xx-cpufreq.c | 37 +-----
drivers/cpufreq/s3c64xx-cpufreq.c | 108 +++++-----------
drivers/cpufreq/s5pv210-cpufreq.c | 105 ++++------------
drivers/cpufreq/sa1100-cpufreq.c | 49 ++------
drivers/cpufreq/sa1110-cpufreq.c | 46 ++-----
drivers/cpufreq/sc520_freq.c | 64 +---------
drivers/cpufreq/sh-cpufreq.c | 22 +---
drivers/cpufreq/sparc-us2e-cpufreq.c | 42 ++-----
drivers/cpufreq/sparc-us3-cpufreq.c | 44 ++-----
drivers/cpufreq/spear-cpufreq.c | 72 ++---------
drivers/cpufreq/speedstep-centrino.c | 81 ++----------
drivers/cpufreq/speedstep-ich.c | 85 ++-----------
drivers/cpufreq/speedstep-smi.c | 76 ++----------
drivers/cpufreq/tegra-cpufreq.c | 114 ++++-------------
drivers/cpufreq/unicore2-cpufreq.c | 26 ++--
drivers/thermal/Kconfig | 1 -
include/linux/cpufreq.h | 59 ++++++---
72 files changed, 922 insertions(+), 2917 deletions(-)
--
1.7.12.rc2.18.g61b472e
On 2 October 2013 20:31, Will Deacon <will.deacon(a)arm.com> wrote:
> On Wed, Oct 02, 2013 at 06:19:30PM +0100, Taras Kondratiuk wrote:
>> On 2 October 2013 15:49, Will Deacon <will.deacon(a)arm.com> wrote:
>> > On Wed, Oct 02, 2013 at 12:34:16PM +0100, Taras Kondratiuk wrote:
>> >> diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
>> >> index 94f6b05..e359b62 100644
>> >> --- a/arch/arm/kernel/process.c
>> >> +++ b/arch/arm/kernel/process.c
>> >> @@ -103,9 +103,11 @@ void soft_restart(unsigned long addr)
>> >> local_irq_disable();
>> >> local_fiq_disable();
>> >>
>> >> - /* Disable the L2 if we're the last man standing. */
>> >> - if (num_online_cpus() == 1)
>> >> + /* Flush and disable the L2 if we're the last man standing. */
>> >> + if (num_online_cpus() == 1) {
>> >> + outer_flush_all();
>> >> outer_disable();
>> >
>> > l2x0_disable already contains a flush, so this doesn't change anything.
>>
>> Unfortunately not everybody uses l2x0_disable().
>> SoC's that use SMC calls for L2 cache maintenance have its own implementation
>> of outer_cache.disable which usually doesn't flush cache implicitly.
>
> In which case, we should probably fix the disabling code to make a flush
> then update callers not to bother with redundant flushing. The flushing
> during the disable code is likely required anyway if there's any
> synchronisation going on.
It makes sense, but a history of the current code looks a bit confusing.
Implicit flush was added in l2x0_disable() as a "side effect" of
commit 38a8914f9ac2379293944f613e6ca24b61373de8
"ARM: 6987/1: l2x0: fix disabling function to avoid deadlock",
while initially disable was just a disable.
Maybe it worth to explicitly document that .disable callback must flush cache?
--
Regards,
Taras Kondratiuk
# added Roland <mcgrathr@chromium> in CC for asm-generic/syscall.h
I modified my patch based on Will's comments.
Speaking of arm, i + n is checked against SYSCALL_MAX_ARGS (== 7),
but it seems that the kernel code assumes that the current max number of
arguments would be 6. For example, SYSCALL_DEFINEn are defined from 0 to 6.
Am i wrong?
Changes:
* added a patch to arm as well
* added a patch to asm-generic/syscall.h; corrected the description on
syscall_get_arguments() and syscall_put_arguments()
* removed portion of commit message which referred to asm-generic/syscall.h
in arm64
AKASHI Takahiro (3):
arm64: check for number of arguments in syscall_get/set_arguments()
arm: check for number of arguments in syscall_get/set_arguments()
asm-generic: syscall_get/set_arguments accept zero for number of
arguments
arch/arm/include/asm/syscall.h | 6 ++++++
arch/arm64/include/asm/syscall.h | 6 ++++++
include/asm-generic/syscall.h | 4 ++--
3 files changed, 14 insertions(+), 2 deletions(-)
--
1.7.9.5
Hi Rafael/Daniel,
This is a small cleanup patchset for CPUIdle which can go in 3.13 if it looks
okay to you guys..
Mostly trivial patches but few are doing good/significant changes. Tested on my
thinkpad with suspend/resume and didn't found any broken stuff with it.
I a not very sure about this patch (As I don't know about all aspects of CPUIdle
framework):
cpuidle: don't call poll_idle_init() for every cpu
--
viresh
Viresh Kumar (21):
cpuidle: fix indentation of cpumask
cpuidle: Fix comments in cpuidle core
cpuidle: make __cpuidle_get_cpu_driver() inline
cpuidle: make __cpuidle_device_init() return void
cpuidle: make __cpuidle_driver_init() return void
cpuidle: rearrange code in __cpuidle_driver_init()
cpuidle: rearrange __cpuidle_register_device() to keep minimal exit
points
cpuidle: use cpuidle_disabled() instead of "off"
cpuidle: merge two if() statements for checking error cases
cpuidle: reduce code duplication inside cpuidle_idle_call()
cpuidle: replace multiline statements with single line in
cpuidle_idle_call()
cpuidle: call cpuidle_get_driver() from after taking
cpuidle_driver_lock
cpuidle: use drv instead of cpuidle_driver in show_current_driver()
cpuidle: coupled: don't compare cpu masks unnecessarily
cpuidle: free all state kobjects from cpuidle_free_state_kobj()
cpuidle: avoid unnecessary kzalloc/free of struct cpuidle_device_kobj
cpuidle: avoid unnecessary kzalloc/free of struct cpuidle_driver_kobj
cpuidle: don't call poll_idle_init() for every cpu
cpuidle: create list of registered drivers
cpuidle: don't calculate time-diff if entered_state == 0
cpuidle: change governor from within cpuidle_replace_governor()
drivers/cpuidle/coupled.c | 9 +--
drivers/cpuidle/cpuidle.c | 95 +++++++------------------
drivers/cpuidle/driver.c | 171 ++++++++++++++++++++-------------------------
drivers/cpuidle/governor.c | 24 +++----
drivers/cpuidle/sysfs.c | 74 +++++++-------------
include/linux/cpuidle.h | 25 +++++--
6 files changed, 161 insertions(+), 237 deletions(-)
--
1.7.12.rc2.18.g61b472e