Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2312175imj; Mon, 11 Feb 2019 00:10:22 -0800 (PST) X-Google-Smtp-Source: AHgI3Ibp8/rmAzdn8Deo/0M2RwFz6OnZGtHtuftuMT0rPs3rMVZUnQucZ7tU5Lg09m8rA+KJSiaQ X-Received: by 2002:a63:4e05:: with SMTP id c5mr960815pgb.393.1549872622452; Mon, 11 Feb 2019 00:10:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549872622; cv=none; d=google.com; s=arc-20160816; b=E2J1U8ObMd+P+r9gpwIn9tMHkAVo27Ic8TQAnTwhyTVBul9XA+miSVoFW13FCq8Wzi +bUwvOyMyv5Dd2sLIZGYYY995jFuYwb8c6Pqn0C3z6dUzP7IewUd6IroW8jFQqxkubMt ymtKDk2qx+TV4Hzg9vRWEdOP2u7Iva7btUpUcTdKdx4Of7Od27iy3gTAH2GEZHjmBAG0 yLKY+QrbEhCafchY0vfIAmCyJrQPRqA17LVViiCtEaaq0JwR9UvSW5zY3Eh/CDuIQSqP GynoDuP2yHFpTYxscOzsF1VF2JtzeU9Yw94X6noTqQcSMklJMCRbxGLiUWsCbKg7nGY+ uTng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=7ZxSvq0e8FV4lnctF5GOazbxzxd8fWksArCcmUjB+lw=; b=rDV4sNzPWor4M5TjasmaNJ1UlC0H1Wd8JVRh6N/awpVF8zKy+b7FPO18fMrLrjC17n CpesPAmT0A5unv+XlBjCw9lv0ijQze3bM+HzY58p39c98gWx5n+ynZGgjcahv9dsbXsg aWCptTAxWyS233lWPZOJKaYz2PdeYbPF8atwVVE8Zsi9amTioehIb9m077x8MBwIrDjZ YcxH7ggl2QnyXvJYorLwjVBH9C0gsqvtjtE3d2esjg7MzUDTNH0U7VDf3yie0L3usn/r cvOF6L8DK7/qD1T5YE4+iuKQ0O0S5/zDbymhCiqabRsLXMzr5BsChtgUIBiBr+ALpFQt BxGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r14si2713424pgk.75.2019.02.11.00.10.05; Mon, 11 Feb 2019 00:10:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726684AbfBKIIT (ORCPT + 99 others); Mon, 11 Feb 2019 03:08:19 -0500 Received: from gate.crashing.org ([63.228.1.57]:51600 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725931AbfBKIIT (ORCPT ); Mon, 11 Feb 2019 03:08:19 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id x1B86w2Y026260; Mon, 11 Feb 2019 02:07:00 -0600 Message-ID: <5dadc1b0aee62ce8371cabaa35ea4bbe6b71f48f.camel@kernel.crashing.org> Subject: Re: [PATCH v1 03/16] powerpc/32: move LOAD_MSR_KERNEL() into head_32.h and use it From: Benjamin Herrenschmidt To: Christophe Leroy , Paul Mackerras , Michael Ellerman , Nicholas Piggin Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Mon, 11 Feb 2019 19:06:58 +1100 In-Reply-To: References: <1946d8ed86a92a9a6827ec260d0d9c99e0d88184.1549630193.git.christophe.leroy@c-s.fr> <749f719a0881531cad2071a7011dc5e894812d3d.camel@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.4 (3.30.4-1.fc29) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-02-11 at 07:26 +0100, Christophe Leroy wrote: > > Le 11/02/2019 à 01:21, Benjamin Herrenschmidt a écrit : > > On Fri, 2019-02-08 at 12:52 +0000, Christophe Leroy wrote: > > > /* > > > + * MSR_KERNEL is > 0x8000 on 4xx/Book-E since it include MSR_CE. > > > + */ > > > +.macro __LOAD_MSR_KERNEL r, x > > > +.if \x >= 0x8000 > > > + lis \r, (\x)@h > > > + ori \r, \r, (\x)@l > > > +.else > > > + li \r, (\x) > > > +.endif > > > +.endm > > > +#define LOAD_MSR_KERNEL(r, x) __LOAD_MSR_KERNEL r, x > > > + > > > > You changed the limit from >= 0x10000 to >= 0x8000 without a > > corresponding explanation as to why... > > Yes, the existing LOAD_MSR_KERNEL() was buggy because 'li' takes a > signed u16, ie between -0x8000 and 0x7999. Ah yes, I was only looking at the "large" case which is fine... > By chance it was working because until now nobody was trying to set > MSR_KERNEL | MSR_EE. > > Christophe