From patchwork Fri May 10 02:17:59 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 16825 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A83F4238F7 for ; Fri, 10 May 2013 02:19:48 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id gf12sf4432665vcb.4 for ; Thu, 09 May 2013 19:19:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-beenthere:x-received:received-spf :x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=nmUoFcyFCxwBW64RWdWPAX5GJRfRdmtARouiTp/R32c=; b=kaBExCuAd6Bet24w28k7ohneSRWRVLpQKC3kyNc7tJ+LciGkznvzrheOnaQJoKf7CR 1gSGGTqXTj8iVh03QKtAWy/FA7jPP7xtS4LPqy+IEoHYhUB36VAjft78Iv1k+/b+Y0ix ZUjpVQhtpoQmHD8WAs9znXOrf+runuLuKfnTUQ+rRBAf1x2ch/3BTDJCzeEILbBLQ82Z iyuX/gI1v65gz8pFZaPM7l3+H541Up1RmEIQ88+d8w05HfSiJeKkoXqmusU+twba4TiJ ayCpkk/88BgCEXH7gZHm5b8Zqsj1TdVR6c2pSytKG8K9itjjPAXTuv0Ibk6ZAtCkhRdt C4Kw== X-Received: by 10.224.200.202 with SMTP id ex10mr11065806qab.8.1368152364018; Thu, 09 May 2013 19:19:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.239 with SMTP id 15ls1788645qeh.60.gmail; Thu, 09 May 2013 19:19:23 -0700 (PDT) X-Received: by 10.220.167.69 with SMTP id p5mr8274665vcy.57.1368152363576; Thu, 09 May 2013 19:19:23 -0700 (PDT) Received: from mail-vb0-x233.google.com (mail-vb0-x233.google.com [2607:f8b0:400c:c02::233]) by mx.google.com with ESMTPS id un20si323254veb.29.2013.05.09.19.19.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:23 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::233; Received: by mail-vb0-f51.google.com with SMTP id x16so3165757vbf.10 for ; Thu, 09 May 2013 19:19:23 -0700 (PDT) X-Received: by 10.220.82.68 with SMTP id a4mr9657409vcl.49.1368152363306; Thu, 09 May 2013 19:19:23 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.217.15 with SMTP id hk15csp36216vcb; Thu, 9 May 2013 19:19:22 -0700 (PDT) X-Received: by 10.180.37.133 with SMTP id y5mr700902wij.20.1368152362007; Thu, 09 May 2013 19:19:22 -0700 (PDT) Received: from mail-wi0-x22b.google.com (mail-wi0-x22b.google.com [2a00:1450:400c:c05::22b]) by mx.google.com with ESMTPS id p6si170815wia.102.2013.05.09.19.19.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:22 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22b is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c05::22b; Received: by mail-wi0-f171.google.com with SMTP id hn3so154324wib.10 for ; Thu, 09 May 2013 19:19:21 -0700 (PDT) X-Received: by 10.180.37.109 with SMTP id x13mr699851wij.20.1368152361383; Thu, 09 May 2013 19:19:21 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id dj7sm597075wib.6.2013.05.09.19.19.20 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 09 May 2013 19:19:20 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: Stefano.Stabellini@eu.citrix.com, ian.campbell@citrix.com, patches@linaro.org, Julien Grall Subject: [PATCH V3 13/41] xen/arm: Remove early_ioremap Date: Fri, 10 May 2013 03:17:59 +0100 Message-Id: <1368152307-598-14-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1368152307-598-1-git-send-email-julien.grall@linaro.org> References: <1368152307-598-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQlyccjScStxXkSORShbIFMgmZrdh9DM7YQH2IzuAaWuP4HCUloW2xTwXzebdWgzUzL9Qknm X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::233 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In the commit "xen/arm: Introduce ioremap_attr", vamp initialization has been moved earlier in the boot process. All the calls to early_ioremap can be replaced by ioremap_attr. Signed-off-by: Julien Grall --- xen/arch/arm/mm.c | 38 +------------------------------------- xen/drivers/video/arm_hdlcd.c | 3 ++- xen/include/asm-arm/mm.h | 2 -- 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/xen/arch/arm/mm.c b/xen/arch/arm/mm.c index 10d2869..d8d0309 100644 --- a/xen/arch/arm/mm.c +++ b/xen/arch/arm/mm.c @@ -568,45 +568,9 @@ void __init setup_frametable_mappings(paddr_t ps, paddr_t pe) frametable_virt_end = FRAMETABLE_VIRT_START + (nr_pages * sizeof(struct page_info)); } -/* Map the physical memory range start - start + len into virtual - * memory and return the virtual address of the mapping. - * start has to be 2MB aligned. - * len has to be < VMAP_VIRT_END - VMAP_VIRT_START. - */ -static __initdata unsigned long early_vmap_start = VMAP_VIRT_END; -void* __init early_ioremap(paddr_t start, size_t len, unsigned attributes) -{ - paddr_t end = start + len; - unsigned long map_start; - - len = (len + SECOND_SIZE - 1) & ~SECOND_MASK; - early_vmap_start -= len; - - ASSERT(!(start & (~SECOND_MASK))); - ASSERT(!(early_vmap_start & (~SECOND_MASK))); - - /* The range we need to map is too big */ - if ( early_vmap_start >= VMAP_VIRT_START ) - return NULL; - - map_start = early_vmap_start; - while ( start < end ) - { - lpae_t e = mfn_to_xen_entry(start >> PAGE_SHIFT); - e.pt.ai = attributes; - write_pte(xen_second + second_table_offset(map_start), e); - - start += SECOND_SIZE; - map_start += SECOND_SIZE; - } - flush_xen_data_tlb_range_va(early_vmap_start, len); - - return (void*)early_vmap_start; -} - void *__init arch_vmap_virt_end(void) { - return (void *)early_vmap_start; + return (void *)VMAP_VIRT_END; } /* diff --git a/xen/drivers/video/arm_hdlcd.c b/xen/drivers/video/arm_hdlcd.c index d0ec13d..ecf2eba 100644 --- a/xen/drivers/video/arm_hdlcd.c +++ b/xen/drivers/video/arm_hdlcd.c @@ -211,7 +211,8 @@ void __init video_init(void) printk(KERN_INFO "Initializing HDLCD driver\n"); - lfb = early_ioremap(framebuffer_start, framebuffer_size, DEV_WC); + lfb = ioremap_attr(framebuffer_start, framebuffer_size, + PAGE_HYPERVISOR_WC); if ( !lfb ) { printk(KERN_ERR "Couldn't map the framebuffer\n"); diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h index b5ea2d1..6b993bc 100644 --- a/xen/include/asm-arm/mm.h +++ b/xen/include/asm-arm/mm.h @@ -153,8 +153,6 @@ extern void setup_frametable_mappings(paddr_t ps, paddr_t pe); extern void set_fixmap(unsigned map, unsigned long mfn, unsigned attributes); /* Remove a mapping from a fixmap entry */ extern void clear_fixmap(unsigned map); -/* map a 2MB aligned physical range in virtual memory. */ -void* early_ioremap(paddr_t start, size_t len, unsigned attributes); /* map a physical range in virtual memory */ void __iomem *ioremap_attr(paddr_t start, size_t len, unsigned attributes);