Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2239273imj; Sun, 10 Feb 2019 22:27:33 -0800 (PST) X-Google-Smtp-Source: AHgI3IZZBqcrgT8aC9LTDgnzAwFAQ+7n+2OEJjzbwtK815o3tY/KWHfkgpIYhlM/QqU2jAChU25E X-Received: by 2002:a65:484c:: with SMTP id i12mr32084258pgs.309.1549866453136; Sun, 10 Feb 2019 22:27:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549866453; cv=none; d=google.com; s=arc-20160816; b=tjj0paDpQf7izWOdrww74kCKIbohYsf8OMf87cOqoak//0whGk505hY/j/4N7w1eN7 KulCMB58GOSPvGkj8t18ii2aXLLQG0RhQjeHE3BvaMN1XUV7qqt9XUC89/mjI3XdIgWf qwqkV7ZuwOS3fnxvzkvej1TeVP0Fi1Db0gW1mDhqOMfw7bKtqZncK1f+smtmMHVY7zAm QciWDyd3mGGYOdwwuhzHL0KWzupKW+E39UJT98/RlSiBwLnNzAYg+xgtNWPa2Yjz9jzQ O43P2lzNDe5ncVwo/TfOXowvd0VsTzvKzMS8g8T7fdn4Q6qF10Ko03p0NwEjBvBgd8r8 BkcA== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=pP+qBsacOc7BX7HqUMyCGXaWaf0LuL8H6j/y+Qb/DfE=; b=Ou6F7ENuULiDjE1qE06pQly5emOa30zpQo3t1P+hMORszF808nLUw9NoARp5Thw3TS l2k/Pj8Yv1SpI3FAlB4u9BsMNPxtPN1QMjs5wsCLX4D2dCa7jrnb2qG5OgJg/gefzIgy 3p+cKesjy4RWc/ZdTNkg4hCzb+Z170X73841cgokwRcXXFfQPkDomSR5KiNZPFopIcwj LVBEnGRcJckmilFixuoqsdgx2FSrWASuPhkzp9xnGvUrTYwuywZ82CCJl18C6XQ+Su4O MnDZ//ucJqEn4IU6AReOl63KGlbBvoq1LQeMeIAYOv4k6jv2tUpr+yJMNoPCLcrAYQa7 i6Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=UImav6xj; 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 3si9642554plo.102.2019.02.10.22.27.02; Sun, 10 Feb 2019 22:27:33 -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; dkim=pass header.i=@c-s.fr header.s=mail header.b=UImav6xj; 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 S1726105AbfBKG0x (ORCPT + 99 others); Mon, 11 Feb 2019 01:26:53 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:55663 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725951AbfBKG0x (ORCPT ); Mon, 11 Feb 2019 01:26:53 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43ybR94nTDz9tyv7; Mon, 11 Feb 2019 07:26:45 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=UImav6xj; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id F0Uehg3cyFmr; Mon, 11 Feb 2019 07:26:45 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 43ybR93m3Dz9tyv6; Mon, 11 Feb 2019 07:26:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1549866405; bh=pP+qBsacOc7BX7HqUMyCGXaWaf0LuL8H6j/y+Qb/DfE=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=UImav6xj6WD5+YiGnMf9PKlhmQmGaSW/NOp2WOAyj/o6DenNrA1ZCb7uzh68UNLi3 nsJhA3fjmmi+WsNS1TxBdxtCXwwtpOFKos3SjcfOnASGkjuZw6BaWHDYDFl34M0VXF oO3yLP/LXlBIW3OTMYvKhSkkWqwWVo5oz3E8ouKg= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B300C8B791; Mon, 11 Feb 2019 07:26:51 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id mQFX59vvXYKb; Mon, 11 Feb 2019 07:26:51 +0100 (CET) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 848E58B74C; Mon, 11 Feb 2019 07:26:51 +0100 (CET) Subject: Re: [PATCH v1 03/16] powerpc/32: move LOAD_MSR_KERNEL() into head_32.h and use it To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Nicholas Piggin Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <1946d8ed86a92a9a6827ec260d0d9c99e0d88184.1549630193.git.christophe.leroy@c-s.fr> <749f719a0881531cad2071a7011dc5e894812d3d.camel@kernel.crashing.org> From: Christophe Leroy Message-ID: Date: Mon, 11 Feb 2019 07:26:51 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <749f719a0881531cad2071a7011dc5e894812d3d.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. By chance it was working because until now nobody was trying to set MSR_KERNEL | MSR_EE. Christophe