From: Rob Herring <robherring2@gmail.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Olof Johansson <olof@lixom.net>,
linux-arm-kernel@lists.infradead.org, linux-next@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: linux-next: manual merge of the arm-soc tree with the arm-current tree
Date: Tue, 04 Sep 2012 07:44:16 -0500 [thread overview]
Message-ID: <5045F7A0.1090400@gmail.com> (raw)
In-Reply-To: <20120904090132.GG24085@n2100.arm.linux.org.uk>
On 09/04/2012 04:01 AM, Russell King - ARM Linux wrote:
> On Tue, Sep 04, 2012 at 08:08:24AM +0000, Arnd Bergmann wrote:
>> On Tuesday 04 September 2012, Stephen Rothwell wrote:
>>> Today's linux-next merge of the arm-soc tree got a conflict in
>>> arch/arm/mm/mmu.c between commit a849088aa155 ("ARM: Fix ioremap() of
>>> address zero") from the arm-current tree and commit c2794437091a ("ARM:
>>> Add fixed PCI i/o mapping") from the arm-soc tree.
>>>
>>> I am not sure how to fix this, so I have used the arm-current version of
>>> the change to pmd_empty_section_gap() since that changed the vm->flags.
>>> It may be that just changing the vm->flags value in vm_reserve_area_early()
>>> would be ok?
>>
>> If I read this correctly, we want pci_reserve_io to use VM_ARM_STATIC_MAPPING
>> while pmd_empty_section_gap should use VM_ARM_EMPTY_MAPPING, so we probably
>> want to add a flag argument to the vm_reserve_area_early() function.
>
> Whereas Rob said to me that both can use VM_ARM_EMPTY_MAPPING when I
> queried this conflict last week.
Right. The PCI i/o reserved area has a dummy physical address of 0 and
needs to be skipped by ioremap searches. So we don't set
VM_ARM_STATIC_MAPPING to prevent matches by ioremap. The vm_struct settings
don't really matter when we do the real mapping of the i/o space.
Here's my merge:
diff --cc arch/arm/mm/mmu.c
index 4c2d045,c2fa21d,512b2c0..18144e6
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@@@ -785,6 -785,6 -786,19 +786,19 @@@@ void __init iotable_init(struct map_des
}
}
++ void __init vm_reserve_area_early(unsigned long addr, unsigned long size,
++ void *caller)
++ {
++ struct vm_struct *vm;
++
++ vm = early_alloc_aligned(sizeof(*vm), __alignof__(*vm));
++ vm->addr = (void *)addr;
++ vm->size = size;
- vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING;
+++ vm->flags = VM_IOREMAP | VM_ARM_EMPTY_MAPPING;
++ vm->caller = caller;
++ vm_area_add_early(vm);
++ }
++
#ifndef CONFIG_ARM_LPAE
/*
WARNING: multiple messages have this Message-ID (diff)
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: linux-next: manual merge of the arm-soc tree with the arm-current tree
Date: Tue, 04 Sep 2012 07:44:16 -0500 [thread overview]
Message-ID: <5045F7A0.1090400@gmail.com> (raw)
In-Reply-To: <20120904090132.GG24085@n2100.arm.linux.org.uk>
On 09/04/2012 04:01 AM, Russell King - ARM Linux wrote:
> On Tue, Sep 04, 2012 at 08:08:24AM +0000, Arnd Bergmann wrote:
>> On Tuesday 04 September 2012, Stephen Rothwell wrote:
>>> Today's linux-next merge of the arm-soc tree got a conflict in
>>> arch/arm/mm/mmu.c between commit a849088aa155 ("ARM: Fix ioremap() of
>>> address zero") from the arm-current tree and commit c2794437091a ("ARM:
>>> Add fixed PCI i/o mapping") from the arm-soc tree.
>>>
>>> I am not sure how to fix this, so I have used the arm-current version of
>>> the change to pmd_empty_section_gap() since that changed the vm->flags.
>>> It may be that just changing the vm->flags value in vm_reserve_area_early()
>>> would be ok?
>>
>> If I read this correctly, we want pci_reserve_io to use VM_ARM_STATIC_MAPPING
>> while pmd_empty_section_gap should use VM_ARM_EMPTY_MAPPING, so we probably
>> want to add a flag argument to the vm_reserve_area_early() function.
>
> Whereas Rob said to me that both can use VM_ARM_EMPTY_MAPPING when I
> queried this conflict last week.
Right. The PCI i/o reserved area has a dummy physical address of 0 and
needs to be skipped by ioremap searches. So we don't set
VM_ARM_STATIC_MAPPING to prevent matches by ioremap. The vm_struct settings
don't really matter when we do the real mapping of the i/o space.
Here's my merge:
diff --cc arch/arm/mm/mmu.c
index 4c2d045,c2fa21d,512b2c0..18144e6
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@@@ -785,6 -785,6 -786,19 +786,19 @@@@ void __init iotable_init(struct map_des
}
}
++ void __init vm_reserve_area_early(unsigned long addr, unsigned long size,
++ void *caller)
++ {
++ struct vm_struct *vm;
++
++ vm = early_alloc_aligned(sizeof(*vm), __alignof__(*vm));
++ vm->addr = (void *)addr;
++ vm->size = size;
- vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING;
+++ vm->flags = VM_IOREMAP | VM_ARM_EMPTY_MAPPING;
++ vm->caller = caller;
++ vm_area_add_early(vm);
++ }
++
#ifndef CONFIG_ARM_LPAE
/*
next prev parent reply other threads:[~2012-09-04 12:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-04 6:06 linux-next: manual merge of the arm-soc tree with the arm-current tree Stephen Rothwell
2012-09-04 6:06 ` Stephen Rothwell
2012-09-04 6:06 ` Stephen Rothwell
2012-09-04 8:08 ` Arnd Bergmann
2012-09-04 8:08 ` Arnd Bergmann
2012-09-04 9:01 ` Russell King - ARM Linux
2012-09-04 9:01 ` Russell King - ARM Linux
2012-09-04 12:44 ` Rob Herring [this message]
2012-09-04 12:44 ` Rob Herring
2012-09-04 13:03 ` Stephen Rothwell
2012-09-04 13:03 ` Stephen Rothwell
2012-09-04 13:03 ` Stephen Rothwell
2012-09-04 13:11 ` Arnd Bergmann
2012-09-04 13:11 ` Arnd Bergmann
2012-09-04 13:19 ` Stephen Rothwell
2012-09-04 13:19 ` Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2013-04-11 6:21 Stephen Rothwell
2013-04-11 6:21 ` Stephen Rothwell
2013-04-11 6:21 ` Stephen Rothwell
2015-01-29 22:58 Stephen Rothwell
2015-01-29 22:58 ` Stephen Rothwell
2015-01-29 22:58 ` Stephen Rothwell
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=5045F7A0.1090400@gmail.com \
--to=robherring2@gmail.com \
--cc=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=olof@lixom.net \
--cc=sfr@canb.auug.org.au \
/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: link
Be 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.