From nobody Wed Dec 17 09:12:18 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A5B2C49EC5 for ; Tue, 23 Aug 2022 10:32:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355385AbiHWKbz (ORCPT ); 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-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 =3D iodc_data[1] & 0x0f; dev->id.sversion =3D ((iodc_data[4] & 0x0f) << 16) | (iodc_data[5] << 8) | iodc_data[6]; - dev->hpa.name =3D parisc_pathname(dev); dev->hpa.start =3D 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 =3D hpa + 0xfff; } dev->hpa.flags =3D IORESOURCE_MEM; - name =3D parisc_hardware_description(&dev->id); - if (name) { - strlcpy(dev->name, name, sizeof(dev->name)); - } + dev->hpa.name =3D dev->name; + name =3D parisc_hardware_description(&dev->id) ? : "unknown"; + snprintf(dev->name, sizeof(dev->name), "%s [%s]", + name, parisc_pathname(dev)); =20 /* Silently fail things like mouse ports which are subsumed within * the keyboard controller