Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4590253rwd; Tue, 30 May 2023 07:25:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6IU4wueg5kgTpyq/wMEcQHXCtDV6pXbpK8eR7aP0CNz5MjvX9Q+x9pcF3ShtIO+Dw4NODw X-Received: by 2002:a05:6a00:2444:b0:64a:7723:fe04 with SMTP id d4-20020a056a00244400b0064a7723fe04mr2972919pfj.4.1685456748265; Tue, 30 May 2023 07:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685456748; cv=none; d=google.com; s=arc-20160816; b=MTzpfKFEiuAEQCZom1KUD7Uy43FEZJODe3IgM2rvpSwfiKUcIQecEEeNqWt7Yj1kmY i6U3DAwKbTK+bbFNIoMpb73n00NqQINNI0RIqTqgHehpyGTjZ5jkATQ9VBLSeIqtljr3 SU8m4J+sf+/wSlGbPZWmsGh1fLaAM3/Mgr2nWGLJq//Ban026y8JLNepenHf7e1oxLVl Mv+ivSm2pXcs414NTqqzblNB8VXsLk4iXUuCETasRaUvI2JuBsWuFXhcSpEVWFVI88RE JpCy6bKSwLZtqWw+jUhByzuC2bEXh45CbBN5aEL/uBYiU9CmfF5FhrcF/41+YUrvoafL +dXQ== 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:dkim-signature; bh=+IulQIBtirUcThrjAwEkKzSGyWo6/XDwAC+HJ/65/5I=; b=tFovyiAWqRSZm7YBCVLdyQVF5z4jayjQrU6byW5/nJPgGN+LVRprLAcJIjK2jSk5L4 cPo2o8On6NsAmAKKaqUaZ4IsuUcqdYEMx90rTZmEDZL+XHsDjaMLi3Ryrnbv+xCAEVMj zAt5l9/cgXmkHbjl/D4D2WzgcPzyg1enYsoMoESnaDZ77daV1PzdpaKT/Z3pWrmWekFM zLdJjyLsfw0hz3eGqiqpcADei7assk0dwIgjaoj5ntv+Cv0Npq5jQ3LtUNJvkLj09pq0 wmq1CkO2q2XNZPvGYByvi5UY1sbEEzottFF+tPr7wkfk9J1dgIim81ggFiICKyB/qdFP +XBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=kr7OVgrm; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l9-20020a637009000000b005323e566996si4108546pgc.58.2023.05.30.07.25.35; Tue, 30 May 2023 07:25:48 -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=@gmail.com header.s=20221208 header.b=kr7OVgrm; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232032AbjE3NeM (ORCPT + 99 others); Tue, 30 May 2023 09:34:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232550AbjE3NeK (ORCPT ); Tue, 30 May 2023 09:34:10 -0400 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 29445C7; Tue, 30 May 2023 06:33:53 -0700 (PDT) Received: by mail-lf1-x12a.google.com with SMTP id 2adb3069b0e04-4f3b4ed6fdeso4708395e87.3; Tue, 30 May 2023 06:33:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685453631; x=1688045631; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=+IulQIBtirUcThrjAwEkKzSGyWo6/XDwAC+HJ/65/5I=; b=kr7OVgrmo/3X1eom8iyxzWkSdXk1ttmznTxQpjpsaFIX1IMUu/yoMOhxprmNhjYsHq L8QeSsR+4OMALOpnnXbmDQMeZxF5G50BPboNMn2b6ahBxORavxPGUqhBzLZHMXzrK7j7 7ogJNB8QCRlYYV0q7bX2j5GhjrI2OjX/bpaFrYLvQQxTq0ThvudhrKqdPCkaj9Ri4MIh vm9AIaihyfMh4uhKeh+e/TIHtcJDC8WNHtQbkNW31dT3TQ7QtciJ5pL8iCfZq5GcB/PC 3YQeetIpZuzO5FX92uRxC1p/rT/K+YAkZA9GBGvHM/0HPlaw8TqZv8gPthXcZGCaIdWd Pbag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685453631; x=1688045631; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=+IulQIBtirUcThrjAwEkKzSGyWo6/XDwAC+HJ/65/5I=; b=klDX0yGEU/w3PIauxIo73++VZQuCH84TmmE/ptkhs6ojuQc/hBZqagCyOEV80mCIrP dzYZl3hLNGov7zNL/0jebhW8+iSqwl1G4QAns9chGdZ+gUQ528dHeiCStPNtRWNaHIjn VSU7AvIFvGoZL/mjs8BPdOK0hWo8J1iG6E90OJbT+DhX91D/OKBRMJzAqtHwq6wZxLwu +l9ArvEipyjS6aQ5wqIDVLoKxXtshuxqMio6lwY7E3QnHTU6A6Lr3SmIUAXEXdr468qs Tu5ja868i6AMmgHtuWs2HBW23yYIzTs/ooCtYRkfICdhDPZ55CH0KAg2vqK00vJk9/D2 8xmQ== X-Gm-Message-State: AC+VfDyQzH0J6foB306obEPXpjvOMgx6NXPOntQSwGxxQL021qYXzep8 BSaXhwLlbpbTCYl9MTI9eOU= X-Received: by 2002:ac2:4319:0:b0:4f1:3d9f:1b4f with SMTP id l25-20020ac24319000000b004f13d9f1b4fmr686765lfh.49.1685453631100; Tue, 30 May 2023 06:33:51 -0700 (PDT) Received: from mobilestation ([95.79.140.35]) by smtp.gmail.com with ESMTPSA id c15-20020a19760f000000b004f24e797c58sm340474lff.217.2023.05.30.06.33.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 May 2023 06:33:50 -0700 (PDT) Date: Tue, 30 May 2023 16:33:48 +0300 From: Serge Semin To: Jiaxun Yang Cc: "Maciej W. Rozycki" , Paul Cercueil , "linux-mips@vger.kernel.org" , linux-kernel@vger.kernel.org, Thomas Bogendoerfer Subject: Re: [PATCH 1/2] MIPS: Allow MIPS32R2 kernel to run on P5600 and M5150 Message-ID: <20230530133348.2jsrbkh6kixonwbm@mobilestation> References: <20230529135245.4085-1-jiaxun.yang@flygoat.com> <684C1A48-C743-4045-AF12-B0846FCE8EBE@flygoat.com> <5CC33034-4AF3-4522-9942-8BCCEF1086AE@flygoat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5CC33034-4AF3-4522-9942-8BCCEF1086AE@flygoat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 On Tue, May 30, 2023 at 02:10:04PM +0100, Jiaxun Yang wrote: > > > > 2023年5月30日 13:16,Maciej W. Rozycki 写道: > > > > On Tue, 30 May 2023, Jiaxun Yang wrote: > > > >>> Sure, but this change is not needed for it. You just need to declare > >>> which ISA revisions your platform supports and leave `__get_cpu_type' > >>> alone. It has worked like that for a decade now. > >> > >> I’m afraid it won’t work as you expected. > >> > >> Actually I ran into a problem that `case CPU_P5600` in c-r4k.c is optimised out > >> by compiler, because the codepath is marked as unreachable. > > > > Maybe there's a bug elsewhere then. Send me your .config and I'll try to > > reproduce it. > > Ok I see the problem, after applying patch 2 the issue is gone. > So actually only patch 2 is necessary. > > The unreachable mark here leads gcc to generate some confusing code > and I misread it. > > Sorry for the noise. Great! Indeed enabling the SYS_HAS_CPU_MIPS32_R5 config is enough to stop the CPU_P5600 being optimized out. Thanks for your work. Let me know if you need some tests on another instance of the P5600 hw. -Serge(y) > > Thanks > - Jiaxun > > > > > Maciej >