Received: by 10.223.164.202 with SMTP id h10csp166589wrb; Mon, 13 Nov 2017 22:34:58 -0800 (PST) X-Google-Smtp-Source: AGs4zMYv6RXt7uoG5KZANu1X3Ma8iRULGrjNYVfsE9RwZv3OAVqdLvVxXCGw2fjBqVZyci4p7fOG X-Received: by 10.98.88.68 with SMTP id m65mr12763364pfb.187.1510641298831; Mon, 13 Nov 2017 22:34:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510641298; cv=none; d=google.com; s=arc-20160816; b=c0VUJqyfa/W9EqexK8xgkGdFfknVsJfgEJseDXWM4DnbGyFKE52n/HsGT4qNGcbuj9 bQIr0Xu+/6laewXu4m74ZCnc678v9N84hrCUEAvHc4lf8cG0te2GjYC5HO2axwlAnQu5 ngVh4vSbFEYtpfjza5GPngw5gNKqlfTe6CwaP48ZpZmbp3S18Wh/BfYqecDu5fNKyMKV DQASH93xhJcFn4WopY6glM6qz38GenKJb+VK2QKZ238y21ZJu5e5qe8MoX5M+ZodlQQG 9jNg9xPeVvZFM5+mAWGoEsVJt4wX2Gf2++8YjZ7cGKzfTTTzATWzknZo/NU1TfE+TwAK PXQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=koeSQv/7HH1Subf3mCfwyX8FV1yqlH6v+HNWOjtObeg=; b=ll7orwhFAJaisIdPo+DmR2OjvVJ0AtZEkoc5R2nnBFdX0lCH5lxh8r/VTibewSmmbj XVM8ssMYq0cMzgKZvehHhRjtiOS6JcedfJ9KkKTY5JxiVus3uHsUYSnJ4d329OFLxwzS WRjZy0p/zcyELSkee5/5W9k2eEVUAawHv6bi4FW4LFgTJhYGqDun0tUQujhju0kpt4Jq WdStRH7RMecpSKLPXPvCqA4wsumkxEu5SGu3hVRniZ4FimA0pFpuXkBzovVM1Mh1424n h5obWzu58AGwuD9KSmQQ3Y3UbBeRkPVcO9LjOx2gRGwa4njBj0pCJ2mjH4pUNPZHWUfu YmhQ== ARC-Authentication-Results: i=1; mx.google.com; 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 k13si12728931pgo.739.2017.11.13.22.34.46; Mon, 13 Nov 2017 22:34:58 -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; 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 S1753028AbdKNGcZ (ORCPT + 89 others); Tue, 14 Nov 2017 01:32:25 -0500 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:35635 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752959AbdKNGcQ (ORCPT ); Tue, 14 Nov 2017 01:32:16 -0500 Received: from unknown (HELO lgeamrelo02.lge.com) (156.147.1.126) by 156.147.23.52 with ESMTP; 14 Nov 2017 15:32:14 +0900 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Received: from unknown (HELO localhost) (10.177.222.138) by 156.147.1.126 with ESMTP; 14 Nov 2017 15:32:14 +0900 X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Tue, 14 Nov 2017 15:37:24 +0900 From: Joonsoo Kim To: Tony Lindgren Cc: Pavel Machek , pali.rohar@gmail.com, sre@kernel.org, kernel list , linux-arm-kernel , linux-omap@vger.kernel.org, khilman@kernel.org, aaro.koskinen@iki.fi, ivo.g.dimitrov.75@gmail.com, patrikbachan@gmail.com, serge@hallyn.com, abcloriens@gmail.com, "Aneesh Kumar K.V" , Vlastimil Babka , Andrew Morton , Stephen Rothwell , Russell King Subject: Re: n900 in next-20170901 Message-ID: <20171114063724.GA16969@js1304-P5Q-DELUXE> References: <20171108163413.GU28152@atomide.com> <20171109000801.GA23982@js1304-P5Q-DELUXE> <20171109001113.GZ28152@atomide.com> <20171109003639.GB23982@js1304-P5Q-DELUXE> <20171109035031.GA24383@js1304-P5Q-DELUXE> <20171109150854.GC28152@atomide.com> <20171110001315.GA29669@js1304-P5Q-DELUXE> <20171110032610.GJ28152@atomide.com> <20171110063727.GA32073@js1304-P5Q-DELUXE> <20171110153620.GO28152@atomide.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171110153620.GO28152@atomide.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 10, 2017 at 07:36:20AM -0800, Tony Lindgren wrote: > * Joonsoo Kim [171110 06:34]: > > On Thu, Nov 09, 2017 at 07:26:10PM -0800, Tony Lindgren wrote: > > > +#define OMAP34XX_SRAM_PHYS 0x40200000 > > > +#define OMAP34XX_SRAM_VIRT 0xd0010000 > > > +#define OMAP34XX_SRAM_SIZE 0x10000 > > > > For my testing environment, vmalloc address space is started at > > roughly 0xe0000000 so 0xd0010000 would not be valid. > > Well we can map it anywhere we want, got any preferences? My testing environment is a beagle-(xm?) for QEMU. It is configured by CONFIG_VMSPLIT_3G=y so kernel address space is started at 0xc0000000. And, it has 512 MB memory so 0xc0000000 ~ 0xdff00000 is used for direct mapping. See below. [ 0.000000] Memory: 429504K/522240K available (11264K kernel code, 1562K rwdata, 4288K rodata, 2048K init, 405K bss, 27200K reserved, 65536K cma-reserved, 0K highmem) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xe0000000 - 0xff800000 ( 504 MB) [ 0.000000] lowmem : 0xc0000000 - 0xdff00000 ( 511 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0208000 - 0xc0e00000 (12256 kB) [ 0.000000] .init : 0xc1300000 - 0xc1500000 (2048 kB) [ 0.000000] .data : 0xc1500000 - 0xc1686810 (1563 kB) [ 0.000000] .bss : 0xc168fc68 - 0xc16f512c ( 406 kB) Therefore, if OMAP34XX_SRAM_VIRT is 0xd0010000, direct mapping is broken and the system doesn't work. I guess that we should use more stable address like as 0xf0000000. > > Just that the current save_secure_ram_context uses "high_mask" > of 0xffff to translate the address. To make this more flexible, > we need the save_secure_ram_context changes too. So we might > want to do the static mapping and save_secure_ram_context changes > as a single patch. > > > And, PHYS can be different according to the system type. Maybe either > > OMAP3_SRAM_PUB_PA or OMAP3_SRAM_PA. It seems that SIZE and TYPE should > > be considered, too. My understanding is correct? > > We can have a static map for the whole SRAM area, see function > __arm_ioremap_pfn_caller() for the comment "Try to reuse one of the > static mapping whenever possible". So the different public SRAM start > addresses and sizes don't matter there. Okay. Look fine with SRAM start addresses and sizes. However, we need to consider mtype since __arm_ioremap_pfn_caller() doesn't reuse the mapping if mtype is different. mtype can be either MT_MEMORY_RWX or MT_MEMORY_RWX_NONCACHED. Thanks. From 1583987092837147996@xxx Mon Nov 13 21:16:47 +0000 2017 X-GM-THRID: 1577552291468010502 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread