Current max VCPUs per-Guest is set to 4 which is preventing
us from creating a Guest (or VM) with 8 VCPUs on Host (e.g.
X-Gene Storm SOC) with 8 Host CPUs.
The correct value of max VCPUs per-Guest should be same as
the max CPUs supported by GICv2 which is 8 hence this patch
increases KVM_MAX_VCPUS to 8.
Signed-off-by: Anup Patel <anup.patel(a)linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar(a)linaro.org>
---
arch/arm64/include/asm/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 0859a4d..60ef29e 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -26,7 +26,7 @@
#include <asm/kvm_asm.h>
#include <asm/kvm_mmio.h>
-#define KVM_MAX_VCPUS 4
+#define KVM_MAX_VCPUS 8
#define KVM_USER_MEM_SLOTS 32
#define KVM_PRIVATE_MEM_SLOTS 4
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
--
1.7.9.5
Current max VCPUs per-Guest is set to 4 which is preventing
us from creating a Guest (or VM) with 8 VCPUs on Host (e.g.
X-Gene Storm SOC) with 8 Host CPUs.
The correct value of max VCPUs per-Guest should be same as
the max CPUs supported by GICv2 which is 8 but, increasing
value of max VCPUs per-Guest can make things slower hence
we add Kconfig option to let KVM users select appropriate
max VCPUs per-Guest.
Signed-off-by: Anup Patel <anup.patel(a)linaro.org>
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar(a)linaro.org>
---
arch/arm64/include/asm/kvm_host.h | 7 ++++++-
arch/arm64/kvm/Kconfig | 11 +++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h
index 0859a4d..f318c43 100644
--- a/arch/arm64/include/asm/kvm_host.h
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -26,7 +26,12 @@
#include <asm/kvm_asm.h>
#include <asm/kvm_mmio.h>
-#define KVM_MAX_VCPUS 4
+#if defined(CONFIG_KVM_ARM_MAX_VCPUS)
+#define KVM_MAX_VCPUS CONFIG_KVM_ARM_MAX_VCPUS
+#else
+#define KVM_MAX_VCPUS 0
+#endif
+
#define KVM_USER_MEM_SLOTS 32
#define KVM_PRIVATE_MEM_SLOTS 4
#define KVM_COALESCED_MMIO_PAGE_OFFSET 1
diff --git a/arch/arm64/kvm/Kconfig b/arch/arm64/kvm/Kconfig
index 21e9082..0c99deb 100644
--- a/arch/arm64/kvm/Kconfig
+++ b/arch/arm64/kvm/Kconfig
@@ -35,6 +35,17 @@ config KVM_ARM_HOST
---help---
Provides host support for ARM processors.
+config KVM_ARM_MAX_VCPUS
+ int "Number maximum supported virtual CPUs per VM"
+ depends on KVM_ARM_HOST
+ default 4
+ help
+ Static number of max supported virtual CPUs per VM.
+
+ If you choose a high number, the vcpu structures will be quite
+ large, so only choose a reasonable number that you expect to
+ actually use.
+
config KVM_ARM_VGIC
bool
depends on KVM_ARM_HOST && OF
--
1.7.9.5
hi Nico,
For later ARMv8's big.LITTLE and for current ARM64 multi-core's power
management, actually we can use MCPM as well, so we want to confirm if
there have plan to support MCPM framework for ARM64 as well?
--
Thx,
Leo Yan
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.11-10050-g3711d86
Commit: 3711d86a2d Merge tag 'writeback-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux
Build Time: 122 min 0 sec
Passed: 126 / 129 ( 97.67 %)
Failed: 3 / 129 ( 2.33 %)
Errors: 1
Warnings: 17
Section Mismatches: 0
Failed defconfigs:
arm-pxa3xx_defconfig
arm-raumfeld_defconfig
arm-cm_x300_defconfig
Errors:
arm-pxa3xx_defconfig
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
arm-raumfeld_defconfig
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
arm-cm_x300_defconfig
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
-------------------------------------------------------------------------------
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: 16 warnings 0 mismatches
arm-iop13xx_defconfig: 1 warnings 0 mismatches
arm-corgi_defconfig: 1 warnings 0 mismatches
arm-iop32x_defconfig: 1 warnings 0 mismatches
-------------------------------------------------------------------------------
Errors summary: 1
3 drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
Warnings Summary: 17
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]
1 arch/arm/mach-omap2/gpmc.c:1495:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_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, 16 warnings, 0 section mismatches
Warnings:
arch/arm/mach-omap2/gpmc.c:1495:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_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/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/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-pxa3xx_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
-------------------------------------------------------------------------------
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-raumfeld_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
-------------------------------------------------------------------------------
arm-cm_x300_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
-------------------------------------------------------------------------------
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-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-viper_defconfig
arm-colibri_pxa300_defconfig
arm-pleb_defconfig
arm-mmp2_defconfig
arm-spear6xx_defconfig
arm-eseries_pxa_defconfig
arm-ks8695_defconfig
arm-imx_v4_v5_defconfig
arm-integrator_defconfig
arm-footbridge_defconfig
arm-pxa168_defconfig
arm-multi_v7_defconfig
arm-s5p64x0_defconfig
arm-rpc_defconfig
arm-mxs_defconfig
arm-nuc910_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-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
This has been running in my mind since few days... That we have fixed cpufreq
core and all other drivers for transition serialization but what about
powernow-k8? It is somewhat special (even more than exynos5440).. It queues a
work from ->target() and may or maynot send notifications at all..
Finally I have got a solution now (detailed logs in the patch)..
These must go with following patchset:
https://lkml.org/lkml/2013/9/12/173
Compile tested only..
Viresh Kumar (2):
cpufreq: Create cpufreq_transition_complete()
cpufreq: powernow-k8: mark freq transition complete on error cases
drivers/cpufreq/cpufreq.c | 25 ++++++++++++-----------
drivers/cpufreq/powernow-k8.c | 47 +++++++++++++++++++++++++++++++------------
include/linux/cpufreq.h | 7 +++++++
3 files changed, 54 insertions(+), 25 deletions(-)
--
1.7.12.rc2.18.g61b472e
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.11-10047-gbdbdfde
Commit: bdbdfdef57 Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
Build Time: 131 min 32 sec
Passed: 126 / 129 ( 97.67 %)
Failed: 3 / 129 ( 2.33 %)
Errors: 1
Warnings: 17
Section Mismatches: 0
Failed defconfigs:
arm-pxa3xx_defconfig
arm-raumfeld_defconfig
arm-cm_x300_defconfig
Errors:
arm-pxa3xx_defconfig
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
arm-raumfeld_defconfig
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
arm-cm_x300_defconfig
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
-------------------------------------------------------------------------------
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: 16 warnings 0 mismatches
arm-iop13xx_defconfig: 1 warnings 0 mismatches
arm-corgi_defconfig: 1 warnings 0 mismatches
arm-iop32x_defconfig: 1 warnings 0 mismatches
-------------------------------------------------------------------------------
Errors summary: 1
3 drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
Warnings Summary: 17
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]
1 arch/arm/mach-omap2/gpmc.c:1495:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_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, 16 warnings, 0 section mismatches
Warnings:
arch/arm/mach-omap2/gpmc.c:1495:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘resource_size_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-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/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-pxa3xx_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
-------------------------------------------------------------------------------
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-raumfeld_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
-------------------------------------------------------------------------------
arm-cm_x300_defconfig : FAIL, 1 errors, 0 warnings, 0 section mismatches
Errors:
drivers/mtd/nand/pxa3xx_nand.c:1325:2: error: implicit declaration of function ‘pxa3xx_nand_get_variant’ [-Werror=implicit-function-declaration]
-------------------------------------------------------------------------------
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-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-viper_defconfig
arm-colibri_pxa300_defconfig
arm-pleb_defconfig
arm-mmp2_defconfig
arm-spear6xx_defconfig
arm-eseries_pxa_defconfig
arm-ks8695_defconfig
arm-imx_v4_v5_defconfig
arm-integrator_defconfig
arm-footbridge_defconfig
arm-pxa168_defconfig
arm-multi_v7_defconfig
arm-s5p64x0_defconfig
arm-rpc_defconfig
arm-mxs_defconfig
arm-nuc910_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-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
From: Mark Brown <broonie(a)linaro.org>
When a system has said that it has fully specified constraints for its
regulators it is still possible that some supplies may be missing,
especially if regulator support has been added to a driver after the
board was integrated. We can handle such situations more gracefully by
providing a dummy regulator.
Unless the caller has specifically indicated that the system design may
not include a given regulator by using regulator_get_optional() or that
it needs its interactions to have an effect using regulator_get_exclusive()
provide a dummy regulator if we can't locate a real one.
The kconfig option REGULATOR_DUMMY that provided similar behaviour for all
regulators has been removed, systems that need it should flag that they
have full constraints instead. Some more thought is needed for a more
elegant way of handling non-DT systems.
Signed-off-by: Mark Brown <broonie(a)linaro.org>
---
drivers/regulator/Kconfig | 10 ----------
drivers/regulator/core.c | 36 +++++++++++++++++++-----------------
2 files changed, 19 insertions(+), 27 deletions(-)
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index dfe5809..0417ce3 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -28,16 +28,6 @@ config REGULATOR_DEBUG
help
Say yes here to enable debugging support.
-config REGULATOR_DUMMY
- bool "Provide a dummy regulator if regulator lookups fail"
- help
- If this option is enabled then when a regulator lookup fails
- and the board has not specified that it has provided full
- constraints the regulator core will provide an always
- enabled dummy regulator, allowing consumer drivers to continue.
-
- A warning will be generated when this substitution is done.
-
config REGULATOR_FIXED_VOLTAGE
tristate "Fixed voltage regulator support"
help
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 02af90e..c9740b5 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1225,7 +1225,7 @@ static struct regulator_dev *regulator_dev_lookup(struct device *dev,
/* Internal regulator request function */
static struct regulator *_regulator_get(struct device *dev, const char *id,
- bool exclusive)
+ bool exclusive, bool allow_dummy)
{
struct regulator_dev *rdev;
struct regulator *regulator = ERR_PTR(-EPROBE_DEFER);
@@ -1250,30 +1250,32 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
* If we have return value from dev_lookup fail, we do not expect to
* succeed, so, quit with appropriate error value
*/
- if (ret) {
+ if (ret && ret != -ENODEV) {
regulator = ERR_PTR(ret);
goto out;
}
- if (board_wants_dummy_regulator) {
- rdev = dummy_regulator_rdev;
- goto found;
- }
-
-#ifdef CONFIG_REGULATOR_DUMMY
if (!devname)
devname = "deviceless";
- /* If the board didn't flag that it was fully constrained then
- * substitute in a dummy regulator so consumers can continue.
+ /*
+ * Assume that a regulator is physically present and enabled
+ * even if it isn't hooked up and just provide a dummy.
*/
- if (!has_full_constraints) {
- pr_warn("%s supply %s not found, using dummy regulator\n",
- devname, id);
+ 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);
+
rdev = dummy_regulator_rdev;
goto found;
+ } else {
+ dev_err(dev, "dummy supplies not allowed\n");
}
-#endif
mutex_unlock(®ulator_list_mutex);
return regulator;
@@ -1331,7 +1333,7 @@ out:
*/
struct regulator *regulator_get(struct device *dev, const char *id)
{
- return _regulator_get(dev, id, false);
+ return _regulator_get(dev, id, false, true);
}
EXPORT_SYMBOL_GPL(regulator_get);
@@ -1358,7 +1360,7 @@ EXPORT_SYMBOL_GPL(regulator_get);
*/
struct regulator *regulator_get_exclusive(struct device *dev, const char *id)
{
- return _regulator_get(dev, id, true);
+ return _regulator_get(dev, id, true, false);
}
EXPORT_SYMBOL_GPL(regulator_get_exclusive);
@@ -1387,7 +1389,7 @@ EXPORT_SYMBOL_GPL(regulator_get_exclusive);
*/
struct regulator *regulator_get_optional(struct device *dev, const char *id)
{
- return _regulator_get(dev, id, 0);
+ return _regulator_get(dev, id, false, false);
}
EXPORT_SYMBOL_GPL(regulator_get_optional);
--
1.8.4.rc3