12 Jan, 2012

1 commit

  • The cache functions lock out interrupts for long periods; this patch
    reduces the impact when operating on large address ranges. In such
    cases it will:
    - Invalidate the entire cache rather than individual addresses.
    - Do nothing when flushing the operand cache in write-through mode.
    - When flushing the operand cache in write-back mdoe, index the
    search for matching addresses on the cache entires instead of the
    addresses to flush

    Note: sh2a__flush_purge_region was only invalidating the operand
    cache, this adds flush.

    Signed-off-by: Phil Edworthy
    Signed-off-by: Paul Mundt

    Phil Edworthy
     

09 Dec, 2011

3 commits

  • Now all ARCH_POPULATES_NODE_MAP archs select HAVE_MEBLOCK_NODE_MAP -
    there's no user of early_node_map[] left. Kill early_node_map[] and
    replace ARCH_POPULATES_NODE_MAP with HAVE_MEMBLOCK_NODE_MAP. Also,
    relocate for_each_mem_pfn_range() and helper from mm.h to memblock.h
    as page_alloc.c would no longer host an alternative implementation.

    This change is ultimately one to one mapping and shouldn't cause any
    observable difference; however, after the recent changes, there are
    some functions which now would fit memblock.c better than page_alloc.c
    and dependency on HAVE_MEMBLOCK_NODE_MAP instead of HAVE_MEMBLOCK
    doesn't make much sense on some of them. Further cleanups for
    functions inside HAVE_MEMBLOCK_NODE_MAP in mm.h would be nice.

    -v2: Fix compile bug introduced by mis-spelling
    CONFIG_HAVE_MEMBLOCK_NODE_MAP to CONFIG_MEMBLOCK_HAVE_NODE_MAP in
    mmzone.h. Reported by Stephen Rothwell.

    Signed-off-by: Tejun Heo
    Cc: Stephen Rothwell
    Cc: Benjamin Herrenschmidt
    Cc: Yinghai Lu
    Cc: Tony Luck
    Cc: Ralf Baechle
    Cc: Martin Schwidefsky
    Cc: Chen Liqin
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: "H. Peter Anvin"

    Tejun Heo
     
  • The only function of memblock_analyze() is now allowing resize of
    memblock region arrays. Rename it to memblock_allow_resize() and
    update its users.

    * The following users remain the same other than renaming.

    arm/mm/init.c::arm_memblock_init()
    microblaze/kernel/prom.c::early_init_devtree()
    powerpc/kernel/prom.c::early_init_devtree()
    openrisc/kernel/prom.c::early_init_devtree()
    sh/mm/init.c::paging_init()
    sparc/mm/init_64.c::paging_init()
    unicore32/mm/init.c::uc32_memblock_init()

    * In the following users, analyze was used to update total size which
    is no longer necessary.

    powerpc/kernel/machine_kexec.c::reserve_crashkernel()
    powerpc/kernel/prom.c::early_init_devtree()
    powerpc/mm/init_32.c::MMU_init()
    powerpc/mm/tlb_nohash.c::__early_init_mmu()
    powerpc/platforms/ps3/mm.c::ps3_mm_add_memory()
    powerpc/platforms/embedded6xx/wii.c::wii_memory_fixups()
    sh/kernel/machine_kexec.c::reserve_crashkernel()

    * x86/kernel/e820.c::memblock_x86_fill() was directly setting
    memblock_can_resize before populating memblock and calling analyze
    afterwards. Call memblock_allow_resize() before start populating.

    memblock_can_resize is now static inside memblock.c.

    Signed-off-by: Tejun Heo
    Cc: Benjamin Herrenschmidt
    Cc: Yinghai Lu
    Cc: Russell King
    Cc: Michal Simek
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Guan Xuetao
    Cc: "H. Peter Anvin"

    Tejun Heo
     
  • memblock_init() initializes arrays for regions and memblock itself;
    however, all these can be done with struct initializers and
    memblock_init() can be removed. This patch kills memblock_init() and
    initializes memblock with struct initializer.

    The only difference is that the first dummy entries don't have .nid
    set to MAX_NUMNODES initially. This doesn't cause any behavior
    difference.

    Signed-off-by: Tejun Heo
    Cc: Benjamin Herrenschmidt
    Cc: Yinghai Lu
    Cc: Russell King
    Cc: Michal Simek
    Cc: Paul Mundt
    Cc: "David S. Miller"
    Cc: Guan Xuetao
    Cc: "H. Peter Anvin"

    Tejun Heo
     

07 Nov, 2011

1 commit

  • * 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: (230 commits)
    Revert "tracing: Include module.h in define_trace.h"
    irq: don't put module.h into irq.h for tracking irqgen modules.
    bluetooth: macroize two small inlines to avoid module.h
    ip_vs.h: fix implicit use of module_get/module_put from module.h
    nf_conntrack.h: fix up fallout from implicit moduleparam.h presence
    include: replace linux/module.h with "struct module" wherever possible
    include: convert various register fcns to macros to avoid include chaining
    crypto.h: remove unused crypto_tfm_alg_modname() inline
    uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
    pm_runtime.h: explicitly requires notifier.h
    linux/dmaengine.h: fix implicit use of bitmap.h and asm/page.h
    miscdevice.h: fix up implicit use of lists and types
    stop_machine.h: fix implicit use of smp.h for smp_processor_id
    of: fix implicit use of errno.h in include/linux/of.h
    of_platform.h: delete needless include
    acpi: remove module.h include from platform/aclinux.h
    miscdevice.h: delete unnecessary inclusion of module.h
    device_cgroup.h: delete needless include
    net: sch_generic remove redundant use of
    net: inet_timewait_sock doesnt need
    ...

    Fix up trivial conflicts (other header files, and removal of the ab3550 mfd driver) in
    - drivers/media/dvb/frontends/dibx000_common.c
    - drivers/media/video/{mt9m111.c,ov6650.c}
    - drivers/mfd/ab3550-core.c
    - include/linux/dmaengine.h

    Linus Torvalds
     

01 Nov, 2011

1 commit


28 Oct, 2011

1 commit

  • Add PHYSICAL_START kernel configuration parameter to set the address at
    which the kernel should be loaded.

    It has been observed on an sh7757lcr that simply modifying MEMORY_START
    does not achieve this goal for 32bit sh. This is due to MEMORY_OFFSET in
    arch/sh/kernel/vmlinux.lds.S bot being based on MEMORY_START on such
    systems.

    Signed-off-by: Simon Horman
    Signed-off-by: Paul Mundt

    Simon Horman
     

23 Jul, 2011

1 commit

  • …git/tip/linux-2.6-tip

    * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (123 commits)
    perf: Remove the nmi parameter from the oprofile_perf backend
    x86, perf: Make copy_from_user_nmi() a library function
    perf: Remove perf_event_attr::type check
    x86, perf: P4 PMU - Fix typos in comments and style cleanup
    perf tools: Make test use the preset debugfs path
    perf tools: Add automated tests for events parsing
    perf tools: De-opt the parse_events function
    perf script: Fix display of IP address for non-callchain path
    perf tools: Fix endian conversion reading event attr from file header
    perf tools: Add missing 'node' alias to the hw_cache[] array
    perf probe: Support adding probes on offline kernel modules
    perf probe: Add probed module in front of function
    perf probe: Introduce debuginfo to encapsulate dwarf information
    perf-probe: Move dwarf library routines to dwarf-aux.{c, h}
    perf probe: Remove redundant dwarf functions
    perf probe: Move strtailcmp to string.c
    perf probe: Rename DIE_FIND_CB_FOUND to DIE_FIND_CB_END
    tracing/kprobe: Update symbol reference when loading module
    tracing/kprobes: Support module init function probing
    kprobes: Return -ENOENT if probe point doesn't exist
    ...

    Linus Torvalds
     

01 Jul, 2011

