Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp204531rdb; Sat, 17 Feb 2024 05:16:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUxE86Z3bJoBJJzblSkKyqVEjzNHKB0TuvEWNFX6HbXF7iSSq3kOa2jZQC2JqAhGVxD3y2CjJzphC1zqiOfTg8Zt/K4fgaqvTGum3MmCg== X-Google-Smtp-Source: AGHT+IG6HJQ11rDe0SvInd3vftz4xV5rXX/zDMW4pQWv5ZVS15woYEEJ9Nr+QM6lRLMOM5pujKUH X-Received: by 2002:a17:906:1398:b0:a3d:9022:c49b with SMTP id f24-20020a170906139800b00a3d9022c49bmr5401283ejc.71.1708175781128; Sat, 17 Feb 2024 05:16:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708175781; cv=pass; d=google.com; s=arc-20160816; b=P/vEQjg0H85v6yJFA/aaH16yaGkfpden1+R4IiiEqvoY7HJ6UlqIA3Zd7RRq/y3DCW bYA0wyPdzulWWftW602vH3HN30Nvas+KnQ9t6nlmyEVYD2xMK2q/YbA8JwRb/k0pjROw IG/NgFuaCavKBiBx5BXTPLZ7v2M4/3nvI0OltBZ3xfavtuABXxQMmVmELZ5eT8m/1sat eeqwO63cIx9Of2zZYXWXMUcfd8UqJ6+XvHHBLU8F9GeTvIaoPzSkD3fyPwgyjtZESP2s 19xBKNTAR6dNLVJsbybYb4Aa+TGcokxX+ONSogNzvjafAiFkiOgwQKhmGZ11M2i+Tm0p 4VuQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=s8NBM6Yqo1gTI6vq9QpVDRtoet1whN/tjqnSSJZJzHM=; fh=yBf5RPuelaa0VsCzcyfqEfd9kgemuLHx5SDDEt4yqfw=; b=OSuVMcQLuoGD7yTugsAT5FwE7+RFkGVGWOJtam3Pvr8m3dBFBxJu+6bpfIb5eSwthj M2wDnQmNZxnSwqdc+9LNMk9uaPVbSM48KWeEgA307Dpldci8W45oyAG4/MzXLiryDccQ q56MM1fQZbeSKGpmXmvrOApoiXw7fD3i8gSV3xn/x2yzv9edeNlwz8zN+SachqMQwXdF 1rJ0I55zOKGbyxwynrprzAaVMQirxXCdKKE/CHCZ0jM1S+DRpZTHK3SAd0W0Aahd/m+W t62ZxcIChClpMiepdSlmMsYWMH9JVD3rMJT4XLQF/LYnjMiAMQAYhIDdEsswfp+vbx4Z L7aA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa2 header.b=rN5ApcSB; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed2 header.b=GiIaKHOb; arc=pass (i=1 dkim=pass dkdomain=ravnborg.org); spf=pass (google.com: domain of linux-kernel+bounces-69830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69830-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id jt23-20020a170906ca1700b00a3d607ab805si856840ejb.50.2024.02.17.05.16.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Feb 2024 05:16:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa2 header.b=rN5ApcSB; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed2 header.b=GiIaKHOb; arc=pass (i=1 dkim=pass dkdomain=ravnborg.org); spf=pass (google.com: domain of linux-kernel+bounces-69830-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69830-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B31211F225DD for ; Sat, 17 Feb 2024 12:00:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2378E6A034; Sat, 17 Feb 2024 12:00:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b="rN5ApcSB"; dkim=permerror (0-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b="GiIaKHOb" Received: from mailrelay2-1.pub.mailoutpod3-cph3.one.com (mailrelay2-1.pub.mailoutpod3-cph3.one.com [46.30.211.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5F106A013 for ; Sat, 17 Feb 2024 12:00:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.30.211.241 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708171242; cv=none; b=UZJMUFpBRc4z2rxtjTOLQ9OopM2WCNYS9SmkbELC6p4AJDL+OXtK7jyOiWsUsTKk48JmQvWOHsvzlCmg/Lq5GxOjpX7Tt5yG7iMXzJKgeovdb2u+fcGa1wIO5kzCWYTNR8DeqnSJiVxTJMYIrCuGyGcZYzj2VUpxvS+Wqi9M3h0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708171242; c=relaxed/simple; bh=WG1z83UKpdJV+VV7pjmtz1f6jWLNZux3gAGLTorgXpE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=euyrLQUA0f1SRTPM1XbRuwD06gGiFkEGquF6JjbruT9FvT3zz6tzNTwosejss4nNh1AhhxR/wbzdgkvN6zib1MGo2rQISVB+2TfiMpPz+LtuhDYmVFKaw8gi5tNhRkj01HTzskj940icu/YlDVsBZAUgwzHdwF4l8fNmv1xCjAM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org; spf=none smtp.mailfrom=ravnborg.org; dkim=pass (2048-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b=rN5ApcSB; dkim=permerror (0-bit key) header.d=ravnborg.org header.i=@ravnborg.org header.b=GiIaKHOb; arc=none smtp.client-ip=46.30.211.241 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ravnborg.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa2; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=s8NBM6Yqo1gTI6vq9QpVDRtoet1whN/tjqnSSJZJzHM=; b=rN5ApcSBnK+CskdQo37NDW3+7WtTo/WYPbcp2SmArSAYErNvCgXAjJIJZAEOdFc4QPihhuM2Kt0E/ zabmz6EdgL3t/i5S8rEL4n+DO+FZ1FvGIMFYIqqU20v9QCNsuOoAFs6/of2pl3NunYKCUEoU3xqWbs 7QShR9tVNbQSknHjSWir3uSumoQOSf7C7FCkfExt+dHY2Cm5m+nD9KexIWSliQeMOvlsCGqRIEegn0 4Yr+kT4E1vKT22fgTTuW4Umy9JtRlAlSuY0Er5JNZ8o31pmoR6NUzOWE1C2xiH4lNG3h7qVoYMoWhn J2jjkFFTFPVigiIBwjJ7NKsn7g4IcuQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed2; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=s8NBM6Yqo1gTI6vq9QpVDRtoet1whN/tjqnSSJZJzHM=; b=GiIaKHObvA0d5L31U76EfSviff6iTllpFtubh+MHM3A8ElYXJxKfv5DKoEjMgZwzMl8jaX2QXDx87 ejjrFY8Cg== X-HalOne-ID: ff4b2dc2-cd8b-11ee-9ac3-657348328a86 Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay2.pub.mailoutpod3-cph3.one.com (Halon) with ESMTPSA id ff4b2dc2-cd8b-11ee-9ac3-657348328a86; Sat, 17 Feb 2024 11:59:28 +0000 (UTC) Date: Sat, 17 Feb 2024 12:59:26 +0100 From: Sam Ravnborg To: Andreas Larsson Cc: "David S. Miller" , Arnd Bergmann , Helge Deller , Alexander Viro , Greg Kroah-Hartman , Alan Stern , Jaroslav Kysela , Takashi Iwai , sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sound@vger.kernel.org Subject: Re: [PATCH 17/27] sparc32: Drop run-time patching of ASI instructions Message-ID: <20240217115926.GA1564615@ravnborg.org> References: <20231219-sam-sparc32-sunset-v3-v1-0-64bb44b598c5@ravnborg.org> <20231219-sam-sparc32-sunset-v3-v1-17-64bb44b598c5@ravnborg.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Hi Andreas, > > diff --git a/arch/sparc/include/asm/winmacro.h b/arch/sparc/include/asm/winmacro.h > > index b6e911f5d93c..c496b04cdfaf 100644 > > --- a/arch/sparc/include/asm/winmacro.h > > +++ b/arch/sparc/include/asm/winmacro.h > > @@ -108,18 +108,11 @@ > > 661: rd %tbr, %idreg; \ > > srl %idreg, 10, %idreg; \ > > and %idreg, 0xc, %idreg; \ > > These three lines, including the label, should also be removed as they > are not for LEON. Additionally, I think it would be best to split out > removing the cpuid instruction fixups to one patch and the MMU ASI > instruction fixups to another patch. Nice catch! I will fix this and split up in two patches in v2. It will take some days before I have v2 ready, and I will base it on top of your for-next branch in the sparc.git tree. Sam > > > - .section .cpuid_patch, "ax"; \ > > - /* Instruction location. */ \ > > - .word 661b; \ > > - /* SUN4D implementation. */ \ > > - lda [%g0] ASI_M_VIKING_TMP1, %idreg; \ > > - sll %idreg, 2, %idreg; \ > > - nop; \ > > - /* LEON implementation. */ \ > > + \ > > rd %asr17, %idreg; \ > > srl %idreg, 0x1c, %idreg; \ > > sll %idreg, 0x02, %idreg; \ > > - .previous; \ > > + \ > > sethi %hi(current_set), %dest_reg; \ > > or %dest_reg, %lo(current_set), %dest_reg;\ > > ld [%idreg + %dest_reg], %dest_reg; > > diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S > > index 0f2417ee3f95..9cf8f87e8c42 100644 > > --- a/arch/sparc/kernel/entry.S > > +++ b/arch/sparc/kernel/entry.S > > The hard_smp_processor_id function also needs to be reduced to just the > LEON code. With the patching removed, SMP otherwise breaks with CPUs > other than CPU 0 getting stuck. > > Thanks, > Andreas