Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3014482rwb; Mon, 15 Aug 2022 16:10:27 -0700 (PDT) X-Google-Smtp-Source: AA6agR5tgOJa7dTJUABxEdjHS3aSOXD7wApA1i63tdM4wJsnmEO08E0RnsyHS8RVZ/kj+WK22fU2 X-Received: by 2002:a17:906:8445:b0:730:ba5a:ef59 with SMTP id e5-20020a170906844500b00730ba5aef59mr12198369ejy.182.1660605027517; Mon, 15 Aug 2022 16:10:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605027; cv=none; d=google.com; s=arc-20160816; b=CDBRpdz8sknMx70gSC1p8YHZE8vDa/Mqlf59Xi187jactYIil1RahSneMQ1rCyN0CL YxcRK5hJDuRSvZC2D6bXzTdbemxEV4zhdhPh3mHLSeR4VxEbQdbhDULiNVCs0m9d3CKM jBThQl6WR5MH8hHWf8un/hLLVs8izgULa6BgwmqN9shjMsXxfc26iCb68faOGN5h9PaE 8IAgCfGgoR/epiR5yW4J/oQSNT4dKEt40xAdCFAbEQb1nqX8rnn2FpbhC09jWn3rQuRj lE1157zwJBJX+5dg7SpBTYF2e/2Hj+aQLwmONRGVYDLJ/Z+fxGpb5DmtbydZX0pXAw4F 6lOQ== 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=1Bir4ESJw0IA+2SVfGdon9u0Q83yN5+MxT9HI0O4MdqYz+OoR3Fe+Bodx7HlALjcfi xMIYk4IMEVZDZ1PAePwEwAt44RYLQl9vnor4IFe915Qku0/YJ3BgRQml8H5fReQSpRQs DSXRJAHSH+3ay4C3yzTcryfp7BvcXr9XbZ3s9+gWmLIPNeO8pbjFmL2TiyGyEgGJOHfQ b3dAoRRGFg9aOCEZUmamXnDL6w91Pqm01xWkwwoVPzgLvdWfkdR7DV04R68t8km8sl19 0bIchwN4HNz6XK3Vlsr/mDfjJfwXRNCgQab6lF5Qb+kbsAG5yMfUmkq/nd1tdQN84QbO 3Czg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fSeUHA5X; 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 y9-20020a056402440900b0043d0b0de3f3si9870298eda.532.2022.08.15.16.10.01; Mon, 15 Aug 2022 16:10: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=fSeUHA5X; 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 S1347262AbiHOWDs (ORCPT + 99 others); Mon, 15 Aug 2022 18:03:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348684AbiHOWBS (ORCPT ); Mon, 15 Aug 2022 18:01:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25ADBAEDA1; Mon, 15 Aug 2022 12:35:50 -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 8BDA06113B; Mon, 15 Aug 2022 19:35:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 92945C433C1; Mon, 15 Aug 2022 19:35:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592132; bh=7M4uIosGCQ+JVXn5ixS/gPXhPLLzxgVy6nzH25ETjwQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fSeUHA5XEMkRfPwD/Z03uDeFEfb0tZcHw5mSHuiAyy8uYcZ68DMphwGrd2evma83m 6eSpNO3mSjrBDFotn9ZFW7BZsOm1G+IPQQy/5rE6dOSD+sf7+BILma50anEG+e8THi TmTh8CCFjfMz0/c+6tskQi5G6ip+/G7OSFY0HkeY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.19 0063/1157] parisc: Fix device names in /proc/iomem Date: Mon, 15 Aug 2022 19:50:19 +0200 Message-Id: <20220815180442.022281406@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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