From patchwork Wed Sep 25 08:29:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Juergen Borleis X-Patchwork-Id: 2940331 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 307E39F2B8 for ; Wed, 25 Sep 2013 08:29:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A7D6D203DB for ; Wed, 25 Sep 2013 08:29:01 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90ACE20318 for ; Wed, 25 Sep 2013 08:28:56 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOkSn-00085U-Ry; Wed, 25 Sep 2013 08:28:50 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOkSl-0008FU-CK; Wed, 25 Sep 2013 08:28:47 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VOkSh-0008DZ-61 for linux-arm-kernel@lists.infradead.org; Wed, 25 Sep 2013 08:28:44 +0000 Received: from thebe.hi.pengutronix.de ([2001:6f8:1178:2:5e26:aff:fe2b:7cc4]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1VOkSG-0007eM-93; Wed, 25 Sep 2013 10:28:16 +0200 From: =?iso-8859-15?q?J=FCrgen_Beisert?= Organization: Pengutronix e.K. To: linux-arm-kernel@lists.infradead.org Subject: ARM/Samsung/S3C24xx: Linux-3.11 crashes when using PWM Date: Wed, 25 Sep 2013 10:29:44 +0200 User-Agent: KMail/1.9.10 (enterprise35 0.20100827.1168748) MIME-Version: 1.0 Content-Disposition: inline Message-Id: <201309251029.44265.jbe@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:5e26:aff:fe2b:7cc4 X-SA-Exim-Mail-From: jbe@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130925_042843_719745_D83F2D9B X-CRM114-Status: GOOD ( 25.30 ) X-Spam-Score: -4.2 (----) Cc: linux-samsung-soc@vger.kernel.org, Kukjin Kim , linux-kernel@vger.kernel.org, Ben Dooks X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, yesterday I tried to make the buzzer on the Mini2440 platform work again. But when I add one of the timer device descriptions to list of devices, the Linux-3.11 kernel crashes. This does not happen to Linux-3.10. What I have done: $ make mini2440_defconfig Change one single line: $ make menuconfig + CONFIG_DEBUG_LL + CONFIG_EARLY_PRINTK (otherwise no output on the serial line) $ make uImage Then booting this image on my Mini2440: [...] booting kernel of type uimage from /dev/ram0.kernel    Verifying Checksum ... OK    Image Name:   Linux-3.11.0+    Created:      2013-09-24  19:15:10 UTC    Image Type:   ()    Data Size:    2551080 Bytes =  2.4 MB    Load Address: 30008000    Entry Point:  30008000 OK commandline: console=ttySAC0,115200 mini2440=0tbc earlyprintk ip=192.168.0.241:192.168.0.10:192.168.0.1:255.255.255.0::: root=/dev/nfs nfsroot=/root,v3,tcp,port=2049,mountport=2049,v3,tcp noinitrd mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root) arch_number: 1999 Starting kernel ... Uncompressing Linux... done, booting the kernel. Booting Linux on physical CPU 0x0 Linux version 3.11.0+ (jb@isonoe) (gcc version 4.6.2 (OSELAS.Toolchain-2011.11.1 linaro-4.6-2011.11) ) #1 Tue Sep 24 21:14:53 CEST 2013 CPU: ARM920T [41129200] revision 0 (ARMv4T), cr=c0007177 CPU: VIVT data cache, VIVT instruction cache Machine: MINI2440 bootconsole [earlycon0] enabled Memory policy: ECC disabled, Data cache writeback CPU S3C2440A (id 0x32440001) S3C24XX Clocks, Copyright 2004 Simtec Electronics S3C244X: core 405.000 MHz, memory 101.250 MHz, peripheral 50.625 MHz CLOCK: Slow mode (1.500 MHz), fast, MPLL on, UPLL on Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256 Kernel command line: console=ttySAC0,115200 mini2440=0tbc earlyprintk ip=192.168.0.241:192.168.0.10:192.168.0.1:255.255.255.0::: root=/dev/nfs nfsroot=/root,v3,tcp,port=2049,mountport=2049,v3,tcp noinitrd mtdparts=nand:512k(barebox),384k(bareboxenv),2048k(kernel),-(root) PID hash table entries: 256 (order: -2, 1024 bytes) Dentry cache hash table entries: 8192 (order: 3, 32768 bytes) Inode-cache hash table entries: 4096 (order: 2, 16384 bytes) Memory: 59784K/65536K available (3570K kernel code, 187K rwdata, 960K rodata, 143K init, 240K bss, 5752K reserved) Virtual kernel memory layout:     vector  : 0xffff0000 - 0xffff1000   (   4 kB)     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)     vmalloc : 0xc4800000 - 0xff000000   ( 936 MB)     lowmem  : 0xc0000000 - 0xc4000000   (  64 MB)     modules : 0xbf000000 - 0xc0000000   (  16 MB)       .text : 0xc0008000 - 0xc0474a44   (4531 kB)       .init : 0xc0475000 - 0xc0498d6c   ( 144 kB)       .data : 0xc049a000 - 0xc04c8c80   ( 188 kB)        .bss : 0xc04c8c80 - 0xc0505050   ( 241 kB) SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 NR_IRQS:103 S3C2440: IRQ Support irq: clearing pending status 00000080 irq: clearing pending status 00000002 sched_clock: 16 bits at 1012kHz, resolution 987ns, wraps every 64ms Console: colour dummy device 80x30 Calibrating delay loop... 201.52 BogoMIPS (lpj=503808) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok Setting up static identity map for 0xc0363ac8 - 0xc0363b20 NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations MINI2440: Option string mini2440=0tbc MINI2440: 't' ignored, touchscreen not compiled in MINI2440: LCD [0:240x320] 1:800x480 2:1024x768 3:320x240 S3C2440: Initialising architecture S3C244X: Clock Support, DVS off Unable to handle kernel NULL pointer dereference at virtual address 00000084 pgd = c0004000 [00000084] *pgd=00000000 Internal error: Oops: 5 [#1] ARM Modules linked in: CPU: 0 PID: 1 Comm: swapper Not tainted 3.11.0+ #1 task: c3830000 ti: c3832000 task.ti: c3832000 PC is at get_device_parent+0x48/0x16c LR is at get_device_parent+0x40/0x16c pc : []    lr : []    psr: 60000053 sp : c3833d88  ip : c3857354  fp : 00000000 r10: c047546c  r9 : c0498770  r8 : c3855f8c r7 : c04a7c98  r6 : c04a7c90  r5 : c3857300  r4 : c3857300 r3 : c04b595c  r2 : 00000000  r1 : 00000000  r0 : c04b9a34 Flags: nZCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment kernel Control: c000717f  Table: 30004000  DAC: 00000017 Process swapper (pid: 1, stack limit = 0xc38321b8) Stack: (0xc3833d88 to 0xc3834000) 3d80:                   c385c220 c3857300 00000000 c04a7c90 00000000 c01db728 3da0: c0498770 c047546c c3833dc4 c0033be8 00000000 c3857308 c38046c0 c04b595c 3dc0: 00000000 c3857300 00000000 c3855f8c c0498770 c047546c 00000000 c01dbcf4 3de0: c3855f8c 00000000 00000024 00000000 c04b5a70 c01dbd7c 00000000 c0410594 3e00: c3833e2c c0011f0c 00000009 c01dbda4 c0410594 c3833e2c c3855f8c c3833e2c 3e20: 00000000 c01a4e84 c0410594 00000000 c3855f8c c01a4594 00000000 c04a6d08 3e40: c04a7c90 c3855f70 c04a7c90 00000000 00590004 c01a52a4 c04a7c98 00000000 3e60: 00000000 c04fd658 c04b5a70 c04a7c90 00000000 c01df17c c01df168 c01ddf54 3e80: c04a7c90 c04b5a70 c04a7cc4 00000000 c0488774 c01de168 c04b5a70 c01de0dc 3ea0: 00000000 c01dc9a4 c384628c c3855bd0 c04b5a70 c04b9b48 c3855f00 c01dd714 3ec0: c03f8884 c04c8f88 c04b5a70 00000000 c0492ce8 c04c8c80 c0488774 c01de604 3ee0: 00000000 c04fa6e4 00000000 c0492ce8 c04c8c80 c0488774 c047546c c04887cc 3f00: c3832000 c0008748 c04ae180 c0366288 c384db40 c04eef40 00000000 00000000 3f20: 00000000 c00d4da0 00000000 60000053 c04545d0 c05863f8 0000007e c002b710 3f40: c03f4e94 c0453df0 00000003 00000003 00000000 c0492d04 c0492d08 00000003 3f60: c0492ce8 c04c8c80 0000007e c047546c 00000000 c0475adc 00000003 00000003 3f80: c047546c 33cc33cc 00000000 c035deac 00000000 00000000 00000000 00000000 3fa0: 00000000 c035deb4 00000000 c0009450 00000000 00000000 00000000 00000000 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 33cc33cc 33cc33cc [] (get_device_parent+0x48/0x16c) from [] (device_add+0x9c/0x5bc) [] (device_add+0x9c/0x5bc) from [] (device_create_groups_vargs+0x94/0xc8) [] (device_create_groups_vargs+0x94/0xc8) from [] (device_create_vargs+0x24/0x2c) [] (device_create_vargs+0x24/0x2c) from [] (device_create+0x20/0x28) [] (device_create+0x20/0x28) from [] (pwmchip_sysfs_export+0x30/0x60) [] (pwmchip_sysfs_export+0x30/0x60) from [] (pwmchip_add+0x17c/0x1d0) [] (pwmchip_add+0x17c/0x1d0) from [] (s3c_pwm_probe+0xd8/0x1e8) [] (s3c_pwm_probe+0xd8/0x1e8) from [] (platform_drv_probe+0x14/0x18) [] (platform_drv_probe+0x14/0x18) from [] (driver_probe_device+0x7c/0x204) [] (driver_probe_device+0x7c/0x204) from [] (__driver_attach+0x8c/0x90) [] (__driver_attach+0x8c/0x90) from [] (bus_for_each_dev+0x5c/0x8c) [] (bus_for_each_dev+0x5c/0x8c) from [] (bus_add_driver+0xd8/0x22c) [] (bus_add_driver+0xd8/0x22c) from [] (driver_register+0x78/0x144) [] (driver_register+0x78/0x144) from [] (pwm_init+0x58/0x84) [] (pwm_init+0x58/0x84) from [] (do_one_initcall+0x34/0x160) [] (do_one_initcall+0x34/0x160) from [] (kernel_init_freeable+0xec/0x1a8) [] (kernel_init_freeable+0xec/0x1a8) from [] (kernel_init+0x8/0xe4) [] (kernel_init+0x8/0xe4) from [] (ret_from_fork+0x14/0x24) Code: e59f0118 eb061af6 e59530c0 e5932040 (e5b23084) ---[ end trace 2965f3757c9915e1 ]--- Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Any chance to get it work again? I guess the other S3C24xx based platforms in arch/arm/mach-s3c24xx will also crash, because they use PWM units for their backlights. Regards, Juergen diff --git a/arch/arm/mach-s3c24xx/mach-mini2440.c b/arch/arm/mach-s3c24xx/mach-mini2440.c index a83db46..d8273da 100644 --- a/arch/arm/mach-s3c24xx/mach-mini2440.c +++ b/arch/arm/mach-s3c24xx/mach-mini2440.c @@ -519,6 +519,7 @@ static struct platform_device *mini2440_devices[] __initdata = {         &s3c_device_iis,         &uda1340_codec,         &mini2440_audio, +       &s3c_device_timer[0],  };  static void __init mini2440_map_io(void)