From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DD74EC433F5 for ; Thu, 16 Dec 2021 23:32:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KCNbCZ7mEGu1l8NyNkTwMcl2XJmOfejb3CS/gF+MSXo=; b=SHMJ8OgLQL1Tz8 haKEx9pC2MsbJ2nuS6XYyjJR+2Ii/aD3s+8x7ucLdfEOjcSqX1CKO4yrSHzIS4g52pn9EqwJnxLQX i7czuGCwbEZYRBlqh4KZp6NXnd6+squgYBfB2/GXplM9DF6Uai2t6cnO6SDT6/qdw5vhU0CY74yI2 fy7WaIuE2XPiwHgMWjSLaVmOwdviDzJS7MyTI4JkN1epQSfM0byOP/0A+1NCNYD+0sihTT4qnBnbF L7aStJss+NZBZ6hFVdkZmBkr9ubrawuT4iW6nwuN8f7bcF8H1mv5MnCUiF3ziZ7Q6Ieb3KDfbcPYX LdjQdQpzyOQLoS/6EPeg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1my0Dt-007wJl-E5; Thu, 16 Dec 2021 23:31:41 +0000 Received: from mail-ot1-f49.google.com ([209.85.210.49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1my0Dh-007wGf-Gu for linux-arm-kernel@lists.infradead.org; Thu, 16 Dec 2021 23:31:30 +0000 Received: by mail-ot1-f49.google.com with SMTP id u18-20020a9d7212000000b00560cb1dc10bso747542otj.11 for ; Thu, 16 Dec 2021 15:31:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4CeoqAJqaVjfhKA4w5q6EV5uHP8MjvTT5rLWnYTWgO0=; b=E760L28AKDI8eduKiMvMS6RYYk/Ub+9rZByJb9phS+LTQItP6UmCW2Wmn1Efv5tZKR M3F9ztRcotuns8reb0JoDUejHiZrsBAOlMQIa/O9p97oBtb975iqzsDB3wgqvBykm9yJ HRPlmheeYwpDgPuSfx7Qc8+ifr2HqEvfp/fJEhVKmVybXyk6yLd0Uyz0O1LTH9zxvoOc TEazZzAYicmSBGlSOfvwBIOhY9xCAZ8Pm1oW0d/Gj0fn/ZBC8HoI45Gj+ARJD7S2f8dS rJaCrDU2ux3nRW5r9HY0teBxUi7gPmzjSFdb2rhJy0PKysXXEG83BZ+DkYdmyugjsqYg 3UfQ== X-Gm-Message-State: AOAM533shkt47mGV60kepHgudYOuKz2r0yB1rMzR2MxszEswdKV9ZyYs aqsBlqw7kU3JiejuhWcXMw== X-Google-Smtp-Source: ABdhPJyRWgdmPmwqOixG+a/R4k7YU6rVBoJiG5qt9epniQEIzD8xrctDnOgNQDBQZkPK0EiqPA6Tqw== X-Received: by 2002:a9d:7cda:: with SMTP id r26mr329913otn.5.1639697488458; Thu, 16 Dec 2021 15:31:28 -0800 (PST) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id n11sm1256646oor.9.2021.12.16.15.31.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Dec 2021 15:31:27 -0800 (PST) From: Rob Herring To: Greg Kroah-Hartman , James Morse , Jeremy Linton Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sudeep Holla , "Rafael J. Wysocki" , Len Brown , devicetree@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH 1/6] cacheinfo: Allow for >32-bit cache 'id' Date: Thu, 16 Dec 2021 17:31:20 -0600 Message-Id: <20211216233125.1130793-2-robh@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211216233125.1130793-1-robh@kernel.org> References: <20211216233125.1130793-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211216_153129_580984_CEA3ABBD X-CRM114-Status: GOOD ( 15.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org In preparation to set the cache 'id' based on the CPU h/w ids which are 64-bit on arm64, allow for a 64-bit bit 'id' value. The only case that needs this is arm64, so unsigned long is sufficient. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Reviewed-by: Sudeep Holla Signed-off-by: Rob Herring --- drivers/base/cacheinfo.c | 8 +++++++- include/linux/cacheinfo.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c index dad296229161..66d10bdb863b 100644 --- a/drivers/base/cacheinfo.c +++ b/drivers/base/cacheinfo.c @@ -366,13 +366,19 @@ static ssize_t file_name##_show(struct device *dev, \ return sysfs_emit(buf, "%u\n", this_leaf->object); \ } -show_one(id, id); show_one(level, level); show_one(coherency_line_size, coherency_line_size); show_one(number_of_sets, number_of_sets); show_one(physical_line_partition, physical_line_partition); show_one(ways_of_associativity, ways_of_associativity); +static ssize_t id_show(struct device *dev, struct device_attribute *attr, char *buf) +{ + struct cacheinfo *this_leaf = dev_get_drvdata(dev); + + return sysfs_emit(buf, "%lu\n", this_leaf->id); +} + static ssize_t size_show(struct device *dev, struct device_attribute *attr, char *buf) { diff --git a/include/linux/cacheinfo.h b/include/linux/cacheinfo.h index 2f909ed084c6..b2e7f3e40204 100644 --- a/include/linux/cacheinfo.h +++ b/include/linux/cacheinfo.h @@ -48,7 +48,7 @@ extern unsigned int coherency_max_size; * keeping, the remaining members form the core properties of the cache */ struct cacheinfo { - unsigned int id; + unsigned long id; enum cache_type type; unsigned int level; unsigned int coherency_line_size; -- 2.32.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel