16 Jun, 2020

1 commit

  • We have a few helper functions for making the access to the buffer
    address easier on SG-buffer. Those are specific to the buffer that is
    allocated with SG-buffer type, and it makes hard to use both SG and
    non-SG buffers in the same code.

    This patch adds a few simple checks and lets the helpers to deal with
    both SG- and continuous buffers gracefully. It's a preliminary step
    for the upcoming patch that mimics the buffer type on the fly.

    Link: https://lore.kernel.org/r/20200615160045.2703-4-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

10 Jun, 2020

1 commit

  • Patch series "mm: consolidate definitions of page table accessors", v2.

    The low level page table accessors (pXY_index(), pXY_offset()) are
    duplicated across all architectures and sometimes more than once. For
    instance, we have 31 definition of pgd_offset() for 25 supported
    architectures.

    Most of these definitions are actually identical and typically it boils
    down to, e.g.

    static inline unsigned long pmd_index(unsigned long address)
    {
    return (address >> PMD_SHIFT) & (PTRS_PER_PMD - 1);
    }

    static inline pmd_t *pmd_offset(pud_t *pud, unsigned long address)
    {
    return (pmd_t *)pud_page_vaddr(*pud) + pmd_index(address);
    }

    These definitions can be shared among 90% of the arches provided
    XYZ_SHIFT, PTRS_PER_XYZ and xyz_page_vaddr() are defined.

    For architectures that really need a custom version there is always
    possibility to override the generic version with the usual ifdefs magic.

    These patches introduce include/linux/pgtable.h that replaces
    include/asm-generic/pgtable.h and add the definitions of the page table
    accessors to the new header.

    This patch (of 12):

    The linux/mm.h header includes to allow inlining of the
    functions involving page table manipulations, e.g. pte_alloc() and
    pmd_alloc(). So, there is no point to explicitly include
    in the files that include .

    The include statements in such cases are remove with a simple loop:

    for f in $(git grep -l "include ") ; do
    sed -i -e '/include / d' $f
    done

    Signed-off-by: Mike Rapoport
    Signed-off-by: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Borislav Petkov
    Cc: Brian Cain
    Cc: Catalin Marinas
    Cc: Chris Zankel
    Cc: "David S. Miller"
    Cc: Geert Uytterhoeven
    Cc: Greentime Hu
    Cc: Greg Ungerer
    Cc: Guan Xuetao
    Cc: Guo Ren
    Cc: Heiko Carstens
    Cc: Helge Deller
    Cc: Ingo Molnar
    Cc: Ley Foon Tan
    Cc: Mark Salter
    Cc: Matthew Wilcox
    Cc: Matt Turner
    Cc: Max Filippov
    Cc: Michael Ellerman
    Cc: Michal Simek
    Cc: Mike Rapoport
    Cc: Nick Hu
    Cc: Paul Walmsley
    Cc: Richard Weinberger
    Cc: Rich Felker
    Cc: Russell King
    Cc: Stafford Horne
    Cc: Thomas Bogendoerfer
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: Vincent Chen
    Cc: Vineet Gupta
    Cc: Will Deacon
    Cc: Yoshinori Sato
    Link: http://lkml.kernel.org/r/20200514170327.31389-1-rppt@kernel.org
    Link: http://lkml.kernel.org/r/20200514170327.31389-2-rppt@kernel.org
    Signed-off-by: Linus Torvalds

    Mike Rapoport
     

31 May, 2019

1 commit

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    59 temple place suite 330 boston ma 02111 1307 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1334 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

28 Aug, 2018

1 commit

  • In some cases (mainly for x86), we need the DMA coherent buffer with
    non-cached pages. Although this has been done in each driver side
    like HD-audio and intel8x0, it can be done cleaner in the core memory
    allocator.

    This patch adds the new types, SNDRV_DMA_TYPE_DEV_UC and
    SNDRV_DMA_TYPE_DEV_UC_SG, for allocating such non-cached buffer
    pages. On non-x86 architectures, they work as same as the standard
    SNDRV_DMA_TYPE_DEV and *_SG.

    One additional change by this move is that we can assure to pass the
    non-cached pgprot to the vmapped buffer, too. It eventually fixes the
    case like non-snoop mode without mmap access on HD-audio.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

22 Nov, 2014

1 commit


23 Sep, 2012

1 commit


03 Aug, 2012

1 commit


18 Mar, 2009

1 commit

  • In snd_free_sgbuf_pags(), vunmap() is called after releasing the SG
    pages, and it causes errors on Xen as Xen manages the pages
    differently. Although no significant errors have been reported on
    the actual hardware, this order should be fixed other way round,
    first vunmap() then free pages.

    Cc: Jan Beulich
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

25 Aug, 2008

1 commit

  • Most hardwares have limited buffer-descriptor table length. This
    also restricts the max buffer size of the sound driver.
    For example, snd-hda-intel has 1MB buffer size limit, and this is
    because it can have at most 256 BDL entries. For supporting larger
    buffers, we need to allocate larger pages even for sg-buffers.

    This patch changes the sgbuf allocation code to try to allocate
    larger pages first. At each head of the allocated pages, the
    number of allocated pages is stored in the lowest bits of the
    corresponding entry of the table addr field. This change isn't
    visible as long as the driver uses snd_sgbuf_get_addr() helper.

    Also, the patch adds a new function, snd_pcm_sgbuf_get_chunk_size().
    This returns the size of the chunk on continuous pages starting at
    the given position offset. If the chunk reaches to a non-continuous
    page, it returns the size to the boundary.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Jaroslav Kysela

    Takashi Iwai
     

20 Dec, 2006

1 commit


03 Aug, 2006

1 commit


01 Jul, 2006

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds