The first batch of patches was posted here:
http://news.gmane.org/group/gmane.linux.ports.arm.kernel/thread=253942
They're now merged in RMK's devel-stable branch and also available via
the linux-next tree.
So here's the second set of patches towards a fully functional and
production quality switcher solution, establishing a landmark to compare
against for any scheduler based solution meant to eventually surpass the
switcher in the mainline kernel.
Those patches are also available here:
git://git.linaro.org/people/nico/linux iks
This set is divided in 3 groups:
Patches 1 to 3 are needed for proper interaction and synchronization with
the cpufreq companion driver that will be posted separately.
Patches 4 to 9 are providing significant switch latency and efficiency
improvements and are purely for optimization purposes.
Patches 10 to 13 are for switch event tracing.
Here's the diffstat:
arch/arm/common/bL_switcher.c | 264 ++++++++++++++++++++++---
arch/arm/common/mcpm_entry.c | 12 ++
arch/arm/common/mcpm_head.S | 16 +-
arch/arm/include/asm/bL_switcher.h | 62 +++++-
arch/arm/include/asm/hardirq.h | 2 +-
arch/arm/include/asm/mcpm.h | 8 +
arch/arm/include/asm/smp.h | 2 +
arch/arm/kernel/smp.c | 21 ++
drivers/irqchip/irq-gic.c | 43 ++++
include/linux/irqchip/arm-gic.h | 2 +
include/trace/events/power_cpu_migrate.h | 67 +++++++
11 files changed, 471 insertions(+), 28 deletions(-)
From: Mark Brown <broonie(a)linaro.org>
Every statement in this comment is incorrect either through bitrot or
(mostly) through never having corresponded to reality in the first place.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
sound/soc/codecs/tlv320aic3x.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 6e3f269..3abbff3 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -90,12 +90,6 @@ struct aic3x_priv {
enum aic3x_micbias_voltage micbias_vg;
};
-/*
- * AIC3X register cache
- * We can't read the AIC3X register space when we are
- * using 2 wire for device control, so we cache them instead.
- * There is no point in caching the reset register
- */
static const u8 aic3x_reg[AIC3X_CACHEREGNUM] = {
0x00, 0x00, 0x00, 0x10, /* 0 */
0x04, 0x00, 0x00, 0x00, /* 4 */
--
1.8.4.rc3
Automated build results for all ARM defconfigs. Summarizes all build
errors, warnings and section mismatches followed by a per-defconfig
summary.
Tree/Branch: linus/master
Git describe: v3.12-rc1-392-g9d23108
Commit: 9d23108df3 Merge tag 'staging-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Build Time: 119 min 17 sec
Passed: 129 / 129 (100.00 %)
Failed: 0 / 129 ( 0.00 %)
Errors: 0
Warnings: 16
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
arm-spitz_defconfig: 1 warnings 0 mismatches
arm-mini2440_defconfig: 1 warnings 0 mismatches
arm-multi_v7_defconfig+lpae.config: 15 warnings 0 mismatches
arm-iop13xx_defconfig: 1 warnings 0 mismatches
arm-corgi_defconfig: 1 warnings 0 mismatches
arm-iop32x_defconfig: 1 warnings 0 mismatches
-------------------------------------------------------------------------------
Warnings Summary: 16
5 crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 drivers/tty/serial/imx.c:1542:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 drivers/gpu/host1x/hw/debug_hw.c:175:10: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘dma_addr_t’ [-Wformat]
1 drivers/gpu/host1x/hw/cdma_hw.c:57:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-sdma.c:1166:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-sdma.c:1092:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:960:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:960:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:930:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:930:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:603:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:593:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:579:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
1 drivers/dma/imx-dma.c:579:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm-spitz_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-mini2440_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-multi_v7_defconfig+lpae.config : PASS, 0 errors, 15 warnings, 0 section mismatches
Warnings:
drivers/dma/imx-sdma.c:1092:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-sdma.c:1166:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/ipu/ipu_idmac.c:1235:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:579:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:579:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:593:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:603:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:930:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:930:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:960:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 6 has type ‘dma_addr_t’ [-Wformat]
drivers/dma/imx-dma.c:960:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 7 has type ‘dma_addr_t’ [-Wformat]
drivers/gpu/host1x/hw/cdma_hw.c:57:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘dma_addr_t’ [-Wformat]
drivers/gpu/host1x/hw/debug_hw.c:175:10: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘dma_addr_t’ [-Wformat]
drivers/tty/serial/imx.c:1542:6: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
-------------------------------------------------------------------------------
arm-iop13xx_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-corgi_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
arm-iop32x_defconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
crypto/wp512.c:987:1: warning: the frame size of 1168 bytes is larger than 1024 bytes [-Wframe-larger-than=]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
arm-realview-smp_defconfig
arm-at91rm9200_defconfig
arm-pcm027_defconfig
arm-rmk-omap3430-ldp.config
arm-bcm2835_defconfig
arm-ixp4xx_defconfig
arm-dove_defconfig
arm-nuc950_defconfig
arm-ebsa110_defconfig
arm-at91sam9261_9g10_defconfig
arm-omap2plus_defconfig
arm-bockw_defconfig
arm-hackkit_defconfig
arm-cns3420vb_defconfig
arm-u300_defconfig
arm-bcm_defconfig
arm-exynos_defconfig
arm-imx_v4_v5_defconfig
arm-zeus_defconfig
arm-rmk-sa11x0-neponset.config
arm-davinci_all_defconfig
arm-badge4_defconfig
arm-exynos_defconfig+lpae.config
arm-nuc960_defconfig
arm-shark_defconfig
arm-allnoconfig
arm-em_x270_defconfig
arm-armadillo800eva_defconfig
arm-trizeps4_defconfig
arm-acs5k_defconfig
arm-rmk-realview.config
arm-at91sam9260_9g20_defconfig
arm-lpc32xx_defconfig
arm-rmk-omap4430-ldp-allnoconfig.config
arm-rmk-versatile.config
arm-vexpress_defconfig
arm-ape6evm_defconfig
arm-netx_defconfig
arm-socfpga_defconfig
arm-orion5x_defconfig
arm-cm_x2xx_defconfig
arm-da8xx_omapl_defconfig
arm-omap2plus_defconfig+pm.config
arm-at91x40_defconfig
arm-cerfcube_defconfig
arm-versatile_defconfig
arm-am200epdkit_defconfig
arm-rmk-omap3430-ldp-allnoconfig.config
arm-simpad_defconfig
arm-pxa910_defconfig
arm-acs5k_tiny_defconfig
arm-xcep_defconfig
arm-s5pv210_defconfig
arm-at91_dt_defconfig
arm-palmz72_defconfig
arm-ezx_defconfig
arm-imote2_defconfig
arm-netwinder_defconfig
arm-iop33x_defconfig
arm-rmk-pxa.config
arm-assabet_defconfig
arm-magician_defconfig
arm-mainstone_defconfig
arm-s5pc100_defconfig
arm-lager_defconfig
arm-spear3xx_defconfig
arm-shannon_defconfig
arm-at91sam9g45_defconfig
arm-prima2_defconfig
arm-jornada720_defconfig
arm-s3c2410_defconfig
arm-pxa255-idp_defconfig
arm-h3600_defconfig
arm-colibri_pxa270_defconfig
arm-nhk8815_defconfig
arm-nuc910_defconfig
arm-viper_defconfig
arm-colibri_pxa300_defconfig
arm-pleb_defconfig
arm-mmp2_defconfig
arm-spear6xx_defconfig
arm-eseries_pxa_defconfig
arm-ks8695_defconfig
arm-raumfeld_defconfig
arm-integrator_defconfig
arm-footbridge_defconfig
arm-pxa168_defconfig
arm-multi_v7_defconfig
arm-s5p64x0_defconfig
arm-rpc_defconfig
arm-mxs_defconfig
arm-pxa3xx_defconfig
arm-omap1_defconfig
arm-kzm9d_defconfig
arm-rmk-vexpress-ct9x4.config
arm-ep93xx_defconfig
arm-keystone_defconfig
arm-at91sam9rl_defconfig
arm-lubbock_defconfig
arm-s3c6400_defconfig
arm-imx_v6_v7_defconfig
arm-at91sam9263_defconfig
arm-mackerel_defconfig
arm-clps711x_defconfig
arm-collie_defconfig
arm-tegra_defconfig
arm-lart_defconfig
arm-marzen_defconfig
arm-kzm9g_defconfig
arm-tct_hammer_defconfig
arm-mv78xx0_defconfig
arm-realview_defconfig
arm-msm_defconfig
arm-u8500_defconfig
arm-cm_x300_defconfig
arm-h5000_defconfig
arm-kirkwood_defconfig
arm-mvebu_defconfig
arm-lpd270_defconfig
arm-rmk-omap4430-ldp.config
arm-sama5_defconfig
arm-neponset_defconfig
arm-spear13xx_defconfig
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.
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 | 26 ++++++++++++++++++++++----
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 | 21 +++++++++++++++++++++
include/uapi/linux/kvm.h | 1 +
7 files changed, 79 insertions(+), 4 deletions(-)
--
1.7.9.5
Implement support to save/restore the ARM KVM VGIC state from the
kernel. The basic appraoch is to transfer state from the in-kernel VGIC
to the emulated arm-gic state representation and let the standard QEMU
vmstate save/restore handle saving the arm-gic state. Restore works by
reversing the process.
The first few patches adds missing features and fixes issues with the
arm-gic implementation in qemu in preparation for the actual
save/restore logic.
The patches depend on the device control patch series sent out earlier,
which can also be found here:
git://git.linaro.org/people/cdall/qemu-arm.git migration/device-ctrl
The whole patch series based on top of the above can be found here:
git://git.linaro.org/people/cdall/qemu-arm.git migration/vgic
Christoffer Dall (5):
hw: arm_gic: Fix gic_set_irq handling
hw: arm_gic: Introduce GIC_SET_PRIORITY macro
hw: arm_gic: Keep track of SGI sources
hw: arm_gic: Support setting/getting binary point reg
hw: arm_gic_kvm: Add KVM VGIC save/restore logic
hw/intc/arm_gic.c | 58 +++---
hw/intc/arm_gic_common.c | 4 +
hw/intc/arm_gic_kvm.c | 418 ++++++++++++++++++++++++++++++++++++++++++-
hw/intc/gic_internal.h | 13 ++
include/migration/vmstate.h | 6 +
5 files changed, 477 insertions(+), 22 deletions(-)
--
1.7.10.4
From: Mark Brown <broonie(a)linaro.org>
Ensure that the return value is always set when we return now that the
logic has changed for regulator_get_optional() so we don't get missing
codes leaking out.
Reported-by: Thierry Reding <treding(a)nvidia.com>
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/regulator/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index fabbf32..6333080 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1281,12 +1281,13 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
if (rdev)
goto found;
+ regulator = ERR_PTR(ret);
+
/*
* If we have return value from dev_lookup fail, we do not expect to
* succeed, so, quit with appropriate error value
*/
if (ret && ret != -ENODEV) {
- regulator = ERR_PTR(ret);
goto out;
}
--
1.8.4.rc3
The memory pinning code in uaccess_with_memcpy.c does not check
for HugeTLB or THP pmds, and will enter an infinite loop should
a __copy_to_user or __clear_user occur against a huge page.
This patch adds detection code for huge pages to pin_page_for_write.
As this code can be executed in a fast path it refers to the actual
pmds rather than the vma. If a HugeTLB or THP is found (they have
the same pmd representation on ARM), the page table spinlock is
taken to prevent modification whilst the page is pinned.
On ARM, huge pages are only represented as pmds, thus no huge pud
checks are performed. (For huge puds one would lock the page table
in a similar manner as in the pmd case).
Two helper functions are introduced; pmd_thp_or_huge will check
whether or not a page is huge or transparent huge (which have the
same pmd layout on ARM), and pmd_hugewillfault will detect whether
or not a page fault will occur on write to the page.
Changes since first RFC:
* The page mask is widened for hugepages to reduce the number
of potential locks/unlocks.
(A knobbled /dev/zero with its latency reduction chunks
removed shows a 2x data rate boost with hugepages backing:
dd if=/dev/zero of=/dev/null bs=10M count=1024 )
Signed-off-by: Steve Capper <steve.capper(a)linaro.org>
---
arch/arm/include/asm/pgtable-3level.h | 3 ++
arch/arm/lib/uaccess_with_memcpy.c | 57 ++++++++++++++++++++++++++++++-----
2 files changed, 52 insertions(+), 8 deletions(-)
diff --git a/arch/arm/include/asm/pgtable-3level.h b/arch/arm/include/asm/pgtable-3level.h
index 5689c18..39c54cf 100644
--- a/arch/arm/include/asm/pgtable-3level.h
+++ b/arch/arm/include/asm/pgtable-3level.h
@@ -206,6 +206,9 @@ static inline pmd_t *pmd_offset(pud_t *pud, unsigned long addr)
#define __HAVE_ARCH_PMD_WRITE
#define pmd_write(pmd) (!(pmd_val(pmd) & PMD_SECT_RDONLY))
+#define pmd_hugewillfault(pmd) (!pmd_young(pmd) || !pmd_write(pmd))
+#define pmd_thp_or_huge(pmd) (pmd_huge(pmd) || pmd_trans_huge(pmd))
+
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
#define pmd_trans_huge(pmd) (pmd_val(pmd) && !(pmd_val(pmd) & PMD_TABLE_BIT))
#define pmd_trans_splitting(pmd) (pmd_val(pmd) & PMD_SECT_SPLITTING)
diff --git a/arch/arm/lib/uaccess_with_memcpy.c b/arch/arm/lib/uaccess_with_memcpy.c
index 025f742..78756db 100644
--- a/arch/arm/lib/uaccess_with_memcpy.c
+++ b/arch/arm/lib/uaccess_with_memcpy.c
@@ -18,11 +18,13 @@
#include <linux/hardirq.h> /* for in_atomic() */
#include <linux/gfp.h>
#include <linux/highmem.h>
+#include <linux/hugetlb.h>
#include <asm/current.h>
#include <asm/page.h>
static int
-pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
+pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp,
+ unsigned long *page_mask)
{
unsigned long addr = (unsigned long)_addr;
pgd_t *pgd;
@@ -40,7 +42,36 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
return 0;
pmd = pmd_offset(pud, addr);
- if (unlikely(pmd_none(*pmd) || pmd_bad(*pmd)))
+ if (unlikely(pmd_none(*pmd)))
+ return 0;
+
+ /*
+ * A pmd can be bad if it refers to a HugeTLB or THP page.
+ *
+ * Both THP and HugeTLB pages have the same pmd layout
+ * and should not be manipulated by the pte functions.
+ *
+ * Lock the page table for the destination and check
+ * to see that it's still huge and whether or not we will
+ * need to fault on write, or if we have a splitting THP.
+ */
+ if (unlikely(pmd_thp_or_huge(*pmd))) {
+ ptl = ¤t->mm->page_table_lock;
+ spin_lock(ptl);
+ if (unlikely(!pmd_thp_or_huge(*pmd)
+ || pmd_hugewillfault(*pmd)
+ || pmd_trans_splitting(*pmd))) {
+ spin_unlock(ptl);
+ return 0;
+ }
+
+ *ptep = NULL;
+ *ptlp = ptl;
+ *page_mask = HPAGE_MASK;
+ return 1;
+ }
+
+ if (unlikely(pmd_bad(*pmd)))
return 0;
pte = pte_offset_map_lock(current->mm, pmd, addr, &ptl);
@@ -52,6 +83,7 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
*ptep = pte;
*ptlp = ptl;
+ *page_mask = PAGE_MASK;
return 1;
}
@@ -60,6 +92,7 @@ static unsigned long noinline
__copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
{
int atomic;
+ unsigned long page_mask;
if (unlikely(segment_eq(get_fs(), KERNEL_DS))) {
memcpy((void *)to, from, n);
@@ -76,7 +109,7 @@ __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
spinlock_t *ptl;
int tocopy;
- while (!pin_page_for_write(to, &pte, &ptl)) {
+ while (!pin_page_for_write(to, &pte, &ptl, &page_mask)) {
if (!atomic)
up_read(¤t->mm->mmap_sem);
if (__put_user(0, (char __user *)to))
@@ -85,7 +118,7 @@ __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
down_read(¤t->mm->mmap_sem);
}
- tocopy = (~(unsigned long)to & ~PAGE_MASK) + 1;
+ tocopy = (~(unsigned long)to & ~page_mask) + 1;
if (tocopy > n)
tocopy = n;
@@ -94,7 +127,10 @@ __copy_to_user_memcpy(void __user *to, const void *from, unsigned long n)
from += tocopy;
n -= tocopy;
- pte_unmap_unlock(pte, ptl);
+ if (pte)
+ pte_unmap_unlock(pte, ptl);
+ else
+ spin_unlock(ptl);
}
if (!atomic)
up_read(¤t->mm->mmap_sem);
@@ -121,6 +157,8 @@ __copy_to_user(void __user *to, const void *from, unsigned long n)
static unsigned long noinline
__clear_user_memset(void __user *addr, unsigned long n)
{
+ unsigned long page_mask;
+
if (unlikely(segment_eq(get_fs(), KERNEL_DS))) {
memset((void *)addr, 0, n);
return 0;
@@ -132,14 +170,14 @@ __clear_user_memset(void __user *addr, unsigned long n)
spinlock_t *ptl;
int tocopy;
- while (!pin_page_for_write(addr, &pte, &ptl)) {
+ while (!pin_page_for_write(addr, &pte, &ptl, &page_mask)) {
up_read(¤t->mm->mmap_sem);
if (__put_user(0, (char __user *)addr))
goto out;
down_read(¤t->mm->mmap_sem);
}
- tocopy = (~(unsigned long)addr & ~PAGE_MASK) + 1;
+ tocopy = (~(unsigned long)addr & ~page_mask) + 1;
if (tocopy > n)
tocopy = n;
@@ -147,7 +185,10 @@ __clear_user_memset(void __user *addr, unsigned long n)
addr += tocopy;
n -= tocopy;
- pte_unmap_unlock(pte, ptl);
+ if (pte)
+ pte_unmap_unlock(pte, ptl);
+ else
+ spin_unlock(ptl);
}
up_read(¤t->mm->mmap_sem);
--
1.8.1.4
Automated DT boot report for various ARM defconfigs.
Boot test simply checks if kernel can boot to initramfs with busybox
and run some basic commands (e.g. 'cat /proc/cpuinfo').
Tree/Branch: next/master
Git describe: next-20130923
Commit: 1fa8f71dfa Add linux-next specific files for 20130923
Failed boot tests (console logs at the end)
===========================================
omap3-beagle: FAIL: arm-omap2plus_defconfig
Full Report
===========
arm-imx_v6_v7_defconfig
-----------------------
imx6dl-wandboard,wand-dual PASS: 0 min 16.4 sec
imx6dl-wandboard,wand-solo PASS: 0 min 16.5 sec
imx6q-wandboard PASS: 0 min 15.1 sec
arm-omap2plus_defconfig
-----------------------
am335x-boneblack PASS: 0 min 31.9 sec
omap3-beagle-xm PASS: 0 min 51.2 sec
am335x-bone PASS: 0 min 26.3 sec
omap3-tobi,3530overo PASS: 0 min 42.4 sec
omap4-panda PASS: 1 min 8.2 sec
omap4-panda-es PASS: 1 min 15.0 sec
omap3-tobi,3730storm PASS: 0 min 42.2 sec
omap3-beagle FAIL: 0 min 18.7 sec
arm-multi_v7_defconfig
----------------------
am335x-boneblack PASS: 0 min 31.7 sec
omap3-beagle-xm PASS: 0 min 51.8 sec
omap4-panda-es PASS: 1 min 13.9 sec
omap4-panda PASS: 1 min 0.8 sec
sun4i-a10-cubieboard PASS: 0 min 11.6 sec
imx6dl-wandboard,wand-solo PASS: 0 min 16.5 sec
omap3-tobi,3530overo PASS: 0 min 40.9 sec
am335x-bone PASS: 0 min 33.4 sec
imx6q-wandboard PASS: 0 min 15.8 sec
omap3-tobi,3730storm PASS: 0 min 40.2 sec
imx6dl-wandboard,wand-dual PASS: 0 min 16.6 sec
omap3-beagle PASS: 0 min 53.8 sec
arm-exynos_defconfig
--------------------
exynos5250-arndale PASS: 0 min 29.6 sec
arm-sama5_defconfig
-------------------
sama5d35ek PASS: 0 min 18.3 sec
Console logs for failures
=========================
arm-omap2plus_defconfig
-----------------------
omap3-beagle: FAIL: last 24 lines of boot log:
----------------------------------------------
if test -n ${initenv}; then run initenv; fi
OMAP3 beagleboard.org # if test -n ${preboot}; then run preboot; fi
if test -n ${preboot}; then run preboot; fi
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
scanning usb for ethernet devices...
Warning: asx0 using MAC address from net device
1 Ethernet Device(s) found
OMAP3 beagleboard.org # setenv autoload no; setenv autoboot no
setenv autoload no; setenv autoboot no
OMAP3 beagleboard.org # dhcp
dhcp
ERROR: Need valid 'usbnet_devaddr' to be set
at ether.c:2369/usb_eth_init()
Waiting for Ethernet connection... done.
BOOTP broadcast 1
EHCI timed out on TD - token=0x8008d80
BOOTP broadcast 2
~$off
# PYBOOT: Exception: u-boot: ERROR: timed-out getting DHCP address.
# PYBOOT: Time: 18.69 seconds.
# PYBOOT: Result: FAIL