From patchwork Wed Apr 9 19:33:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Noever X-Patchwork-Id: 3958121 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BE3269F464 for ; Thu, 10 Apr 2014 01:09:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8D6220646 for ; Thu, 10 Apr 2014 01:09:39 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 182182063D for ; Thu, 10 Apr 2014 01:09:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1220E6E150; Wed, 9 Apr 2014 18:09:36 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D17A6E0AD for ; Wed, 9 Apr 2014 12:36:27 -0700 (PDT) Received: by mail-ee0-f54.google.com with SMTP id d49so2300854eek.27 for ; Wed, 09 Apr 2014 12:36:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=OukfB9yEWYmQ7jg72nbwnfhUm7VdYmUMGM4ahmgk6o0=; b=ZBREWqwM1MMuY5gvk9L30iZyRM1J97yuMcCkXtt1Wz9Ju/DOkDTeWtg34H/T+YGMsU HE6bXyd/l+ZfwNXEA/8lwvFAajC6lZh7CWuFawvYzie+idf/wknSuzYYc46DnTzNxtPb +vpczVVNeOacVa151pljUxLxx74ZXn0vgH591knT8D2e6tzkH+kpkd0POobkB6nmptHY L5WWpAsJ/aYy5ZYGkgkTRi38yPNEIZ5VqtnXSo7nNbqW9XbUiW+Up0SnSsY6hNq8NNSU Nji+sIQXGVFueOA9M9Oxkfa1j+VsEUtaXoE8F37W0ikIXiuEZ2m76TZ4jfSStsY+YQPZ VPAQ== X-Received: by 10.14.37.8 with SMTP id x8mr14263252eea.32.1397072186021; Wed, 09 Apr 2014 12:36:26 -0700 (PDT) Received: from localhost.localdomain (77-58-151-250.dclient.hispeed.ch. [77.58.151.250]) by mx.google.com with ESMTPSA id l42sm4401413eew.19.2014.04.09.12.36.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Apr 2014 12:36:25 -0700 (PDT) From: Andreas Noever To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/nouveau/bios: fix bug introduced in 457e77b2 Date: Wed, 9 Apr 2014 21:33:30 +0200 Message-Id: <1397072012-9475-1-git-send-email-andreas.noever@gmail.com> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Wed, 09 Apr 2014 18:09:35 -0700 Cc: linux-kernel@vger.kernel.org, Ben Skeggs , Andreas Noever X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 457e77b2 effectively replaces (... & 0xffffff00) << 8 with (... >> 8) << 8. Which does not do the same and breaks boot on my machine. Restore the old behaviour and remove the unnecessary cast. Signed-off-by: Andreas Noever Tested-by: Thomas Glanzmann Signed-off-by: Ben Skeggs --- drivers/gpu/drm/nouveau/core/subdev/bios/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c b/drivers/gpu/drm/nouveau/core/subdev/bios/base.c index e9df94f..2885b7c 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/base.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/base.c @@ -109,7 +109,7 @@ nouveau_bios_shadow_pramin(struct nouveau_bios *bios) return; } - addr = (u64)(addr >> 8) << 8; + addr = (addr >> 8) << 16; if (!addr) { addr = (u64)nv_rd32(bios, 0x001700) << 16; addr += 0xf0000;