From patchwork Wed Jun 18 16:54:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 361670 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3C0E114007B for ; Thu, 19 Jun 2014 02:58:09 +1000 (EST) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WxJ8e-0000A4-Aj; Wed, 18 Jun 2014 16:55:08 +0000 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WxJ8Z-0007nY-Fg for linux-arm-kernel@lists.infradead.org; Wed, 18 Jun 2014 16:55:04 +0000 Received: by mail-wg0-f47.google.com with SMTP id k14so1120114wgh.18 for ; Wed, 18 Jun 2014 09:54:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=pvrVAXdRWOpxMvX+0ZcLaleyE34C7TdHRcq6Ppl05H4=; b=vibidD0leoSc5Z3G3OCmfu6gMdgLY0xdkUII2DGxw4Co9SSV1qFO/QQbdCEM0isxcu WYnGaqXuKnVAEoP55JkXvWHsP0/XJtfKV/ZHBfN2aJ/mpLiT/LPjmsoLbsJ/vtjShhRa WwRtRCMl36zoKpbgR+LtjSTeNclO13VcNgHiR5vgol6OCZ69phLqNgiMH/kY/QabbVmf CnyLLivf2bvfCaPgiWDUOV4R2nUP+js8XS8yCmW907+JRkb/+9TZUhb9eVxYK/h0hIpL JCFsn5FqJebgtKXXDB/jfEwfMhW8LjMq+SMSch/wliZWuAGizctu2UHcPPIBx7KqKC9x PimA== X-Received: by 10.194.223.67 with SMTP id qs3mr15590817wjc.66.1403110480908; Wed, 18 Jun 2014 09:54:40 -0700 (PDT) Received: from Pali-Latitude.kolej.mff.cuni.cz (pali.kolej.mff.cuni.cz. [78.128.193.202]) by mx.google.com with ESMTPSA id u10sm4758854wix.11.2014.06.18.09.54.38 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Jun 2014 09:54:39 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Russell King , Santosh Shilimkar , Will Deacon , Ivaylo Dimitrov , Sebastian Reichel , Pavel Machek Subject: [PATCH] ARM: /proc/cpuinfo: Use DT machine name when possible Date: Wed, 18 Jun 2014 18:54:24 +0200 Message-Id: <1403110464-29646-1-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140618_095503_740131_2F3B623D X-CRM114-Status: GOOD ( 12.55 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c00:0:0:0:22f listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (pali.rohar[at]gmail.com) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Machine name from board description is some generic name on DT kernel. DT provides machine name property which is specific for board, so use it instead generic one when possible. Signed-off-by: Pali Rohár --- arch/arm/kernel/setup.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 8a16ee5..fbc7b4f 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -875,10 +875,13 @@ void __init setup_arch(char **cmdline_p) setup_processor(); mdesc = setup_machine_fdt(__atags_pointer); - if (!mdesc) + if (mdesc) + machine_name = of_flat_dt_get_machine_name(); + else mdesc = setup_machine_tags(__atags_pointer, __machine_arch_type); machine_desc = mdesc; - machine_name = mdesc->name; + if (!machine_name) + machine_name = mdesc->name; if (mdesc->reboot_mode != REBOOT_HARD) reboot_mode = mdesc->reboot_mode;