1. 29 6月, 2013 1 次提交
  2. 24 6月, 2013 6 次提交
  3. 17 6月, 2013 4 次提交
  4. 08 6月, 2013 5 次提交
    • J
      ARM: mpu: Complete initialisation of the MPU after reaching the C-world · 9a271567
      Jonathan Austin 提交于
      Much like with the MMU, MPU initialisation is performed in two stages; the
      first in the pre-C world and the 'real' initialisation during arch setup.
      
      This patch wires in previously added MPU initialisation functions so that
      the whole of memory is mapped with the appropriate region properties for
      'normal' RAM (the appropriate properties depend on whether the system is
      SMP).
      
      Stub initialisation functions are added for the case that there MPU support
      is not configured in to the kernel.
      Signed-off-by: NJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      CC: Hyok S. Choi <hyok.choi@samsung.com>
      9a271567
    • J
      ARM: mpu: add MPU probe and initialisation functions in C · 5ad7dcbe
      Jonathan Austin 提交于
      This patch adds new functions for probing and initialising the ARMv7
      PMSA-compliant MPU.
      
      These use the pre-defined and reserved MPU_PROBE_REGION for establishing
      properties of the MPU, which is necessary because certain probe operations
      require modifying region properties and reading back the results.
      
      This patch also introduces a minimal sanity_check_meminfo_mpu function, that
      ensures that the memory set-up passed to the kernel can be used in conjunction
      with the MPU. The base address of a region must be aligned to the region size,
      otherwise behavior is unpredictable and region sizes can only be specified as a
      power-of-two. To simplify the satisfaction of these requirements this
      implementation currently enforces that all memory is contiguous from
      PHYS_OFFSET, merging banks that are contiguous but passed in separately.
      
      The functions are added in this patch but wired in to the boot process later
      in the series.
      Signed-off-by: NJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      CC: Hyok S. Choi <hyok.choi@samsung.com>
      5ad7dcbe
    • J
      ARM: add Cortex-R7 Processor Info · c90ad5c9
      Jonathan Austin 提交于
      This patch adds processor info for ARM Ltd. Cortex-R7.
      
      The R7 has many similarities to the A9 and though the ACTLR layout is not
      identical, the bits associated with cache operations broadcasting and SMP
      modes are the same for A9, A5 and R7 (Though in the A-class processors the
      same bits toggle TLB-ops broadcasting as well as cache-ops)
      Signed-off-by: NJonathan Austin <jonathan.austin@arm.com>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      CC: Catalin Marinas <catalin.marinas@arm.com>
      CC: Stephen Boyd <sboyd@codeaurora.org>
      c90ad5c9
    • J
      ARM: select CPU_CPU15_MMU/MPU appropriately · 66567618
      Jonathan Austin 提交于
      Currently CPU_V7 selects CPU_CP15_MMU, however in the case of a V7 CPU
      implementing the PMSA, such as the Cortex-R7, the CP15_MMU operations are
      not available. Selecting CPU_CP15_MPU is appropriate in this case.
      
      This patch makes CPU_CP15_MMU dependent on the use of the MMU, selecting
      CPU_CP15_MPU for v7 processors when !MMU is chosen.
      Signed-off-by: NJonathan Austin <jonathan.austin@arm.com>
      66567618
    • W
      ARM: suspend: fix CPU suspend code for !CONFIG_MMU configurations · aa1aadc3
      Will Deacon 提交于
      The ARM CPU suspend code can be selected even for a !CONFIG_MMU
      configuration. The resulting kernel will not compile and, even if it did,
      would access undefined co-processor registers when executing.
      
      This patch fixes the v6 and v7 CPU suspend code for the nommu case.
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Tested-by: NJonathan Austin <jonathan.austin@arm.com>
      CC: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> (commit_signer:1/3=33%)
      CC: Santosh Shilimkar <santosh.shilimkar@ti.com> (commit_signer:1/3=33%)
      CC: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
      aa1aadc3
  5. 06 6月, 2013 1 次提交
    • M
      ARM: 7746/1: mm: lazy cache flushing on non-mapped pages · 81f28946
      Ming Lei 提交于
      Currently flush_dcache_page() thinks pages as non-mapped if
      mapping_mapped(mapping) return false. This approach is very
      coase:
      	- mmap on part of file may cause all pages backed on
      	the file being thought as mmaped
      
      	- file-backed pages aren't mapped into user space actually
      	if the memory mmaped on the file isn't accessed
      
      This patch uses page_mapped() to decide if the page has been
      mapped.
      
      From the attached test code, I find there is much performance
      improvement(>25%) when accessing page caches via read under this
      situations, so memcpy benefits a lot from not flushing cache
      under this situation.
      
      No.   read time without the patch	No. read time with the patch
      ================================================================
      No. 0, time  22615636 us		No. 0, time  22014717 us
      No. 1, time  4387851 us 		No. 1, time  3113184 us
      No. 2, time  4276535 us 		No. 2, time  3005244 us
      No. 3, time  4259821 us 		No. 3, time  3001565 us
      No. 4, time  4263811 us 		No. 4, time  3002748 us
      No. 5, time  4258486 us 		No. 5, time  3004104 us
      No. 6, time  4253009 us 		No. 6, time  3002188 us
      No. 7, time  4262809 us 		No. 7, time  2998196 us
      No. 8, time  4264525 us 		No. 8, time  3007255 us
      No. 9, time  4267795 us 		No. 9, time  3005094 us
      
      1), No.0. is to read the file from storage device, and others are
      to read the file from page caches basically.
      2), file size is 512M, and is on ext4 over usb mass storage.
      3), the test is done on Pandaboard.
      
      unsigned int  sum = 0;
      unsigned long sum_val = 0;
      
      static unsigned long tv_diff(struct timeval *tv1, struct timeval *tv2)
      {
      	return (tv2->tv_sec - tv1->tv_sec) * 1000000 +
      		(tv2->tv_usec - tv1->tv_usec);
      }
      
      int main(int argc, char *argv[])
      {
      	char *mbuf, fbuf;
      	int fd;
      	int i;
      	unsigned long page_size, size;
      	struct stat stat;
      	struct timeval t1, t2;
      	unsigned char *rbuf = malloc(32 * page_size);
      
      	if (!rbuf) {
      		printf("	%sn", "malloc failed");
      		exit(-1);
      	}
      
      	page_size = getpagesize();
      	fd = open(argv[1], O_RDWR);
      	assert(fd >= 0);
      
      	fstat(fd, &stat);
      	size = stat.st_size;
      	printf("%s: file %s, size %lu, page size %lun",
      		argv[0],
      		argv[1], size, page_size);
      
      	gettimeofday(&t1, NULL);
      	mbuf = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
      	if (!mbuf) {
      		printf("	%sn", "mmap failed");
      		exit(-1);
      	}
      
      	for (i = 0 ; i < size ; i += (page_size * 32)) {
      		int rcnt;
      		lseek(fd, i, SEEK_SET);
      		rcnt = read(fd, rbuf, page_size * 32);
      		if (rcnt != page_size * 32) {
      			printf("%s: read faildn", __func__);
      			exit(-1);
      		}
      	}
      	free(rbuf);
      	munmap(mbuf, size);
      	gettimeofday(&t2, NULL);
      	printf("tread mmaped time: %luusn", tv_diff(&t1, &t2));
      
      	close(fd);
      }
      
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
      Reviewed-by: NWill Deacon <will.deacon@arm.com>
      Acked-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      81f28946
  6. 04 6月, 2013 3 次提交
  7. 30 5月, 2013 10 次提交
  8. 23 5月, 2013 2 次提交
    • M
      ARM: 7730/1: DMA-mapping: mark all !DMA_TO_DEVICE pages in unmapping as clean · b2a234ed
      Ming Lei 提交于
      It is common for one sg to include many pages, so mark all these
      pages as clean to avoid unnecessary flushing on them in
      set_pte_at() or update_mmu_cache().
      
      The patch might improve loading performance of applciation code a bit.
      
      On the below test code to read file(~1GByte size) from usb mass storage
      disk to buffer created with mmap(PROT_READ | PROT_EXEC) on
      Pandaboard, average ~1% improvement can be observed with the patch on
      10 times test.
      
      unsigned int sum = 0;
      static unsigned long tv_diff(struct timeval *tv1, struct timeval *tv2)
      {
      	return (tv2->tv_sec - tv1->tv_sec) * 1000000 + (tv2->tv_usec - tv1->tv_usec);
      }
      int main(int argc, char *argv[])
      {
      	char *mbuffer;
      	int fd;
      	int i;
      	unsigned long page_size, size;
      	struct stat stat;
      	struct timeval t1, t2;
      
      	page_size = getpagesize();
      	fd = open(argv[1], O_RDONLY);
      	assert(fd >= 0);
      
      	fstat(fd, &stat);
      	size = stat.st_size;
      	printf("%s: file %s, file size %lu, page size %lun", argv[0],
      	        read_filename, size, page_size);
      
      	gettimeofday(&t1, NULL);
      	mbuffer = mmap(NULL, size, PROT_READ | PROT_EXEC, MAP_SHARED, fd, 0);
      	for (i = 0 ; i < size ; i += page_size)
      	        sum += mbuffer[i];
      	munmap(mbuffer, page_size);
      	gettimeofday(&t2, NULL);
      	printf("tread mmaped time: %luusn", tv_diff(&t1, &t2));
      
      	close(fd);
      }
      Acked-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Marek Szyprowski <m.szyprowski@samsung.com>
      Signed-off-by: NMing Lei <ming.lei@canonical.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b2a234ed
    • L
      ARM: 7728/1: mm: Use phys_addr_t properly for ioremap functions · 9b97173e
      Laura Abbott 提交于
      Several of the ioremap functions use unsigned long in places
      resulting in truncation if physical addresses greater than
      4G are passed in. Change the types of the functions and the
      callers accordingly.
      
      Cc: Krzysztof Halasa <khc@pm.waw.pl>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: NLaura Abbott <lauraa@codeaurora.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      9b97173e
  9. 17 5月, 2013 1 次提交
  10. 16 5月, 2013 1 次提交
  11. 30 4月, 2013 3 次提交
  12. 29 4月, 2013 1 次提交
  13. 18 4月, 2013 2 次提交