10 Jun, 2011

1 commit


29 Nov, 2010

1 commit


02 Sep, 2010

1 commit


14 Jul, 2010

1 commit

  • via following scripts

    FILES=$(find * -type f | grep -vE 'oprofile|[^K]config')

    sed -i \
    -e 's/lmb/memblock/g' \
    -e 's/LMB/MEMBLOCK/g' \
    $FILES

    for N in $(find . -name lmb.[ch]); do
    M=$(echo $N | sed 's/lmb/memblock/g')
    mv $N $M
    done

    and remove some wrong change like lmbench and dlmb etc.

    also move memblock.c from lib/ to mm/

    Suggested-by: Ingo Molnar
    Acked-by: "H. Peter Anvin"
    Acked-by: Benjamin Herrenschmidt
    Acked-by: Linus Torvalds
    Signed-off-by: Yinghai Lu
    Signed-off-by: Benjamin Herrenschmidt

    Yinghai Lu
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

04 Dec, 2009

1 commit

  • That is "success", "unknown", "through", "performance", "[re|un]mapping"
    , "access", "default", "reasonable", "[con]currently", "temperature"
    , "channel", "[un]used", "application", "example","hierarchy", "therefore"
    , "[over|under]flow", "contiguous", "threshold", "enough" and others.

    Signed-off-by: André Goddard Rosa
    Signed-off-by: Jiri Kosina

    André Goddard Rosa
     

24 Sep, 2009

1 commit

  • Sometimes this is used to hold a simple offset, and sometimes
    it is used to hold a pointer. This patch changes it to a union containing
    void * and dma_addr_t. get/set accessors are also provided, because it was
    getting a bit ugly to get to the actual data.

    Signed-off-by: Becky Bruce
    Signed-off-by: Benjamin Herrenschmidt

    Becky Bruce
     

25 Jul, 2008

1 commit

  • To support Cooperative Memory Overcommitment (CMO), we need to check
    for failure from some of the tce hcalls.

    These changes for the pseries platform affect the powerpc architecture;
    patches for the other affected platforms are included in this patch.

    pSeries platform IOMMU code changes:
    * platform TCE functions must handle H_NOT_ENOUGH_RESOURCES errors and
    return an error.

    Architecture IOMMU code changes:
    * Calls to ppc_md.tce_build need to check return values and return
    DMA_MAPPING_ERROR for transient errors.

    Architecture changes:
    * struct machdep_calls for tce_build*_pSeriesLP functions need to change
    to indicate failure.
    * all other platforms will need updates to iommu functions to match the new
    calling semantics; they will return 0 on success. The other platforms
    default configs have been built, but no further testing was performed.

    Signed-off-by: Robert Jennings
    Acked-by: Olof Johansson
    Acked-by: Paul Mackerras
    Signed-off-by: Benjamin Herrenschmidt

    Robert Jennings
     

22 Jul, 2008

1 commit


14 Feb, 2008

1 commit


17 Aug, 2007

1 commit


07 May, 2007

1 commit


09 Mar, 2007

1 commit


04 Dec, 2006

2 commits

  • This patch adds full cell iommu support (and iommu disabled mode).

    It implements mapping/unmapping of iommu pages on demand using the
    standard powerpc iommu framework. It also supports running with
    iommu disabled for machines with less than 2GB of memory. (The
    default is off in that case, though it can be forced on with the
    kernel command line option iommu=force).

    Signed-off-by: Jeremy Kerr
    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Jeremy Kerr
     
  • This patch completely refactors DMA operations for 64 bits powerpc. 32 bits
    is untouched for now.

    We use the new dev_archdata structure to add the dma operations pointer
    and associated data to struct device. While at it, we also add the OF node
    pointer and numa node. In the future, we might want to look into merging
    that with pci_dn as well.

    The old vio, pci-iommu and pci-direct DMA ops are gone. They are now replaced
    by a set of generic iommu and direct DMA ops (non PCI specific) that can be
    used by bus types. The toplevel implementation is now inline.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     

