Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758629AbZGHWKI (ORCPT ); Wed, 8 Jul 2009 18:10:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756755AbZGHWJ4 (ORCPT ); Wed, 8 Jul 2009 18:09:56 -0400 Received: from exprod6og104.obsmtp.com ([64.18.1.187]:58364 "HELO exprod6og104.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1758483AbZGHWJy (ORCPT ); Wed, 8 Jul 2009 18:09:54 -0400 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Subject: RE: Problem with /proc/iomem on ARM Date: Wed, 8 Jul 2009 18:09:51 -0400 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem with /proc/iomem on ARM Thread-Index: Acn6fFjScMtTTYugSSGknQ8Ieg+ybAFm9+Gg References: From: "H Hartley Sweeten" To: "Kay Sievers" Cc: X-OriginalArrivalTime: 08 Jul 2009 22:09:52.0710 (UTC) FILETIME=[D1798E60:01CA0018] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by alpha.home.local id n68MAWXx029080 Content-Length: 1767 Lines: 48 On Wednesday, July 01, 2009 11:47 AM, Kay Sievers wrote: > On Wed, Jul 1, 2009 at 20:24, H Hartley Sweeten wrote: >> On Wednesday, July 01, 2009 11:13 AM, Kay Sievers wrote: >>>> The serial ports on my system are amba bus devices. >>>> >>>>> After all, it seems like this should be fixed in arm somewhere, >>>>> not to copy and store internal driver core pointers, but use the >>>>> device itself to retrieve the values. >>>> >>>> Maybe the problem is in drivers/amba/bus.c? amba_device_register() >>>> does: >>>> >>>>        dev->res.name = dev_name(&dev->dev); >>> >>> Looks like. If you get the name directly from dev->init_name. Does >>> that work? >>> >> >> The following patch does fix /proc/iomem for the amba uarts on my >> system. Is this the correct approach to fixing the issue? > > Looks fine to work around the issue that statically allocated struct > devices can cause. The proper fix would be to convert them to dynamic > objects and get rid of .init_name entirely. Disregard. Russell King added a patch that fixed the issue. I just showed up. commit 557dca5f48a45df88a73e69ee0700cfd4e2358c9 Author: Russell King Date: Sun Jul 5 22:39:08 2009 +0100 [ARM] amba: fix amba device resources AMBA device resources were being reported as: 10004000-10004fff : This is because dev_name() was returning NULL prior to device_register. Ensure that the struct device is properly initialized, and the name is set before adding it to the device tree. Signed-off-by: Russell King Thanks, Hartley ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?