29 Jun, 2012
1 commit
-
Signed-off-by: Alessandro Rubini
Acked-by: Giancarlo Asnaghi
Acked-by: Linus Walleij
Cc: Alan Cox
Signed-off-by: Russell King
30 Mar, 2012
1 commit
-
Pull "ARM: cleanups of io includes" from Olof Johansson:
"Rob Herring has done a sweeping change cleaning up all of the
mach/io.h includes, moving some of the oft-repeated macros to a common
location and removing a bunch of boiler plate. This is another step
closer to a common zImage for multiple platforms."Fix up various fairly trivial conflicts ( removal vs changes
around it, tegra localtimer.o is *still* gone, yadda-yadda).* tag 'cleanup2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
ARM: tegra: Include assembler.h in sleep.S to fix build break
ARM: pxa: use common IOMEM definition
ARM: dma-mapping: convert ARCH_HAS_DMA_SET_COHERENT_MASK to kconfig symbol
ARM: __io abuse cleanup
ARM: create a common IOMEM definition
ARM: iop13xx: fix missing declaration of iop13xx_init_early
ARM: fix ioremap/iounmap for !CONFIG_MMU
ARM: kill off __mem_pci
ARM: remove bunch of now unused mach/io.h files
ARM: make mach/io.h include optional
ARM: clps711x: remove unneeded include of mach/io.h
ARM: dove: add explicit include of dove.h to addr-map.c
ARM: at91: add explicit include of hardware.h to uncompressor
ARM: ep93xx: clean-up mach/io.h
ARM: tegra: clean-up mach/io.h
ARM: orion5x: clean-up mach/io.h
ARM: davinci: remove unneeded mach/io.h include
[media] davinci: remove includes of mach/io.h
ARM: OMAP: Remove remaining includes for mach/io.h
ARM: msm: clean-up mach/io.h
...
29 Mar, 2012
2 commits
-
Disintegrate asm/system.h for ARM.
Signed-off-by: David Howells
cc: Russell King
cc: linux-arm-kernel@lists.infradead.org -
Avoid namespace conflicts with drivers over the CP15 definitions by
moving CP15 related prototypes and definitions to a private header
file.Acked-by: Stephen Warren
Tested-by: Stephen Warren [Tegra]
Acked-by: H Hartley Sweeten
Tested-by: H Hartley Sweeten [EP93xx]
Acked-by: Nicolas Pitre
Acked-by: Kukjin Kim
Signed-off-by: Russell King
Signed-off-by: David Howells
07 Mar, 2012
1 commit
-
We have compile time over-ride of ioremap and iounmap, but an run-time
override is needed for multi-platform builds. This adds an extra function
pointer check, but ioremap is not peformance critical. The option for
compile time selection remains.The caller variant is used here to provide correct caller information as
ARM can only support level 0 for __builtin_return_address.Signed-off-by: Rob Herring
Cc: Russell King
Reviewed-by: Arnd Bergmann
Reviewed-by: Nicolas Pitre
03 Feb, 2012
1 commit
-
This reverts commit 3c424f359898aff48c3d5bed608ac706f8a528c3.
Joachim Eastwood reports:
| "ARM: 7304/1: ioremap: fix boundary check when reusing static mapping"
| Commit: 3c424f359898aff48c3d5bed608ac706f8a528c3 in Linus master
|
| Breaks booting on my custom AT91RM9200 board.
| There isn't any error messages or anything that indicates what goes
| wrong it just stops after; Uncompressing Linux... done, booting the
| kernel.
|
| Reverting it makes my board boot again.and further debugging reveals:
ioremap: pfn=fffff phys=fffff000 offset=400 size=1000
ioremap: area c3ffdfc0: phys_addr=200000 pfn=200 size=4000
ioremap: found: addr fef74000 => fed73000 => fed73400Clearly, an area for pfn 0x200, 16K can't ever satisfy a request for pfn
0xfffff. This happens because the changed if statement becomes:if (0x00200 > 0xfffff ||
0xfffff000 + 0x400 + 0x1000-1 > 0x00200000 + 0x4000-1)
and therefore:
if (0x00200 > 0xfffff ||
0x000003ff > 0x00203fff)The if condition fails, and so we _believe_ that the SRAM mapping fits
our request. Clearly that's totally bogus.Moreover, the original premise of the 'fix' patch was wrong:
| The condition checking boundaries of the requested and existing
| mappings didn't take in-page offset into consideration though,
| which lead to obscure and hard to debug problems when requested
| mapping crossed end of the static one.as the code immediately above this loop does:
size = PAGE_ALIGN(offset + size);
so 'size' already contains the requested offset into the page.
So, revert the broken 'fix'.
Acked-by: Nicolas Pitre
28 Jan, 2012
1 commit
-
Since commit 576d2f2525612ecb5af029a76f21f22a3b82563d "ARM: add
generic ioremap optimization by reusing static mappings" ioremap()
is trying to reuse existing static mapping when possible.The condition checking boundaries of the requested and existing
mappings didn't take in-page offset into consideration though,
which lead to obscure and hard to debug problems when requested
mapping crossed end of the static one.Signed-off-by: Pawel Moll
Acked-by: Nicolas Pitre
Signed-off-by: Russell King
09 Dec, 2011
1 commit
-
…/linux into devel-stable
Conflicts:
arch/arm/mm/ioremap.c
08 Dec, 2011
2 commits
-
This patch modifies the pgd/pmd/pte manipulation functions to support
the 3-level page table format. Since there is no need for an 'ext'
argument to cpu_set_pte_ext(), this patch conditionally defines a
different prototype for this function when CONFIG_ARM_LPAE.The patch also introduces the L_PGD_SWAPPER flag to mark pgd entries
pointing to pmd tables pre-allocated in the swapper_pg_dir and avoid
trying to free them at run-time. This flag is 0 with the classic page
table format.Signed-off-by: Catalin Marinas
-
With the arch/arm code conversion to pgtable-nopud.h, the section and
supersection (un|re)map code triggers compiler warnings on UP systems.
This is caused by pmd_offset() being given a pgd_t argument rather than
a pud_t one. This patch makes the necessary conversion with the
assumption that the pud is folded into the pgd. The page table setting
code only loops over the pmd which is enough with the classic page
tables. This code is not compiled when LPAE is enabled.Signed-off-by: Catalin Marinas
27 Nov, 2011
2 commits
-
Now that we have all the static mappings from iotable_init() located
in the vmalloc area, it is trivial to optimize ioremap by reusing those
static mappings when the requested physical area fits in one of them,
and so in a generic way for all platforms.Signed-off-by: Nicolas Pitre
Tested-by: Stephen Warren
Tested-by: Kevin Hilman
Tested-by: Jamie Iles -
Firstly, there is no need to have a double pointer here as we're only
walking the vmlist and not modifying it.Secondly, for the same reason, we don't need a write lock but only a
read lock here, since the lock only protects the coherency of the list
nothing else.Lastly, the reason for holding a lock is not what the comment says, so
let's remove that misleading piece of information.Signed-off-by: Nicolas Pitre
23 Oct, 2011
1 commit
-
This allows mapping external memory such as SRAM for use.
This is needed for some small chunks of code, such as reprogramming
SDRAM memory source clocks that can't be executed in SDRAM. Other
use cases include some PM related code.Acked-by: Nicolas Pitre
Acked-by: Andres Salomon
Signed-off-by: Tony Lindgren
Signed-off-by: Russell King
24 Dec, 2010
1 commit
-
This reverts commit 06c1088, as promised in the warning message.
13 Oct, 2010
1 commit
-
... but produce a big warning about the problem as encouragement
for people to fix their drivers.Signed-off-by: Russell King
27 Jul, 2010
1 commit
-
We don't need our own implementation of this, use the generic
library implementation instead.Signed-off-by: Russell King
22 Jun, 2010
1 commit
-
ARMv6 and above have a restriction whereby aliasing virtual:physical
mappings must not have differing memory type and sharability
attributes. Strictly, this covers the memory type (strongly ordered,
device, memory), cache attributes (uncached, write combine, write
through, write back read alloc, write back write alloc) and the
shared bit.However, using ioremap() and its variants on system RAM results in
mappings which differ in these attributes from the main system RAM
mapping. Other architectures which similar restrictions approch this
problem in the same way - they do not permit ioremap on main system
RAM.Make ARM behave in the same way, with a WARN_ON() such that users can
be traced and an alternative approach found.Signed-off-by: Russell King
16 Feb, 2010
1 commit
-
This allows the procfs vmallocinfo file to show who created the ioremap
regions. Note: __builtin_return_address(0) doesn't do what's expected
if its used in an inline function, so we leave __arm_ioremap callers
in such places alone.Signed-off-by: Russell King
19 May, 2009
1 commit
-
This patch provides a device drivers, which has a omap iommu, with
address mapping APIs between device virtual address(iommu), physical
address and MPU virtual address.There are 4 possible patterns for iommu virtual address(iova/da) mapping.
|iova/ mapping iommu_ page
| da pa va (d)-(p)-(v) function type
---------------------------------------------------------------------------
1 | c c c 1 - 1 - 1 _kmap() / _kunmap() s
2 | c c,a c 1 - 1 - 1 _kmalloc()/ _kfree() s
3 | c d c 1 - n - 1 _vmap() / _vunmap() s
4 | c d,a c 1 - n - 1 _vmalloc()/ _vfree() n*'iova': device iommu virtual address
'da': alias of 'iova'
'pa': physical address
'va': mpu virtual address'c': contiguous memory area
'd': dicontiguous memory area
'a': anonymous memory allocation
'()': optional feature'n': a normal page(4KB) size is used.
's': multiple iommu superpage(16MB, 1MB, 64KB, 4KB) size is used.'*': not yet, but feasible.
Signed-off-by: Hiroshi DOYU
26 Jan, 2009
1 commit
-
Tomi Valkeinen reports:
Running with latest linux-omap kernel on OMAP3 SDP board, I have
problem with iounmap(). It looks like iounmap() does not properly
free large areas. Below is a test which fails for me in 6-7 loops.for (i = 0; i < 200; ++i) {
vaddr = ioremap(paddr, size);
if (!vaddr) {
printk("couldn't ioremap\n");
break;
}
iounmap(vaddr);
}The changes to vmalloc.c weren't reflected in the ARM ioremap
implementation. Turns out the fix is rather simple.Tested-by: Tomi Valkeinen
Tested-by: Matt Gerassimoff
Signed-off-by: Russell King
10 Oct, 2008
1 commit
-
Conflicts:
arch/arm/Kconfig
01 Oct, 2008
1 commit
-
This member is now redundant; the memory type is encoded in the Linux
PTE bits.Signed-off-by: Russell King
06 Sep, 2008
1 commit
-
Signed-off-by: Russell King
05 Sep, 2008
1 commit
-
arch/arm/kernel/process.c:270:6: warning: symbol 'show_fpregs' was not declared. Should it be static?
This function isn't used, so can be removed.
arch/arm/kernel/setup.c:532:9: warning: symbol 'len' shadows an earlier one
arch/arm/kernel/setup.c:524:6: originally declared hereA function containing two 'len's.
arch/arm/mm/fault-armv.c:188:13: warning: symbol 'check_writebuffer_bugs' was not declared. Should it be static?
arch/arm/mm/mmap.c:122:5: warning: symbol 'valid_phys_addr_range' was not declared. Should it be static?
arch/arm/mm/mmap.c:137:5: warning: symbol 'valid_mmap_phys_addr_range' was not declared. Should it be static?Missing includes.
arch/arm/kernel/traps.c:71:77: warning: Using plain integer as NULL pointer
arch/arm/mm/ioremap.c:355:46: error: incompatible types in comparison expression (different address spaces)Sillies.
Signed-off-by: Russell King
01 Sep, 2008
1 commit
-
Add asm/cputype.h, moving functions and definitions from asm/system.h
there. Convert all users of 'processor_id' to the more efficient
read_cpuid_id() function.Signed-off-by: Russell King
03 Aug, 2008
1 commit
-
Move platform independent header files to arch/arm/include/asm, leaving
those in asm/arch* and asm/plat* alone.Signed-off-by: Russell King
06 Feb, 2008
1 commit
-
(with Martin Schwidefsky )
The pgd/pud/pmd/pte page table allocation functions get a mm_struct pointer as
first argument. The free functions do not get the mm_struct argument. This
is 1) asymmetrical and 2) to do mm related page table allocations the mm
argument is needed on the free function as well.[kamalesh@linux.vnet.ibm.com: i386 fix]
[akpm@linux-foundation.org: coding-syle fixes]
Signed-off-by: Benjamin Herrenschmidt
Signed-off-by: Martin Schwidefsky
Cc:
Signed-off-by: Kamalesh Babulal
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
12 Jul, 2007
1 commit
-
If size=16M offset=2K then we should map two supersections
rather than just one.Signed-off-by: Russell King
21 May, 2007
1 commit
-
Spelling fixes in arch/arm/.
Signed-off-by: Simon Arlott
Signed-off-by: Russell King
06 May, 2007
1 commit
-
__ioremap() took a set of page table flags (specifically the cacheable
and bufferable bits) to control the mapping type. However, with
the advent of ARMv6, this is far too limited.Replace the page table flags with a memory type index, so that the
desired attributes can be selected from the mem_type table.Finally, to prevent silent miscompilation due to the differing
arguments, rename the __ioremap() and __ioremap_pfn() functions.Signed-off-by: Russell King
22 Apr, 2007
3 commits
-
Add prot_pte_ext to the mem_types table to allow the extended pte
attributes to be passed to set_pte_ext(), thereby permitting us to
specify memory type information for the hardware PTE entries.Signed-off-by: Russell King
-
We really want to be using the memory type table in ioremap, so we
only have to do the CPU type fixups in one place.Signed-off-by: Russell King
-
Catalin Marinas at ARM Ltd says:
> The CPU architects in ARM intended supersections only as a way to map
> addresses >= 4GB. Supersections are not mandated by the architecture
> and there is no easy way to detect their hardware support at run-time
> (other than checking for a specific core). From the analysis done in
> ARM, there wasn't a clear performance gain by using supersections
> rather than sections (no significant improvement in the TLB misses).Therefore, we should avoid using supersections unless there's a real
need (iow, we're mapping addresses >= 4GB).This means that we can simplify create_mapping() a bit since we will
only use supersection mappings for addresses >= 4GB, which means that
the physical, virtual and length must be multiples of the supersection
mapping size.Signed-off-by: Russell King
26 Jan, 2007
1 commit
-
Supersections do not have a field for the domain and it is always
0. This patch prevents the creation of supersections during ioremap
when DOMAIN_IO is not zero (i.e. !defined(CONFIG_IO_36)).Signed-off-by: Catalin Marinas
Signed-off-by: Russell King
18 Dec, 2006
1 commit
-
We need to ensure that the area size is page aligned so that
remap_area_pte() doesn't increment the address past the end of
the desired area.Signed-off-by: Russell King
13 Dec, 2006
2 commits
-
Since we're keeping the ioremap code, we might as well keep it as
close to the standard kernel as possible.Signed-off-by: Russell King
-
L_PTE_ASID is not really required to be stored in every PTE, since we
can identify it via the address passed to set_pte_at(). So, create
set_pte_ext() which takes the address of the PTE to set, the Linux
PTE value, and the additional CPU PTE bits which aren't encoded in
the Linux PTE value.Signed-off-by: Russell King
09 Oct, 2006
1 commit
-
Signed-off-by: Al Viro
Signed-off-by: Linus Torvalds
26 Sep, 2006
1 commit
-
One of the changes necessary for shared page tables is to standardize the
pxx_page macros. pte_page and pmd_page have always returned the struct
page associated with their entry, while pte_page_kernel and pmd_page_kernel
have returned the kernel virtual address. pud_page and pgd_page, on the
other hand, return the kernel virtual address.Shared page tables needs pud_page and pgd_page to return the actual page
structures. There are very few actual users of these functions, so it is
simple to standardize their usage.Since this is basic cleanup, I am submitting these changes as a standalone
patch. Per Hugh Dickins' comments about it, I am also changing the
pxx_page_kernel macros to pxx_page_vaddr to clarify their meaning.Signed-off-by: Dave McCracken
Cc: Hugh Dickins
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Jul, 2006
1 commit
-
Patch from Catalin Marinas
This patch adds #ifdef around some variables in the arch/arm/mm/ioremap.c
file.Signed-off-by: Catalin Marinas
Signed-off-by: Russell King