Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3386542rwa; Tue, 23 Aug 2022 04:03:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR43SVLJx866ObMa5FgvP0AMWeRsmV1py0PlGKpbvco2qxumyn3SHC7mS+JkZkYF+OjoeMC0 X-Received: by 2002:a17:90b:2685:b0:1fb:1884:ebd2 with SMTP id pl5-20020a17090b268500b001fb1884ebd2mr2740146pjb.61.1661252638212; Tue, 23 Aug 2022 04:03:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661252638; cv=none; d=google.com; s=arc-20160816; b=HRulFweD1Tl1i5ypGXrF/NnPfrkoOpDrrLQLPEXHrN0e1bKT/1Ovxo5NbStiT7skNa kV0I1C27R4Owq6sJysKt6Q7HJNWdYw4/1NU+TOq9a6r8QijCLLFel2jNRn5MoiTyQ+I6 XHCCLgQ6zKVK3q1GqfSLG2PT9l/swbFhtlpzIgfNeETlGfvxsO8YbGZrpjXqSVy9sZaZ Gjdz5zEjn2Xzp8PXnRso2CQlVDtyrxg5ucOnBStCo7b1tHu+2RvWoQwo7gYGYR972bYN hniolWLsJRD4zozscN3IF9xLzovJ1/utWaqQmVBaW+V4EUWrMoY2rZD1pExi9Nqkd8W2 Tt2Q== 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=AX65XB06gzjf+rk22NJhzVwSt8NWdoLvJY/XpG1kE2g=; b=RtNG8RWLly8W/Vn/UOK7t+uwd3g5JZEF0+w9gVx+7JRueepgH48N/BBg8hUMt0P75I q4kRVgalSK//wXib5Q6puHd8cBu/fmBFFbN714xGq1DxSmUpiVdGqLDGF0L/jMDTilzd XBWq1k6sgpoK1dlMZfzu2x30pMRLXPAG7o5VdEPiXyOPcbNfpIPWxHyOPOdoIhXp6J2I o3Pbn+Mb+SMuIYDMH8lwWLboqblRlqXWRgRK3nIeUk9/iavfeKIOaP9/UpN8z4WGlBxw Ebhlfw/eeyfkaAqpEUUIfnYVYFl+obqjI39gB7xqIKwSy3YwE8XDXyg6qx1UMpzF6wxr nTyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wWL4YHd3; 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 nv16-20020a17090b1b5000b001fb71ad2590si360389pjb.43.2022.08.23.04.03.47; Tue, 23 Aug 2022 04:03:58 -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=wWL4YHd3; 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 S1350342AbiHWJb7 (ORCPT + 99 others); Tue, 23 Aug 2022 05:31:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51022 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350527AbiHWJaX (ORCPT ); Tue, 23 Aug 2022 05:30:23 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEC37923F0; Tue, 23 Aug 2022 01:37:54 -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 9EA39B81C35; Tue, 23 Aug 2022 08:36:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01561C433C1; Tue, 23 Aug 2022 08:36:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243804; bh=vWwA4f4O0Bfos50TDwGtYO/p5gav7IBXlJJI5sEDmao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wWL4YHd35MhrYi0OnY8k53WozE7iVZ1XwCQV5fYF50Uu7zpsWho4QpAtPTqePXz/g Thgdivg/y5qEY6yPjvbHPr0HchTlmeG9Xtq+kYcXclr0W8AxNgVEeeFWLofkFVpLej uNS+komgNRVumxZ+EclChohyq4KdFLxoI+jSO+cg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 4.14 026/229] parisc: Fix device names in /proc/iomem Date: Tue, 23 Aug 2022 10:23:07 +0200 Message-Id: <20220823080054.396142524@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@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 @@ -505,7 +505,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 @@ -519,10 +518,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