From: Chris Wilson Subject: Re: [PATCH 2/2] x86: add early quirk for reserving Intel graphics stolen memory Date: Wed, 24 Jul 2013 19:22:58 +0100 Message-ID: <20130724182258.GC8762@cantiga.alporthouse.com> References: <1374686569-2376-1-git-send-email-jbarnes@virtuousgeek.org> <1374686569-2376-2-git-send-email-jbarnes@virtuousgeek.org> <20130724175902.GB8762@cantiga.alporthouse.com> <20130724110918.1cd6434a@jbarnes-desktop> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (s16502780.onlinehome-server.info [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 29A93E5C6C for ; Wed, 24 Jul 2013 11:23:04 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130724110918.1cd6434a@jbarnes-desktop> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jesse Barnes Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, Jul 24, 2013 at 11:09:18AM -0700, Jesse Barnes wrote: > On Wed, 24 Jul 2013 18:59:02 +0100 > Chris Wilson wrote: > > > + base = read_pci_config_32(num, slot, func, 0x5c); > > > + base &= ~((1<<20) - 1); > > > > I wish there was some synatic sugar we can apply for base &= -MB(1); > > I think it's clear enough. Or is this a snarky comment that kernel.h > has a macro for this you're not mentioning? :) I was being sincere! It's an idiom that crops up often enough, so I wondering aloud if someone had a neat solution. -Chris -- Chris Wilson, Intel Open Source Technology Centre