Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3592508rwb; Tue, 16 Aug 2022 05:55:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4pv1J1/9gr7SmmQKjiqFU2EwItWezrfsgwk7UISdwzkR/IFbZA0ry28tZO+tmTOPX0oKzM X-Received: by 2002:a17:907:2cd1:b0:730:65c9:4c18 with SMTP id hg17-20020a1709072cd100b0073065c94c18mr13376185ejc.324.1660654522038; Tue, 16 Aug 2022 05:55:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660654522; cv=none; d=google.com; s=arc-20160816; b=tAvfVMQ43eqhzpDA9JSh1PXz+T+vrt5+q8xs32ZtOJRBz7szrvFARvJa94vxICKBzn HBN6lrDdIONsg78cClRFYOsaErHwW1Po3VqI7PEUyiqrpTivb22knI6I5o0UhQZz49wW JwtKDvwFvzUovIkMRFXPXu5SIkew8fbhWb1JmQuchl5svyPgIc6Oc+0SNzlwF7WvSlJj OF3gtdIQgo01ERrky0wfxmx9IM+c00LHe+FhYCisSUYIMMZRqMdNnAb+7CJK5+sPTi9k tX0PZNsFv4wAwjz90/KmAj2jHbXuXod1cvzvo7peXIAXSbYLhE4zO1I3Jyr5sQRXF8L0 vbow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:feedback-id:dkim-signature:dkim-signature; bh=ky0kxryxzgBQxj79y+IZat+dQ+Oo6flqFYfzcpKMIA4=; b=c6xLGEJ6IachENInl7DqybumQTDZKUNud+IMVcP2lCI2fVqyUVrcynsCsG3HO5cVxZ UvVciWZbK0gCiTkuOVt+e/VZepvJ7TxpQyZ9DDm+qPKQfR2R7nIlBmD3zHW+9GXPVvlC pUhf0n4Klhi5cffoqskwz3FiDnWnXBfUjXtl3nwVkGHQNAu4+F3er+X50UlZNoUMrxoS jK1S3cXl1gLYNc2MZfoHZYTytAhGoqeXjv01vQnnNS/80lupw5YETLzddduT11CNq4xa qLh5wIq4HC6s4LQi6+VJDZDKCLJWHGIdrUlaCODZ4sXjKRzeYRHiRLCWIHVb8EJCQ8V4 oTlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kroah.com header.s=fm1 header.b=c4vU59iw; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=vxZ+437S; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a056402194100b0044375e191e6si7618789edz.222.2022.08.16.05.54.56; Tue, 16 Aug 2022 05:55:22 -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=@kroah.com header.s=fm1 header.b=c4vU59iw; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=vxZ+437S; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235081AbiHPMm2 (ORCPT + 99 others); Tue, 16 Aug 2022 08:42:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230104AbiHPMm0 (ORCPT ); Tue, 16 Aug 2022 08:42:26 -0400 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 379DEA0603; Tue, 16 Aug 2022 05:42:25 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id AEBDE3200909; Tue, 16 Aug 2022 08:42:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 16 Aug 2022 08:42:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1660653743; x= 1660740143; bh=ky0kxryxzgBQxj79y+IZat+dQ+Oo6flqFYfzcpKMIA4=; b=c 4vU59iwxGCl8M4ZmetRzeJ/eZJRnXBJs9cZDy9HAxoGwZaBs5mjEppLC60EUVTAo i/DmHxvUyc5w/fASYhgvMJF/xqG5L5qlymeFf1w4tt5WOdm9hMrgdSmGM7+aUFPr MsjIim1+fp3s9tWf42mhv2f0KAB3C320Qwj7TJxJ+vgMRXhGB1raICmVoBIvtKvG OCkVQaS22hDU7Ue7JGAbEKU/91vdVFRv8qC1MT//zOSMB5uLF8Vdz6vl8giPNQLs jCWjgTNXf/p8VyUn4oz+PHen9DKd3w/dEZThvcmts8mDWWdIXUqIF37oi7ORACGV SyMHkg52FtFYmuHdMiSLQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1660653743; x= 1660740143; bh=ky0kxryxzgBQxj79y+IZat+dQ+Oo6flqFYfzcpKMIA4=; b=v xZ+437SagXEit2LSOBnDfTa1yW6teiVy02VaAgMzycWp/NtszNGkP4Nq9xqD3EnG 33W08NEkOr2FW+SrQGChkfKLj6yZhbXoQdA74KhQAAujVBuTrRoDB1fgFMwC8mAQ NpmCqfOEXRJc2h8LE/L/+HJHqJdAqUiPjJjCNEhus8+sDsBbAMhXTdQCGpQ6woCV cqcd59TwcDuR3e37tSZLrluqNrPZ4BkERfQtZC70Eek+a9el1cewM/xuQClJlUyB czGDzIrslWYBHqmNSfYoA6DS+0leg4OpZH4C/q8IQrC29JML8yd4aISGLJkztp2N XwvWcScr07sfYsG25yuhw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdehgedgheeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggugfgjsehtkeortddttdejnecuhfhrohhmpefirhgv ghcumffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeeuhe fgveehuddtkeefkefhhfehtefhkeffteetudeiffekveevffeiudfhvdejleenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhroh grhhdrtghomh X-ME-Proxy: Feedback-ID: i787e41f1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 16 Aug 2022 08:42:22 -0400 (EDT) Date: Tue, 16 Aug 2022 14:42:20 +0200 From: Greg KH To: Jiaxun Yang Cc: "linux-mips@vger.kernel.org" , linux-kernel@vger.kernel.org, Thomas Bogendoerfer , linux-api@vger.kernel.org, f.fainelli@gmail.com Subject: Re: [PATCH v4] MIPS: Expose prid and globalnumber to sysfs Message-ID: References: <20220816091258.9571-1-jiaxun.yang@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 On Tue, Aug 16, 2022 at 01:38:27PM +0100, Jiaxun Yang wrote: > > > 在2022年8月16日八月 上午10:21,Greg KH写道: > > On Tue, Aug 16, 2022 at 09:12:58AM +0000, Jiaxun Yang wrote: > >> Some application would like to know precise model and rev of processor > >> to do errata workaround or optimization. > >> > >> Expose them in sysfs as: > >> /sys/devices/system/cpu/cpuX/regs/identification/prid > >> /sys/devices/system/cpu/cpuX/regs/identification/globalnumber > >> > >> Reusing AArch64 CPU registers directory. > >> > >> Signed-off-by: Jiaxun Yang > >> --- > >> v2: Drop static qualifier for kobj (gregkh) > >> v3: Use kzalloc to allocate struct cpuregs. > >> note: When Greg mentioned about static I was thinking about > >> static qualifier of percpu variable. After reading documents > >> again it turns out kobjs should be allocated at runtime. Arm64's > >> cpuinfo kobj is also on a percpu variable... I guess that was a > >> intentional use? > >> v4: Properly handle err of kobj creation. (gregkh) > > > > Nothing was fixed :( > > [Resending due to previous mail contains HTML. I just got a Macbook > and was trying to use it's built-in mail client. Turns out that it's > sending HTML even with "Plain Text" selected... > Now turning back to mutt. Apologise for inconvinence.] > > Hi Greg, > > Sorry for misinterpret your comments again :( > > Hmm I just use kobject_put to replace kobject_del. > I thought that was what you were trying to say? Yes, I think that is correct (I have no context here), but you can't then call kfree() as the memory is now gone from the last put, right? Try it and see :) thanks, greg k-h