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: 4378081 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5535EBEEAA for ; Wed, 18 Jun 2014 16:57:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6AB132037A for ; Wed, 18 Jun 2014 16:57:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7E61420379 for ; Wed, 18 Jun 2014 16:57:48 +0000 (UTC) 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 (/) 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-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=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 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;