Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934543AbbGVPTf (ORCPT ); Wed, 22 Jul 2015 11:19:35 -0400 Received: from smtp2-g21.free.fr ([212.27.42.2]:15333 "EHLO smtp2-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934322AbbGVPTb (ORCPT ); Wed, 22 Jul 2015 11:19:31 -0400 Message-ID: <55AFB47B.301@free.fr> Date: Wed, 22 Jul 2015 17:19:23 +0200 From: Mason User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 SeaMonkey/2.32.1 MIME-Version: 1.0 To: Linux ARM CC: LKML Subject: Having Linux handle different "types" of memory Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1603 Lines: 43 Hello everyone, I'm using an ARMv7 platform (Cortex A9) on Linux 3.14 The system supports two memory modules. For performance reasons, memory is "transparently" interleaved (with a 128-byte grain). That is, when the CPU accesses addresses 0-127, it hits DRAM0; addresses 128-255, it hits DRAM1, and so on. The problem is that other devices in the system, mainly the Ethernet controller, didn't get the "transparent interleaving" treatment. They just see DRAM0 and DRAM1. And I'm guessing this will generate all kinds of "interesting" problems when I try to DMA from the Ethernet controller's memory to DRAM... Is there a way to tell Linux: 1) this 1GB memory chunk here is for you and your private allocations, but don't use it for talking to devices/peripherals. 2) this 1GB memory chunk there is for talking to devices/peripherals, but it has lower performance, so try not to use it for your own private memory pools, but you can if memory is /really/ tight. Is there something like this? Maybe one of the NUMA policies? https://www.kernel.org/doc/Documentation/vm/numa_memory_policy.txt (I don't see any arch/arm/mm/numa.c however) Maybe I can pretend that there is some kind of IOMMU? https://www.kernel.org/doc/Documentation/DMA-API-HOWTO.txt arch/arm/include/asm/dma-iommu.h Or maybe there is an obvious solution that I'm missing? Regards. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/