01 Nov, 2006

1 commit

  • The 10Gigabit ethernet device drivers appear to be able to chew
    up all 256MB of TCE mappings on pSeries systems, as evidenced by
    numerous error messages:

    iommu_alloc failed, tbl c0000000010d5c48 vaddr c0000000d875eff0 npages 1

    Some experimentation indicates that this is essentially because
    one 1500 byte ethernet MTU gets mapped as a 64K DMA region when
    the large 64K pages are enabled. Thus, it doesn't take much to
    exhaust all of the available DMA mappings for a high-speed card.

    This patch changes the iommu allocator to work with its own
    unique, distinct page size. Although the patch is long, its
    actually quite simple: it just #defines a distinct IOMMU_PAGE_SIZE
    and then uses this in all the places that matter.

    As a side effect, it also dramatically improves network performance
    on platforms with H-calls on iommu translation inserts/removes (since
    we no longer call it 16 times for a 1500 bytes packet when the iommu HW
    is still 4k).

    In the future, we might want to make the IOMMU_PAGE_SIZE a variable
    in the iommu_table instance, thus allowing support for different HW
    page sizes in the iommu itself.

    Signed-off-by: Linas Vepstas
    Signed-off-by: Benjamin Herrenschmidt
    Acked-by: Olof Johansson
    Acked-by: Stephen Rothwell
    Signed-off-by: Paul Mackerras

    Linas Vepstas
     

13 Sep, 2006

1 commit


01 Jul, 2006

1 commit


29 Jun, 2006

1 commit


15 Jun, 2006

1 commit


21 Apr, 2006

1 commit

  • Turn on the DART already at 1GB. This is needed because of crippled
    devices in some systems, i.e. Airport Extreme cards, only supporting
    30-bit DMA addresses.

    Otherwise, users with between 1 and 2GB of memory will need to manually
    enable it with iommu=force, and that's no good.

    Some simple performance tests show that there's a slight impact of
    enabling DART, but it's in the 1-3% range (kernel build with disk I/O
    as well as over NFS).

    iommu=off can still be used for those who don't want to deal with the
    overhead (and don't need it for any devices).

    Signed-off-by: Olof Johansson
    Signed-off-by: Paul Mackerras

    Olof Johansson
     

10 Feb, 2006

1 commit


08 Feb, 2006

1 commit


07 Feb, 2006

1 commit

  • Currently most callers of lmb_alloc() don't check if it worked or not, if it
    ever does weird bad things will probably happen. The few callers who do check
    just panic or BUG_ON.

    So make lmb_alloc() panic internally, to catch bugs at the source. The few
    callers who did check the result no longer need to.

    The only caller that did anything interesting with the return result was
    careful_allocation(). For it we create __lmb_alloc_base() which _doesn't_ panic
    automatically, a little messy, but passable.

    Signed-off-by: Michael Ellerman
    Signed-off-by: Paul Mackerras

    Michael Ellerman
     

12 Jan, 2006

1 commit


09 Jan, 2006

2 commits

  • The patch enabling the new G5's with U4 broke initialization of the DART
    driver, causing it to trigger a BUG_ON for a case that is actually
    valid. This patch fixes it:

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt
     
  • This adds some very basic support for the new machines, including the
    Quad G5 (tested), and other new dual core based machines and iMac G5
    iSight (untested). This is still experimental ! There is no thermal
    control yet, there is no proper handing of MSIs, etc.. but it
    boots, I have all 4 cores up on my machine. Compared to the previous
    version of this patch, this one adds DART IOMMU support for the U4
    chipset and thus should work fine on setups with more than 2Gb of RAM.

    Signed-off-by: Benjamin Herrenschmidt
    Signed-off-by: Paul Mackerras

    Benjamin Herrenschmidt