From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH] Serial: Avoid enabling clocks when clock node is null. Date: Tue, 20 Apr 2010 16:30:29 -0700 Message-ID: <87mxwxbt2i.fsf@deeprootsystems.com> References: <40436.192.168.10.89.1271750521.squirrel@dbdmail.itg.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail-pw0-f46.google.com ([209.85.160.46]:33872 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753425Ab0DTXab (ORCPT ); Tue, 20 Apr 2010 19:30:31 -0400 Received: by pwj9 with SMTP id 9so4717782pwj.19 for ; Tue, 20 Apr 2010 16:30:31 -0700 (PDT) In-Reply-To: <40436.192.168.10.89.1271750521.squirrel@dbdmail.itg.ti.com> (Govindraj R.'s message of "Tue\, 20 Apr 2010 13\:32\:01 +0530 \(IST\)") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: "Govindraj.R" Cc: linux-omap@vger.kernel.org, Tony Lindgren , Venkatraman S "Govindraj.R" writes: > This patch ensures that if a particular uart clock node > was not acquired then do not proceed with enabling clock > and device registration for that uart. > > Without this patch if uart_ick/fck value was null > then it throw oops as below and boot will halt. > > <1>Unable to handle kernel NULL pointer dereference at virtual address 0000001c > <1>pgd = c0004000 > <1>[0000001c] *pgd=00000000 > <0>Internal error: Oops: 5 [#1] > <0>last sysfs file: > Modules linked in: > CPU: 0 Not tainted (2.6.34-rc3-00006-g7da06f1-dirty #15) > PC is at omap_serial_init_port+0x64/0x3a0 > LR is at 0x8 > pc : [] lr : [<00000008>] psr: 60000013 > sp : dfc2bf80 ip : 00000000 fp : 00000000 > r10: 000007c8 r9 : c05c65f8 r8 : 00000000 > r7 : c05c6dc0 r6 : c000b44c r5 : 00000000 r4 : 00000004 > r3 : 00000007 r2 : c05c6538 r1 : fb020000 r0 : c05c6dc0 > Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel > Control: 10c5387f Table: 80004019 DAC: 00000017 > <0>Process swapper (pid: 1, stack limit = 0xdfc2a2f0) > <0>Stack: (0xdfc2bf80 to 0xdfc2c000) > <0>bf80: 00000003 fb020000 00000004 00000000 c000b44c 00000000 00000000 00000000 > <0>bfa0: 00000000 c000f880 c002e288 c00135e0 c002e288 c00137f4 c002e288 c000b464 > <0>bfc0: c002e288 c003e34c 00000031 00000000 00000000 00000192 00000000 c002e288 > <0>bfe0: 00000000 00000000 00000000 c0008578 00000000 c003f970 ffffffff ffffffff > [] (omap_serial_init_port+0x64/0x3a0) from [] (omap_serial_init+0x28/0x3c) > [] (omap_serial_init+0x28/0x3c) from [] (zoom_peripherals_init+0x44/0x6c) > [] (zoom_peripherals_init+0x44/0x6c) from [] (omap_sdp_init+0x14/0x54) > [] (omap_sdp_init+0x14/0x54) from [] (customize_machine+0x18/0x24) > [] (customize_machine+0x18/0x24) from [] (do_one_initcall+0x5c/0x1b8) > [] (do_one_initcall+0x5c/0x1b8) from [] (kernel_init+0x90/0x144) > [] (kernel_init+0x90/0x144) from [] (kernel_thread_exit+0x0/0x8) > <0>Code: eb00ef8f e597c06c e3a0e008 e3a03007 (e5dc201c) > <4>---[ end trace 1b75b31a2719ed1c ]--- > <0>Kernel panic - not syncing: Attempted to kill init! > > Cc: Tony Lindgren > Cc: Kevin Hilman > Reported-by: Venkatraman S > Signed-off-by: Govindraj.R Acked-by: Kevin Hilman Should be queued for -fixes. Kevin