Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2893328rwb; Mon, 15 Aug 2022 13:28:28 -0700 (PDT) X-Google-Smtp-Source: AA6agR70Bxt/50jLABbwEzL3Z7RNjOMd9iQCuMBZQsVbX2gOI8dXbaS5sfqthO203iRxclhHros4 X-Received: by 2002:a17:907:2c6b:b0:730:e952:4140 with SMTP id ib11-20020a1709072c6b00b00730e9524140mr11807320ejc.702.1660595307941; Mon, 15 Aug 2022 13:28:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660595307; cv=none; d=google.com; s=arc-20160816; b=cANT3f5rxrX56D9p9JZUTuakbd6owO0Iv+wY0qZxn7yPQAdfbYBF3vfncE+Z55DsYQ KHCu+tmXusqD7V1F8bzVcWxPtziwHyKuOY3YatP0QBcSM988aC+yUa5O/IL9G2P3PdjJ 9agfdxBKmEo8FqZoYyzr+Nf3Nx3NdjFYptjfEljMr2P6AOGaIKusDfyFNznOrt/3f5SX KtwzCDUGAWRA0a++VnZCzQ9vRdehivuDApr10KvgfhFhwV2j+wzgppHgP/ZkESBLmz6/ LuccqqrAB+zW9+SM3JZIRJuHjU19fGXDZjxn8x/aMpHVgXjC2Y5MUou0DwiS9xvzizQ+ SE8w== 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=KEvk1sz+iQj/3SN8lvDdgES4S0pjEHXxxKelbTnLtRQQpMPrgX6cqjPDqX3z2WZPDT mpZgw1tvvEq0gffnr2px7rsCUVgqR1W+T4mwrVRkef27YH3dGO3WpiQ8ebW6x3jOwJv4 H7EmVPZ9Zkw8oyJmFkqINNKzJWSN6MlulJbXrXFELRFNUPhANuk0w+30TecWdCb6O5xq 2EZqhRXpWQInU6rA2ijeTJ2w7lEnHJdoGgO0wOeTZgNGyVR4nhvJyqod86vsIWnL+RIX JyuJ4wdbAg8G5GeDwPvK7E7VpfYbrC2iR6Cn8WcmJ3j6K8q4JkLNFhwZLDrUaVP33GxR 1qBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QbAPji8L; 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 go16-20020a1709070d9000b0072f1f3ec581si10565004ejc.264.2022.08.15.13.27.37; Mon, 15 Aug 2022 13:28:27 -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=QbAPji8L; 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 S1346242AbiHOUTr (ORCPT + 99 others); Mon, 15 Aug 2022 16:19:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346199AbiHOULD (ORCPT ); Mon, 15 Aug 2022 16:11:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6166595AB; Mon, 15 Aug 2022 11:56:57 -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 04674B8109E; Mon, 15 Aug 2022 18:56:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85881C433C1; Mon, 15 Aug 2022 18:56:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660589814; bh=7M4uIosGCQ+JVXn5ixS/gPXhPLLzxgVy6nzH25ETjwQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QbAPji8LjhG8H/w3nZZNAp7qjnTX7s/eKd3E9lpHSMZ0v7oeeV8kk3s5CrqnN6Cwa AS64QYv7Q+8UnCQWbaVWLQzPt9JV7a6zSv5JFTwVVUJ4nRLYHlFuxAYMUds2FCv08p TTAa5veIBJCq/llzbG5UgHZ32FA2QYZ3sqJW1WfM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.18 0056/1095] parisc: Fix device names in /proc/iomem Date: Mon, 15 Aug 2022 19:50:55 +0200 Message-Id: <20220815180431.782149817@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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