This patch set enables kdump (crash dump kernel) support on arm64 on top of
Geoff's kexec patchset.
In this version, there are some arm64-specific usage/constraints:
1) "mem=" boot parameter must be specified on crash dump kernel
if the system starts on uefi.
2) Kvm will not be enabled on crash dump kernel even if configured
See commit messages and Documentation/kdump/kdump.txt for details.
The only concern I have is whether or not we can use the exact same kernel
as both system kernel and crash dump kernel. The current arm64 kernel is
not relocatable in the exact sense but I see no problems in using the same
binary when testing kdump.
I tested the code with
- ATF v1.1 + EDK2(UEFI) v3.0-rc0
- kernel v4.0 + Geoff' kexec v9
on
- Base fast model, and
- MediaTek MT8173-EVB
using my own kexec-tools [1], currently v0.12.
You may want to start a kernel with the following boot parameter:
crashkernel=64M (or so, on model)
and try
$ kexec -p --load <vmlinux> --append ...
$ echo c > /proc/sysrq-trigger
To examine vmcore (/proc/vmcore), you should use
- gdb v7.7 or later
- crash + a small patch (to recognize v4.0 kernel)
Changes from v1:
* rebased to Geoff's v9
* tested this patchset on real hardware and fixed bugs:
- added cache flush operation in ipi_cpu_stop() when shutting down
the system. Otherwise, data saved in vmcore's note sections by
crash_save_cpu() might not be flushed to dumped memory and crash command
fail to fetch correct data.
I will address Mark's commit[2] after Geoff takes care of it on kexec.
- modified to use ioremap_cache() instead of ioremap() when reading
crash memory. Otherwise, accessing /proc/vmcore on crash dump kernel
might cause an alignment fault.
* allows reserve_crashkernel() to handle "crashkernel=xyz[MG]" correctly,
thanks to Pratyush Anand. And it now also enforces memory limit.
* moved reserve_crashkernel() and reserve_elfcorehdr() to
arm64_memblock_init() to clarify that they should be called before
dma_contignuous_reserve().
[1] https://git.linaro.org/people/takahiro.akashi/kexec-tools.git
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-April/338171.html
AKASHI Takahiro (5):
arm64: kdump: reserve memory for crash dump kernel
arm64: kdump: implement machine_crash_shutdown()
arm64: kdump: do not go into EL2 before starting a crash dump kernel
arm64: add kdump support
arm64: enable kdump in the arm64 defconfig
Documentation/kdump/kdump.txt | 31 +++++++++++++-
arch/arm64/Kconfig | 12 ++++++
arch/arm64/configs/defconfig | 1 +
arch/arm64/include/asm/kexec.h | 34 ++++++++++++++-
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/crash_dump.c | 71 +++++++++++++++++++++++++++++++
arch/arm64/kernel/machine_kexec.c | 55 +++++++++++++++++++++++-
arch/arm64/kernel/process.c | 7 +++-
arch/arm64/kernel/setup.c | 8 +++-
arch/arm64/kernel/smp.c | 12 +++++-
arch/arm64/mm/init.c | 84 +++++++++++++++++++++++++++++++++++++
11 files changed, 309 insertions(+), 7 deletions(-)
create mode 100644 arch/arm64/kernel/crash_dump.c
--
1.7.9.5
Tree/Branch: next-20150729
Git describe: next-20150729
Commit: a861233de3 Add linux-next specific files for 20150729
Build Time: 70 min 0 sec
Passed: 7 / 9 ( 77.78 %)
Failed: 2 / 9 ( 22.22 %)
Errors: 13
Warnings: 49
Section Mismatches: 1
Failed defconfigs:
arm64-allmodconfig
arm-allmodconfig
Errors:
arm64-allmodconfig
../include/linux/platform_device.h:245:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
../include/linux/platform_device.h:250:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
arm-allmodconfig
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../drivers/gpu/drm/omapdrm/omap_crtc.c:470:2: error: initialization from incompatible pointer type [-Werror]
../drivers/gpu/drm/omapdrm/omap_crtc.c:470:2: error: (near initialization for 'omap_crtc_helper_funcs.atomic_begin') [-Werror]
../drivers/gpu/drm/omapdrm/omap_crtc.c:471:2: error: initialization from incompatible pointer type [-Werror]
../drivers/gpu/drm/omapdrm/omap_crtc.c:471:2: error: (near initialization for 'omap_crtc_helper_funcs.atomic_flush') [-Werror]
../drivers/pci/host/pcie-xilinx.c:235:3: error: implicit declaration of function 'msi_desc_to_pci_sys_data' [-Werror=implicit-function-declaration]
../drivers/soc/mediatek/mtk-scpsys.c:487:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
../drivers/soc/mediatek/mtk-scpsys.c:487:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
2 warnings 0 mismatches : arm64-allnoconfig
114 warnings 1 mismatches : arm64-allmodconfig
2 warnings 0 mismatches : arm-multi_v5_defconfig
5 warnings 0 mismatches : arm-multi_v7_defconfig
20 warnings 0 mismatches : arm-allmodconfig
1 warnings 0 mismatches : arm-allnoconfig
2 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Errors summary: 13
15 ../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
15 ../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
15 ../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
15 ../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
1 ../include/linux/platform_device.h:250:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
1 ../include/linux/platform_device.h:245:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
1 ../drivers/soc/mediatek/mtk-scpsys.c:487:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
1 ../drivers/soc/mediatek/mtk-scpsys.c:487:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
1 ../drivers/pci/host/pcie-xilinx.c:235:3: error: implicit declaration of function 'msi_desc_to_pci_sys_data' [-Werror=implicit-function-declaration]
1 ../drivers/gpu/drm/omapdrm/omap_crtc.c:471:2: error: initialization from incompatible pointer type [-Werror]
1 ../drivers/gpu/drm/omapdrm/omap_crtc.c:471:2: error: (near initialization for 'omap_crtc_helper_funcs.atomic_flush') [-Werror]
1 ../drivers/gpu/drm/omapdrm/omap_crtc.c:470:2: error: initialization from incompatible pointer type [-Werror]
1 ../drivers/gpu/drm/omapdrm/omap_crtc.c:470:2: error: (near initialization for 'omap_crtc_helper_funcs.atomic_begin') [-Werror]
Warnings Summary: 49
17 ../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
17 ../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
14 ../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
14 ../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
10 <stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
10 ../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
10 ../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
4 ../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:32:0: warning: "TRUE" redefined
4 ../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:31:0: warning: "FALSE" redefined
3 warning: (MFD_CROS_EC) selects CHROME_PLATFORMS which has unmet direct dependencies (X86 || ARM)
2 ../include/linux/export.h:36:30: warning: parameter names (without types) in function declaration
2 ../drivers/soc/mediatek/mtk-scpsys.c:487:1: warning: parameter names (without types) in function declaration [enabled by default]
2 ../drivers/soc/mediatek/mtk-scpsys.c:487:1: warning: data definition has no type or storage class [enabled by default]
2 ../drivers/gpio/gpio-omap.c:504:3: warning: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [enabled by default]
1 ../sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../net/bluetooth/mgmt.c:6636:8: warning: 'r192' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../net/bluetooth/mgmt.c:6636:8: warning: 'h192' may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../kernel/sched/rt.c:68:13: warning: 'push_irq_work_func' declared 'static' but never defined [-Wunused-function]
1 ../ipc/kdbus/connection.c:2049:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../include/uapi/linux/byteorder/big_endian.h:32:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../include/linux/platform_device.h:250:1: warning: data definition has no type or storage class
1 ../include/linux/platform_device.h:245:1: warning: data definition has no type or storage class
1 ../include/linux/bitops.h:6:19: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../drivers/usb/renesas_usbhs/common.c:496:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/soc/mediatek/mtk-scpsys.c:487:30: warning: 'scpsys_drv_init' defined but not used [-Wunused-function]
1 ../drivers/soc/mediatek/mtk-scpsys.c:487:1: warning: 'scpsys_drv_init' defined but not used [-Wunused-function]
1 ../drivers/scsi/advansys.c:7806:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c:766:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c:675:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/pci/host/pcie-xilinx.c:235:3: warning: passing argument 1 of 'sys_to_pcie' makes pointer from integer without a cast [enabled by default]
1 ../drivers/ntb/ntb_transport.c:778:3: warning: right shift count >= width of type [enabled by default]
1 ../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
1 ../drivers/net/ethernet/dec/tulip/tulip_core.c:101:2: warning: #warning Processor architecture undefined! [-Wcpp]
1 ../drivers/mmc/host/sh_mmcif.c:418:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/mmc/host/sh_mmcif.c:417:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/infiniband/hw/qib/qib_qp.c:44:0: warning: "BITS_PER_PAGE" redefined
1 ../drivers/infiniband/hw/cxgb4/mem.c:147:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/infiniband/core/uverbs_cmd.c:1466:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/gpu/drm/virtio/virtgpu_fence.c:64:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'long long int' [-Wformat]
1 ../drivers/gpu/drm/virtio/virtgpu_debugfs.c:39:6: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'long long int' [-Wformat]
1 ../drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm204.c:975:1: warning: the frame size of 1208 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../drivers/block/nvme-core.c:1888:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/block/nvme-core.c:1846:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined
1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined
1 ../drivers/atm/iphase.h:127:0: warning: "isprint" redefined
1 ../crypto/wp512.c:987:1: warning: the frame size of 1112 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1 ../arch/arm/mach-cns3xxx/pcie.c:266:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=]
Section Mismatch Summary: 1
1 WARNING: drivers/staging/fsl-mc/bus/mc-bus-driver.o(.init.text+0x18c): Section mismatch in reference from the function init_module() to the function .exit.text:dprc_driver_exit()
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allnoconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
../kernel/sched/rt.c:68:13: warning: 'push_irq_work_func' declared 'static' but never defined [-Wunused-function]
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 2 errors, 114 warnings, 1 section mismatches
Errors:
../include/linux/platform_device.h:245:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
../include/linux/platform_device.h:250:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
Warnings:
warning: (MFD_CROS_EC) selects CHROME_PLATFORMS which has unmet direct dependencies (X86 || ARM)
warning: (MFD_CROS_EC) selects CHROME_PLATFORMS which has unmet direct dependencies (X86 || ARM)
warning: (MFD_CROS_EC) selects CHROME_PLATFORMS which has unmet direct dependencies (X86 || ARM)
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
../drivers/atm/iphase.h:127:0: warning: "isprint" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../sound/pci/echoaudio/echoaudio.h:156:0: warning: "TRUE" redefined
../sound/pci/echoaudio/echoaudio.h:157:0: warning: "FALSE" redefined
../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined
../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined
../sound/soc/samsung/dmaengine.c:53:32: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../sound/soc/samsung/dmaengine.c:60:31: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/infiniband/hw/qib/qib_qp.c:44:0: warning: "BITS_PER_PAGE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:43:0: warning: "FALSE" redefined
../drivers/isdn/mISDN/dsp_ecdis.h:44:0: warning: "TRUE" redefined
../drivers/mmc/host/sh_mmcif.c:417:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/mmc/host/sh_mmcif.c:418:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c:675:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c:766:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../include/linux/platform_device.h:245:1: warning: data definition has no type or storage class
../include/linux/export.h:36:30: warning: parameter names (without types) in function declaration
../include/linux/platform_device.h:250:1: warning: data definition has no type or storage class
../include/linux/export.h:36:30: warning: parameter names (without types) in function declaration
../drivers/soc/mediatek/mtk-scpsys.c:487:30: warning: 'scpsys_drv_init' defined but not used [-Wunused-function]
../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:31:0: warning: "FALSE" redefined
../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:32:0: warning: "TRUE" redefined
../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:31:0: warning: "FALSE" redefined
../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:32:0: warning: "TRUE" redefined
../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:31:0: warning: "FALSE" redefined
../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:32:0: warning: "TRUE" redefined
../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:31:0: warning: "FALSE" redefined
../drivers/staging/ft1000/ft1000-usb/ft1000_usb.h:32:0: warning: "TRUE" redefined
../drivers/net/ethernet/dec/tulip/winbond-840.c:910:2: warning: #warning Processor architecture undefined [-Wcpp]
../drivers/net/ethernet/dec/tulip/tulip_core.c:101:2: warning: #warning Processor architecture undefined! [-Wcpp]
../drivers/usb/renesas_usbhs/common.c:496:25: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../include/uapi/linux/byteorder/big_endian.h:32:26: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../drivers/net/fddi/skfp/h/targetos.h:62:0: warning: "TRUE" redefined
../drivers/net/fddi/skfp/h/targetos.h:63:0: warning: "FALSE" redefined
../include/linux/bitops.h:6:19: warning: large integer implicitly truncated to unsigned type [-Woverflow]
Section Mismatches:
WARNING: drivers/staging/fsl-mc/bus/mc-bus-driver.o(.init.text+0x18c): Section mismatch in reference from the function init_module() to the function .exit.text:dprc_driver_exit()
-------------------------------------------------------------------------------
arm-multi_v5_defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
-------------------------------------------------------------------------------
arm-multi_v7_defconfig : PASS, 0 errors, 5 warnings, 0 section mismatches
Warnings:
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
../net/bluetooth/mgmt.c:6636:8: warning: 'r192' may be used uninitialized in this function [-Wmaybe-uninitialized]
../net/bluetooth/mgmt.c:6636:8: warning: 'h192' may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/gpio/gpio-omap.c:504:3: warning: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [enabled by default]
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
-------------------------------------------------------------------------------
arm-allmodconfig : FAIL, 67 errors, 20 warnings, 0 section mismatches
Errors:
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:12:3: error: unknown type name 'u32'
../arch/arm/include/asm/spinlock_types.h:15:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:16:4: error: unknown type name 'u16'
../arch/arm/include/asm/spinlock_types.h:28:2: error: unknown type name 'u32'
../drivers/gpu/drm/omapdrm/omap_crtc.c:470:2: error: initialization from incompatible pointer type [-Werror]
../drivers/gpu/drm/omapdrm/omap_crtc.c:470:2: error: (near initialization for 'omap_crtc_helper_funcs.atomic_begin') [-Werror]
../drivers/gpu/drm/omapdrm/omap_crtc.c:471:2: error: initialization from incompatible pointer type [-Werror]
../drivers/gpu/drm/omapdrm/omap_crtc.c:471:2: error: (near initialization for 'omap_crtc_helper_funcs.atomic_flush') [-Werror]
../drivers/pci/host/pcie-xilinx.c:235:3: error: implicit declaration of function 'msi_desc_to_pci_sys_data' [-Werror=implicit-function-declaration]
../drivers/soc/mediatek/mtk-scpsys.c:487:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
../drivers/soc/mediatek/mtk-scpsys.c:487:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
Warnings:
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
../arch/arm/mach-cns3xxx/pcie.c:266:1: warning: the frame size of 1088 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../ipc/kdbus/connection.c:2049:1: warning: the frame size of 1280 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../crypto/wp512.c:987:1: warning: the frame size of 1112 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/block/nvme-core.c:1846:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/block/nvme-core.c:1888:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/gpio/gpio-omap.c:504:3: warning: passing argument 1 of 'spin_unlock_irqrestore' from incompatible pointer type [enabled by default]
../drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm204.c:975:1: warning: the frame size of 1208 bytes is larger than 1024 bytes [-Wframe-larger-than=]
../drivers/gpu/drm/virtio/virtgpu_fence.c:64:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'long long int' [-Wformat]
../drivers/gpu/drm/virtio/virtgpu_debugfs.c:39:6: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'long long int' [-Wformat]
../drivers/infiniband/core/uverbs_cmd.c:1466:2: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/infiniband/hw/cxgb4/mem.c:147:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/ntb/ntb_transport.c:778:3: warning: right shift count >= width of type [enabled by default]
../drivers/pci/host/pcie-xilinx.c:235:3: warning: passing argument 1 of 'sys_to_pcie' makes pointer from integer without a cast [enabled by default]
../drivers/soc/mediatek/mtk-scpsys.c:487:1: warning: data definition has no type or storage class [enabled by default]
../drivers/soc/mediatek/mtk-scpsys.c:487:1: warning: parameter names (without types) in function declaration [enabled by default]
../drivers/soc/mediatek/mtk-scpsys.c:487:1: warning: data definition has no type or storage class [enabled by default]
../drivers/soc/mediatek/mtk-scpsys.c:487:1: warning: parameter names (without types) in function declaration [enabled by default]
../drivers/soc/mediatek/mtk-scpsys.c:487:1: warning: 'scpsys_drv_init' defined but not used [-Wunused-function]
../drivers/scsi/advansys.c:7806:2: warning: large integer implicitly truncated to unsigned type [-Woverflow]
-------------------------------------------------------------------------------
arm-allnoconfig : PASS, 0 errors, 1 warnings, 0 section mismatches
Warnings:
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
<stdin>:1298:2: warning: #warning syscall userfaultfd not implemented [-Wcpp]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
x86_64-allnoconfig
x86_64-defconfig
Hi
With an ARM Landing Team branch based on LSK 3.18 Android I'm seeing a
hang if I
echo 0 > /sys/devices/system/cpu/cpu1/online
After bisecting, I fixed this problem by reverting commit 553b785b5383
("cpufreq: Iterate over all the possible cpus to create powerstats.")
I was tempted to also revert the other scheduler and cpufreq mods from
Google that are part of the same series, just as a precaution, because
they don't fill me with confidence, but have left them in for now.
--
Tixy
Hi Kevin, Alex,
Please consider following linaro-android pull request for
"linux-linaro-lsk-v3.18-android" branch. Just a couple of minor Linaro
fixes [1][2] on top of aosp/android-3.18 for lsk-v3.18-android.
Regards,
Amit Pundir
[1] https://android.git.linaro.org/gitweb/kernel/linaro-android.git/commitdiff/…
[2] https://android-review.googlesource.com/#/c/159240/
The following changes since commit 028d5c1bb15977715f4c5d8c7827deec05a3fb59:
Merge branch 'android-3.18' of
https://android.googlesource.com/kernel/common (2015-06-04 13:02:57
+0530)
are available in the git repository at:
git://android.git.linaro.org/kernel/linaro-android.git linaro-android-3.18-lsk
for you to fetch changes up to d86b81d4d5f700610182ce19d9ba646303fe16bb:
android: configs: base: enable USB_CONFIGFS (2015-07-13 18:00:57 +0530)
----------------------------------------------------------------
Amit Pundir (4):
sched: cpufreq: update power usage only if cpufreq_stat is enabled
Merge branch 'android-3.18' of
https://android.googlesource.com/kernel/common
arm64: move mixed endian EL0 declarations under __ASSEMBLY__ guards
android: configs: base: enable USB_CONFIGFS
Kevin Hilman (1):
cpufreq_stats: fix use of cpufreq_for_each_valid_entry() iterator
Rom Lemarchand (1):
initramfs: Add skip_initramfs command line option
Ruchi Kandoi (5):
sched: cpufreq: Adds a field cpu_power in the task_struct
uid_cputime: Extends the cputime functionality to report power per uid
cpufreq: Iterate over all the possible cpus to create powerstats.
uid_cputime: Avoids double accounting of process stime, utime
and cpu_power in task exit.
cpu_power: Avoids race condition when the task exits.
Tobias Lindskog (1):
Shrink ashmem directly through shmem_fallocate
android/configs/android-base.cfg | 2 +-
arch/arm64/include/asm/cpufeature.h | 4 ++--
drivers/cpufreq/cpufreq_stats.c | 32 +++++++++++++++++++++++++++-----
drivers/misc/uid_cputime.c | 18 ++++++++++++++++--
drivers/staging/android/ashmem.c | 2 +-
include/linux/cpufreq.h | 9 +++++++++
include/linux/initramfs.h | 32 ++++++++++++++++++++++++++++++++
include/linux/sched.h | 1 +
init/Makefile | 3 ---
init/initramfs.c | 19 ++++++++++++++++++-
init/noinitramfs.c | 9 ++++++++-
kernel/fork.c | 1 +
kernel/sched/cputime.c | 11 +++++++++++
13 files changed, 127 insertions(+), 16 deletions(-)
create mode 100644 include/linux/initramfs.h
Hi Kevin, Alex,
Please consider following linaro-android pull request for
"linux-linaro-lsk-v3.14-android" branch. No new Linaro (non-AOSP)
fixes in this pull request this time around.
Regards,
Amit Pundir
The following changes since commit 17b3b28baf84999421d56dce68c4b1c1ec7f1ef3:
fix: align closely to AOSP. (2015-06-08 11:13:17 +0530)
are available in the git repository at:
git://android.git.linaro.org/kernel/linaro-android.git linaro-android-3.14-lsk
for you to fetch changes up to e690330424d6aab0d15998ed4184603b51fd8aec:
Merge branch 'android-3.14' of
https://android.googlesource.com/kernel/common (2015-07-13 14:11:48
+0530)
----------------------------------------------------------------
Alexander Shiyan (1):
of: add empty of_find_node_by_path() for !OF
Amit Pundir (2):
sched: cpufreq: update power usage only if cpufreq_stat is enabled
Merge branch 'android-3.14' of
https://android.googlesource.com/kernel/common
Rom Lemarchand (1):
initramfs: Add skip_initramfs command line option
Ruchi Kandoi (3):
cpufreq: Iterate over all the possible cpus to create powerstats.
uid_cputime: Avoids double accounting of process stime, utime
and cpu_power in task exit.
cpu_power: Avoids race condition when the task exits.
Tobias Lindskog (1):
Shrink ashmem directly through shmem_fallocate
drivers/cpufreq/cpufreq_stats.c | 11 +++++++----
drivers/misc/uid_cputime.c | 6 ++++++
drivers/staging/android/ashmem.c | 2 +-
include/linux/initramfs.h | 32 ++++++++++++++++++++++++++++++++
include/linux/of.h | 5 +++++
init/Makefile | 3 ---
init/initramfs.c | 19 ++++++++++++++++++-
init/noinitramfs.c | 9 ++++++++-
8 files changed, 77 insertions(+), 10 deletions(-)
Since commit d4573c3e1c99 ("sched: Improve load balancing in the presence
of idle CPUs"), the ILB CPU starts with the idle load balancing of other
idle CPUs and finishes with itself in order to speed up the spread of tasks
in all idle CPUs.
The this_rq->next_balance is still used in nohz_idle_balance as an
intermediate step to gather the shortest next balance before updating
nohz.next_balance. But the former has not been updated yet and is likely to
be set with the current jiffies. As a result, the nohz.next_balance will be
set with current jiffies instead of the real next balance date. This
generates spurious kicks of nohz ilde balance.
nohz_idle_balance must set the nohz.next_balance without taking into
account this_rq->next_balance which is not updated yet. Then, this_rq will
update nohz.next_update with its next_balance once updated and if necessary.
Signed-off-by: Vincent Guittot <vincent.guittot(a)linaro.org>
---
kernel/sched/fair.c | 33 +++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 587a2f6..2b02089 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7779,8 +7779,21 @@ static void rebalance_domains(struct rq *rq, enum cpu_idle_type idle)
* When the cpu is attached to null domain for ex, it will not be
* updated.
*/
- if (likely(update_next_balance))
+ if (likely(update_next_balance)) {
rq->next_balance = next_balance;
+
+ /*
+ * If this cpu has been elected to perform the nohz idle
+ * balance. Other idle cpus have already rebalance with
+ * nohz_idle_balance and the nohz.next_balaance has been
+ * updated accordingly. This cpu has now run the idle load
+ * balance for itself and we need to update the
+ * nohz.next_balance accordingly.
+ */
+ if ((idle == CPU_IDLE) &&
+ time_after(nohz.next_balance, rq->next_balance))
+ nohz.next_balance = rq->next_balance;
+ }
}
#ifdef CONFIG_NO_HZ_COMMON
@@ -7793,6 +7806,9 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
int this_cpu = this_rq->cpu;
struct rq *rq;
int balance_cpu;
+ /* Earliest time when we have to do rebalance again */
+ unsigned long next_balance = jiffies + 60*HZ;
+ int update_next_balance = 0;
if (idle != CPU_IDLE ||
!test_bit(NOHZ_BALANCE_KICK, nohz_flags(this_cpu)))
@@ -7824,10 +7840,19 @@ static void nohz_idle_balance(struct rq *this_rq, enum cpu_idle_type idle)
rebalance_domains(rq, CPU_IDLE);
}
- if (time_after(this_rq->next_balance, rq->next_balance))
- this_rq->next_balance = rq->next_balance;
+ if (time_after(next_balance, rq->next_balance)) {
+ next_balance = rq->next_balance;
+ update_next_balance = 1;
+ }
}
- nohz.next_balance = this_rq->next_balance;
+
+ /*
+ * next_balance will be updated only when there is a need.
+ * When the cpu is attached to null domain for ex, it will not be
+ * updated.
+ */
+ if (likely(update_next_balance))
+ nohz.next_balance = next_balance;
end:
clear_bit(NOHZ_BALANCE_KICK, nohz_flags(this_cpu));
}
--
1.9.1
MT8173 is a ARMv8 based SoC with 2 clusters. All CPUs in a single cluster
share the same power and clock domain. This series tries to add cpufreq support
for MT8173 SoC.
changes in v6:
- Move clock and regulator consumer properties document to the device tree
bindings documents of MT8173 CPU DVFS clock driver
- Add change log to describe what is implemented in the MT8173 cpufreq driver
- Add missed rcu_read_unlock() in the error path
- Move of_init_opp_table() call to make sure all required hardware resources
are already there before it is called
- Add comments to describe why both platform driver and deivce registration
codes are put in the initcall function
- Use the term "voltage tracking" instead of "voltage trace" according to an
internal SoC document
changes in v5:
- Move resource allocation code from init() into probe() and remove some unused
functions due to this change
- Fix descriptions for device tree binding document
- Address review comments for last version
- Register CPU cooling device
Changes in v4:
- Add bindings for MT8173 cpufreq driver
- Move OPP table back into device tree
- Address comments for last version
Changes in v3:
- Implement MT8173 specific standalone cpufreq driver instead of using
cpufreq-dt driver
- Define OPP table in the driver source code until new OPP binding is ready
Changes in v2:
- Add intermediate frequency support in cpufreq-dt driver
- Use voltage scaling code of cpufreq-dt for little cluster instead of
implementaion in notifier of mtk-cpufreq driver
- Code refinement for mtk-cpufreq driver
Pi-Cheng Chen (4):
dt-bindings: mediatek: Add MT8173 CPU DVFS clock bindings
dt-bindings: mediatek: Add MT8173 cpufreq driver bindings
cpufreq: mediatek: Add MT8173 cpufreq driver
arm64: dts: mt8173: Add mt8173 cpufreq driver support
.../devicetree/bindings/clock/mt8173-cpu-dvfs.txt | 83 ++++
.../devicetree/bindings/cpufreq/cpufreq-mt8173.txt | 134 ++++++
arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 18 +
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 64 +++
drivers/cpufreq/Kconfig.arm | 7 +
drivers/cpufreq/Makefile | 1 +
drivers/cpufreq/mt8173-cpufreq.c | 524 +++++++++++++++++++++
7 files changed, 831 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/mt8173-cpu-dvfs.txt
create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-mt8173.txt
create mode 100644 drivers/cpufreq/mt8173-cpufreq.c
--
1.9.1
Hi Guys,
Resending this again because:
- opp-hz is now 64 bit long and so that required a binding update.
- There is another 4 patch series that as updating turbo OPP support,
along with updates to cpufreq core and cpufreq-dt driver.
- A minor bug-fix in V2 4/11, which caused false positive for duplicate
OPPs in some cases.
Tested this on dual-core exynos board with the driver inbuilt as well as
a module. Tried multiple insertion/removals of the module. Have tested
cpufreq-dt driver with both old and new bindings.
Also tried by sending some dummy OPPs that contained opp-hz greater than
what can be captured by u32, to test the u64 updates.
----------x-----------------x-------------
This adds code to support operating-points-v2 bindings. Not everything
is supported yet, but most of the basic stuff is.
Pushed here as well for reference:
ssh://git@git.linaro.org/people/viresh.kumar/linux.git opp/v2
V2->V3:
- Update to opp-hz binding to make it pass u64 value instead of 32 bit
value. This is done to support clock rates greater than 4 GHz.
- Merged two inter-related series, opp-v2 and turbo mode updates.
- Fixed 4/11 from opp-v2 series, which cased false positive for
duplicate OPPs in some cases.
- Add a separate comment in _opp_add_dynamic() (5/16), to clearly
specify that we pass &dev_opp->opp_list to list_for_each_entry_rcu()
and not pass 'head' which contains the same value. Because head will
get modified by the code and that may result in an infinite loop.
- Accumulate more RBY tags.
V1->V2:
- 1/11 is a new patch which moves the bindings file into opp specific
folder.
- 'opp-suspend' binding got updated and is part of individual OPPs now,
instead of a phandle present in the opp table.
- Some more minor reformatting as suggested by Bartlomiej and Stephen,
they were already posted as reply to earlier patches in V1.
Bartlomiej Zolnierkiewicz (2):
PM / OPP: add dev_pm_opp_is_turbo() helper
cpufreq: Update boost flag while initializing freq table from OPPs
Viresh Kumar (14):
PM / OPP: Update bindings to make opp-hz a 64 bit value
PM / OPP: Create a directory for opp bindings
PM / OPP: Relocate few routines
PM / OPP: Create _remove_device_opp() for freeing dev_opp
PM / OPP: Allocate dev_opp from _add_device_opp()
PM / OPP: Break _opp_add_dynamic() into smaller functions
PM / OPP: Add support to parse "operating-points-v2" bindings
PM / OPP: Add clock-latency-ns support
PM / OPP: Add OPP sharing information to OPP library
PM / OPP: Add support for opp-suspend
PM / OPP: Add helpers for initializing CPU OPPs
cpufreq: Allow drivers to enable boost support after registering
driver
cpufreq: dt: Add support for operating-points-v2 bindings
cpufreq: dt: Add support for turbo/boost mode
.../devicetree/bindings/power/{ => opp}/opp.txt | 40 +-
drivers/base/power/opp.c | 1084 ++++++++++++++++----
drivers/cpufreq/cpufreq-dt.c | 64 +-
drivers/cpufreq/cpufreq.c | 68 +-
drivers/cpufreq/cpufreq_opp.c | 4 +
drivers/cpufreq/freq_table.c | 15 +
include/linux/cpufreq.h | 12 +
include/linux/pm_opp.h | 36 +
8 files changed, 1049 insertions(+), 274 deletions(-)
rename Documentation/devicetree/bindings/power/{ => opp}/opp.txt (93%)
--
2.4.0