1 commit

  • The nmi parameter indicated if we could do wakeups from the current
    context, if not, we would set some state and self-IPI and let the
    resulting interrupt do the wakeup.

    For the various event classes:

    - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from
    the PMI-tail (ARM etc.)
    - tracepoint: nmi=0; since tracepoint could be from NMI context.
    - software: nmi=[0,1]; some, like the schedule thing cannot
    perform wakeups, and hence need 0.

    As one can see, there is very little nmi=1 usage, and the down-side of
    not using it is that on some platforms some software events can have a
    jiffy delay in wakeup (when arch_irq_work_raise isn't implemented).

    The up-side however is that we can remove the nmi parameter and save a
    bunch of conditionals in fast paths.

    Signed-off-by: Peter Zijlstra
    Cc: Michael Cree
    Cc: Will Deacon
    Cc: Deng-Cheng Zhu
    Cc: Anton Blanchard
    Cc: Eric B Munson
    Cc: Heiko Carstens
    Cc: Paul Mundt
    Cc: David S. Miller
    Cc: Frederic Weisbecker
    Cc: Jason Wessel
    Cc: Don Zickus
    Link: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

30 Jun, 2011

1 commit


06 Jun, 2011

1 commit

  • This patch fixes a icache/dcache address-array start address while
    dumping its entires in debugfs. Perviously the code was attempting to
    remember the address in static variable, which is no more required
    for debugfs, as the function can be executed in one pass.

    Without this patch the start address ends up in wrong place and the
    /sys/kernel/debug/sh/icache or dcache debugfs contents may not be correct.

    Signed-off-by: Srinivas Kandagatla
    Cc: Stuart Menefy
    Signed-off-by: Paul Mundt

    Srinivas KANDAGATLA
     

31 May, 2011

1 commit


25 May, 2011

1 commit

  • Fold all the mmu_gather rework patches into one for submission

    Signed-off-by: Peter Zijlstra
    Reported-by: Hugh Dickins
    Cc: Benjamin Herrenschmidt
    Cc: David Miller
    Cc: Martin Schwidefsky
    Cc: Russell King
    Cc: Paul Mundt
    Cc: Jeff Dike
    Cc: Richard Weinberger
    Cc: Tony Luck
    Cc: KAMEZAWA Hiroyuki
    Cc: Mel Gorman
    Cc: KOSAKI Motohiro
    Cc: Nick Piggin
    Cc: Namhyung Kim
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

23 Mar, 2011

1 commit


15 Feb, 2011

2 commits

  • This patch enables gcov kernel profiling over the whole kernel for sh.
    Profiling of specific files individually already worked. A handful of
    files have to be explicitly excluded from the profiling to avoid
    breaking things, notably pmb.c.

    Signed-off-by: Chris Smith
    Signed-off-by: Stuart Menefy
    Signed-off-by: Paul Mundt

    Chris Smith
     
  • This resolves a problem seen when using the Android dynamic linker.
    Sometimes the dynamic linker would seg-fault at start up and this
    was eventually traced to the handling of a COW fault for a page which
    was being modified by the linker. If there was no cache aliasing between
    the kernel and the user page, the page was not flushed, leaving the
    newly copied data in the D-cache. However when executing instructions
    from that page, the I-cache is filled directly from external memory,
    rather than the D-cache, and causing garbage to be executed.

    Signed-off-by: Stuart Menefy
    Signed-off-by: Paul Mundt

    Stuart Menefy
     

14 Jan, 2011

2 commits

  • pte alloc routines must wait for split_huge_page if the pmd is not present
    and not null (i.e. pmd_trans_splitting). The additional branches are
    optimized away at compile time by pmd_trans_splitting if the config option
    is off. However we must pass the vma down in order to know the anon_vma
    lock to wait for.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Andrea Arcangeli
    Acked-by: Rik van Riel
    Acked-by: Mel Gorman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • * 'sh-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (31 commits)
    sh: Add support for AP-SH4AD-0A board.
    sh: Add support for AP-SH4A-3A board.
    sh: Add a new mach type for alpha project boards.
    serial: sh-sci: build fixes.
    sh: sh7372 SH4AL-DSP probe support
    sh: sh7366 Enable SDIO IRQs
    sh: sh7343 Enable SDIO IRQs
    sh: mach-ecovec24: enable runtime PM for SDHI
    sh: sh7723 / ap325rxa enable SDIO IRQs
    sh: sh7722 Enable SDIO IRQs
    sh: sh7724 Enable SDIO IRQs
    sh: Fix up legacy PTEA space attribute mapping.
    sh: Stub out legacy PCC pgprot encoding for X2 TLBs.
    sh: constify prefetch pointers.
    sh: Add a machvec callback for early memblock reservations.
    sh: update sh7757lcr_defconfig
    sh: add PVR probing for SH7757 3rd cut
    sh: Use device_initcall() instead of __initcall()
    sh: intc - convert board specific landisk code
    sh: Move init_landisk_IRQ to header file
    ...

    Linus Torvalds
     

11 Jan, 2011

1 commit


23 Dec, 2010

1 commit


01 Dec, 2010

1 commit

  • This follows the ARM change c01778001a4f5ad9c62d882776235f3f31922fdd
    ("ARM: 6379/1: Assume new page cache pages have dirty D-cache") for the
    same rationale:

    There are places in Linux where writes to newly allocated page
    cache pages happen without a subsequent call to flush_dcache_page()
    (several PIO drivers including USB HCD). This patch changes the
    meaning of PG_arch_1 to be PG_dcache_clean and always flush the
    D-cache for a newly mapped page in update_mmu_cache().

    This addresses issues seen with executing binaries from MMC, in
    addition to some of the other HCDs that don't explicitly do cache
    management for their pipe-in buffers.

    Requested-by: Yoshihiro Shimoda
    Signed-off-by: Paul Mundt

    Paul Mundt
     

04 Nov, 2010

1 commit

  • The nommu code has regressed somewhat in that 29BIT gets set for the
    SH-2/2A configs regardless of the fact that they are really 32BIT sans
    MMU or PMB. This does a bit of tidying to get nommu properly selecting
    32BIT as it was before.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König
     

27 Oct, 2010

1 commit


25 Oct, 2010

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (110 commits)
    sh: i2c-sh7760: Replase from ctrl_* to __raw_*
    sh: clkfwk: Shuffle around to match the intc split up.
    sh: clkfwk: modify for_each_frequency end condition
    sh: fix clk_get() error handling
    sh: clkfwk: Fix fault in frequency iterator.
    sh: clkfwk: Add a helper for rate rounding by divisor ranges.
    sh: clkfwk: Abstract rate rounding helper.
    sh: clkfwk: support clock remapping.
    sh: pci: Convert to upper/lower_32_bits() helpers.
    sh: mach-sdk7786: Add support for the FPGA SRAM.
    sh: Provide a generic SRAM pool for tiny memories.
    sh: pci: Support secondary FPGA-driven PCIe clocks on SDK7786.
    sh: pci: Support slot 4 routing on SDK7786.
    sh: Fix up PMB locking.
    sh: mach-sdk7786: Add support for fpga gpios.
    sh: use pr_fmt for clock framework, too.
    sh: remove name and id from struct clk
    sh: free-without-alloc fix for sh_mobile_lcdcfb
    sh: perf: Set up perf_max_events.
    sh: perf: Support SH-X3 hardware counters.
    ...

    Fix up trivial conflicts (perf_max_events got removed) in arch/sh/kernel/perf_event.c

    Linus Torvalds
     

15 Oct, 2010

1 commit

  • This sets up a generic SRAM pool for CPUs and platform code to insert
    their otherwise unused memories into. A simple alloc/free interface is
    provided (lifed from avr32) for generic code.

    This only applies to tiny SRAMs that are otherwise unmanaged, and does
    not take in to account the more complex SRAMs sitting behind transfer
    engines, or that employ an I/D split.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

14 Oct, 2010

1 commit

  • This first converts the PMB locking over to raw spinlocks, and secondly
    fixes up a nested locking issue that was triggering lockdep early on:

    swapper/0 is trying to acquire lock:
    (&pmbe->lock){......}, at: [] pmb_init+0xf4/0x4dc

    but task is already holding lock:
    (&pmbe->lock){......}, at: [] pmb_init+0xc6/0x4dc

    other info that might help us debug this:
    1 lock held by swapper/0:
    #0: (&pmbe->lock){......}, at: [] pmb_init+0xc6/0x4dc

    Signed-off-by: Paul Mundt

    Paul Mundt
     

13 Oct, 2010

1 commit

  • We need to round memory regions correctly -- specifically, we need to
    round reserved region in the more expansive direction (lower limit
    down, upper limit up) whereas usable memory regions need to be rounded
    in the more restrictive direction (lower limit up, upper limit down).

    This introduces two set of inlines:

    memblock_region_memory_base_pfn()
    memblock_region_memory_end_pfn()
    memblock_region_reserved_base_pfn()
    memblock_region_reserved_end_pfn()

    Although they are antisymmetric (and therefore are technically
    duplicates) the use of the different inlines explicitly documents the
    programmer's intention.

    The lack of proper rounding caused a bug on ARM, which was then found
    to also affect other architectures.

    Reported-by: Russell King
    Signed-off-by: Yinghai Lu
    LKML-Reference:
    Cc: Jeremy Fitzhardinge
    Signed-off-by: H. Peter Anvin

    Yinghai Lu
     

24 Sep, 2010

1 commit

  • While sh previously had its own debugfs root, there now exists a
    common arch_debugfs_dir prototype, so we switch everything over to
    that. Presumably once more architectures start making use of this
    we'll be able to just kill off the stub kdebugfs wrapper.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

23 Sep, 2010

1 commit


16 Aug, 2010

1 commit


04 Aug, 2010

3 commits


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
     

02 Jul, 2010

1 commit

  • This provides a sledgehammer approach for clearing the TLBs, only to be
    used in cases where we know we will never want to use the mappings again
    and have no interest in preserving state. This also destroys wired
    entries.

    The primary use for this is when we are either entering or exiting the
    kernel completely, in the latter case as a precursor for CPU reset by
    MMU.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

21 Jun, 2010

2 commits

  • page_table_range_init() presently allocates a PUD page for the 3-level
    page table case on X2 TLB configurations on each successive call. This
    results in the previous PUD page being trampled when PMDs with an
    overlapping PUD are initialized. This case was triggered by putting
    persistent kmaps immediately below the fixmap range for highmem.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • The function begins and ends with a read_lock. The latter is changed to a
    read_unlock.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @locked@
    expression E1;
    position p;
    @@

    read_lock(E1@p,...);

    @r exists@
    expression x

    Signed-off-by: Julia Lawall
    Acked-by: Matt Fleming
    Signed-off-by: Paul Mundt

    Julia Lawall
     

18 May, 2010

2 commits