* [PATCH 3/3] mm: make pagoff_t type 64-bit
From: kbuild test robot @ 2016-12-11 13:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1481461003-14361-4-git-send-email-ynorov@caviumnetworks.com>
Hi Yury,
[auto build test WARNING on linus/master]
[also build test WARNING on v4.9-rc8]
[cannot apply to mmotm/master next-20161209]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Yury-Norov/mm-move-argument-checkers-of-mmap_pgoff-to-separated-routine/20161211-211314
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
arch/x86/mm/pgtable.c: In function 'pgd_set_mm':
>> arch/x86/mm/pgtable.c:108:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
virt_to_page(pgd)->index = (pgoff_t)mm;
^
arch/x86/mm/pgtable.c: In function 'pgd_page_get_mm':
>> arch/x86/mm/pgtable.c:113:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (struct mm_struct *)page->index;
^
--
mm/percpu.c: In function 'pcpu_get_page_chunk':
>> mm/percpu.c:240:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (struct pcpu_chunk *)page->index;
^
vim +108 arch/x86/mm/pgtable.c
68db065c Jeremy Fitzhardinge 2008-03-17 102 (SHARED_KERNEL_PMD ? KERNEL_PGD_BOUNDARY : PTRS_PER_PGD)
4f76cd38 Jeremy Fitzhardinge 2008-03-17 103
617d34d9 Jeremy Fitzhardinge 2010-09-21 104
617d34d9 Jeremy Fitzhardinge 2010-09-21 105 static void pgd_set_mm(pgd_t *pgd, struct mm_struct *mm)
617d34d9 Jeremy Fitzhardinge 2010-09-21 106 {
617d34d9 Jeremy Fitzhardinge 2010-09-21 107 BUILD_BUG_ON(sizeof(virt_to_page(pgd)->index) < sizeof(mm));
617d34d9 Jeremy Fitzhardinge 2010-09-21 @108 virt_to_page(pgd)->index = (pgoff_t)mm;
617d34d9 Jeremy Fitzhardinge 2010-09-21 109 }
617d34d9 Jeremy Fitzhardinge 2010-09-21 110
617d34d9 Jeremy Fitzhardinge 2010-09-21 111 struct mm_struct *pgd_page_get_mm(struct page *page)
617d34d9 Jeremy Fitzhardinge 2010-09-21 112 {
617d34d9 Jeremy Fitzhardinge 2010-09-21 @113 return (struct mm_struct *)page->index;
617d34d9 Jeremy Fitzhardinge 2010-09-21 114 }
617d34d9 Jeremy Fitzhardinge 2010-09-21 115
617d34d9 Jeremy Fitzhardinge 2010-09-21 116 static void pgd_ctor(struct mm_struct *mm, pgd_t *pgd)
:::::: The code at line 108 was first introduced by commit
:::::: 617d34d9e5d8326ec8f188c616aa06ac59d083fe x86, mm: Hold mm->page_table_lock while doing vmalloc_sync
:::::: TO: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
:::::: CC: H. Peter Anvin <hpa@linux.intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 6363 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20161211/a02f0aed/attachment.gz>
^ permalink raw reply
* i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo
From: Magnus Lilja @ 2016-12-11 13:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAOMZO5DYwAHdRqqYM-7dKtRJhuV9oGVWYFWmD0JTZR+WFr-XXA@mail.gmail.com>
Hi Fabio,
On 11 December 2016 at 13:59, Fabio Estevam <festevam@gmail.com> wrote:
> Thinking more about it we see that commit c93cc61475ebbe6 ("[media]
> staging/media: remove deprecated mx3 driver") only appeared in 4.8, so
> it is OK to remove mx31_3ds_reserve() now, but it will not fix the
> kernel boot in the previous kernels.
>
> Commit 1c2f87c22 ("ARM: 8025/1: Get rid of meminfo") is from kernel 3.16 though.
>
> So it seems we need a proper fix for kernels 3.16-4.8.
Yes, indeed. There are a couple long term stable kernels in that range
that needs to be fixed (and also might need other fixes as well to
boot mx31_3ds).
Regards, Magnus
^ permalink raw reply
* [PATCH RFC 2/2] ARM: nommu: remap exception base address to RAM
From: Afzal Mohammed @ 2016-12-11 13:12 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161211131028.3019-1-afzal.mohd.ma@gmail.com>
Remap exception base address to start of RAM in Kernel in !MMU mode.
Based on existing Kconfig help, Kernel was expecting it to be
configured by external support. Also earlier it was not possible to
copy the exception table to start of RAM due to Kconfig dependency,
which has been fixed by a change prior to this.
Kernel text start at an offset of at least 32K to account for page
tables in MMU case. On a !MMU build too this space is kept aside, and
since 2 pages (8K) is the maximum for exception plus stubs, it can be
placed at the start of RAM.
Signed-off-by: Afzal Mohammed <afzal.mohd.ma@gmail.com>
---
i am a bit shaky about this change, though it works here on Cortex-A9,
this probably would have to be made robust so as to not cause issue on
other v7-A's upon trying to do !MMU (this won't affect normal MMU boot),
or specifically where security extensions are not enabled. Also effect
of hypervisor extension also need to be considered. Please let know if
any better ways to handle this.
arch/arm/Kconfig-nommu | 6 +++---
arch/arm/kernel/head-nommu.S | 6 ++++++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu
index b7576349528c..f57fbe3d5eb0 100644
--- a/arch/arm/Kconfig-nommu
+++ b/arch/arm/Kconfig-nommu
@@ -46,9 +46,9 @@ config REMAP_VECTORS_TO_RAM
If your CPU provides a remap facility which allows the exception
vectors to be mapped to writable memory, say 'n' here.
- Otherwise, say 'y' here. In this case, the kernel will require
- external support to redirect the hardware exception vectors to
- the writable versions located at DRAM_BASE.
+ Otherwise, say 'y' here. In this case, the kernel will
+ redirect the hardware exception vectors to the writable
+ versions located at DRAM_BASE.
config ARM_MPU
bool 'Use the ARM v7 PMSA Compliant MPU'
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index 6b4eb27b8758..ac31c9647830 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -158,6 +158,12 @@ __after_proc_init:
bic r0, r0, #CR_V
#endif
mcr p15, 0, r0, c1, c0, 0 @ write control reg
+
+#ifdef CONFIG_REMAP_VECTORS_TO_RAM
+ mov r3, #CONFIG_VECTORS_BASE @ read VECTORS_BASE
+ mcr p15, 0, r3, c12, c0, 0 @ write to VBAR
+#endif
+
#elif defined (CONFIG_CPU_V7M)
/* For V7M systems we want to modify the CCR similarly to the SCTLR */
#ifdef CONFIG_CPU_DCACHE_DISABLE
--
2.11.0
^ permalink raw reply related
* [PATCH 1/2] ARM: nommu: allow enabling REMAP_VECTORS_TO_RAM
From: Afzal Mohammed @ 2016-12-11 13:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161211131028.3019-1-afzal.mohd.ma@gmail.com>
REMAP_VECTORS_TO_RAM depends on DRAM_BASE, but since DRAM_BASE is a
hex, REMAP_VECTORS_TO_RAM could never get enabled. Also depending on
DRAM_BASE is redundant as whenever REMAP_VECTORS_TO_RAM makes itself
available to Kconfig, DRAM_BASE also is available as the Kconfig gets
sourced on !MMU.
Signed-off-by: Afzal Mohammed <afzal.mohd.ma@gmail.com>
---
arch/arm/Kconfig-nommu | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/arm/Kconfig-nommu b/arch/arm/Kconfig-nommu
index aed66d5df7f1..b7576349528c 100644
--- a/arch/arm/Kconfig-nommu
+++ b/arch/arm/Kconfig-nommu
@@ -34,8 +34,7 @@ config PROCESSOR_ID
used instead of the auto-probing which utilizes the register.
config REMAP_VECTORS_TO_RAM
- bool 'Install vectors to the beginning of RAM' if DRAM_BASE
- depends on DRAM_BASE
+ bool 'Install vectors to the beginning of RAM'
help
The kernel needs to change the hardware exception vectors.
In nommu mode, the hardware exception vectors are normally
--
2.11.0
^ permalink raw reply related
* [PATCH 0/2] ARM: v7-A !MMU fixes for fun (&fame)
From: Afzal Mohammed @ 2016-12-11 13:10 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
ARM core fixes required to bring up !MMU Kernel on v7 Cortex-A.
This was done on top of Vladimir Murzin's !MMU multiplatform series[1].
Platform used was Cortex-A9, AM437x IDK.
Kernel reached the stage of invoking user space init & panicked, though
it could not reach till prompt for want of user space executables, it
went as much as Kernel can help by itself. But that is an issue
independent of the Kernel, hence posting the series (also thought of
at least posting the existing patches b'fore merge window starts).
So far i have not come across a toolchain (or a way to create toolchain)
to create !MMU user space executables for Cortex-A. It is being hoped
that Cortex-R toolchain might help here (Thanks Arnd). This is being
looked into.
multi_v7_defconfig was used & all platforms except TI OMAP/AM/DM/DRA &
Freescale i.MX family was deselected. ARM_MPU option was disabled as
Vladimir had given an early warning. DRAM_BASE was set to 0x80000000.
During the course of bringup, futex was causing issues, hence FUTEX was
removed. L1 & L2 caches were disabled in config. High vectors were
disabled & vectors were made to remap to base of RAM. An additional OMAP
specific change to avoid one ioremap was also required.
2/2th patch has been sticked with RFC label, as, though it works, it
might have to be made robust so as to not cause issue on other v7-A's
upon trying to do !MMU (this won't affect normal MMU boot), or
specifically where security extensions are not enabled. Also effect
of hypervisor extension also need to be considered. Please let know if
any better ways to handle this.
Boot logs at the end.
Afzal Mohammed (2):
ARM: nommu: allow enabling REMAP_VECTORS_TO_RAM
ARM: nommu: remap exception base address to RAM
arch/arm/Kconfig-nommu | 9 ++++-----
arch/arm/kernel/head-nommu.S | 6 ++++++
2 files changed, 10 insertions(+), 5 deletions(-)
[1] "[RFC v2 PATCH 00/23] Allow NOMMU for MULTIPLATFORM",
http://lists.infradead.org/pipermail/linux-arm-kernel/2016-November/470966.html
(git://linux-arm.org/linux-vm.git nommu-rfc-v2)
[2] Boot log
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.0-rc7-00026-g7a142ca8231b (afzal at debian) (gcc version 6.2.0 (GCC) ) #23 Sun Dec 11 14:59:57 IST 2016
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=00c50478
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt:Machine model: TI AM437x Industrial Development Kit
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] AM437x ES1.2 (sgx neon)
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260096
[ 0.000000] Kernel command line: console=ttyO0,115200n8 root=/dev/ram0 rw initrd=0x81800000,8M earlyprintk
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 1021276K/1048576K available (6558K kernel code, 523K rwdata, 2096K rodata, 444K init, 274K bss, 27300K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0x80000000 - 0x80001000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0x00000000 - 0xffffffff (4095 MB)
[ 0.000000] lowmem : 0x80000000 - 0xc0000000 (1024 MB)
[ 0.000000] modules : 0x80000000 - 0xc0000000 (1024 MB)
[ 0.000000] .text : 0x80008000 - 0x8066f948 (6559 kB)
[ 0.000000] .init : 0x8087d000 - 0x808ec000 ( 444 kB)
[ 0.000000] .data : 0x808ec000 - 0x8096ef60 ( 524 kB)
[ 0.000000] .bss : 0x8096ef60 - 0x809b3a9c ( 275 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:16 nr_irqs:16 16
[ 0.000000] OMAP clockevent source: timer1 at 32786 Hz
[ 0.000255] sched_clock: 64 bits at 500MHz, resolution 2ns, wraps every 4398046511103ns
[ 0.009514] clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0xe6a171a037, max_idle_ns: 881590485102 ns
[ 0.021986] Switching to timer-based delay loop, resolution 2ns
[ 0.140838] clocksource: 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
[ 0.151820] OMAP clocksource: 32k_counter at 32768 Hz
[ 0.230698] Console: colour dummy device 80x30
[ 0.236205] Calibrating delay loop (skipped), value calculated using timer frequency.. 1000.00 BogoMIPS (lpj=5000000)
[ 0.248268] pid_max: default: 32768 minimum: 301
[ 0.255822] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.263618] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.322900] devtmpfs: initialized
[ 0.936367] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
[ 0.952252] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.964401] pinctrl core: initialized pinctrl subsystem
[ 1.014271] NET: Registered protocol family 16
[ 2.116314] cpuidle: using governor menu
[ 2.185476] omap_l3_noc 44000000.ocp: L3 debug error: target 8 mod:0 (unclearable)
[ 2.195318] omap_l3_noc 44000000.ocp: L3 application error: target 8 mod:0 (unclearable)
[ 2.498901] OMAP GPIO hardware version 0.1
[ 2.880457] platform 53701000.des: Cannot lookup hwmod 'des'
[ 2.897229] platform 48310000.rng: Cannot lookup hwmod 'rng'
[ 3.042436] hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
[ 3.051608] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 3.067955] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[ 3.076481] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[ 4.002793] edma 49000000.edma: TI EDMA DMA engine driver
[ 4.028172] V3_3D: supplied by V24_0D
[ 4.042678] VDD_COREREG: supplied by V24_0D
[ 4.058179] VDD_CORE: supplied by VDD_COREREG
[ 4.073926] V1_8DREG: supplied by V24_0D
[ 4.089154] V1_8D: supplied by V1_8DREG
[ 4.104080] V1_5DREG: supplied by V24_0D
[ 4.119127] V1_5D: supplied by V1_5DREG
[ 4.273112] vgaarb: loaded
[ 4.310009] SCSI subsystem initialized
[ 4.328627] usbcore: registered new interface driver usbfs
[ 4.337597] usbcore: registered new interface driver hub
[ 4.345367] usbcore: registered new device driver usb
[ 4.366408] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp at 44000000/l4_wkup at 44c00000/scm at 210000/pinmux at 800/i2c0_pins_default, deferring probe
[ 4.382947] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp at 44000000/l4_wkup at 44c00000/scm at 210000/pinmux at 800/i2c2_pins_default, deferring probe
[ 4.403752] pps_core: LinuxPPS API ver. 1 registered
[ 4.409476] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 4.420441] PTP clock support registered
[ 4.432462] EDAC MC: Ver: 3.0.0
[ 4.493322] clocksource: Switched to clocksource arm_global_timer
[ 4.869692] NET: Registered protocol family 2
[ 4.898940] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[ 4.912636] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 4.925797] TCP: Hash tables configured (established 8192 bind 8192)
[ 4.935378] UDP hash table entries: 512 (order: 1, 8192 bytes)
[ 4.943318] UDP-Lite hash table entries: 512 (order: 1, 8192 bytes)
[ 4.954721] NET: Registered protocol family 1
[ 4.966327] RPC: Registered named UNIX socket transport module.
[ 4.973033] RPC: Registered udp transport module.
[ 4.978697] RPC: Registered tcp transport module.
[ 4.984370] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 5.001882] Trying to unpack rootfs image as initramfs...
[ 5.034070] rootfs image is not initramfs (no cpio magic); looks like an initrd
[ 6.359174] Freeing initrd memory: 8192K (81800000 - 82000000)
[ 6.453302] workingset: timestamp_bits=30 max_order=18 bucket_order=0
[ 6.910863] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 6.964046] NFS: Registering the id_resolver key type
[ 6.970315] Key type id_resolver registered
[ 6.975420] Key type id_legacy registered
[ 6.981225] ntfs: driver 2.1.32 [Flags: R/O].
[ 7.037313] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[ 7.045863] io scheduler noop registered
[ 7.050452] io scheduler deadline registered
[ 7.065425] io scheduler cfq registered (default)
[ 7.161373] pinctrl-single 44e10800.pinmux: 199 pins at pa 44e10800 size 796
[ 9.535089] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 9.644270] omap_uart 44e09000.serial: no wakeirq for uart0
[ 9.650936] omap_uart 44e09000.serial: No clock speed specified: using default: 48000000
[ 9.662676] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 29, base_baud = 3000000) is a OMAP UART0
[ 9.673897] console [ttyO0] enabled
[ 9.673897] console [ttyO0] enabled
[ 9.682034] bootconsole [earlycon0] disabled
[ 9.682034] bootconsole [earlycon0] disabled
[ 9.708232] STMicroelectronics ASC driver initialized
[ 9.754052] omap_rng 48310000.rng: _od_fail_runtime_resume: FIXME: missing hwmod/omap_dev info
[ 9.764695] omap_rng 48310000.rng: Failed to runtime_get device: -19
[ 9.772443] omap_rng 48310000.rng: initialization failed.
[ 10.195514] brd: module loaded
[ 10.422154] loop: module loaded
[ 10.591936] libphy: Fixed MDIO Bus: probed
[ 10.662542] CAN device driver interface
[ 10.737391] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 10.744646] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 10.754902] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[ 10.763205] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 10.973943] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[ 10.981436] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[ 10.999526] libphy: 4a101000.mdio: probed
[ 11.004917] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver Micrel KSZ9031 Gigabit PHY
[ 11.038793] cpsw 4a100000.ethernet: Detected MACID = c4:be:84:cc:f8:b2
[ 11.095184] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[ 11.106034] usbcore: registered new interface driver pegasus
[ 11.115479] usbcore: registered new interface driver asix
[ 11.124060] usbcore: registered new interface driver ax88179_178a
[ 11.133203] usbcore: registered new interface driver cdc_ether
[ 11.142987] usbcore: registered new interface driver smsc75xx
[ 11.152860] usbcore: registered new interface driver smsc95xx
[ 11.161841] usbcore: registered new interface driver net1080
[ 11.170867] usbcore: registered new interface driver cdc_subset
[ 11.180063] usbcore: registered new interface driver zaurus
[ 11.189712] usbcore: registered new interface driver cdc_ncm
[ 11.260711] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 11.268771] ehci-pci: EHCI PCI platform driver
[ 11.276303] ehci-platform: EHCI generic platform driver
[ 11.292469] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 11.300232] ohci-pci: OHCI PCI platform driver
[ 11.307765] ohci-platform: OHCI generic platform driver
[ 11.320423] ohci-omap3: OHCI OMAP3 driver
[ 11.361822] usbcore: registered new interface driver usb-storage
[ 11.436768] mousedev: PS/2 mouse device common for all mice
[ 11.483706] i2c /dev entries driver
[ 11.651196] sdhci: Secure Digital Host Controller Interface driver
[ 11.658834] sdhci: Copyright(c) Pierre Ossman
[ 11.682975] omap_hsmmc 48060000.mmc: Got CD GPIO
[ 11.760972] Synopsys Designware Multimedia Card Interface Driver
[ 11.790084] sdhci-pltfm: SDHCI platform and OF driver helper
[ 11.838871] ledtrig-cpu: registered to indicate activity on CPUs
[ 11.853073] usbcore: registered new interface driver usbhid
[ 11.860012] usbhid: USB HID core driver
[ 11.907366] NET: Registered protocol family 10
[ 11.958684] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 11.995847] NET: Registered protocol family 17
[ 12.001416] can: controller area network core (rev 20120528 abi 9)
[ 12.011131] NET: Registered protocol family 29
[ 12.016810] can: raw protocol (rev 20120528)
[ 12.022021] can: broadcast manager protocol (rev 20161123 t)
[ 12.029239] can: netlink gateway (rev 20130117) max_hops=1
[ 12.050005] Key type dns_resolver registered
[ 12.064564] omap_voltage_late_init: Voltage driver support not added
[ 12.077074] ThumbEE CPU extension supported.
[ 12.308431] mmc0: host does not support reading read-only switch, assuming write-enable
[ 12.321471] mmc0: new high speed SDHC card at address 0002
[ 12.345989] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 64 bytes/write
[ 12.368663] mmcblk0: mmc0:0002 00000 3.66 GiB
[ 12.394788] omap_i2c 44e0b000.i2c: bus 0 rev0.12 at 400 kHz
[ 12.421561] mmcblk0: p1 p2
[ 12.461994] omap_i2c 4819c000.i2c: bus 2 rev0.12 at 100 kHz
[ 12.492765] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ 12.507921] hctosys: unable to open rtc device (rtc0)
[ 12.538496] RAMDISK: gzip image found at block 0
[ 15.374579] EXT4-fs (ram0): couldn't mount as ext3 due to feature incompatibilities
[ 15.385965] EXT4-fs (ram0): mounting ext2 file system using the ext4 subsystem
[ 15.424025] EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
[ 15.432741] VFS: Mounted root (ext2 filesystem) on device 1:0.
[ 15.441488] devtmpfs: mounted
[ 15.480818] Freeing unused kernel memory: 444K (8087d000 - 808ec000)
[ 15.488676] This architecture does not have kernel memory protection.
[ 15.502853] Starting init: /sbin/init exists but couldn't execute it (error -8)
[ 15.515466] Starting init: /bin/sh exists but couldn't execute it (error -8)
[ 15.524269] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
[ 15.539836] CPU: 0 PID: 1 Comm: swapper Not tainted 4.9.0-rc7-00026-g7a142ca8231b #23
[ 15.549157] Hardware name: Generic AM43 (Flattened Device Tree)
[ 15.556400] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
--
2.11.0
^ permalink raw reply
* i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo
From: Fabio Estevam @ 2016-12-11 12:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAM=E1R7yT_TkzMNVHv3ZYud0w+A7t2x+MKU76ViKC7EVuT1+kg@mail.gmail.com>
Hi Magnus,
On Sun, Dec 11, 2016 at 10:51 AM, Magnus Lilja <lilja.magnus@gmail.com> wrote:
> Thanks for the info! Will send a patch later!
Thinking more about it we see that commit c93cc61475ebbe6 ("[media]
staging/media: remove deprecated mx3 driver") only appeared in 4.8, so
it is OK to remove mx31_3ds_reserve() now, but it will not fix the
kernel boot in the previous kernels.
Commit 1c2f87c22 ("ARM: 8025/1: Get rid of meminfo") is from kernel 3.16 though.
So it seems we need a proper fix for kernels 3.16-4.8.
Regards,
Fabio Estevam
^ permalink raw reply
* [PATCH 3/3] mm: make pagoff_t type 64-bit
From: Yury Norov @ 2016-12-11 12:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1481461003-14361-1-git-send-email-ynorov@caviumnetworks.com>
Also fix related interfaces
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
---
fs/btrfs/extent_io.c | 2 +-
fs/ext2/dir.c | 4 ++--
include/linux/mm.h | 9 +++++----
include/linux/radix-tree.h | 8 ++++----
include/linux/types.h | 2 +-
lib/radix-tree.c | 8 ++++----
mm/debug.c | 2 +-
mm/internal.h | 2 +-
mm/memory.c | 4 ++--
mm/mmap.c | 7 ++++---
mm/readahead.c | 4 ++--
mm/util.c | 3 ++-
12 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 8ed05d9..f4c9318 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3436,7 +3436,7 @@ static noinline_for_stack int __extent_writepage_io(struct inode *inode,
set_range_writeback(tree, cur, cur + iosize - 1);
if (!PageWriteback(page)) {
btrfs_err(BTRFS_I(inode)->root->fs_info,
- "page %lu not writeback, cur %llu end %llu",
+ "page %llu not writeback, cur %llu end %llu",
page->index, cur, end);
}
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
index d9650c9..c01b76e 100644
--- a/fs/ext2/dir.c
+++ b/fs/ext2/dir.c
@@ -174,7 +174,7 @@ static bool ext2_check_page(struct page *page, int quiet)
error = "inode out of bounds";
bad_entry:
if (!quiet)
- ext2_error(sb, __func__, "bad entry in directory #%lu: : %s - "
+ ext2_error(sb, __func__, "bad entry in directory #%llu: : %s - "
"offset=%lu, inode=%lu, rec_len=%d, name_len=%d",
dir->i_ino, error, (page->index<<PAGE_SHIFT)+offs,
(unsigned long) le32_to_cpu(p->inode),
@@ -184,7 +184,7 @@ static bool ext2_check_page(struct page *page, int quiet)
if (!quiet) {
p = (ext2_dirent *)(kaddr + offs);
ext2_error(sb, "ext2_check_page",
- "entry in directory #%lu spans the page boundary"
+ "entry in directory #%llu spans the page boundary"
"offset=%lu, inode=%lu",
dir->i_ino, (page->index<<PAGE_SHIFT)+offs,
(unsigned long) le32_to_cpu(p->inode));
diff --git a/include/linux/mm.h b/include/linux/mm.h
index a92c8d7..33d9150 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -2022,19 +2022,20 @@ extern int install_special_mapping(struct mm_struct *mm,
unsigned long addr, unsigned long len,
unsigned long flags, struct page **pages);
-extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
+extern unsigned long get_unmapped_area(struct file *, unsigned long,
+ unsigned long, pgoff_t, unsigned long);
extern unsigned long mmap_region(struct file *file, unsigned long addr,
- unsigned long len, vm_flags_t vm_flags, unsigned long pgoff);
+ unsigned long len, vm_flags_t vm_flags, pgoff_t pgoff);
extern unsigned long do_mmap(struct file *file, unsigned long addr,
unsigned long len, unsigned long prot, unsigned long flags,
- vm_flags_t vm_flags, unsigned long pgoff, unsigned long *populate);
+ vm_flags_t vm_flags, pgoff_t pgoff, unsigned long *populate);
extern int do_munmap(struct mm_struct *, unsigned long, size_t);
static inline unsigned long
do_mmap_pgoff(struct file *file, unsigned long addr,
unsigned long len, unsigned long prot, unsigned long flags,
- unsigned long pgoff, unsigned long *populate)
+ pgoff_t pgoff, unsigned long *populate)
{
return do_mmap(file, addr, len, prot, flags, 0, pgoff, populate);
}
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index af3581b..1781bb7 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -287,7 +287,7 @@ unsigned int radix_tree_gang_lookup(struct radix_tree_root *root,
void **results, unsigned long first_index,
unsigned int max_items);
unsigned int radix_tree_gang_lookup_slot(struct radix_tree_root *root,
- void ***results, unsigned long *indices,
+ void ***results, unsigned long long *indices,
unsigned long first_index, unsigned int max_items);
int radix_tree_preload(gfp_t gfp_mask);
int radix_tree_maybe_preload(gfp_t gfp_mask);
@@ -308,7 +308,7 @@ radix_tree_gang_lookup_tag_slot(struct radix_tree_root *root, void ***results,
unsigned long first_index, unsigned int max_items,
unsigned int tag);
unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root *root,
- unsigned long *first_indexp, unsigned long last_index,
+ unsigned long long *first_indexp, unsigned long last_index,
unsigned long nr_to_tag,
unsigned int fromtag, unsigned int totag);
int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag);
@@ -335,8 +335,8 @@ static inline void radix_tree_preload_end(void)
* radix tree tag.
*/
struct radix_tree_iter {
- unsigned long index;
- unsigned long next_index;
+ unsigned long long index;
+ unsigned long long next_index;
unsigned long tags;
#ifdef CONFIG_RADIX_TREE_MULTIORDER
unsigned int shift;
diff --git a/include/linux/types.h b/include/linux/types.h
index baf7183..1e711c1 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -137,7 +137,7 @@ typedef unsigned long blkcnt_t;
/*
* The type of an index into the pagecache.
*/
-#define pgoff_t unsigned long
+#define pgoff_t unsigned long long
/*
* A dma_addr_t can hold any valid DMA address, i.e., any address returned
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index 0d1d23e..afb49381 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -97,7 +97,7 @@ static inline unsigned long get_slot_offset(struct radix_tree_node *parent,
}
static unsigned int radix_tree_descend(struct radix_tree_node *parent,
- struct radix_tree_node **nodep, unsigned long index)
+ struct radix_tree_node **nodep, unsigned long long index)
{
unsigned int offset = (index >> parent->shift) & RADIX_TREE_MAP_MASK;
void **entry = rcu_dereference_raw(parent->slots[offset]);
@@ -1040,14 +1040,14 @@ EXPORT_SYMBOL(radix_tree_next_chunk);
* be prepared to handle that.
*/
unsigned long radix_tree_range_tag_if_tagged(struct radix_tree_root *root,
- unsigned long *first_indexp, unsigned long last_index,
+ unsigned long long *first_indexp, unsigned long last_index,
unsigned long nr_to_tag,
unsigned int iftag, unsigned int settag)
{
struct radix_tree_node *parent, *node, *child;
unsigned long maxindex;
unsigned long tagged = 0;
- unsigned long index = *first_indexp;
+ unsigned long long index = *first_indexp;
radix_tree_load_root(root, &child, &maxindex);
last_index = min(last_index, maxindex);
@@ -1195,7 +1195,7 @@ EXPORT_SYMBOL(radix_tree_gang_lookup);
*/
unsigned int
radix_tree_gang_lookup_slot(struct radix_tree_root *root,
- void ***results, unsigned long *indices,
+ void ***results, unsigned long long *indices,
unsigned long first_index, unsigned int max_items)
{
struct radix_tree_iter iter;
diff --git a/mm/debug.c b/mm/debug.c
index 9feb699..a568fc8 100644
--- a/mm/debug.c
+++ b/mm/debug.c
@@ -49,7 +49,7 @@ void __dump_page(struct page *page, const char *reason)
*/
int mapcount = PageSlab(page) ? 0 : page_mapcount(page);
- pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#lx",
+ pr_emerg("page:%p count:%d mapcount:%d mapping:%p index:%#llx",
page, page_ref_count(page), mapcount,
page->mapping, page_to_pgoff(page));
if (PageCompound(page))
diff --git a/mm/internal.h b/mm/internal.h
index 537ac99..8027eac 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -447,7 +447,7 @@ extern u32 hwpoison_filter_enable;
extern unsigned long __must_check vm_mmap_pgoff(struct file *, unsigned long,
unsigned long, unsigned long,
- unsigned long, unsigned long);
+ unsigned long, pgoff_t);
extern void set_pageblock_order(void);
unsigned long reclaim_clean_pages_from_list(struct zone *zone,
diff --git a/mm/memory.c b/mm/memory.c
index e18c57b..c05d534 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -688,7 +688,7 @@ static void print_bad_pte(struct vm_area_struct *vma, unsigned long addr,
(long long)pte_val(pte), (long long)pmd_val(*pmd));
if (page)
dump_page(page, "bad pte");
- pr_alert("addr:%p vm_flags:%08lx anon_vma:%p mapping:%p index:%lx\n",
+ pr_alert("addr:%p vm_flags:%08lx anon_vma:%p mapping:%p index:%llx\n",
(void *)addr, vma->vm_flags, vma->anon_vma, mapping, index);
/*
* Choose text because data symbols depend on CONFIG_KALLSYMS_ALL=y
@@ -3133,7 +3133,7 @@ static int do_fault_around(struct fault_env *fe, pgoff_t start_pgoff)
end_pgoff = start_pgoff -
((fe->address >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) +
PTRS_PER_PTE - 1;
- end_pgoff = min3(end_pgoff, vma_pages(fe->vma) + fe->vma->vm_pgoff - 1,
+ end_pgoff = min3(end_pgoff, (pgoff_t) vma_pages(fe->vma) + fe->vma->vm_pgoff - 1,
start_pgoff + nr_pages - 1);
if (pmd_none(*fe->pmd)) {
diff --git a/mm/mmap.c b/mm/mmap.c
index 6c6b95a..cf50232 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -9,6 +9,7 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/kernel.h>
+#include <linux/types.h>
#include <linux/slab.h>
#include <linux/backing-dev.h>
#include <linux/mm.h>
@@ -1304,7 +1305,7 @@ static inline int mlock_future_check(struct mm_struct *mm,
unsigned long do_mmap(struct file *file, unsigned long addr,
unsigned long len, unsigned long prot,
unsigned long flags, vm_flags_t vm_flags,
- unsigned long pgoff, unsigned long *populate)
+ pgoff_t pgoff, unsigned long *populate)
{
struct mm_struct *mm = current->mm;
int pkey = 0;
@@ -1624,7 +1625,7 @@ static inline int accountable_mapping(struct file *file, vm_flags_t vm_flags)
}
unsigned long mmap_region(struct file *file, unsigned long addr,
- unsigned long len, vm_flags_t vm_flags, unsigned long pgoff)
+ unsigned long len, vm_flags_t vm_flags, pgoff_t pgoff)
{
struct mm_struct *mm = current->mm;
struct vm_area_struct *vma, *prev;
@@ -2088,7 +2089,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
unsigned long
get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
- unsigned long pgoff, unsigned long flags)
+ pgoff_t pgoff, unsigned long flags)
{
unsigned long (*get_area)(struct file *, unsigned long,
unsigned long, unsigned long, unsigned long);
diff --git a/mm/readahead.c b/mm/readahead.c
index c8a955b..902bad8 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -332,8 +332,8 @@ static pgoff_t count_history_pages(struct address_space *mapping,
static int try_context_readahead(struct address_space *mapping,
struct file_ra_state *ra,
pgoff_t offset,
- unsigned long req_size,
- unsigned long max)
+ unsigned long long req_size,
+ unsigned long long max)
{
pgoff_t size;
diff --git a/mm/util.c b/mm/util.c
index 1a41553..51fae99 100644
--- a/mm/util.c
+++ b/mm/util.c
@@ -2,6 +2,7 @@
#include <linux/slab.h>
#include <linux/string.h>
#include <linux/compiler.h>
+#include <linux/types.h>
#include <linux/export.h>
#include <linux/err.h>
#include <linux/sched.h>
@@ -292,7 +293,7 @@ EXPORT_SYMBOL_GPL(get_user_pages_fast);
unsigned long vm_mmap_pgoff(struct file *file, unsigned long addr,
unsigned long len, unsigned long prot,
- unsigned long flag, unsigned long pgoff)
+ unsigned long flag, pgoff_t pgoff)
{
unsigned long ret;
struct mm_struct *mm = current->mm;
--
2.7.4
^ permalink raw reply related
* [PATCH 2/3] sys_mmap64()
From: Yury Norov @ 2016-12-11 12:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1481461003-14361-1-git-send-email-ynorov@caviumnetworks.com>
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
---
include/linux/syscalls.h | 3 +++
include/uapi/asm-generic/unistd.h | 4 +++-
mm/mmap.c | 25 +++++++++++++++++++++++++
3 files changed, 31 insertions(+), 1 deletion(-)
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 91a740f..869ca76 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -857,6 +857,9 @@ asmlinkage long sys_perf_event_open(
asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
unsigned long fd, unsigned long pgoff);
+asmlinkage long sys_mmap64(unsigned long addr, unsigned long len,
+ unsigned long prot, unsigned long flags,
+ unsigned long fd, unsigned long long *offset);
asmlinkage long sys_old_mmap(struct mmap_arg_struct __user *arg);
asmlinkage long sys_name_to_handle_at(int dfd, const char __user *name,
struct file_handle __user *handle,
diff --git a/include/uapi/asm-generic/unistd.h b/include/uapi/asm-generic/unistd.h
index d65e232..f9ca919 100644
--- a/include/uapi/asm-generic/unistd.h
+++ b/include/uapi/asm-generic/unistd.h
@@ -734,9 +734,11 @@ __SYSCALL(__NR_pkey_mprotect, sys_pkey_mprotect)
__SYSCALL(__NR_pkey_alloc, sys_pkey_alloc)
#define __NR_pkey_free 290
__SYSCALL(__NR_pkey_free, sys_pkey_free)
+#define __NR_mmap64 291
+__SYSCALL(__NR_mmap64, sys_mmap64)
#undef __NR_syscalls
-#define __NR_syscalls 291
+#define __NR_syscalls 292
/*
* All syscalls below here should go away really,
diff --git a/mm/mmap.c b/mm/mmap.c
index fc1c943..6c6b95a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1504,6 +1504,31 @@ static int mmap_pgoff_prepare(struct file **f, unsigned long *l,
return 0;
}
+SYSCALL_DEFINE6(mmap64, unsigned long, addr, unsigned long, len,
+ unsigned long, prot, unsigned long, flags,
+ unsigned long, fd, unsigned long long __user *, offset)
+{
+ int err;
+ unsigned long long koffset;
+ unsigned long retval;
+ struct file *file = NULL;
+
+ if (copy_from_user(&koffset, offset, sizeof(koffset)))
+ return -EFAULT;
+ if (offset_in_page(koffset))
+ return -EINVAL;
+
+ err = mmap_pgoff_prepare(&file, &len, &flags, fd);
+ if (err)
+ return err;
+
+ retval = vm_mmap_pgoff(file, addr, len, prot,
+ flags, koffset >> PAGE_SHIFT);
+ if (file)
+ fput(file);
+ return retval;
+}
+
SYSCALL_DEFINE6(mmap_pgoff, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags,
unsigned long, fd, unsigned long, pgoff)
--
2.7.4
^ permalink raw reply related
* [PATCH 1/3] mm: move argument checkers of mmap_pgoff() to separated routine
From: Yury Norov @ 2016-12-11 12:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1481461003-14361-1-git-send-email-ynorov@caviumnetworks.com>
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
---
mm/mmap.c | 34 +++++++++++++++++++++++++---------
1 file changed, 25 insertions(+), 9 deletions(-)
diff --git a/mm/mmap.c b/mm/mmap.c
index 1af87c1..fc1c943 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1455,12 +1455,12 @@ unsigned long do_mmap(struct file *file, unsigned long addr,
return addr;
}
-SYSCALL_DEFINE6(mmap_pgoff, unsigned long, addr, unsigned long, len,
- unsigned long, prot, unsigned long, flags,
- unsigned long, fd, unsigned long, pgoff)
+static int mmap_pgoff_prepare(struct file **f, unsigned long *l,
+ unsigned long *fl, unsigned long fd)
{
- struct file *file = NULL;
- unsigned long retval;
+ struct file *file = *f;
+ unsigned long flags = *fl;
+ unsigned long len = *l;
if (!(flags & MAP_ANONYMOUS)) {
audit_mmap_fd(fd, flags);
@@ -1469,9 +1469,10 @@ SYSCALL_DEFINE6(mmap_pgoff, unsigned long, addr, unsigned long, len,
return -EBADF;
if (is_file_hugepages(file))
len = ALIGN(len, huge_page_size(hstate_file(file)));
- retval = -EINVAL;
- if (unlikely(flags & MAP_HUGETLB && !is_file_hugepages(file)))
- goto out_fput;
+ if (unlikely(flags & MAP_HUGETLB && !is_file_hugepages(file))) {
+ fput(file);
+ return -EINVAL;
+ }
} else if (flags & MAP_HUGETLB) {
struct user_struct *user = NULL;
struct hstate *hs;
@@ -1497,8 +1498,23 @@ SYSCALL_DEFINE6(mmap_pgoff, unsigned long, addr, unsigned long, len,
flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
+ *f = file;
+ *l = len;
+ *fl = flags;
+ return 0;
+}
+
+SYSCALL_DEFINE6(mmap_pgoff, unsigned long, addr, unsigned long, len,
+ unsigned long, prot, unsigned long, flags,
+ unsigned long, fd, unsigned long, pgoff)
+{
+ struct file *file = NULL;
+ unsigned long retval;
+ int err = mmap_pgoff_prepare(&file, &len, &flags, fd);
+ if (err)
+ return err;
+
retval = vm_mmap_pgoff(file, addr, len, prot, flags, pgoff);
-out_fput:
if (file)
fput(file);
return retval;
--
2.7.4
^ permalink raw reply related
* [Question] New mmap64 syscall?
From: Yury Norov @ 2016-12-11 12:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161210092130.GA19309@xo-6d-61-c0.localdomain>
This is the draft of sys_mmap64() support in the kernel. For 64-bit
kernels everything is simple. For 32-bit kernels we have a problem.
pgoff_t is declared as unsigned long, and should be turned to
unsigned long long. It affects the number of structures and interfaces.
Last patch does the change. It should be wide-tested on 32-bit kernels
whith I didn't do. Arm64 kernel is working with this patchset, and I don't
expect difficulties there.
Yury Norov (3):
mm: move argument checkers of mmap_pgoff() to separated routine
sys_mmap64()
mm: turn page offset types to 64-bit
fs/btrfs/extent_io.c | 2 +-
fs/ext2/dir.c | 4 +--
include/linux/mm.h | 9 +++---
include/linux/radix-tree.h | 8 ++---
include/linux/syscalls.h | 3 ++
include/linux/types.h | 2 +-
include/uapi/asm-generic/unistd.h | 4 ++-
lib/radix-tree.c | 8 ++---
mm/debug.c | 2 +-
mm/internal.h | 2 +-
mm/memory.c | 4 +--
mm/mmap.c | 66 ++++++++++++++++++++++++++++++++-------
mm/readahead.c | 4 +--
mm/util.c | 3 +-
14 files changed, 85 insertions(+), 36 deletions(-)
--
2.7.4
^ permalink raw reply
* i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo
From: Magnus Lilja @ 2016-12-11 12:51 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAOMZO5ChFGrOfgnmaCxw=KwB7ZSp=ZOsmKb_v12_ti48U1NwgA@mail.gmail.com>
Fabio,
On 11 December 2016 at 13:36, Fabio Estevam <festevam@gmail.com> wrote:
> Hi Magnus,
>
> On Sun, Dec 11, 2016 at 8:34 AM, Magnus Lilja <lilja.magnus@gmail.com> wrote:
>> Hi,
>>
>> I'm trying to get current modern Linux kernels to boot on the i.MX31 PDK
>> board (a.k.a MX31_3DS).
>>
>> One problem I've noticed is that I have to comment out the following code
>> from mach-mx31_3ds.c, the reserve function is registered as
>> mach_desc->reserve . If I leave this function as is the kernel stops very
>> early in the boot (see end of the mail).
>>
>> static void __init mx31_3ds_reserve(void)
>> {
>> /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
>> mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE,
>> MX31_3DS_CAMERA_BUF_SIZE);
>> }
>
> The mx31_3ds_reserve() was used for reserving the buffer for the old
> mx3_camera driver.
>
> The mx3_camera driver has been removed since c93cc61475ebbe6 ("[media]
> staging/media: remove deprecated mx3 driver"), so I would suggest you
> to send a patch that just removes mx31_3ds_reserve().
Thanks for the info! Will send a patch later!
Regards, Magnus
^ permalink raw reply
* i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo
From: Fabio Estevam @ 2016-12-11 12:36 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <27bbaa4c-7c8d-cf76-c98f-e8edc89367db@gmail.com>
Hi Magnus,
On Sun, Dec 11, 2016 at 8:34 AM, Magnus Lilja <lilja.magnus@gmail.com> wrote:
> Hi,
>
> I'm trying to get current modern Linux kernels to boot on the i.MX31 PDK
> board (a.k.a MX31_3DS).
>
> One problem I've noticed is that I have to comment out the following code
> from mach-mx31_3ds.c, the reserve function is registered as
> mach_desc->reserve . If I leave this function as is the kernel stops very
> early in the boot (see end of the mail).
>
> static void __init mx31_3ds_reserve(void)
> {
> /* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
> mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE,
> MX31_3DS_CAMERA_BUF_SIZE);
> }
The mx31_3ds_reserve() was used for reserving the buffer for the old
mx3_camera driver.
The mx3_camera driver has been removed since c93cc61475ebbe6 ("[media]
staging/media: remove deprecated mx3 driver"), so I would suggest you
to send a patch that just removes mx31_3ds_reserve().
Thanks
^ permalink raw reply
* [PATCH v1] watchdog: imx2: fix hang-up on boot for i.MX21, i.MX27 and i.MX31 SoCs
From: Uwe Kleine-König @ 2016-12-11 12:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <2fc2558d-fe05-14a7-745e-f71d2178bad6@mleia.com>
On Sun, Dec 11, 2016 at 01:21:16PM +0200, Vladimir Zapolskiy wrote:
> On 12/11/2016 12:26 PM, Uwe Kleine-K?nig wrote:
> > . With the change to the driver it's like using the watchdog driver in
> > it's pre-5fe65ce7ccbb4-state on it. If this is bad, we must indeed make
> > fsl,imx53-wdt known to the driver. If not, just adding a single new
> > compatible to the driver is just fine.
<sarcasm>You can also add "marvell,armada-xp-wdt" to the end of the
list. If your kernel is configured correctly still the right thing will
happen.</sarcasm>
> The change under discussion preserves the current runtime behaviour for
> i.MX53 and its friends, the watchdog power down counter in WMCR is
> disabled on boot (you may want to confirm it by testing though), another
> question is if it is wanted for e.g. i.MX53 right from the beginning.
>
> To keep the runtime compatibility of a newer kernel with old DTBs such
> a long list of device compatibles has to be inserted.
>
> >
> > If you want to call it imx25 or imx35 doesn't matter much. The reason I
> > picked imx35 is that this one was already picked before for cspi. This
> > suggests that i.MX35 is older than i.MX25 and so this is the canonical
> > choice.
>
> Accepted, from the Wikipedia both i.MX25 and i.MX35 are released in 2009,
> which one is the first I don't know for sure, I supposed it could be
> i.MX25 as a SoC with a weaker core.
>
> >
> >> $ grep -H 'fsl,imx.*-wdt' arch/arm/boot/dts/*.dtsi
> >> arch/arm/boot/dts/imx25.dtsi: compatible = "fsl,imx25-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx27.dtsi: compatible = "fsl,imx27-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx35.dtsi: compatible = "fsl,imx35-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx50.dtsi: compatible = "fsl,imx50-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx51.dtsi: compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx51.dtsi: compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx53.dtsi: compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx53.dtsi: compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx6qdl.dtsi: compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx6qdl.dtsi: compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx6sl.dtsi: compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx6sl.dtsi: compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx6ul.dtsi: compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx6ul.dtsi: compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
> >> arch/arm/boot/dts/ls1021a.dtsi: compatible = "fsl,imx21-wdt";
> >> arch/arm/boot/dts/vfxxx.dtsi: compatible = "fsl,vf610-wdt", "fsl,imx21-wdt";
> >>
> >> I don't see a confirmation of the fact that "fsl,imx35-wdt" is the best
> >> selection, hence definitely "fsl,imx25-wdt" overscores it.
> >
> > I stated my reason to pick imx35 over imx25 above. Why do yo prefer
> > imx25?
>
> As you said right now and until it is added into DTS files "fsl,imx25-wdt" and
> "fsl,imx35-wdt" are equal as a compatible representation of WMCR-aware watchdogs.
>
> I may be wrong, if I assume that i.MX25 is released before i.MX35 (looks like
> they are released in parallel), but "imx25" precedes in alphanumerically sorted
> list of SoC names.
I'm sure Shawn could say something here, but I would be surprised if the
i.MX25 came first.
> >>> A reason to add e.g. fsl,imx6sl-wdt is that dtbs in the wild use
> >>>
> >>> "fsl,imx6sl-wdt", "fsl,imx21-wdt"
> >>>
> >>> . But then I wonder if
> >>>
> >>> 5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
> >>>
> >>> is that important to justify to add these all.
> >>
> >> About this comment I don't know, you may have better insight about the original
> >> change. By the way, in barebox you may want to fix the same hang-up, because
> >> you touch WMCR unconditionally.
> >
> > Sure.
> >
> >>> Independant of this I'd like to have all dtsi for the newer SoCs changed
> >>> to get
> >>>
> >>> "fsl,imx6sl-wdt", "fsl,imx35-wdt"
> >>>
> >>> and if you really want to add all these compatibles, add a comment that
> >>> these are really fsl,imx35-wdt and were added to work around broken
> >>> dtbs.
> >>
> >> No objections, but
> >>
> >> 1) I'd like to see "fsl,imx25-wdt" as a new common compatible, and that's
> >> what have been proposed and shared in RFC 2/2.
> >
> > Yeah, I missed that other patch (which was not part of this series).
> >
> >> 2) Please remind me, why do you ask to drop "fsl,imx21-wdt" from the list?
> >>
> >> compatible = "fsl,imx6sx-wdt", "fsl,imx25-wdt", "fsl,imx21-wdt";
> >>
> >> The list of compatibles above is valid (from the most specific on the left
> >> to the most generic on the right), and that compatible property is rightly
> >> handled in the driver with this change applied. I don't see a need to
> >> drop "fsl,imx21-wdt".
> >
> > If the wdt in the i.MX6SX can be operated by the watchdog driver in it's
> > imx21 mode, you should keep the imx21 entry. If not, you shouldn't.
>
> The DTS description shall be rather independent from any particular software
> implementation, someone may want to reuse the same DTB in bootloaders and OS
> kernels of different versions.
Full ack.
> Assuming that I have a bootloader/kernel with a pure i.MX21 watchdog
> driver and run it on i.MX6SX, I'd prefer to match
> "fsl,imx21-wdt" compatible.
I'd prefer to notice that the i.MX6SX has a (maybe only slightly)
different watchdog and so the i.MX21 aware driver should not bind to the
i.MX6SX hardware. So (as you said above) the compatible should be
independent from already existing i.MX21 wdt support in a driver.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* ILP32 for ARM64 - testing with lmbench
From: Yury Norov @ 2016-12-11 12:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161205141312.GC14429@e104818-lin.cambridge.arm.com>
On Mon, Dec 05, 2016 at 02:13:12PM +0000, Catalin Marinas wrote:
> On Mon, Dec 05, 2016 at 06:16:09PM +0800, Zhangjian (Bamvor) wrote:
> > Do you have suggestion of next move of upstreaming ILP32?
>
> I mentioned the steps a few time before. I'm pasting them again here:
>
> 1. Complete the review of the Linux patches and ABI (no merge yet)
> 2. Review the corresponding glibc patches (no merge yet)
> 3. Ask (Linaro, Cavium) for toolchain + filesystem (pre-built and more
> than just busybox) to be able to reproduce the testing in ARM
> 4. More testing (LTP, trinity, performance regressions etc.)
> 5. Move the ILP32 PCS out of beta (based on the results from 4)
> 6. Check the market again to see if anyone still needs ILP32
> 7. Based on 6, decide whether to merge the kernel and glibc patches
>
> What's not explicitly mentioned in step 4 is glibc testing. Point 5 is
> ARM's responsibility (toolchain folk).
>
> > There are already the test results of lmbench and specint. Do you they
> > are ok or need more data to prove no regression?
>
> I would need to reproduce the tests myself, see step 3.
Hi Catalin,
> 3. Ask (Linaro, Cavium) for toolchain + filesystem (pre-built and more
> than just busybox) to be able to reproduce the testing in ARM
This is the Andrew's toolchain I use to build kernel, GLIBC, binutils etc:
https://drive.google.com/open?id=0B93nHerV55yNVlVKaXpOOHQtbW8
It's not the latest build but it works well to me.
This archive contains 4.9-rc8 kernel, initrd, sys-root, qemu image based on
ilp32 busybox.
https://drive.google.com/open?id=0B93nHerV55yNbVo0bko0bWlQeFE
I can start linux on qemu and run basic commands and tests in ilp32
mode. This is my first attempt to create rootfs, and this is very basic
busybox + sys-root. But it lets me start lp64 and ilp32 apps (find
example there). If you need something more, let me know and I'll add
it. You can also use any professional distro with this ilp32-enabled
kernel, just copy sys-root there (like I actually do - I run Ubuntu
14 daily).
BTW. This is of course good idea to build and test ilp32 user
environment, but in real life I think ilp32 apps will work in lp64
userspace.
> 4. More testing (LTP, trinity, performance regressions etc.)
I also built and ran trinity. After ~24 hours I found all trinity
threads stalled for lp64, and after another 24 hours I found it
running but slower for ilp32. Kernel was alive in both cases.
Yury.
^ permalink raw reply
* [PATCH v1] watchdog: imx2: fix hang-up on boot for i.MX21, i.MX27 and i.MX31 SoCs
From: Vladimir Zapolskiy @ 2016-12-11 11:21 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161211102634.jn3awmlzdrm3pqai@pengutronix.de>
On 12/11/2016 12:26 PM, Uwe Kleine-K?nig wrote:
> Hello Vladimir,
>
> On Sun, Dec 11, 2016 at 12:01:08PM +0200, Vladimir Zapolskiy wrote:
>> On 12/11/2016 11:35 AM, Uwe Kleine-K?nig wrote:
>>> On Sun, Dec 11, 2016 at 03:06:48AM +0200, Vladimir Zapolskiy wrote:
>>>> Power down counter enable/disable bit switch is located in WMCR
>>>> register, but watchdog controllers found on legacy i.MX21, i.MX27 and
>>>> i.MX31 SoCs don't have this register. As a result of writing data to
>>>> the non-existing register on driver probe the SoC hangs up, to fix the
>>>> problem add more OF compatible strings and on this basis get
>>>> information about availability of the WMCR register.
>>>>
>>>> Fixes: 5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
>>>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
>>>> ---
>>
>> [snip]
>>
>>>>
>>>> static const struct of_device_id imx2_wdt_dt_ids[] = {
>>>> - { .compatible = "fsl,imx21-wdt", },
>>>> + { .compatible = "fsl,imx21-wdt", .data = IMX2_WDT_NO_WMCR },
>>>> + { .compatible = "fsl,imx25-wdt", },
>>>> + { .compatible = "fsl,imx27-wdt", .data = IMX2_WDT_NO_WMCR },
>>>> + { .compatible = "fsl,imx31-wdt", .data = IMX2_WDT_NO_WMCR },
>>>> + { .compatible = "fsl,imx35-wdt", },
>>>> + { .compatible = "fsl,imx50-wdt", },
>>>> + { .compatible = "fsl,imx51-wdt", },
>>>> + { .compatible = "fsl,imx53-wdt", },
>>>> + { .compatible = "fsl,imx6q-wdt", },
>>>> + { .compatible = "fsl,imx6sl-wdt", },
>>>> + { .compatible = "fsl,imx6sx-wdt", },
>>>> + { .compatible = "fsl,imx6ul-wdt", },
>>>> + { .compatible = "fsl,imx7d-wdt", },
>>>> + { .compatible = "fsl,vf610-wdt", },
>>>
>>> Up to now we only had fsl,imx21-wdt, now it seems that iMX31, i.MX27 and
>>> i.MX21 form a group of equal watchdog IPs and the others form another
>>> group, right?
>>>
>>> So conceptually we should differenciate between
>>>
>>> fsl,imx21-wdt (which is used on i.MX21, i.MX27 and i.MX31)
>>> fsl,imx35-wdt (which is used on all others)
>>>
>>
>> The problem is that "fsl,imx35-wdt" is not used on all others in the
>> existing DTS, i.e. in the old firmware, which shall be compatible with
>> new changes.
>
> So old i.MX53 has
>
> compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
>
> . With the change to the driver it's like using the watchdog driver in
> it's pre-5fe65ce7ccbb4-state on it. If this is bad, we must indeed make
> fsl,imx53-wdt known to the driver. If not, just adding a single new
> compatible to the driver is just fine.
The change under discussion preserves the current runtime behaviour for
i.MX53 and its friends, the watchdog power down counter in WMCR is
disabled on boot (you may want to confirm it by testing though), another
question is if it is wanted for e.g. i.MX53 right from the beginning.
To keep the runtime compatibility of a newer kernel with old DTBs such
a long list of device compatibles has to be inserted.
>
> If you want to call it imx25 or imx35 doesn't matter much. The reason I
> picked imx35 is that this one was already picked before for cspi. This
> suggests that i.MX35 is older than i.MX25 and so this is the canonical
> choice.
Accepted, from the Wikipedia both i.MX25 and i.MX35 are released in 2009,
which one is the first I don't know for sure, I supposed it could be
i.MX25 as a SoC with a weaker core.
>
>> $ grep -H 'fsl,imx.*-wdt' arch/arm/boot/dts/*.dtsi
>> arch/arm/boot/dts/imx25.dtsi: compatible = "fsl,imx25-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx27.dtsi: compatible = "fsl,imx27-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx35.dtsi: compatible = "fsl,imx35-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx50.dtsi: compatible = "fsl,imx50-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx51.dtsi: compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx51.dtsi: compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx53.dtsi: compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx53.dtsi: compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx6qdl.dtsi: compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx6qdl.dtsi: compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx6sl.dtsi: compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx6sl.dtsi: compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx6ul.dtsi: compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx6ul.dtsi: compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
>> arch/arm/boot/dts/ls1021a.dtsi: compatible = "fsl,imx21-wdt";
>> arch/arm/boot/dts/vfxxx.dtsi: compatible = "fsl,vf610-wdt", "fsl,imx21-wdt";
>>
>> I don't see a confirmation of the fact that "fsl,imx35-wdt" is the best
>> selection, hence definitely "fsl,imx25-wdt" overscores it.
>
> I stated my reason to pick imx35 over imx25 above. Why do yo prefer
> imx25?
As you said right now and until it is added into DTS files "fsl,imx25-wdt" and
"fsl,imx35-wdt" are equal as a compatible representation of WMCR-aware watchdogs.
I may be wrong, if I assume that i.MX25 is released before i.MX35 (looks like
they are released in parallel), but "imx25" precedes in alphanumerically sorted
list of SoC names.
>>> A reason to add e.g. fsl,imx6sl-wdt is that dtbs in the wild use
>>>
>>> "fsl,imx6sl-wdt", "fsl,imx21-wdt"
>>>
>>> . But then I wonder if
>>>
>>> 5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
>>>
>>> is that important to justify to add these all.
>>
>> About this comment I don't know, you may have better insight about the original
>> change. By the way, in barebox you may want to fix the same hang-up, because
>> you touch WMCR unconditionally.
>
> Sure.
>
>>> Independant of this I'd like to have all dtsi for the newer SoCs changed
>>> to get
>>>
>>> "fsl,imx6sl-wdt", "fsl,imx35-wdt"
>>>
>>> and if you really want to add all these compatibles, add a comment that
>>> these are really fsl,imx35-wdt and were added to work around broken
>>> dtbs.
>>
>> No objections, but
>>
>> 1) I'd like to see "fsl,imx25-wdt" as a new common compatible, and that's
>> what have been proposed and shared in RFC 2/2.
>
> Yeah, I missed that other patch (which was not part of this series).
>
>> 2) Please remind me, why do you ask to drop "fsl,imx21-wdt" from the list?
>>
>> compatible = "fsl,imx6sx-wdt", "fsl,imx25-wdt", "fsl,imx21-wdt";
>>
>> The list of compatibles above is valid (from the most specific on the left
>> to the most generic on the right), and that compatible property is rightly
>> handled in the driver with this change applied. I don't see a need to
>> drop "fsl,imx21-wdt".
>
> If the wdt in the i.MX6SX can be operated by the watchdog driver in it's
> imx21 mode, you should keep the imx21 entry. If not, you shouldn't.
The DTS description shall be rather independent from any particular software
implementation, someone may want to reuse the same DTB in bootloaders and OS
kernels of different versions. Assuming that I have a bootloader/kernel
with a pure i.MX21 watchdog driver and run it on i.MX6SX, I'd prefer to match
"fsl,imx21-wdt" compatible.
--
With best wishes,
Vladimir
^ permalink raw reply
* i.MX31 3DS board not booting after commit 1c2f87c22... ARM: 8025/1: Get rid of meminfo
From: Magnus Lilja @ 2016-12-11 10:34 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
I'm trying to get current modern Linux kernels to boot on the i.MX31 PDK
board (a.k.a MX31_3DS).
One problem I've noticed is that I have to comment out the following
code from mach-mx31_3ds.c, the reserve function is registered as
mach_desc->reserve . If I leave this function as is the kernel stops
very early in the boot (see end of the mail).
static void __init mx31_3ds_reserve(void)
{
/* reserve MX31_3DS_CAMERA_BUF_SIZE bytes for mx3-camera */
mx3_camera_base = arm_memblock_steal(MX31_3DS_CAMERA_BUF_SIZE,
MX31_3DS_CAMERA_BUF_SIZE);
}
The commits that causes this problem (according to git bisect) is:
[1c2f87c22566cd057bc8cde10c37ae9da1a1bb76] ARM: 8025/1: Get rid of meminfo
(Yes, it's been a while since I last tried to boot a modern kernel on
this board)
I'm using the imx_v6_v7_defconfig.
Kernel boot log using earlyprintk. (the arm_memblock_init NNN lines are
my added printk's)
Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.0-rc7-dirty (lilja at xubuntu-14-04) (gcc
version 4. 8.3 20140320 (prerelease) (Sourcery CodeBench Lite
2014.05-29) ) #150 SMP Sun Dec 11 11:12:32 CET 2016
[ 0.000000] CPU: ARMv6-compatible processor [4107b364] revision 4
(ARMv6TEJ), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing
instruction cache
[ 0.000000] Machine: Freescale MX31PDK (3DS)
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] arm_memblock_init 268
[ 0.000000] arm_memblock_init 273
[ 0.000000] arm_memblock_init 277
[ 0.000000] cma: Reserved 16 MiB at 0x86800000
[ 0.000000] arm_memblock_init 281
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] percpu: Embedded 14 pages/cpu @c64f0000 s26688 r8192
d22464 u57344
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on.
Total pages: 30464
[ 0.000000] Kernel command line: console=ttymxc0,115200 earlyprintk
[ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536
bytes)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
This is where boot stops. If I comment out the arm_memblock_steal() call
from mx31_3ds_reserve() the boot works and the next couple of lines are:
[ 0.000000] Memory: 92564K/131072K available (8192K kernel code, 360K
rwdata, 2 280K rodata, 1024K init, 8218K bss, 22124K reserved, 16384K
cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc8800000 - 0xff800000 ( 880 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB)
[ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
[ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0900000 (9184 kB)
[ 0.000000] .init : 0xc0c00000 - 0xc0d00000 (1024 kB)
[ 0.000000] .data : 0xc0d00000 - 0xc0d5a120 ( 361 kB
I have really no clue why that commit causes problems. There are not a
lot of boards using mach_desc->reserve .
Any ideas on how to fix or debug this?
Regards, Magnus
^ permalink raw reply
* [PATCH v1] watchdog: imx2: fix hang-up on boot for i.MX21, i.MX27 and i.MX31 SoCs
From: Uwe Kleine-König @ 2016-12-11 10:26 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <d6d987f1-3461-214a-0ca1-16d310ddd370@mleia.com>
Hello Vladimir,
On Sun, Dec 11, 2016 at 12:01:08PM +0200, Vladimir Zapolskiy wrote:
> On 12/11/2016 11:35 AM, Uwe Kleine-K?nig wrote:
> > On Sun, Dec 11, 2016 at 03:06:48AM +0200, Vladimir Zapolskiy wrote:
> >> Power down counter enable/disable bit switch is located in WMCR
> >> register, but watchdog controllers found on legacy i.MX21, i.MX27 and
> >> i.MX31 SoCs don't have this register. As a result of writing data to
> >> the non-existing register on driver probe the SoC hangs up, to fix the
> >> problem add more OF compatible strings and on this basis get
> >> information about availability of the WMCR register.
> >>
> >> Fixes: 5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
> >> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> >> ---
>
> [snip]
>
> >>
> >> static const struct of_device_id imx2_wdt_dt_ids[] = {
> >> - { .compatible = "fsl,imx21-wdt", },
> >> + { .compatible = "fsl,imx21-wdt", .data = IMX2_WDT_NO_WMCR },
> >> + { .compatible = "fsl,imx25-wdt", },
> >> + { .compatible = "fsl,imx27-wdt", .data = IMX2_WDT_NO_WMCR },
> >> + { .compatible = "fsl,imx31-wdt", .data = IMX2_WDT_NO_WMCR },
> >> + { .compatible = "fsl,imx35-wdt", },
> >> + { .compatible = "fsl,imx50-wdt", },
> >> + { .compatible = "fsl,imx51-wdt", },
> >> + { .compatible = "fsl,imx53-wdt", },
> >> + { .compatible = "fsl,imx6q-wdt", },
> >> + { .compatible = "fsl,imx6sl-wdt", },
> >> + { .compatible = "fsl,imx6sx-wdt", },
> >> + { .compatible = "fsl,imx6ul-wdt", },
> >> + { .compatible = "fsl,imx7d-wdt", },
> >> + { .compatible = "fsl,vf610-wdt", },
> >
> > Up to now we only had fsl,imx21-wdt, now it seems that iMX31, i.MX27 and
> > i.MX21 form a group of equal watchdog IPs and the others form another
> > group, right?
> >
> > So conceptually we should differenciate between
> >
> > fsl,imx21-wdt (which is used on i.MX21, i.MX27 and i.MX31)
> > fsl,imx35-wdt (which is used on all others)
> >
>
> The problem is that "fsl,imx35-wdt" is not used on all others in the
> existing DTS, i.e. in the old firmware, which shall be compatible with
> new changes.
So old i.MX53 has
compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
. With the change to the driver it's like using the watchdog driver in
it's pre-5fe65ce7ccbb4-state on it. If this is bad, we must indeed make
fsl,imx53-wdt known to the driver. If not, just adding a single new
compatible to the driver is just fine.
If you want to call it imx25 or imx35 doesn't matter much. The reason I
picked imx35 is that this one was already picked before for cspi. This
suggests that i.MX35 is older than i.MX25 and so this is the canonical
choice.
> $ grep -H 'fsl,imx.*-wdt' arch/arm/boot/dts/*.dtsi
> arch/arm/boot/dts/imx25.dtsi: compatible = "fsl,imx25-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx27.dtsi: compatible = "fsl,imx27-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx35.dtsi: compatible = "fsl,imx35-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx50.dtsi: compatible = "fsl,imx50-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx51.dtsi: compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx51.dtsi: compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx53.dtsi: compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx53.dtsi: compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx6qdl.dtsi: compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx6qdl.dtsi: compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx6sl.dtsi: compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx6sl.dtsi: compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx6ul.dtsi: compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx6ul.dtsi: compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
> arch/arm/boot/dts/ls1021a.dtsi: compatible = "fsl,imx21-wdt";
> arch/arm/boot/dts/vfxxx.dtsi: compatible = "fsl,vf610-wdt", "fsl,imx21-wdt";
>
> I don't see a confirmation of the fact that "fsl,imx35-wdt" is the best
> selection, hence definitely "fsl,imx25-wdt" overscores it.
I stated my reason to pick imx35 over imx25 above. Why do yo prefer
imx25?
> > A reason to add e.g. fsl,imx6sl-wdt is that dtbs in the wild use
> >
> > "fsl,imx6sl-wdt", "fsl,imx21-wdt"
> >
> > . But then I wonder if
> >
> > 5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
> >
> > is that important to justify to add these all.
>
> About this comment I don't know, you may have better insight about the original
> change. By the way, in barebox you may want to fix the same hang-up, because
> you touch WMCR unconditionally.
Sure.
> > Independant of this I'd like to have all dtsi for the newer SoCs changed
> > to get
> >
> > "fsl,imx6sl-wdt", "fsl,imx35-wdt"
> >
> > and if you really want to add all these compatibles, add a comment that
> > these are really fsl,imx35-wdt and were added to work around broken
> > dtbs.
>
> No objections, but
>
> 1) I'd like to see "fsl,imx25-wdt" as a new common compatible, and that's
> what have been proposed and shared in RFC 2/2.
Yeah, I missed that other patch (which was not part of this series).
> 2) Please remind me, why do you ask to drop "fsl,imx21-wdt" from the list?
>
> compatible = "fsl,imx6sx-wdt", "fsl,imx25-wdt", "fsl,imx21-wdt";
>
> The list of compatibles above is valid (from the most specific on the left
> to the most generic on the right), and that compatible property is rightly
> handled in the driver with this change applied. I don't see a need to
> drop "fsl,imx21-wdt".
If the wdt in the i.MX6SX can be operated by the watchdog driver in it's
imx21 mode, you should keep the imx21 entry. If not, you shouldn't.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* [PATCH v1] watchdog: imx2: fix hang-up on boot for i.MX21, i.MX27 and i.MX31 SoCs
From: Vladimir Zapolskiy @ 2016-12-11 10:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161211093519.xrxxhrqpc7fmadfr@pengutronix.de>
Hello Uwe,
On 12/11/2016 11:35 AM, Uwe Kleine-K?nig wrote:
> On Sun, Dec 11, 2016 at 03:06:48AM +0200, Vladimir Zapolskiy wrote:
>> Power down counter enable/disable bit switch is located in WMCR
>> register, but watchdog controllers found on legacy i.MX21, i.MX27 and
>> i.MX31 SoCs don't have this register. As a result of writing data to
>> the non-existing register on driver probe the SoC hangs up, to fix the
>> problem add more OF compatible strings and on this basis get
>> information about availability of the WMCR register.
>>
>> Fixes: 5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
>> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
>> ---
[snip]
>>
>> static const struct of_device_id imx2_wdt_dt_ids[] = {
>> - { .compatible = "fsl,imx21-wdt", },
>> + { .compatible = "fsl,imx21-wdt", .data = IMX2_WDT_NO_WMCR },
>> + { .compatible = "fsl,imx25-wdt", },
>> + { .compatible = "fsl,imx27-wdt", .data = IMX2_WDT_NO_WMCR },
>> + { .compatible = "fsl,imx31-wdt", .data = IMX2_WDT_NO_WMCR },
>> + { .compatible = "fsl,imx35-wdt", },
>> + { .compatible = "fsl,imx50-wdt", },
>> + { .compatible = "fsl,imx51-wdt", },
>> + { .compatible = "fsl,imx53-wdt", },
>> + { .compatible = "fsl,imx6q-wdt", },
>> + { .compatible = "fsl,imx6sl-wdt", },
>> + { .compatible = "fsl,imx6sx-wdt", },
>> + { .compatible = "fsl,imx6ul-wdt", },
>> + { .compatible = "fsl,imx7d-wdt", },
>> + { .compatible = "fsl,vf610-wdt", },
>
> Up to now we only had fsl,imx21-wdt, now it seems that iMX31, i.MX27 and
> i.MX21 form a group of equal watchdog IPs and the others form another
> group, right?
>
> So conceptually we should differenciate between
>
> fsl,imx21-wdt (which is used on i.MX21, i.MX27 and i.MX31)
> fsl,imx35-wdt (which is used on all others)
>
The problem is that "fsl,imx35-wdt" is not used on all others in the
existing DTS, i.e. in the old firmware, which shall be compatible with
new changes.
$ grep -H 'fsl,imx.*-wdt' arch/arm/boot/dts/*.dtsi
arch/arm/boot/dts/imx25.dtsi: compatible = "fsl,imx25-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx27.dtsi: compatible = "fsl,imx27-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx35.dtsi: compatible = "fsl,imx35-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx50.dtsi: compatible = "fsl,imx50-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx51.dtsi: compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx51.dtsi: compatible = "fsl,imx51-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx53.dtsi: compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx53.dtsi: compatible = "fsl,imx53-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx6qdl.dtsi: compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx6qdl.dtsi: compatible = "fsl,imx6q-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx6sl.dtsi: compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx6sl.dtsi: compatible = "fsl,imx6sl-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx6sx.dtsi: compatible = "fsl,imx6sx-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx6ul.dtsi: compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx6ul.dtsi: compatible = "fsl,imx6ul-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/imx7s.dtsi: compatible = "fsl,imx7d-wdt", "fsl,imx21-wdt";
arch/arm/boot/dts/ls1021a.dtsi: compatible = "fsl,imx21-wdt";
arch/arm/boot/dts/vfxxx.dtsi: compatible = "fsl,vf610-wdt", "fsl,imx21-wdt";
I don't see a confirmation of the fact that "fsl,imx35-wdt" is the best
selection, hence definitely "fsl,imx25-wdt" overscores it.
> A reason to add e.g. fsl,imx6sl-wdt is that dtbs in the wild use
>
> "fsl,imx6sl-wdt", "fsl,imx21-wdt"
>
> . But then I wonder if
>
> 5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
>
> is that important to justify to add these all.
About this comment I don't know, you may have better insight about the original
change. By the way, in barebox you may want to fix the same hang-up, because
you touch WMCR unconditionally.
>
> Independant of this I'd like to have all dtsi for the newer SoCs changed
> to get
>
> "fsl,imx6sl-wdt", "fsl,imx35-wdt"
>
> and if you really want to add all these compatibles, add a comment that
> these are really fsl,imx35-wdt and were added to work around broken
> dtbs.
No objections, but
1) I'd like to see "fsl,imx25-wdt" as a new common compatible, and that's
what have been proposed and shared in RFC 2/2.
2) Please remind me, why do you ask to drop "fsl,imx21-wdt" from the list?
compatible = "fsl,imx6sx-wdt", "fsl,imx25-wdt", "fsl,imx21-wdt";
The list of compatibles above is valid (from the most specific on the left
to the most generic on the right), and that compatible property is rightly
handled in the driver with this change applied. I don't see a need to
drop "fsl,imx21-wdt".
As a reminder while changing the source code new (updated) kernel must be
compatible with the old (not updated) DTB firmware, and not the other way
round.
--
With best wishes,
Vladimir
^ permalink raw reply
* [PATCH] media: platform: xilinx: xilinx-tpg: constify v4l2_subdev_* structures
From: Bhumika Goyal @ 2016-12-11 9:52 UTC (permalink / raw)
To: linux-arm-kernel
v4l2_subdev_{core/pad/video}_ops structures are stored in the
fields of the v4l2_subdev_ops structure which are of type const.
Also, v4l2_subdev_ops structure is passed to a function
having its argument of type const. As these structures are never
modified, so declare them as const.
Done using Coccinelle: (One of the scripts used)
@r1 disable optional_qualifier @
identifier i;
position p;
@@
static struct v4l2_subdev_video_ops i at p = {...};
@ok1@
identifier r1.i;
position p;
struct v4l2_subdev_ops obj;
@@
obj.video=&i at p;
@bad@
position p!={r1.p,ok1.p};
identifier r1.i;
@@
i at p
@depends on !bad disable optional_qualifier@
identifier r1.i;
@@
+const
struct v4l2_subdev_video_ops i;
File size before:
text data bss dec hex filename
6170 2752 144 9066 236a media/platform/xilinx/xilinx-tpg.o
File size after:
text data bss dec hex filename
6666 2384 8 9058 2362 media/platform/xilinx/xilinx-tpg.o
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
drivers/media/platform/xilinx/xilinx-tpg.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/platform/xilinx/xilinx-tpg.c b/drivers/media/platform/xilinx/xilinx-tpg.c
index 2ec1f6c..9c49d1d 100644
--- a/drivers/media/platform/xilinx/xilinx-tpg.c
+++ b/drivers/media/platform/xilinx/xilinx-tpg.c
@@ -460,21 +460,21 @@ static int xtpg_s_ctrl(struct v4l2_ctrl *ctrl)
.s_ctrl = xtpg_s_ctrl,
};
-static struct v4l2_subdev_core_ops xtpg_core_ops = {
+static const struct v4l2_subdev_core_ops xtpg_core_ops = {
};
-static struct v4l2_subdev_video_ops xtpg_video_ops = {
+static const struct v4l2_subdev_video_ops xtpg_video_ops = {
.s_stream = xtpg_s_stream,
};
-static struct v4l2_subdev_pad_ops xtpg_pad_ops = {
+static const struct v4l2_subdev_pad_ops xtpg_pad_ops = {
.enum_mbus_code = xvip_enum_mbus_code,
.enum_frame_size = xtpg_enum_frame_size,
.get_fmt = xtpg_get_format,
.set_fmt = xtpg_set_format,
};
-static struct v4l2_subdev_ops xtpg_ops = {
+static const struct v4l2_subdev_ops xtpg_ops = {
.core = &xtpg_core_ops,
.video = &xtpg_video_ops,
.pad = &xtpg_pad_ops,
--
1.9.1
^ permalink raw reply related
* [RFC PATCH 2/2] ARM: i.MX: dts: add fsl, imx25-wdt compatible to all relevant watchdog nodes
From: Uwe Kleine-König @ 2016-12-11 9:40 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160926062759.3eoezyezog6clz6x@pengutronix.de>
Hello,
On Mon, Sep 26, 2016 at 08:27:59AM +0200, Uwe Kleine-K?nig wrote:
> On Mon, Sep 26, 2016 at 03:39:21AM +0300, Vladimir Zapolskiy wrote:
> > Watchdog device controller found on all modern SoCs from i.MX series
> > and firstly introduced in i.MX25 is not one in one compatible with the
> > watchdog controllers on i.MX21, i.MX27 and i.MX31, the latter
> > controlles don't have WICR (and pretimeout notification support) and
> > WMCR registers. To get benefit from the more advanced watchdog device
> > and to avoid operations over non-existing registers on legacy SoCs add
> > fsl,imx25-wdt compatible to descriptions of all i.MX25 compatible
> > watchdog controllers.
> >
> > Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> > ---
> > arch/arm/boot/dts/imx35.dtsi | 3 ++-
> > arch/arm/boot/dts/imx50.dtsi | 3 ++-
> > arch/arm/boot/dts/imx51.dtsi | 6 ++++--
> > arch/arm/boot/dts/imx53.dtsi | 6 ++++--
> > arch/arm/boot/dts/imx6qdl.dtsi | 6 ++++--
> > arch/arm/boot/dts/imx6sl.dtsi | 6 ++++--
> > arch/arm/boot/dts/imx6sx.dtsi | 9 ++++++---
> > arch/arm/boot/dts/imx6ul.dtsi | 6 ++++--
> > arch/arm/boot/dts/imx7s.dtsi | 12 ++++++++----
> > arch/arm/boot/dts/ls1021a.dtsi | 2 +-
> > arch/arm/boot/dts/vfxxx.dtsi | 3 ++-
> > 11 files changed, 41 insertions(+), 21 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/imx35.dtsi b/arch/arm/boot/dts/imx35.dtsi
> > index 490b7b4..8fd4482 100644
> > --- a/arch/arm/boot/dts/imx35.dtsi
> > +++ b/arch/arm/boot/dts/imx35.dtsi
> > @@ -284,7 +284,8 @@
> > };
> >
> > wdog: wdog at 53fdc000 {
> > - compatible = "fsl,imx35-wdt", "fsl,imx21-wdt";
> > + compatible = "fsl,imx35-wdt", "fsl,imx25-wdt",
> > + "fsl,imx21-wdt";
>
> When this is used on an old kernel that doesn't know about fsl,imx25-wdt
> this picks up the imx21 driver logic. As this is wrong I think you
> should drop imx21-wdt here. Can one of the dt-people comfirm?
I forgot in the mail at the other end of this thread that the dti were
already addressed. I (implicitly) wrote there that fsl,imx35-wdt should
be the new compatible describing the wdt with misc register. Picking
imx25 (as you did) works, too, but e.g. the CSPI device has
compatible = "fsl,imx25-cspi", "fsl,imx35-cspi";
on the i.MX25 and
compatible = "fsl,imx35-cspi";
on the i.MX35. So I think we should pick i.MX35 here, too, as the one
giving its name.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* [PATCH v1] watchdog: imx2: fix hang-up on boot for i.MX21, i.MX27 and i.MX31 SoCs
From: Uwe Kleine-König @ 2016-12-11 9:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161211010648.6591-1-vz@mleia.com>
On Sun, Dec 11, 2016 at 03:06:48AM +0200, Vladimir Zapolskiy wrote:
> Power down counter enable/disable bit switch is located in WMCR
> register, but watchdog controllers found on legacy i.MX21, i.MX27 and
> i.MX31 SoCs don't have this register. As a result of writing data to
> the non-existing register on driver probe the SoC hangs up, to fix the
> problem add more OF compatible strings and on this basis get
> information about availability of the WMCR register.
>
> Fixes: 5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> ---
> Changes from RFC to v1:
> * replaced private data struct with a macro as suggested by Guenter,
> * updated the comment in the source code to reflect the change,
> * rearranged and simplified the logic of detecting WMCR presence,
> * pulled the fix out from the series with optional proposed DTS changes.
>
> drivers/watchdog/imx2_wdt.c | 30 +++++++++++++++++++++++++-----
> 1 file changed, 25 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index 4874b0f..66bd454 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -30,6 +30,7 @@
> #include <linux/module.h>
> #include <linux/moduleparam.h>
> #include <linux/of_address.h>
> +#include <linux/of_device.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> #include <linux/watchdog.h>
> @@ -57,6 +58,7 @@
> #define IMX2_WDT_WICR_WICT 0xFF /* -> Interrupt Count Timeout */
>
> #define IMX2_WDT_WMCR 0x08 /* Misc Register */
> +#define IMX2_WDT_NO_WMCR ((void *)true) /* Indicates unavailable WMCR */
>
> #define IMX2_WDT_MAX_TIME 128
> #define IMX2_WDT_DEFAULT_TIME 60 /* in seconds */
> @@ -70,6 +72,8 @@ struct imx2_wdt_device {
> bool ext_reset;
> };
>
> +static const struct of_device_id imx2_wdt_dt_ids[];
> +
> static bool nowayout = WATCHDOG_NOWAYOUT;
> module_param(nowayout, bool, 0);
> MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
> @@ -242,6 +246,7 @@ static const struct regmap_config imx2_wdt_regmap_config = {
>
> static int __init imx2_wdt_probe(struct platform_device *pdev)
> {
> + const struct of_device_id *of_id;
> struct imx2_wdt_device *wdev;
> struct watchdog_device *wdog;
> struct resource *res;
> @@ -310,11 +315,13 @@ static int __init imx2_wdt_probe(struct platform_device *pdev)
> }
>
> /*
> - * Disable the watchdog power down counter at boot. Otherwise the power
> - * down counter will pull down the #WDOG interrupt line for one clock
> - * cycle.
> + * If watchdog controller has WMCR, disable the watchdog power
> + * down counter at boot. Otherwise the power down counter will
> + * pull down the #WDOG interrupt line for one clock cycle.
> */
> - regmap_write(wdev->regmap, IMX2_WDT_WMCR, 0);
> + of_id = of_match_device(imx2_wdt_dt_ids, &pdev->dev);
> + if (of_id && !of_id->data)
> + regmap_write(wdev->regmap, IMX2_WDT_WMCR, 0);
>
> ret = watchdog_register_device(wdog);
> if (ret) {
> @@ -412,7 +419,20 @@ static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend,
> imx2_wdt_resume);
>
> static const struct of_device_id imx2_wdt_dt_ids[] = {
> - { .compatible = "fsl,imx21-wdt", },
> + { .compatible = "fsl,imx21-wdt", .data = IMX2_WDT_NO_WMCR },
> + { .compatible = "fsl,imx25-wdt", },
> + { .compatible = "fsl,imx27-wdt", .data = IMX2_WDT_NO_WMCR },
> + { .compatible = "fsl,imx31-wdt", .data = IMX2_WDT_NO_WMCR },
> + { .compatible = "fsl,imx35-wdt", },
> + { .compatible = "fsl,imx50-wdt", },
> + { .compatible = "fsl,imx51-wdt", },
> + { .compatible = "fsl,imx53-wdt", },
> + { .compatible = "fsl,imx6q-wdt", },
> + { .compatible = "fsl,imx6sl-wdt", },
> + { .compatible = "fsl,imx6sx-wdt", },
> + { .compatible = "fsl,imx6ul-wdt", },
> + { .compatible = "fsl,imx7d-wdt", },
> + { .compatible = "fsl,vf610-wdt", },
Up to now we only had fsl,imx21-wdt, now it seems that iMX31, i.MX27 and
i.MX21 form a group of equal watchdog IPs and the others form another
group, right?
So conceptually we should differenciate between
fsl,imx21-wdt (which is used on i.MX21, i.MX27 and i.MX31)
fsl,imx35-wdt (which is used on all others)
A reason to add e.g. fsl,imx6sl-wdt is that dtbs in the wild use
"fsl,imx6sl-wdt", "fsl,imx21-wdt"
. But then I wonder if
5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
is that important to justify to add these all.
Independant of this I'd like to have all dtsi for the newer SoCs changed
to get
"fsl,imx6sl-wdt", "fsl,imx35-wdt"
and if you really want to add all these compatibles, add a comment that
these are really fsl,imx35-wdt and were added to work around broken
dtbs.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
^ permalink raw reply
* [PATCH 2/2] kcov: make kcov work properly with KASLR enabled
From: Dmitry Vyukov @ 2016-12-11 9:32 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1481417456-28826-3-git-send-email-alex.popov@linux.com>
On Sun, Dec 11, 2016 at 1:50 AM, Alexander Popov <alex.popov@linux.com> wrote:
> Subtract KASLR offset from the kernel addresses reported by kcov.
> Tested on x86_64 and AArch64 (Hikey LeMaker).
>
> Signed-off-by: Alexander Popov <alex.popov@linux.com>
> ---
> kernel/kcov.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/kcov.c b/kernel/kcov.c
> index 3cbb0c8..f8f3f4c 100644
> --- a/kernel/kcov.c
> +++ b/kernel/kcov.c
> @@ -14,6 +14,7 @@
> #include <linux/debugfs.h>
> #include <linux/uaccess.h>
> #include <linux/kcov.h>
> +#include <asm/setup.h>
>
> /*
> * kcov descriptor (one per opened debugfs file).
> @@ -68,6 +69,11 @@ void notrace __sanitizer_cov_trace_pc(void)
> if (mode == KCOV_MODE_TRACE) {
> unsigned long *area;
> unsigned long pos;
> + unsigned long ip = _RET_IP_;
> +
> +#ifdef CONFIG_RANDOMIZE_BASE
> + ip -= kaslr_offset();
> +#endif
>
> /*
> * There is some code that runs in interrupts but for which
> @@ -81,7 +87,7 @@ void notrace __sanitizer_cov_trace_pc(void)
> /* The first word is number of subsequent PCs. */
> pos = READ_ONCE(area[0]) + 1;
> if (likely(pos < t->kcov_size)) {
> - area[pos] = _RET_IP_;
> + area[pos] = ip;
> WRITE_ONCE(area[0], pos);
> }
> }
> --
> 2.7.4
Hi,
I think generally this is the right thing to do.
There are 2 pending patches for kcov by +Quentin (hopefully in mm):
"kcov: add AFL-style tracing"
"kcov: size of arena is now given in bytes"
https://groups.google.com/forum/#!topic/syzkaller/gcqbIhKjGcY
https://groups.google.com/d/msg/syzkaller/gcqbIhKjGcY/KQFryjBKCAAJ
Your patch probably conflicts with them.
Should you base them on top of these patches, so that Andrew can merge
it without conflicts?
^ permalink raw reply
* [PATCH v1] watchdog: imx2: fix hang-up on boot for i.MX21, i.MX27 and i.MX31 SoCs
From: Magnus Lilja @ 2016-12-11 8:58 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20161211010648.6591-1-vz@mleia.com>
Hi
Excellent!
On 11 December 2016 at 02:06, Vladimir Zapolskiy <vz@mleia.com> wrote:
> Power down counter enable/disable bit switch is located in WMCR
> register, but watchdog controllers found on legacy i.MX21, i.MX27 and
> i.MX31 SoCs don't have this register. As a result of writing data to
> the non-existing register on driver probe the SoC hangs up, to fix the
> problem add more OF compatible strings and on this basis get
> information about availability of the WMCR register.
>
> Fixes: 5fe65ce7ccbb ("watchdog: imx2_wdt: Disable power down counter on boot")
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> ---
Tested-by: Magnus Lilja <lilja.magnus@gmail.com>
(Tested on i.MX31 without device tree)
/Magnus
^ permalink raw reply
* [PATCH V1] pinctrl:pxa:pinctrl-pxa2xx:- No need of devm functions
From: arvind Yadav @ 2016-12-11 8:04 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <87eg1g16r8.fsf@belgarion.home>
Yes, It will not fixes any defect. But we are going to free allocate
memory then why we need devm api. In this case Devm will first add this
entry to list and immediately it will remove from list.
-Arvind
On Saturday 10 December 2016 02:49 PM, Robert Jarzmik wrote:
> Arvind Yadav <arvind.yadav.cs@gmail.com> writes:
>
> Hi Arvind,
>
>> In functions pxa2xx_build_functions, the memory allocated for
>> 'functions' is live within the function only. After the
>> allocation it is immediately freed with devm_kfree. There is
>> no need to allocate memory for 'functions' with devm function
>> so replace devm_kcalloc with kcalloc and devm_kfree with kfree.
> That's not very true : the "need" is to spare the "manual" kfree you're adding
> in your patch for one, and make it consistent with pxa2xx_build_groups() and
> pxa2xx_build_state() for two.
>
> Therefore I'm not very thrilled by this patch and unless it fixes a defect in
> the driver I'd rather not have it in.
>
> Cheers.
>
> --
> Robert
^ permalink raw reply
* [PATCH] Input: imx6ul_tsc - generalize the averaging property
From: Guy Shapiro @ 2016-12-11 7:06 UTC (permalink / raw)
To: linux-arm-kernel
Make the avarage-samples property a general touchscreen property
rather than imx6ul device specific.
Signed-off-by: Guy Shapiro <guy.shapiro@mobi-wize.com>
---
.../bindings/input/touchscreen/imx6ul_tsc.txt | 11 ++----
.../bindings/input/touchscreen/touchscreen.txt | 3 ++
drivers/input/touchscreen/imx6ul_tsc.c | 46 ++++++++++++++++------
3 files changed, 41 insertions(+), 19 deletions(-)
diff --git a/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
index a66069f..d4927c2 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/imx6ul_tsc.txt
@@ -17,13 +17,8 @@ Optional properties:
This value depends on the touch screen.
- pre-charge-time: the touch screen need some time to precharge.
This value depends on the touch screen.
-- average-samples: Number of data samples which are averaged for each read.
- Valid values 0-4
- 0 = 1 sample
- 1 = 4 samples
- 2 = 8 samples
- 3 = 16 samples
- 4 = 32 samples
+- touchscreen-average-samples: Number of data samples which are averaged for
+ each read. Valid values are 1, 4, 8, 16 and 32.
Example:
tsc: tsc at 02040000 {
@@ -39,6 +34,6 @@ Example:
xnur-gpio = <&gpio1 3 GPIO_ACTIVE_LOW>;
measure-delay-time = <0xfff>;
pre-charge-time = <0xffff>;
- average-samples = <4>;
+ touchscreen-average-samples = <32>;
status = "okay";
};
diff --git a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
index bccaa4e..537643e 100644
--- a/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
+++ b/Documentation/devicetree/bindings/input/touchscreen/touchscreen.txt
@@ -14,6 +14,9 @@ Optional properties for Touchscreens:
- touchscreen-fuzz-pressure : pressure noise value of the absolute input
device (arbitrary range dependent on the
controller)
+ - touchscreen-average-samples : Number of data samples which are averaged
+ for each read (valid values dependent on the
+ controller)
- touchscreen-inverted-x : X axis is inverted (boolean)
- touchscreen-inverted-y : Y axis is inverted (boolean)
- touchscreen-swapped-x-y : X and Y axis are swapped (boolean)
diff --git a/drivers/input/touchscreen/imx6ul_tsc.c b/drivers/input/touchscreen/imx6ul_tsc.c
index d2a3912..58d1aa5 100644
--- a/drivers/input/touchscreen/imx6ul_tsc.c
+++ b/drivers/input/touchscreen/imx6ul_tsc.c
@@ -93,7 +93,8 @@ struct imx6ul_tsc {
u32 measure_delay_time;
u32 pre_charge_time;
- u32 average_samples;
+ bool average_enable;
+ u32 average_select;
struct completion completion;
};
@@ -117,9 +118,9 @@ static int imx6ul_adc_init(struct imx6ul_tsc *tsc)
adc_cfg |= ADC_12BIT_MODE | ADC_IPG_CLK;
adc_cfg &= ~(ADC_CLK_DIV_MASK | ADC_SAMPLE_MODE_MASK);
adc_cfg |= ADC_CLK_DIV_8 | ADC_SHORT_SAMPLE_MODE;
- if (tsc->average_samples) {
+ if (tsc->average_enable) {
adc_cfg &= ~ADC_AVGS_MASK;
- adc_cfg |= (tsc->average_samples - 1) << ADC_AVGS_SHIFT;
+ adc_cfg |= (tsc->average_select) << ADC_AVGS_SHIFT;
}
adc_cfg &= ~ADC_HARDWARE_TRIGGER;
writel(adc_cfg, tsc->adc_regs + REG_ADC_CFG);
@@ -132,7 +133,7 @@ static int imx6ul_adc_init(struct imx6ul_tsc *tsc)
/* start ADC calibration */
adc_gc = readl(tsc->adc_regs + REG_ADC_GC);
adc_gc |= ADC_CAL;
- if (tsc->average_samples)
+ if (tsc->average_enable)
adc_gc |= ADC_AVGE;
writel(adc_gc, tsc->adc_regs + REG_ADC_GC);
@@ -362,6 +363,7 @@ static int imx6ul_tsc_probe(struct platform_device *pdev)
int err;
int tsc_irq;
int adc_irq;
+ u32 average_samples;
tsc = devm_kzalloc(&pdev->dev, sizeof(*tsc), GFP_KERNEL);
if (!tsc)
@@ -466,14 +468,36 @@ static int imx6ul_tsc_probe(struct platform_device *pdev)
if (err)
tsc->pre_charge_time = 0xfff;
- err = of_property_read_u32(np, "average-samples",
- &tsc->average_samples);
+ err = of_property_read_u32(np, "touchscreen-average-samples",
+ &average_samples);
if (err)
- tsc->average_samples = 0;
-
- if (tsc->average_samples > 4) {
- dev_err(&pdev->dev, "average-samples (%u) must be [0-4]\n",
- tsc->average_samples);
+ average_samples = 1;
+
+ switch (average_samples) {
+ case 1:
+ tsc->average_enable = false;
+ tsc->average_select = 0; /* value unused; initialize anyway */
+ break;
+ case 4:
+ tsc->average_enable = true;
+ tsc->average_select = 0;
+ break;
+ case 8:
+ tsc->average_enable = true;
+ tsc->average_select = 1;
+ break;
+ case 16:
+ tsc->average_enable = true;
+ tsc->average_select = 2;
+ break;
+ case 32:
+ tsc->average_enable = true;
+ tsc->average_select = 3;
+ break;
+ default:
+ dev_err(&pdev->dev,
+ "touchscreen-average-samples (%u) must be 1, 4, 8, 16 or 32\n",
+ average_samples);
return -EINVAL;
}
--
2.1.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox