Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1860919rwb; Fri, 19 Aug 2022 10:35:44 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Ak4Inxzqdn2QBNiO9+1Lrq4TTG5Or23jzhtJmXdm7XFbfL3SoIZ0Y/nwp/C7WnicDanKy X-Received: by 2002:a17:902:f54e:b0:16f:206b:74cc with SMTP id h14-20020a170902f54e00b0016f206b74ccmr8373285plf.170.1660930544484; Fri, 19 Aug 2022 10:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930544; cv=none; d=google.com; s=arc-20160816; b=C54OLZBQTkZgBKo3I9IoX5ZOzYUXONB2aAPhw83CCkXIbOnuDYMsU/CfKE+lPzQL4D zNf9gx2ygUAhayBa6Y+nWAve7y+j5Wf+9rQbzhRMwUjDzZjutis+5WWyeqpbroXhkrww nsitS4NLAGSVvi3qZNwOK+Jxn007BCr1LcAkd1/MigLue+OSb2fNezxZIEmoK1ljWp/r InAewBbHuMuc4r7nL0UV63QGrchpEO85ZP1J5Gp8Jr8w7lM7MFcp6CL9GbOm+oI1dFlk N5IeqtQ5rQaBXeiiZy4WeiKwgfTc8eFeHZ2bOqr7wf7L4S6hHwTiuMN0cqPvmqRFvGo0 i8MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=c716Tf3d0OKTHhw2YXoUgRprhMqyUuOxsKR10pwTh2o=; b=ZdcD8gqmGIvL6t4mIriAjMBs9zoMC/w/e9z8Ua2NxSWow0lNqvlCOji3xXorBv7oPn fjDWWkle5UzmEqQ9CRcHcAfwomlEd7rc/htaFOmXKxHFyMOrzhtV8G+1ulkyafpG4Q0C FVfJvVXkXufsXzccJjCDgnU1K1XY4IgpATIMPmywyz2bGwYSoMAgmBFJJd+VE/IKEOfL dYF0PwwfQjs6tSzDKfCxWBI1F+5knT5eIMOGJfN9sgeIwNX97PkoH3cbfBFGxKW15IcG liHEfGna6HZnpfY3kcee/VD1XyBvg+UVAkOqeEnoJ3I62rU6otx3r5EuYhR7ajFP6MlK DYIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p7ud4hjv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b1-20020a170902d50100b00158bfb59d03si1911891plg.382.2022.08.19.10.35.33; Fri, 19 Aug 2022 10:35:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=p7ud4hjv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350279AbiHSPtu (ORCPT + 99 others); Fri, 19 Aug 2022 11:49:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350221AbiHSPtK (ORCPT ); Fri, 19 Aug 2022 11:49:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5A6D10446A; Fri, 19 Aug 2022 08:47:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 06EE6B827F8; Fri, 19 Aug 2022 15:47:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D331C433D7; Fri, 19 Aug 2022 15:47:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924053; bh=AeCE1Er0u3+CfgnIcSP0hqc86mkUGBlP4W3KgCbzw90=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p7ud4hjvIlTUetlQ1TBlM9HYRtohVRlafzIJxCJ4hdOIgmFLnLRT4JvY1koxal5pL /lGdQrZgZ9OYpmiB08QVwgzazi6B/zA7ZwUO1RAl/v85aHKvgHFTwBEJ88IAZMYMtm 2OEtZYILTCjrWKAxMXsYFoIp1MzZsBM5Sjke5TTI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.10 039/545] parisc: Fix device names in /proc/iomem Date: Fri, 19 Aug 2022 17:36:49 +0200 Message-Id: <20220819153830.987318036@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Helge Deller commit cab56b51ec0e69128909cef4650e1907248d821b upstream. Fix the output of /proc/iomem to show the real hardware device name including the pa_pathname, e.g. "Merlin 160 Core Centronics [8:16:0]". Up to now only the pa_pathname ("[8:16.0]") was shown. Signed-off-by: Helge Deller Cc: # v4.9+ Signed-off-by: Greg Kroah-Hartman --- arch/parisc/kernel/drivers.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c @@ -521,7 +521,6 @@ alloc_pa_dev(unsigned long hpa, struct h dev->id.hversion_rev = iodc_data[1] & 0x0f; dev->id.sversion = ((iodc_data[4] & 0x0f) << 16) | (iodc_data[5] << 8) | iodc_data[6]; - dev->hpa.name = parisc_pathname(dev); dev->hpa.start = hpa; /* This is awkward. The STI spec says that gfx devices may occupy * 32MB or 64MB. Unfortunately, we don't know how to tell whether @@ -535,10 +534,10 @@ alloc_pa_dev(unsigned long hpa, struct h dev->hpa.end = hpa + 0xfff; } dev->hpa.flags = IORESOURCE_MEM; - name = parisc_hardware_description(&dev->id); - if (name) { - strlcpy(dev->name, name, sizeof(dev->name)); - } + dev->hpa.name = dev->name; + name = parisc_hardware_description(&dev->id) ? : "unknown"; + snprintf(dev->name, sizeof(dev->name), "%s [%s]", + name, parisc_pathname(dev)); /* Silently fail things like mouse ports which are subsumed within * the keyboard controller