From patchwork Mon Aug 25 21:26:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Krause X-Patchwork-Id: 4776811 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E3058C0338 for ; Mon, 25 Aug 2014 21:27:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EBFCC201C7 for ; Mon, 25 Aug 2014 21:27:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEFC1201DD for ; Mon, 25 Aug 2014 21:27:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756622AbaHYV1O (ORCPT ); Mon, 25 Aug 2014 17:27:14 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:49105 "EHLO mail-we0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933329AbaHYV1M (ORCPT ); Mon, 25 Aug 2014 17:27:12 -0400 Received: by mail-we0-f169.google.com with SMTP id u56so13813660wes.14 for ; Mon, 25 Aug 2014 14:27:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ssMvMcL0P1jCIxSlBKLPSR5OhIOyEEq394u17OfYZ+8=; b=zsrUwZhLoHwICfI/dx9bMzewLm4aynKghusjsehmbyJweBSmr/jGdjw1moaKs5P+gV D+LTGfJkVcWDVGNQNW2iGOiIHhPijHCaXhTdjrBb9bJL/mvxZ6eDJlo0R2nfEgsaLP5m EK0liSnro6a0vlK5F1slw609X7xdnEiO1s6A8tiTu2QT0E6qDAExy1nZLgCUuD7Ef8Ne z5B+uyRcq4d+EYjkTdydmcsFxOxZd2q2+XtKyp1tOEzsBKQ0IL4G8nDcbm4R9wBZQJiL XSZkhJ1XvtS/MhcZzFbsnoq6UMNtjcxAWhWzAOLHfDJ/FIWUawebGw8A8bS08uAfji1S L4UA== X-Received: by 10.180.100.230 with SMTP id fb6mr18080604wib.0.1409002031248; Mon, 25 Aug 2014 14:27:11 -0700 (PDT) Received: from jig.fritz.box (p4FF2823D.dip0.t-ipconnect.de. [79.242.130.61]) by mx.google.com with ESMTPSA id lh5sm2622976wjb.12.2014.08.25.14.27.10 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Aug 2014 14:27:10 -0700 (PDT) From: Mathias Krause To: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, Mathias Krause Subject: [PATCH 3/5] x86/PCI: Mark constants of pci_mmcfg_nvidia_mcp55() as __initconst Date: Mon, 25 Aug 2014 23:26:37 +0200 Message-Id: <1409001999-23161-4-git-send-email-minipli@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1409001999-23161-1-git-send-email-minipli@googlemail.com> References: <1409001999-23161-1-git-send-email-minipli@googlemail.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 The constants in pci_mmcfg_nvidia_mcp55() need to be marked as __initconst or they will remain in memory after init memory was released. Signed-off-by: Mathias Krause --- arch/x86/pci/mmconfig-shared.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 163ef6bf16..63fc0d4d58 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c @@ -240,16 +240,20 @@ static const char *__init pci_mmcfg_nvidia_mcp55(void) int bus; int mcp55_mmconf_found = 0; - static const u32 extcfg_regnum = 0x90; - static const u32 extcfg_regsize = 4; - static const u32 extcfg_enable_mask = 1<<31; - static const u32 extcfg_start_mask = 0xff<<16; - static const int extcfg_start_shift = 16; - static const u32 extcfg_size_mask = 0x3<<28; - static const int extcfg_size_shift = 28; - static const int extcfg_sizebus[] = {0x100, 0x80, 0x40, 0x20}; - static const u32 extcfg_base_mask[] = {0x7ff8, 0x7ffc, 0x7ffe, 0x7fff}; - static const int extcfg_base_lshift = 25; + static const u32 extcfg_regnum __initconst = 0x90; + static const u32 extcfg_regsize __initconst = 4; + static const u32 extcfg_enable_mask __initconst = 1 << 31; + static const u32 extcfg_start_mask __initconst = 0xff << 16; + static const int extcfg_start_shift __initconst = 16; + static const u32 extcfg_size_mask __initconst = 0x3 << 28; + static const int extcfg_size_shift __initconst = 28; + static const int extcfg_sizebus[] __initconst = { + 0x100, 0x80, 0x40, 0x20 + }; + static const u32 extcfg_base_mask[] __initconst = { + 0x7ff8, 0x7ffc, 0x7ffe, 0x7fff + }; + static const int extcfg_base_lshift __initconst = 25; /* * do check if amd fam10h already took over