From: Joonsoo Kim <iamjoonsoo.kim@lge.com> To: Tony Lindgren <tony@atomide.com> Cc: Pavel Machek <pavel@ucw.cz>, pali.rohar@gmail.com, sre@kernel.org, kernel list <linux-kernel@vger.kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, 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" <aneesh.kumar@linux.vnet.ibm.com>, Vlastimil Babka <vbabka@suse.cz>, Andrew Morton <akpm@linux-foundation.org>, Stephen Rothwell <sfr@canb.auug.org.au>, Russell King <linux@armlinux.org.uk> Subject: Re: n900 in next-20170901 Date: Tue, 14 Nov 2017 15:37:24 +0900 [thread overview] Message-ID: <20171114063724.GA16969@js1304-P5Q-DELUXE> (raw) In-Reply-To: <20171110153620.GO28152@atomide.com> On Fri, Nov 10, 2017 at 07:36:20AM -0800, Tony Lindgren wrote: > * Joonsoo Kim <iamjoonsoo.kim@lge.com> [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.
WARNING: multiple messages have this Message-ID (diff)
From: iamjoonsoo.kim@lge.com (Joonsoo Kim) To: linux-arm-kernel@lists.infradead.org Subject: n900 in next-20170901 Date: Tue, 14 Nov 2017 15:37:24 +0900 [thread overview] Message-ID: <20171114063724.GA16969@js1304-P5Q-DELUXE> (raw) In-Reply-To: <20171110153620.GO28152@atomide.com> On Fri, Nov 10, 2017 at 07:36:20AM -0800, Tony Lindgren wrote: > * Joonsoo Kim <iamjoonsoo.kim@lge.com> [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.
next prev parent reply other threads:[~2017-11-14 6:32 UTC|newest] Thread overview: 121+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-09-03 20:37 n900 in next-20170901 Pavel Machek 2017-09-03 20:37 ` Pavel Machek 2017-09-05 20:13 ` Tony Lindgren 2017-09-05 20:13 ` Tony Lindgren 2017-09-05 20:27 ` Vlastimil Babka 2017-09-05 20:27 ` Vlastimil Babka 2017-09-05 20:32 ` Tony Lindgren 2017-09-05 20:32 ` Tony Lindgren 2017-09-05 23:32 ` Joonsoo Kim 2017-09-05 23:32 ` Joonsoo Kim 2017-09-06 13:30 ` Tony Lindgren 2017-09-06 13:30 ` Tony Lindgren 2017-09-07 7:30 ` Joonsoo Kim 2017-09-07 7:30 ` Joonsoo Kim 2017-09-07 16:16 ` Tony Lindgren 2017-09-07 16:16 ` Tony Lindgren 2017-09-13 7:55 ` Joonsoo Kim 2017-09-13 7:55 ` Joonsoo Kim 2017-09-13 16:31 ` Tony Lindgren 2017-09-13 16:31 ` Tony Lindgren 2017-09-15 6:56 ` Joonsoo Kim 2017-09-15 6:56 ` Joonsoo Kim 2017-09-21 17:28 ` Tony Lindgren 2017-09-21 17:28 ` Tony Lindgren 2017-09-25 8:08 ` Joonsoo Kim 2017-09-25 8:08 ` Joonsoo Kim 2017-09-25 14:54 ` Tony Lindgren 2017-09-25 14:54 ` Tony Lindgren 2017-10-18 8:29 ` Joonsoo Kim 2017-10-18 8:29 ` Joonsoo Kim 2017-10-19 18:30 ` Tony Lindgren 2017-10-19 18:30 ` Tony Lindgren 2017-10-20 1:55 ` Joonsoo Kim 2017-10-20 1:55 ` Joonsoo Kim 2017-10-20 17:31 ` Tony Lindgren 2017-10-20 17:31 ` Tony Lindgren 2017-10-23 4:53 ` Joonsoo Kim 2017-10-23 4:53 ` Joonsoo Kim 2017-10-25 17:31 ` Tony Lindgren 2017-10-25 17:31 ` Tony Lindgren 2017-10-26 4:48 ` Joonsoo Kim 2017-10-26 4:48 ` Joonsoo Kim 2017-10-26 14:16 ` Tony Lindgren 2017-10-26 14:16 ` Tony Lindgren 2017-11-07 5:33 ` Joonsoo Kim 2017-11-07 5:33 ` Joonsoo Kim 2017-11-07 15:48 ` Tony Lindgren 2017-11-07 15:48 ` Tony Lindgren 2017-11-08 7:46 ` Joonsoo Kim 2017-11-08 7:46 ` Joonsoo Kim 2017-11-08 16:34 ` Tony Lindgren 2017-11-08 16:34 ` Tony Lindgren 2017-11-09 0:08 ` Joonsoo Kim 2017-11-09 0:08 ` Joonsoo Kim 2017-11-09 0:11 ` Tony Lindgren 2017-11-09 0:11 ` Tony Lindgren 2017-11-09 0:36 ` Joonsoo Kim 2017-11-09 0:36 ` Joonsoo Kim 2017-11-09 3:50 ` Joonsoo Kim 2017-11-09 3:50 ` Joonsoo Kim 2017-11-09 15:08 ` Tony Lindgren 2017-11-09 15:08 ` Tony Lindgren 2017-11-10 0:13 ` Joonsoo Kim 2017-11-10 0:13 ` Joonsoo Kim 2017-11-10 3:26 ` Tony Lindgren 2017-11-10 3:26 ` Tony Lindgren 2017-11-10 6:19 ` Tony Lindgren 2017-11-10 6:19 ` Tony Lindgren 2017-11-10 6:23 ` Tony Lindgren 2017-11-10 6:23 ` Tony Lindgren 2017-11-10 6:46 ` Joonsoo Kim 2017-11-10 6:46 ` Joonsoo Kim 2017-11-10 15:37 ` Tony Lindgren 2017-11-10 15:37 ` Tony Lindgren 2017-11-10 6:37 ` Joonsoo Kim 2017-11-10 6:37 ` Joonsoo Kim 2017-11-10 15:36 ` Tony Lindgren 2017-11-10 15:36 ` Tony Lindgren 2017-11-13 21:15 ` Tony Lindgren 2017-11-13 21:15 ` Tony Lindgren 2017-11-14 6:40 ` Joonsoo Kim 2017-11-14 6:40 ` Joonsoo Kim 2017-11-14 6:37 ` Joonsoo Kim [this message] 2017-11-14 6:37 ` Joonsoo Kim 2017-11-14 17:37 ` Tony Lindgren 2017-11-14 17:37 ` Tony Lindgren 2017-11-14 19:31 ` Tero Kristo 2017-11-14 19:31 ` Tero Kristo 2017-11-14 19:31 ` Tero Kristo 2017-11-14 19:44 ` Tony Lindgren 2017-11-14 19:44 ` Tony Lindgren 2017-11-14 20:01 ` Tero Kristo 2017-11-14 20:01 ` Tero Kristo 2017-11-14 20:01 ` Tero Kristo 2017-11-14 20:54 ` Tony Lindgren 2017-11-14 20:54 ` Tony Lindgren 2017-11-15 0:51 ` Joonsoo Kim 2017-11-15 0:51 ` Joonsoo Kim 2017-11-15 2:04 ` Tony Lindgren 2017-11-15 2:04 ` Tony Lindgren 2017-11-15 2:48 ` Joonsoo Kim 2017-11-15 2:48 ` Joonsoo Kim 2017-11-15 2:53 ` Tony Lindgren 2017-11-15 2:53 ` Tony Lindgren 2017-11-15 2:53 ` Tony Lindgren 2017-09-15 13:18 ` Pavel Machek 2017-09-15 13:18 ` Pavel Machek 2017-09-18 2:01 ` Joonsoo Kim 2017-09-18 2:01 ` Joonsoo Kim 2017-09-18 8:11 ` Linux-next broken for 2 weeks was " Pavel Machek 2017-09-18 8:11 ` Pavel Machek 2017-09-18 22:00 ` Stephen Rothwell 2017-09-18 22:00 ` Stephen Rothwell 2017-09-18 22:16 ` Pavel Machek 2017-09-18 22:16 ` Pavel Machek 2017-09-15 13:28 ` Pali Rohár 2017-09-15 13:28 ` Pali Rohár 2017-09-18 2:07 ` Joonsoo Kim 2017-09-18 2:07 ` Joonsoo Kim 2017-09-08 9:31 ` Pavel Machek 2017-09-08 9:31 ` Pavel Machek
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20171114063724.GA16969@js1304-P5Q-DELUXE \ --to=iamjoonsoo.kim@lge.com \ --cc=aaro.koskinen@iki.fi \ --cc=abcloriens@gmail.com \ --cc=akpm@linux-foundation.org \ --cc=aneesh.kumar@linux.vnet.ibm.com \ --cc=ivo.g.dimitrov.75@gmail.com \ --cc=khilman@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux@armlinux.org.uk \ --cc=pali.rohar@gmail.com \ --cc=patrikbachan@gmail.com \ --cc=pavel@ucw.cz \ --cc=serge@hallyn.com \ --cc=sfr@canb.auug.org.au \ --cc=sre@kernel.org \ --cc=tony@atomide.com \ --cc=vbabka@suse.cz \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.