Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3469524rwa; Tue, 23 Aug 2022 05:24:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR6rRaVoA6g3ncti+b40mhK1JVO2EJQ+ZJDCAry2sp1WBZlVehZ6wAOIgIX6+ugzQwAeb17j X-Received: by 2002:a05:6a00:1803:b0:536:e9a4:89d4 with SMTP id y3-20020a056a00180300b00536e9a489d4mr4399408pfa.28.1661257450649; Tue, 23 Aug 2022 05:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661257450; cv=none; d=google.com; s=arc-20160816; b=bBKH4Ch/71+fnQepHxYpZFCl4I7oBvuWQgj1A6pQ57SobpHTEtoyfsp4nREXUaN+3G FK8S4EpIIbvJm6wMini9N/FtqoEjX5HA3r0Wd5R6bMbQbN8Pfux1JAXbcPesmU6U+suw 6AYM5lGNW3eB2QEwDeESZ6qB9twwrfnZjr4pndxt5oW0XxXIjCQxhX0g98FS8oYGkCj3 5B4gcTkdbBqHht55Nfxm8Pa42ev33QJ5TA/DW4q+f4rKQv+g80j3OzMK4MSVJicVGBZD rVFAdLiW6Zeg3C8k3DTVhUGlVIzh6NuaWAXRIQIIdB5nSQqo+lwab8x9DIRwS/KrQ9+/ 4FkA== 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=p445ucpAXVtVeSeRfjP7NRKo6xvQzmT9HXbKDqKCwTc=; b=glCqc8zqJxi1kM5Ueqjso8KYedFxo3N2dAOEgXoXgmw74yWg7QW48rYxbqs1QbvWUD VJnkhqOJptn3CjPLCPleee90Pf4zCv2v4UcWVqoCtLoOr23ObC3x5Zu849vBaGIDS611 SBKx+n+MNUR85cZ343Ygk12MVNReIFUUDrLDRMNeBgRLzy2r7p7D42Gt9mPIV92Z9Jol DEB/2+Kol7lKvXtPeQ44qjKO1x3ecQP4iwHOdmubQfmjdP1hiGTCjuB2oyynOYBDBJv5 O6M/h6NYDBtkrdcOtlJVJ1/wON30T8EEfgne5/l8cB9NCXr69y9/x4hL5AibbFmc+KjT TacA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ei2DdEDz; 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 g12-20020a63200c000000b004299f17732fsi15846670pgg.138.2022.08.23.05.23.59; Tue, 23 Aug 2022 05:24:10 -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=ei2DdEDz; 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 S1355378AbiHWKbz (ORCPT + 99 others); Tue, 23 Aug 2022 06:31:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55980 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353768AbiHWKPx (ORCPT ); Tue, 23 Aug 2022 06:15:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A5CE7FE4E; Tue, 23 Aug 2022 02:00:55 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 4280561524; Tue, 23 Aug 2022 09:00:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D705C433D6; Tue, 23 Aug 2022 09:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661245254; bh=pi9vYBZD2zfpl5KFECfULYdO7ZxPwT/FN8MkrKh2USc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ei2DdEDzr9h50gu335DFp82O3Co+iCOEyFUQvojMh3EuVodscXfYUOUjv8ZmDYPu8 KPQUoFYJmC2MLiHJiehQ1e3j7y0Q3SxdeV2pMbUBLXe/47a2uVNXYLACpJNeuR4CkH tTEbqmbbrIr6LuFkxblaj1wMMy9f/zcP7jGeJhJE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 4.19 021/287] parisc: Fix device names in /proc/iomem Date: Tue, 23 Aug 2022 10:23:10 +0200 Message-Id: <20220823080100.992430625@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080100.268827165@linuxfoundation.org> References: <20220823080100.268827165@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 @@ -499,7 +499,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 @@ -513,10 +512,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