Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp796893rdf; Tue, 21 Nov 2023 17:48:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHda5IazO925letniA+0tt5tUbKADVNkfPhK04hmmMJyn0DIoEltiEH+1Z6LqSxwtyQYqUl X-Received: by 2002:aca:1e18:0:b0:3b5:37c6:6dcb with SMTP id m24-20020aca1e18000000b003b537c66dcbmr1106464oic.21.1700617692990; Tue, 21 Nov 2023 17:48:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700617692; cv=none; d=google.com; s=arc-20160816; b=JHhHdDJzXucsqf2luNVj4MzT8opx0QxA6Un+Zggq59k5oJsyRlc2z5bVF/0WanP2OX LlUz+YUTkCDoyFbMJ94Qvya50R52ceUO68rlmWx1QyFtfrq2mKxk9HHYHJnvmDuqUIAz A0G1yg4wnvpJSuFfkMVjYbTbKt65pOGcGxrGxBOqaLX5P6+tnfOgrwg9jW6dSmM2Sz4z zYqGgdsvG2kE2WJ8vsiHsMnZZYxh040aC5mg5gzz9V7JJrSysxMTz3Jfi1hbn53apNII Az2hzRsk7v56ci3B+VLlC3SCwtg9RA+ERvN7y/kExED6uEBlf6mODIaMEe/Vmz8/RlCd pqrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=+HHlh6rPcGUnKW8ceaHbkKWRA/p99wmeiArQFNzZvO8=; fh=ujQQqRN+6CJogBFFMhCLgt0M/wmJUFrtWlEZPPVDfoA=; b=PT9dBjLyoI766gjyz806d6y44HQBHTzM+vDvw/PHfYOrCtu2WSBatOeYtCem6IvDEL qKT50bxb8aS+UMX0HUV94BjFaXzLVeRcM7gDCdQyizhYSKaG8WTlLaNYsUpJgkzOxWP9 /cJzV3/0ft7wfNKjqgxRc75MQdT5TxKh5RmIfoHXE8Vrp4moAjt9pCxdGtbcsw3lgWIw 2QvO4gHy9Xp9J2+SFD/C7Puhkk7rJSBLga7ATGINWozt4ckFZaROKSthi7LnU731Dbpu 3PJt0fBbqhYu0iNgLkhq2Zncc5ALGMja+9tCEM/JYhH6CH7Vktw1maDiFsuDBC/qsrjE +SrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=aio2GqOd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id s6-20020a63e806000000b005b91518ab92si11030695pgh.671.2023.11.21.17.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 17:48:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=aio2GqOd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 32573807C65C; Tue, 21 Nov 2023 17:48:10 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229894AbjKVBsB (ORCPT + 99 others); Tue, 21 Nov 2023 20:48:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjKVBsA (ORCPT ); Tue, 21 Nov 2023 20:48:00 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3B85A4; Tue, 21 Nov 2023 17:47:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1700617671; bh=+HHlh6rPcGUnKW8ceaHbkKWRA/p99wmeiArQFNzZvO8=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=aio2GqOdZ0h4bAiFX1GZwLHcBo0BjvuIQMUllBXrVntKvFTB9+CzBP1JEK9hO4+Zw pxxaBtf1UT6ZwYEWwnsSi2jxknguTJB/vrQJ3RkUhSaUt4GIOdcJKAQsQXL72qyuI3 jdHSWcWRTzx0SUzG/jmwBGmrvrVkReWcFdJ2vVYhPBxR1LmGlhgv8suoAzxqbbRQbY G0rq2dBQbqZjCTy/uZw8rieyqVTbBbts9MBZpGghPtyFwsGE4sZDEkh666Z0UmBetw iUpaGp2FL73xeDnYkljvOJwLR243Kw9+fxkfpUq5cN7kHABqbhpp9YhGgxi4jRf4g6 eFEsNUgA/k9Mg== Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4SZkdy2pWTz4x7q; Wed, 22 Nov 2023 12:47:49 +1100 (AEDT) From: Michael Ellerman To: Zhao Ke , npiggin@gmail.com, christophe.leroy@csgroup.eu, fbarrat@linux.ibm.com, ajd@linux.ibm.com, arnd@arndb.de, gregkh@linuxfoundation.org Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Zhao Ke Subject: Re: [PATCH] powerpc: Add PVN support for HeXin C2000 processor In-Reply-To: <20231117075215.647-1-ke.zhao@shingroup.cn> References: <20231117075215.647-1-ke.zhao@shingroup.cn> Date: Wed, 22 Nov 2023 12:46:51 +1100 Message-ID: <87sf4yk19w.fsf@mail.lhotse> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 21 Nov 2023 17:48:10 -0800 (PST) Zhao Ke writes: > HeXin Tech Co. has applied for a new PVN from the OpenPower Community > for its new processor C2000. The OpenPower has assigned a new PVN > and this newly assigned PVN is 0x0066, add pvr register related > support for this PVN. > > Signed-off-by: Zhao Ke > Link: https://discuss.openpower.foundation/t/how-to-get-a-new-pvr-for-processors-follow-power-isa/477/10 Hi Zhao Ke, Thanks for the patch. Just a few questions. Are you able to provide any further detail on the processor? Your cputable entry claims that it's identical to the original Power8 core, can you comment at all on how true that is in practice? Unfortunately the kernel has some hard-coded knowledge of various non-architected features, which are not controlled via the CPU table, and are instead controlled by firmware. So you'll need to make sure you set those correctly, see init_fw_feat_flags() for details. One other comment below ... > diff --git a/arch/powerpc/kernel/cpu_specs_book3s_64.h b/arch/powerpc/kernel/cpu_specs_book3s_64.h > index c370c1b804a9..4f604934da7c 100644 > --- a/arch/powerpc/kernel/cpu_specs_book3s_64.h > +++ b/arch/powerpc/kernel/cpu_specs_book3s_64.h > @@ -238,6 +238,21 @@ static struct cpu_spec cpu_specs[] __initdata = { > .machine_check_early = __machine_check_early_realmode_p8, > .platform = "power8", > }, > + { /* 2.07-compliant processor, HeXin C2000 processor */ > + .pvr_mask = 0xffffffff, > + .pvr_value = 0x00660000, > + .cpu_name = "POWER8 (architected)", Using "(architected)" here is not right. That's reserved for the 0x0f00000x range of PVRs. You should use "POWER8 (raw)", or you could actually use the marketing name there if you want to, eg. "HeXin C2000" or whatever. cheers