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
It will be very useful for user space (QEMU/KVMTOOL) if it has a
method of querying VCPU target type matching to underlying Host.
We can use such querying mechanism and implement machine models
in user space where VCPU target type is always same-as/similar-to
underlying Host (i.e. Target CPU=Host).
This patch series implements KVM_ARM_PREFERRED_TARGET vm ioclt for
querying VCPU target type matching underlying host. Using this new
ioctl we can implement VCPU target CPU=Host in user space.
Also, it is not mandatory to call KVM_ARM_PREFERRED_TARGET vm ioctl
and the old method of trying all possible target types using the
KVM_ARM_VCPU_INIT ioctl to initialize VCPU works fine.
V5:
- Update documentation based on review comments
V4:
- Fixed files exchanged between patches
- For now return zeroed features in struct kvm_vcpu_init instance
V3:
- Return -ENODEV if no preferred target available for host
- Make KVM_ARM_PREFERRED_TARGET ioctl as vm ioctl
V2:
- Renamed the ioclt to KVM_ARM_PREFERRED_TARGET
- Return struct kvm_vcpu_init instace instead of just target type
V1:
- Initial patch-set with ioctl named as KVM_ARM_SUITABLE_TARGET
Anup Patel (4):
ARM: KVM: Implement kvm_vcpu_preferred_target() function
ARM64: KVM: Implement kvm_vcpu_preferred_target() function
ARM/ARM64: KVM: Implement KVM_ARM_PREFERRED_TARGET ioctl
KVM: Add documentation for KVM_ARM_PREFERRED_TARGET ioctl
Documentation/virtual/kvm/api.txt | 31 +++++++++++++++++++++++++++----
arch/arm/include/asm/kvm_host.h | 1 +
arch/arm/kvm/arm.c | 13 +++++++++++++
arch/arm/kvm/guest.c | 20 ++++++++++++++++++++
arch/arm64/include/asm/kvm_host.h | 1 +
arch/arm64/kvm/guest.c | 20 ++++++++++++++++++++
include/uapi/linux/kvm.h | 1 +
7 files changed, 83 insertions(+), 4 deletions(-)
--
1.7.9.5
In ftrace_syscall_enter(),
syscall_get_arguments(..., 0, n, ...)
if (i == 0) { <handle orig_x0> ...; n--;}
memcpy(..., n * sizeof(args[0]));
If 'number of arguments(n)' is zero and 'argument index(i)' is also zero in
syscall_get_arguments(), none of arguments should be copied by memcpy().
Otherwise 'n--' can be a big positive number and unexpected amount of data
will be copied. Tracing system calls which take no argument, say sync(void),
may hit this case and eventually make the system corrupted.
This patch fixes the issue both in syscall_get_arguments() and
syscall_set_arguments().
Please note, however, that asm-generic/syscall.h says,
* syscall_get_arguments - extract system call parameter values
* @i: argument index [0,5]
* @n: number of arguments; n+i must be [1,6].
and so we'd better change the caller's code(ftrace_syscall_enter).
Signed-off-by: AKASHI Takahiro <takahiro.akashi(a)linaro.org>
---
arch/arm64/include/asm/syscall.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/arm64/include/asm/syscall.h b/arch/arm64/include/asm/syscall.h
index c89821f..01bb8cc 100644
--- a/arch/arm64/include/asm/syscall.h
+++ b/arch/arm64/include/asm/syscall.h
@@ -63,6 +63,9 @@ static inline void syscall_get_arguments(struct task_struct *task,
unsigned int i, unsigned int n,
unsigned long *args)
{
+ if (n == 0)
+ return;
+
if (i + n > SYSCALL_MAX_ARGS) {
unsigned long *args_bad = args + SYSCALL_MAX_ARGS - i;
unsigned int n_bad = n + i - SYSCALL_MAX_ARGS;
@@ -86,6 +89,9 @@ static inline void syscall_set_arguments(struct task_struct *task,
unsigned int i, unsigned int n,
const unsigned long *args)
{
+ if (n == 0)
+ return;
+
if (i + n > SYSCALL_MAX_ARGS) {
pr_warning("%s called with max args %d, handling only %d\n",
__func__, i + n, SYSCALL_MAX_ARGS);
--
1.7.9.5
The sleep_length is computed in the tick_nohz_stop_sched_tick function but it
is used later in the code with in between the local irq enabled.
cpu_idle_loop
tick_nohz_idle_enter [ exits with local irq enabled ]
__tick_nohz_idle_enter
tick_nohz_stop_sched_tick
...
arch_cpu_idle
menu_select [ uses here 'sleep_length' ]
...
Between the computation of the sleep length and its usage, some interrupts
can occur, making the sleep length shorter than actually it is.
This patch fixes that by moving the sleep_length computation in the
tick_nohz_get_sleep_length function and store the next_event for the device
instead of the sleep_length.
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
---
include/linux/tick.h | 2 +-
kernel/time/tick-sched.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/linux/tick.h b/include/linux/tick.h
index 5128d33..4932004 100644
--- a/include/linux/tick.h
+++ b/include/linux/tick.h
@@ -67,7 +67,7 @@ struct tick_sched {
ktime_t idle_exittime;
ktime_t idle_sleeptime;
ktime_t iowait_sleeptime;
- ktime_t sleep_length;
+ ktime_t next_event;
unsigned long last_jiffies;
unsigned long next_jiffies;
ktime_t idle_expires;
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 3612fc7..2007a7f 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -673,7 +673,7 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts,
out:
ts->next_jiffies = next_jiffies;
ts->last_jiffies = last_jiffies;
- ts->sleep_length = ktime_sub(dev->next_event, now);
+ ts->next_event = dev->next_event;
return ret;
}
@@ -837,8 +837,9 @@ void tick_nohz_irq_exit(void)
ktime_t tick_nohz_get_sleep_length(void)
{
struct tick_sched *ts = &__get_cpu_var(tick_cpu_sched);
+ ktime_t now = ktime_get();
- return ts->sleep_length;
+ return ktime_sub(ts->next_event, now);
}
static void tick_nohz_restart(struct tick_sched *ts, ktime_t now)
--
1.7.9.5
On Mon, 30 Sep 2013 12:00:36 -0700
Zi Shen Lim <zishen.lim(a)linaro.org> wrote:
> On Mon, Sep 30, 2013 at 12:03 PM, Anders Roxell
> <anders.roxell(a)linaro.org> wrote:
> > Hi,
> >
> > On 2013-09-30 11:48, Zi Shen Lim wrote:
> >> Signed-off-by: Zi Shen Lim <zishen.lim(a)linaro.org>
> >> ---
> >> linaro/configs/linaro-base.conf | 4 ++++
> >> 1 file changed, 4 insertions(+)
> >>
> >> diff --git a/linaro/configs/linaro-base.conf b/linaro/configs/linaro-base.conf
> >> index 947ca1f..0093640 100644
> >> --- a/linaro/configs/linaro-base.conf
> >> +++ b/linaro/configs/linaro-base.conf
> >> @@ -92,3 +92,7 @@ CONFIG_HW_PERF_EVENTS=y
> >> CONFIG_FUNCTION_TRACER=y
> >> CONFIG_ENABLE_DEFAULT_TRACERS=y
> >> CONFIG_PROC_DEVICETREE=y
> >> +CONFIG_HUGETLB_PAGE=y
> >> +CONFIG_HUGETLBFS=y
> >> +CONFIG_TRANSPARENT_HUGEPAGE=y
> >> +CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y
> > This CONFIG_* fragments are already in linaro/configs/linaro-base64.conf
> > right?
> >
>
> Isn't linaro-base64.conf meant for ARMv8?
>
> We need hugepage support on existing 32-bit / ARMv7 platforms too, don't we?
[adding linaro-kernel, Andrey]
Yes, it seems the base64 component is a misnomer, at least for now.
Meanwhile, if this patch is targeted to the main linaro kernel, please
send via the linaro-kernel list, cc'ing linaro-networking. If not,
then perhaps a separate .conf file is in order? Anyway, I think we'd
all prefer a resolution within the main linaro kernel for hugepage
support.
> > and we are building with it in our ci/job/linux-lng* scripts...
perhaps those should be patched as well.
Kim
On ARM the debug info is not present in the .eh_frame sections but
in .debug_frame instead, in dwarf format.
This patch set uses libunwind to load and parse the dwarf debug info from
the .debug_frame section if no .eh_frame_hdr section is found; also it
sets the hooks in the perf_regs and libunwind code for ARMv7.
Dependencies:
. if present, libunwind >= 1.1 is needed to prevent a segfault when
parsing the dwarf info,
. libunwind needs to be configured with --enable-debug-frame
to prevent a linkage error. Note: --enable-debug-frame is automatically
selected on ARM).
The generated perf has been tested on ARMv7 (OMAP4, Marvell Armada XP) and
x86_64, using the following commands:
perf record -g [dwarf] -- <binary>
perf report --sort symbol --call-graph --stdio
Jean Pihet (2):
perf tools: Check libunwind for availability of dwarf parsing feature
perf: parse the .debug_frame section in case .eh_frame is not present
Will Deacon (2):
ARM: perf: add support for perf registers API
ARM: perf: wire up perf_regs and unwind support for ARM
arch/arm/Kconfig | 2 +
arch/arm/include/uapi/asm/Kbuild | 1 +
arch/arm/include/uapi/asm/perf_regs.h | 23 +++++++++++
arch/arm/kernel/Makefile | 1 +
arch/arm/kernel/perf_regs.c | 30 ++++++++++++++
tools/perf/arch/arm/Makefile | 3 ++
tools/perf/arch/arm/include/perf_regs.h | 54 +++++++++++++++++++++++++
tools/perf/arch/arm/util/unwind.c | 48 ++++++++++++++++++++++
tools/perf/config/Makefile | 7 +++-
tools/perf/config/feature-tests.mak | 11 ++++-
tools/perf/util/unwind.c | 71 +++++++++++++++++++++++++--------
11 files changed, 232 insertions(+), 19 deletions(-)
create mode 100644 arch/arm/include/uapi/asm/perf_regs.h
create mode 100644 arch/arm/kernel/perf_regs.c
create mode 100644 tools/perf/arch/arm/include/perf_regs.h
create mode 100644 tools/perf/arch/arm/util/unwind.c
--
1.7.11.7
Lots of device drivers especially for platform/I2C/SPI bus devices,
they want to be initialized earlier than other devices, so the driver
use initcall such as subsys_initcall for the device initialization.
But for those drivers, lots of them just do nothing special in
xxx_initcall/module_exit, and produce lots of boilerplate.
This patch set introduces a helper macro initcall_driver() to
eliminate lots of boilerplate just like module_driver() did, and use
it for platform/I2C/SPI bus devices.
I use following command under the lastest kernel source code:
$grep -r -E "*_initcall" drivers/ | cut -d":" -f1 |xargs grep -E
"return platform_driver_register|return i2c_add_driver|return spi_register_driver"
| cut -d":" -f1 | xargs grep "module_exit" | wc -l
and get 205 hits, so if we use helper macro initcall_driver(),
we can reduce thousands lines of code.
Hanjun Guo (4):
driver core: introduce helper macro initcall_driver()
platform device: introduce helper macro initcall_platform_driver()
i2c: introduce helper macro initcall_i2c_driver()
spi: introduce helper macro initcall_spi_driver()
include/linux/device.h | 27 +++++++++++++++++++++++++++
include/linux/i2c.h | 11 +++++++++++
include/linux/platform_device.h | 11 +++++++++++
include/linux/spi/spi.h | 11 +++++++++++
4 files changed, 60 insertions(+)
--
1.7.9.5
It will be very useful for user space (QEMU/KVMTOOL) if it has a
method of querying VCPU target type matching to underlying Host.
We can use such querying mechanism and implement machine models
in user space where VCPU target type is always same-as/similar-to
underlying Host (i.e. Target CPU=Host).
This patch series implements KVM_ARM_PREFERRED_TARGET vm ioclt for
querying VCPU target type matching underlying host. Using this new
ioctl we can implement VCPU target CPU=Host in user space.
Also, it is not mandatory to call KVM_ARM_PREFERRED_TARGET vm ioctl
and the old method of trying all possible target types using the
KVM_ARM_VCPU_INIT ioctl to initialize VCPU works fine.
V4:
- Fixed files exchanged between patches
- For now return zeroed features in struct kvm_vcpu_init instance
V3:
- Return -ENODEV if no preferred target available for host
- Make KVM_ARM_PREFERRED_TARGET ioctl as vm ioctl
V2:
- Renamed the ioclt to KVM_ARM_PREFERRED_TARGET
- Return struct kvm_vcpu_init instace instead of just target type
V1:
- Initial patch-set with ioctl named as KVM_ARM_SUITABLE_TARGET
Anup Patel (4):
ARM: KVM: Implement kvm_vcpu_preferred_target() function
ARM64: KVM: Implement kvm_vcpu_preferred_target() function
ARM/ARM64: KVM: Implement KVM_ARM_PREFERRED_TARGET ioctl
KVM: Add documentation for KVM_ARM_PREFERRED_TARGET ioctl
Documentation/virtual/kvm/api.txt | 27 +++++++++++++++++++++++----
arch/arm/include/asm/kvm_host.h | 1 +
arch/arm/kvm/arm.c | 13 +++++++++++++
arch/arm/kvm/guest.c | 20 ++++++++++++++++++++
arch/arm64/include/asm/kvm_host.h | 1 +
arch/arm64/kvm/guest.c | 20 ++++++++++++++++++++
include/uapi/linux/kvm.h | 1 +
7 files changed, 79 insertions(+), 4 deletions(-)
--
1.7.9.5
This patch set just did one simple thing: convert to module_platform_driver()
in video driver to simplify the code.
Hanjun Guo (10):
Video / hecubafb: Use module_platform_driver() to simplify code
Video / bfin-t350mcqb-fb: Use module_platform_driver() to simplify
code
Video / metronomefb: Use module_platform_driver() to simplify code
Video / jz4740_fb: Use module_platform_driver() to simplify code
Video / da8xx-fb: Use module_platform_driver() to simplify code
Video / cobalt_lcdfb: Use module_platform_driver() to simplify code
Video / broadsheetfb: Use module_platform_driver() to simplify code
Video / bf54x-lq043fb: Use module_platform_driver() to simplify code
Video / au1200fb: Use module_platform_driver() to simplify code
Video / au1100fb: Use module_platform_driver() to simplify code
drivers/video/au1100fb.c | 14 +-------------
drivers/video/au1200fb.c | 16 +---------------
drivers/video/bf54x-lq043fb.c | 14 +-------------
drivers/video/bfin-t350mcqb-fb.c | 14 +-------------
drivers/video/broadsheetfb.c | 14 +-------------
drivers/video/cobalt_lcdfb.c | 14 +-------------
drivers/video/da8xx-fb.c | 14 +-------------
drivers/video/hecubafb.c | 14 +-------------
drivers/video/jz4740_fb.c | 13 +------------
drivers/video/metronomefb.c | 14 +-------------
10 files changed, 10 insertions(+), 131 deletions(-)
--
1.7.9.5
Hi,
I tried to build linaro kernel for pandaboard. I have tried everything what
I can think of but the kernel still can't boot correctly. Any help will be
appreciated. Here is what I did:
1. I flash the 13.07 linaro-ubuntu-pandaboard image into the sd card (
http://releases.linaro.org/13.07/ubuntu/panda). This image works fine.
2. I clone the kernel source code from git://
git.linaro.org/kernel/linux-linaro-stable.git.
3. checkout the lsk 13.07 tag.
4. copy the config file from original image (i.e.
/boot/config-3.10.1.0-1-linaro-omap).
5. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- CFLAGS="-O"
LOADADDR=0x80008000 uImage
The cross compiler on my machine is gcc-4.7-arm-linux-gnueabihf-base
6. From pandaboard, I load the built uImage via scp.
The problem I met:
1. In most cases, the kernel can't boot correctly. And the terminal keeps
printing "hub 1-1:1.0: hub_port_status failed (err = -71)".
2.Sometime, the kernel can finish booting. But the terminal prints for
several times the aforementioned error message after booting. Plus, I don't
have any module running, 'lsmod' shows nothing.
Please help! Thank you.
--
Regards,
Chao Xu
From: Mark Brown <broonie(a)linaro.org>
The current si476x I/O implementation wraps the regmap for the core with
functions that make the register map cache only when the device is powered
down. This implementation appears to be incomplete since there is no code
to synchronise the cache so writes done while the core is powered down
will be ignored, the device will only be configured if it is powered.
A better and more idiomatic approach would be to have the MFD manage the
cache, making the device cache only when it powers things down. This also
allows ASoC to use the standard regmap helpers for the device which helps
remove the ASoC custom ones so do convert to do that.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
sound/soc/codecs/si476x.c | 46 +---------------------------------------------
1 file changed, 1 insertion(+), 45 deletions(-)
diff --git a/sound/soc/codecs/si476x.c b/sound/soc/codecs/si476x.c
index 38f3b10..ec29d26 100644
--- a/sound/soc/codecs/si476x.c
+++ b/sound/soc/codecs/si476x.c
@@ -60,48 +60,6 @@ enum si476x_pcm_format {
SI476X_PCM_FORMAT_S24_LE = 6,
};
-static unsigned int si476x_codec_read(struct snd_soc_codec *codec,
- unsigned int reg)
-{
- int err;
- unsigned int val;
- struct si476x_core *core = codec->control_data;
-
- si476x_core_lock(core);
- if (!si476x_core_is_powered_up(core))
- regcache_cache_only(core->regmap, true);
-
- err = regmap_read(core->regmap, reg, &val);
-
- if (!si476x_core_is_powered_up(core))
- regcache_cache_only(core->regmap, false);
- si476x_core_unlock(core);
-
- if (err < 0)
- return err;
-
- return val;
-}
-
-static int si476x_codec_write(struct snd_soc_codec *codec,
- unsigned int reg, unsigned int val)
-{
- int err;
- struct si476x_core *core = codec->control_data;
-
- si476x_core_lock(core);
- if (!si476x_core_is_powered_up(core))
- regcache_cache_only(core->regmap, true);
-
- err = regmap_write(core->regmap, reg, val);
-
- if (!si476x_core_is_powered_up(core))
- regcache_cache_only(core->regmap, false);
- si476x_core_unlock(core);
-
- return err;
-}
-
static const struct snd_soc_dapm_widget si476x_dapm_widgets[] = {
SND_SOC_DAPM_OUTPUT("LOUT"),
SND_SOC_DAPM_OUTPUT("ROUT"),
@@ -239,7 +197,7 @@ static int si476x_codec_hw_params(struct snd_pcm_substream *substream,
static int si476x_codec_probe(struct snd_soc_codec *codec)
{
- codec->control_data = i2c_mfd_cell_to_core(codec->dev);
+ codec->control_data = dev_get_regmap(codec->dev.parent);
return 0;
}
@@ -268,8 +226,6 @@ static struct snd_soc_dai_driver si476x_dai = {
static struct snd_soc_codec_driver soc_codec_dev_si476x = {
.probe = si476x_codec_probe,
- .read = si476x_codec_read,
- .write = si476x_codec_write,
.dapm_widgets = si476x_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(si476x_dapm_widgets),
.dapm_routes = si476x_dapm_routes,
--
1.8.4.rc3
It is quite subtle why we mask the timer on behalf of the guest when
then guest has programmed the timer and it fires and is handled on the
host.
Add a comment to that effect.
Signed-off-by: Christoffer Dall <christoffer.dall(a)linaro.org>
---
virt/kvm/arm/arch_timer.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c
index c2e1ef4..8168437 100644
--- a/virt/kvm/arm/arch_timer.c
+++ b/virt/kvm/arm/arch_timer.c
@@ -63,6 +63,12 @@ static void kvm_timer_inject_irq(struct kvm_vcpu *vcpu)
{
struct arch_timer_cpu *timer = &vcpu->arch.timer_cpu;
+ /*
+ * Mask the virtual timer, because otherwise, the guest would never
+ * execute its interrupt handler because the virtual timer interrupt
+ * would continously preempt guest execution as the hardware interrupt
+ * traps to Hyp mode.
+ */
timer->cntv_ctl |= ARCH_TIMER_CTRL_IT_MASK;
kvm_vgic_inject_irq(vcpu->kvm, vcpu->vcpu_id,
timer->irq->irq,
--
1.7.10.4
From: Mark Brown <broonie(a)linaro.org>
Ensure that the FIFOs are fully drained before we deassert /CS or do any
delays that have been requested in order to ensure that the behaviour
visible on the bus matches that which was requested by the caller.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/spi/spi-s3c64xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
index 229c6b9..2e267ce 100644
--- a/drivers/spi/spi-s3c64xx.c
+++ b/drivers/spi/spi-s3c64xx.c
@@ -960,6 +960,8 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
goto out;
}
+ flush_fifo(sdd);
+
if (xfer->delay_usecs)
udelay(xfer->delay_usecs);
@@ -972,8 +974,6 @@ static int s3c64xx_spi_transfer_one_message(struct spi_master *master,
}
msg->actual_length += xfer->len;
-
- flush_fifo(sdd);
}
out:
--
1.8.4.rc3
Hi all,
This series patches base on Tom's "Initial drm/kms driver for pl111"[1]
with linaro release 13.07 and migrate the CDFv3 for evaluation.
please notes that I set VGA as default output and tested on RTSM only.
[1] http://lwn.net/Articles/561344/
Cheers,
Show Liu
Show Liu (3):
Add display entities and pipe link for pl111
Add display entity and set VGA output(site MB) as default
add pipe link for display entity
arch/arm/boot/dts/rtsm_ve-motherboard.dtsi | 46 +++
arch/arm/boot/dts/rtsm_ve-v2p-ca15x1-ca7x1.dts | 4 +
drivers/gpu/drm/pl111/pl111_drm.h | 23 +-
drivers/gpu/drm/pl111/pl111_drm_device.c | 374 ++++++++++++++++++++++--
drivers/video/vexpress-dvi.c | 94 +++++-
5 files changed, 503 insertions(+), 38 deletions(-)
--
1.7.9.5
These patches are for separating the SOC On-Chip ohci host controller
from ohci-hcd host code and making per SOC driver module similar to EHCI
module available in the kernel. This work is part of enabling multi-platform
kernel on ARM.
Before I was sending three different ohci patch set as below.
1. Six series patch set is having exynos, omap, omap3, spear, at91 and s3c2410.
2. ohci-nxp a separate driver patch.
3. Two series patch set is having ep93xx and pxa27x.
In this patch set all three previous ohci series have been combined into single
series as all these patches are related to OHCI.
This patch series is rebased on greghk/usb-next 3.12 rc1.
Manjunath Goudar (9):
USB: OHCI: make ohci-exynos a separate driver
USB: OHCI: make ohci-omap a separate driver
USB: OHCI: make ohci-omap3 a separate driver
USB: OHCI: make ohci-spear a separate driver
USB: OHCI: make ohci-at91 a separate driver
USB: OHCI: make ohci-s3c2410 a separate driver
USB: OHCI: make ohci-nxp a separate driver
USB: OHCI: make ohci-ep93xx a separate driver
USB: OHCI: make ohci-pxa27x a separate driver
drivers/usb/host/Kconfig | 56 ++++++++-
drivers/usb/host/Makefile | 9 ++
drivers/usb/host/ohci-at91.c | 156 ++++++++++++-------------
drivers/usb/host/ohci-ep93xx.c | 72 +++++-------
drivers/usb/host/ohci-exynos.c | 167 +++++++++++----------------
drivers/usb/host/ohci-hcd.c | 149 ------------------------
drivers/usb/host/ohci-nxp.c | 123 ++++++++------------
drivers/usb/host/ohci-omap.c | 156 +++++++++----------------
drivers/usb/host/ohci-omap3.c | 118 +++++++------------
drivers/usb/host/ohci-pxa27x.c | 240 +++++++++++++++++----------------------
drivers/usb/host/ohci-s3c2410.c | 128 ++++++++++-----------
drivers/usb/host/ohci-spear.c | 140 +++++++++--------------
12 files changed, 587 insertions(+), 927 deletions(-)
--
1.7.9.5
On 27/09/13 12:53, Mark Brown wrote:
> From: Mark Brown <broonie(a)linaro.org>
>
> Otherwise we may try to start transfers immediately and then fail to
> runtime resume the device causing us not to have clocks enabled.
>
> Signed-off-by: Mark Brown <broonie(a)linaro.org>
Reviewed-by: Sylwester Nawrocki <s.nawrocki(a)samsung.com>
There is only a small typo in the subject line, thanks.
Implement save/restore of the VGIC state using the newer KVM Device
Control API. This requries some number of changes to existing code in
addition to actually supporting save/restore of the necessary state.
The first patches (01-03) support creating the VGIC using the Device
Control API. This change is necessary because there are no other
suitable KVM APIs that we can leverage to access the VGIC state from
user space and the device control API was crafted exactly for this
purpose.
Subsequent patches add the missing infrastructure and user space API
pieces necessary to actually save and restore the VGIC state. The GIC
v2.0 architecture specification already specifies registers that can be
used to save and restore the complete VGIC state for suspend/resume
purposes on real hardware, and we can resuse this interface for the
VGIC. The API is therefore based on the memory-mapped register accesses
defined in the specs. See the individual patches for details.
The patches are based on kvm-arm-next:
git://git.linaro.org/people/cdall/linux-kvm-arm.git kvm-arm-next
This patch series based on the above can be cloned from:
git://git.linaro.org/people/cdall/linux-kvm-arm.git vgic-migrate-v2
User space patches for QEMU also posted on the list. Tested on Versatile
Express TC2.
Changelogs in the individual patches.
Christoffer Dall (8):
ARM: KVM: Allow creating the VGIC after VCPUs
KVM: arm-vgic: Support KVM_CREATE_DEVICE for VGIC
KVM: arm-vgic: Set base addr through device API
irqchip: arm-gic: Define additional MMIO offsets and masks
KVM: arm-vgic: Make vgic mmio functions more generic
KVM: arm-vgic: Add vgic reg access from dev attr
KVM: arm-vgic: Add GICD_SPENDSGIR and GICD_CPENDSGIR handlers
KVM: arm-vgic: Support CPU interface reg access
Documentation/virtual/kvm/api.txt | 6 +-
Documentation/virtual/kvm/devices/arm-vgic.txt | 71 ++++
arch/arm/include/uapi/asm/kvm.h | 8 +
arch/arm/kvm/arm.c | 10 +-
include/kvm/arm_vgic.h | 2 +-
include/linux/irqchip/arm-gic.h | 14 +
include/linux/kvm_host.h | 1 +
include/uapi/linux/kvm.h | 1 +
virt/kvm/arm/vgic.c | 494 ++++++++++++++++++++++--
virt/kvm/kvm_main.c | 5 +
10 files changed, 580 insertions(+), 32 deletions(-)
create mode 100644 Documentation/virtual/kvm/devices/arm-vgic.txt
--
1.7.10.4
Implement save/restore of the VGIC state using the newer KVM Device
Control API. This requries some number of changes to existing code in
addition to actually supporting save/restore of the necessary state.
The first patches (01-03) support creating the VGIC using the Device
Control API. This change is necessary because there are no other
suitable KVM APIs that we can leverage to access the VGIC state from
user space and the device control API was crafted exactly for this
purpose.
Subsequent patches add the missing infrastructure and user space API
pieces necessary to actually save and restore the VGIC state. The GIC
v2.0 architecture specification already specifies registers that can be
used to save and restore the complete VGIC state for suspend/resume
purposes on real hardware, and we can resuse this interface for the
VGIC. The API is therefore based on the memory-mapped register accesses
defined in the specs. See the individual patches for details.
The patches rely on a number of small fixes sent separately to actually
work:
git://git.linaro.org/people/cdall/linux-kvm-arm.git vgic-migrate-prereq
This patch series based on the above can be cloned from:
git://git.linaro.org/people/cdall/linux-kvm-arm.git vgic-migrate
User space patches for QEMU will follow shortly. Tested on Versatile
Express TC2.
Christoffer Dall (8):
ARM: KVM: Allow creating the VGIC after VCPUs
KVM: arm-vgic: Support KVM_CREATE_DEVICE for VGIC
KVM: arm-vgic: Set base addr through device API
irqchip: arm-gic: Define additional MMIO offsets and masks
KVM: arm-vgic: Make vgic mmio functions more generic
KVM: arm-vgic: Add vgic reg access from dev attr
KVM: arm-vgic: Add GICD_SPENDSGIR and GICD_CPENDSGIR handlers
KVM: arm-vgic: Support CPU interface reg access
Documentation/virtual/kvm/api.txt | 6 +-
Documentation/virtual/kvm/devices/arm-vgic.txt | 56 +++
arch/arm/include/uapi/asm/kvm.h | 8 +
arch/arm/kvm/arm.c | 10 +-
include/kvm/arm_vgic.h | 2 +-
include/linux/irqchip/arm-gic.h | 14 +
include/linux/kvm_host.h | 1 +
include/uapi/linux/kvm.h | 1 +
virt/kvm/arm/vgic.c | 479 ++++++++++++++++++++++--
virt/kvm/kvm_main.c | 5 +
10 files changed, 554 insertions(+), 28 deletions(-)
create mode 100644 Documentation/virtual/kvm/devices/arm-vgic.txt
--
1.7.10.4
From: Mark Brown <broonie(a)linaro.org>
The DSI-CM driver uses the backlight class so needs to build depend on it.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/video/omap2/displays-new/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/video/omap2/displays-new/Kconfig b/drivers/video/omap2/displays-new/Kconfig
index 6c90885..10b25e7 100644
--- a/drivers/video/omap2/displays-new/Kconfig
+++ b/drivers/video/omap2/displays-new/Kconfig
@@ -35,6 +35,7 @@ config DISPLAY_PANEL_DPI
config DISPLAY_PANEL_DSI_CM
tristate "Generic DSI Command Mode Panel"
+ depends on BACKLIGHT_CLASS_DEVICE
help
Driver for generic DSI command mode panels.
--
1.8.4.rc3