Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2876966rwb; Mon, 15 Aug 2022 13:07:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR6PicjeJyz4zRH2ZORqcqn0gmvnMqrtkTHnwzVI9o3CIJNeR0AhlidMOsl930TlFjhvElcP X-Received: by 2002:a17:903:248:b0:172:7520:db04 with SMTP id j8-20020a170903024800b001727520db04mr3373000plh.99.1660594068328; Mon, 15 Aug 2022 13:07:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660594068; cv=none; d=google.com; s=arc-20160816; b=s465biNpDLCQo/ylZplwPDvaEURijxUD5+8744//eBXXsDMaabKUifGMteIkk612v4 SoNSoCTR4bFPRiMI14u0EXV8r3eD2AeTzDleKOIxJZJInt2Jcu8rmrZvERuXG7nk//PV wdSASYIRigV9yHEbMAhhC2r7eok673h5Vq9lL7GKFQQu7hSbbByK+SSB0H35Td8lGrt0 2+pn9DCZLJuWe8QBpgdaHl8dUH19DLrT3ojQUqSMzkcPjx+xTaqWX2u7FRIW8ilnevJ8 1hq1tiV5KqBwHQpN6FjURCFhM5h3L7WuT1A/LKNV8mD6Vts2MnHRNdxhz8pG8MjWOdwk HJWA== 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=gK4qp+4604tgdAl4RjYS2qbQ1jQmvT2tgIfcswE5VKc=; b=x4GtRrbV76zih7AtXtYB0Smu9CFVe6Ybq4jcLmibZRmwrfSpxnPKLV9wRtAdro7jOa JpN1uJsvVhPV21ytNoMRYkMUcYG93VD2Qn10QspzJaB2r+9mIQyAZ3Oe3gMUZPlzS7xN weaOdOd/BNLM/qgqrguDnKSO9rDGoTybauMYHI06S+y/5hNbMJifgk8h1KvvciT5mHVb VxqYCW5oVyimYj/sgaj+ywGDUfaYDJ6vIG73OQUhlUwoXv6fOnrl0AGrqj6DAkckcLHm lf3Dsl6O40Gl7N0RK+RnCvr4qxp47KG2DzgytJ9y2tkf3VUPrjkfeGkexw77iJuxn/nD 7/SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tRa0nHXK; 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 k10-20020a056a00134a00b0052b29ffa4c9si12361740pfu.347.2022.08.15.13.07.37; Mon, 15 Aug 2022 13:07:48 -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=tRa0nHXK; 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 S240009AbiHOSSo (ORCPT + 99 others); Mon, 15 Aug 2022 14:18:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239338AbiHOSSE (ORCPT ); Mon, 15 Aug 2022 14:18:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EF1F29CB3; Mon, 15 Aug 2022 11:15:32 -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 6B9C5B8106C; Mon, 15 Aug 2022 18:15:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B08B1C433C1; Mon, 15 Aug 2022 18:15:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587330; bh=7M4uIosGCQ+JVXn5ixS/gPXhPLLzxgVy6nzH25ETjwQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tRa0nHXKGemcUISD3zEAf1+a+FN7Q4793RVnDXT5qNZnh04bznHPEJDkUXzs8D9yA R8DeCYBVU+LitPB8GwUjtSZEfF3hyNLOQqmgjNG4FFBiD5WEv5QPqGc8vrgpMmYjd3 k+g4acfbtYFtuiurEidLbHR4b7q/un0AT9L4oBnE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.15 049/779] parisc: Fix device names in /proc/iomem Date: Mon, 15 Aug 2022 19:54:53 +0200 Message-Id: <20220815180339.365686298@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 @@ -520,7 +520,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 @@ -534,10 +533,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