10 May, 2013

1 commit

  • Pull removal of GENERIC_GPIO from Grant Likely:
    "GENERIC_GPIO now synonymous with GPIOLIB. There are no longer any
    valid cases for enableing GENERIC_GPIO without GPIOLIB, even though it
    is possible to do so which has been causing confusion and breakage.
    This branch does the work to completely eliminate GENERIC_GPIO."

    * tag 'gpio-for-linus' of git://git.secretlab.ca/git/linux:
    gpio: update gpio Chinese documentation
    Remove GENERIC_GPIO config option
    Convert selectors of GENERIC_GPIO to GPIOLIB
    blackfin: force use of gpiolib
    m68k: coldfire: use gpiolib
    mips: pnx833x: remove requirement for GENERIC_GPIO
    openrisc: default GENERIC_GPIO to false
    avr32: default GENERIC_GPIO to false
    xtensa: remove explicit selection of GENERIC_GPIO
    sh: replace CONFIG_GENERIC_GPIO by CONFIG_GPIOLIB
    powerpc: remove redundant GENERIC_GPIO selection
    unicore32: default GENERIC_GPIO to false
    unicore32: remove unneeded select GENERIC_GPIO
    arm: plat-orion: use GPIO driver on CONFIG_GPIOLIB
    arm: remove redundant GENERIC_GPIO selection
    mips: alchemy: require gpiolib
    mips: txx9: change GENERIC_GPIO to GPIOLIB
    mips: loongson: use GPIO driver on CONFIG_GPIOLIB
    mips: remove redundant GENERIC_GPIO select

    Linus Torvalds
     

06 May, 2013

1 commit

  • Pull mudule updates from Rusty Russell:
    "We get rid of the general module prefix confusion with a binary config
    option, fix a remove/insert race which Never Happens, and (my
    favorite) handle the case when we have too many modules for a single
    commandline. Seriously, the kernel is full, please go away!"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    modpost: fix unwanted VMLINUX_SYMBOL_STR expansion
    X.509: Support parse long form of length octets in Authority Key Identifier
    module: don't unlink the module until we've removed all exposure.
    kernel: kallsyms: memory override issue, need check destination buffer length
    MODSIGN: do not send garbage to stderr when enabling modules signature
    modpost: handle huge numbers of modules.
    modpost: add -T option to read module names from file/stdin.
    modpost: minor cleanup.
    genksyms: pass symbol-prefix instead of arch
    module: fix symbol versioning with symbol prefixes
    CONFIG_SYMBOL_PREFIX: cleanup.

    Linus Torvalds
     

03 May, 2013

1 commit

  • Pull powerpc update from Benjamin Herrenschmidt:
    "The main highlights this time around are:

    - A pile of addition POWER8 bits and nits, such as updated
    performance counter support (Michael Ellerman), new branch history
    buffer support (Anshuman Khandual), base support for the new PCI
    host bridge when not using the hypervisor (Gavin Shan) and other
    random related bits and fixes from various contributors.

    - Some rework of our page table format by Aneesh Kumar which fixes a
    thing or two and paves the way for THP support. THP itself will
    not make it this time around however.

    - More Freescale updates, including Altivec support on the new e6500
    cores, new PCI controller support, and a pile of new boards support
    and updates.

    - The usual batch of trivial cleanups & fixes"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (156 commits)
    powerpc: Fix build error for book3e
    powerpc: Context switch the new EBB SPRs
    powerpc: Turn on the EBB H/FSCR bits
    powerpc: Replace CPU_FTR_BCTAR with CPU_FTR_ARCH_207S
    powerpc: Setup BHRB instructions facility in HFSCR for POWER8
    powerpc: Fix interrupt range check on debug exception
    powerpc: Update tlbie/tlbiel as per ISA doc
    powerpc: Print page size info during boot
    powerpc: print both base and actual page size on hash failure
    powerpc: Fix hpte_decode to use the correct decoding for page sizes
    powerpc: Decode the pte-lp-encoding bits correctly.
    powerpc: Use encode avpn where we need only avpn values
    powerpc: Reduce PTE table memory wastage
    powerpc: Move the pte free routines from common header
    powerpc: Reduce the PTE_INDEX_SIZE
    powerpc: Switch 16GB and 16MB explicit hugepages to a different page table format
    powerpc: New hugepage directory format
    powerpc: Don't truncate pgd_index wrongly
    powerpc: Don't hard code the size of pte page
    powerpc: Save DAR and DSISR in pt_regs on MCE
    ...

    Linus Torvalds
     

01 May, 2013

3 commits

  • show_regs() is inherently arch-dependent but it does make sense to print
    generic debug information and some archs already do albeit in slightly
    different forms. This patch introduces a generic function to print debug
    information from show_regs() so that different archs print out the same
    information and it's much easier to modify what's printed.

    show_regs_print_info() prints out the same debug info as dump_stack()
    does plus task and thread_info pointers.

    * Archs which didn't print debug info now do.

    alpha, arc, blackfin, c6x, cris, frv, h8300, hexagon, ia64, m32r,
    metag, microblaze, mn10300, openrisc, parisc, score, sh64, sparc,
    um, xtensa

    * Already prints debug info. Replaced with show_regs_print_info().
    The printed information is superset of what used to be there.

    arm, arm64, avr32, mips, powerpc, sh32, tile, unicore32, x86

    * s390 is special in that it used to print arch-specific information
    along with generic debug info. Heiko and Martin think that the
    arch-specific extra isn't worth keeping s390 specfic implementation.
    Converted to use the generic version.

    Note that now all archs print the debug info before actual register
    dumps.

    An example BUG() dump follows.

    kernel BUG at /work/os/work/kernel/workqueue.c:4841!
    invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #7
    Hardware name: empty empty/S3992, BIOS 080011 10/26/2007
    task: ffff88007c85e040 ti: ffff88007c860000 task.ti: ffff88007c860000
    RIP: 0010:[] [] init_workqueues+0x4/0x6
    RSP: 0000:ffff88007c861ec8 EFLAGS: 00010246
    RAX: ffff88007c861fd8 RBX: ffffffff824466a8 RCX: 0000000000000001
    RDX: 0000000000000046 RSI: 0000000000000001 RDI: ffffffff8234a07a
    RBP: ffff88007c861ec8 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000001 R11: 0000000000000000 R12: ffffffff8234a07a
    R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
    FS: 0000000000000000(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    CR2: ffff88015f7ff000 CR3: 00000000021f1000 CR4: 00000000000007f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Stack:
    ffff88007c861ef8 ffffffff81000312 ffffffff824466a8 ffff88007c85e650
    0000000000000003 0000000000000000 ffff88007c861f38 ffffffff82335e5d
    ffff88007c862080 ffffffff8223d8c0 ffff88007c862080 ffffffff81c47760
    Call Trace:
    [] do_one_initcall+0x122/0x170
    [] kernel_init_freeable+0x9b/0x1c8
    [] ? rest_init+0x140/0x140
    [] kernel_init+0xe/0xf0
    [] ret_from_fork+0x7c/0xb0
    [] ? rest_init+0x140/0x140
    ...

    v2: Typo fix in x86-32.

    v3: CPU number dropped from show_regs_print_info() as
    dump_stack_print_info() has been updated to print it. s390
    specific implementation dropped as requested by s390 maintainers.

    Signed-off-by: Tejun Heo
    Acked-by: David S. Miller
    Acked-by: Jesper Nilsson
    Cc: Heiko Carstens
    Cc: Martin Schwidefsky
    Cc: Bjorn Helgaas
    Cc: Fengguang Wu
    Cc: Mike Frysinger
    Cc: Vineet Gupta
    Cc: Sam Ravnborg
    Acked-by: Chris Metcalf [tile bits]
    Acked-by: Richard Kuo [hexagon bits]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Both dump_stack() and show_stack() are currently implemented by each
    architecture. show_stack(NULL, NULL) dumps the backtrace for the
    current task as does dump_stack(). On some archs, dump_stack() prints
    extra information - pid, utsname and so on - in addition to the
    backtrace while the two are identical on other archs.

    The usages in arch-independent code of the two functions indicate
    show_stack(NULL, NULL) should print out bare backtrace while
    dump_stack() is used for debugging purposes when something went wrong,
    so it does make sense to print additional information on the task which
    triggered dump_stack().

    There's no reason to require archs to implement two separate but mostly
    identical functions. It leads to unnecessary subtle information.

    This patch expands the dummy fallback dump_stack() implementation in
    lib/dump_stack.c such that it prints out debug information (taken from
    x86) and invokes show_stack(NULL, NULL) and drops arch-specific
    dump_stack() implementations in all archs except blackfin. Blackfin's
    dump_stack() does something wonky that I don't understand.

    Debug information can be printed separately by calling
    dump_stack_print_info() so that arch-specific dump_stack()
    implementation can still emit the same debug information. This is used
    in blackfin.

    This patch brings the following behavior changes.

    * On some archs, an extra level in backtrace for show_stack() could be
    printed. This is because the top frame was determined in
    dump_stack() on those archs while generic dump_stack() can't do that
    reliably. It can be compensated by inlining dump_stack() but not
    sure whether that'd be necessary.

    * Most archs didn't use to print debug info on dump_stack(). They do
    now.

    An example WARN dump follows.

    WARNING: at kernel/workqueue.c:4841 init_workqueues+0x35/0x505()
    Hardware name: empty
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #9
    0000000000000009 ffff88007c861e08 ffffffff81c614dc ffff88007c861e48
    ffffffff8108f50f ffffffff82228240 0000000000000040 ffffffff8234a03c
    0000000000000000 0000000000000000 0000000000000000 ffff88007c861e58
    Call Trace:
    [] dump_stack+0x19/0x1b
    [] warn_slowpath_common+0x7f/0xc0
    [] warn_slowpath_null+0x1a/0x20
    [] init_workqueues+0x35/0x505
    ...

    v2: CPU number added to the generic debug info as requested by s390
    folks and dropped the s390 specific dump_stack(). This loses %ksp
    from the debug message which the maintainers think isn't important
    enough to keep the s390-specific dump_stack() implementation.

    dump_stack_print_info() is moved to kernel/printk.c from
    lib/dump_stack.c. Because linkage is per objecct file,
    dump_stack_print_info() living in the same lib file as generic
    dump_stack() means that archs which implement custom dump_stack()
    - at this point, only blackfin - can't use dump_stack_print_info()
    as that will bring in the generic version of dump_stack() too. v1
    The v1 patch broke build on blackfin due to this issue. The build
    breakage was reported by Fengguang Wu.

    Signed-off-by: Tejun Heo
    Acked-by: David S. Miller
    Acked-by: Vineet Gupta
    Acked-by: Jesper Nilsson
    Acked-by: Vineet Gupta
    Acked-by: Martin Schwidefsky [s390 bits]
    Cc: Heiko Carstens
    Cc: Mike Frysinger
    Cc: Fengguang Wu
    Cc: Bjorn Helgaas
    Cc: Sam Ravnborg
    Acked-by: Richard Kuo [hexagon bits]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     
  • Pull arch/metag update from James Hogan:

    - Various fixes for the interrupting perf counter handling in metag's
    perf backend.

    - Add OProfile support based on perf.

    - Sets up cache partitions for SMP so bootloader doesn't have to.

    - Patch from Paul Bolle to remove ARCH_POPULATES_NODE_MAP again
    (touches microblaze too).

    - Add TLS pointer regset to metag ptrace api.

    - Add exported metag DSP extended context handling header .

    - Increase defconfig log buffer size to 128KiB.

    - Various fixes, typos, missing exports.

    * tag 'metag-for-v3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag:
    metag: defconfigs: increase log buffer 8KiB => 128KiB
    metag: avoid unnecessary builtin dtb rebuilds
    metag: add exported for extended context handling
    metag: export _metag_da_present and cpu_2_hwthread_id
    metag: ptrace: Implement NT_METAG_TLS
    memblock: Kill ARCH_POPULATES_NODE_MAP once more
    metag: cachepart: fix get_global_dcache_size() typo
    metag: cachepart: take into account small cache bits
    metag: smp: copy cache partition and enable GCOn
    metag: OProfile support
    metag: perf: prepare for use by oprofile
    metag: perf: don't reset TXTACTCYC
    metag: perf: use hard_processor_id() to get thread
    metag: perf: fix frequency sampling (dynamic period)
    metag: perf: add missing prev_count updates
    metag: perf: fixes for interrupting perf counters
    metag: perf: fix wrap handling in delta calculation
    metag: perf: fix core internal / perf channel mux

    Linus Torvalds
     

30 Apr, 2013

3 commits

  • Pull SMP/hotplug changes from Ingo Molnar:
    "This is a pretty large, multi-arch series unifying and generalizing
    the various disjunct pieces of idle routines that architectures have
    historically copied from each other and have grown in random, wildly
    inconsistent and sometimes buggy directions:

    101 files changed, 455 insertions(+), 1328 deletions(-)

    this went through a number of review and test iterations before it was
    committed, it was tested on various architectures, was exposed to
    linux-next for quite some time - nevertheless it might cause problems
    on architectures that don't read the mailing lists and don't regularly
    test linux-next.

    This cat herding excercise was motivated by the -rt kernel, and was
    brought to you by Thomas "the Whip" Gleixner."

    * 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (40 commits)
    idle: Remove GENERIC_IDLE_LOOP config switch
    um: Use generic idle loop
    ia64: Make sure interrupts enabled when we "safe_halt()"
    sparc: Use generic idle loop
    idle: Remove unused ARCH_HAS_DEFAULT_IDLE
    bfin: Fix typo in arch_cpu_idle()
    xtensa: Use generic idle loop
    x86: Use generic idle loop
    unicore: Use generic idle loop
    tile: Use generic idle loop
    tile: Enter idle with preemption disabled
    sh: Use generic idle loop
    score: Use generic idle loop
    s390: Use generic idle loop
    powerpc: Use generic idle loop
    parisc: Use generic idle loop
    openrisc: Use generic idle loop
    mn10300: Use generic idle loop
    mips: Use generic idle loop
    microblaze: Use generic idle loop
    ...

    Linus Torvalds
     
  • Use helper function free_highmem_page() to free highmem pages into
    the buddy system.

    Signed-off-by: Jiang Liu
    Cc: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     
  • Use common help functions to free reserved pages.

    Signed-off-by: Jiang Liu
    Cc: James Hogan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiang Liu
     

25 Apr, 2013

1 commit

  • The Meta defconfigs set the log buffer size to just 8KiB, but with the
    fairly recent conversion of the kernel log buffer into a structured
    binary format, log messages appear to consume more space in the buffer,
    and in some cases it's not big enough to store the entire boot log.

    Therefore switch all the defconfigs to use the default size of 128KiB.

    Signed-off-by: James Hogan

    James Hogan
     

22 Apr, 2013

1 commit

  • The builtin .dtb.S intermediate file needs to be marked with .SECONDARY
    so that it isn't automatically deleted (which causes it to be
    regenerated on every build). Also add *.dtb.S to clean-files so it gets
    cleaned up by make clean.

    Similarly, if the specified builtin dtb isn't already in dtb-y (e.g.
    imported into the tree and specified in CONFIG_METAG_BUILTIN_DTB_NAME)
    it too will be treated as an intermediate and deleted automatically
    (again causing it to be regenerated on every build), so add it to dtb-y
    so it gets added to targets and the dtbs target.

    Signed-off-by: James Hogan
    Cc: Vineet Gupta
    Cc: Grant Likely
    Cc: Michal Marek
    Cc: Sam Ravnborg
    Reviewed-by: Stephen Warren

    James Hogan
     

18 Apr, 2013

1 commit

  • The Kconfig symbol MAX_ACTIVE_REGIONS is unused. Commit
    0ee332c1451869963626bf9cac88f165a90990e1 ("memblock: Kill
    early_node_map[]") removed the only place were it was actually used. But
    it did not remove its Kconfig entries (for powerpc and sh).

    Remove those two entries (and the entry for metag, that popped up in
    v3.9-rc1).

    Signed-off-by: Paul Bolle
    Acked-by: Paul Mundt
    Acked-by: James Hogan
    Signed-off-by: Michael Ellerman

    Paul Bolle
     

17 Apr, 2013

1 commit


16 Apr, 2013

1 commit

  • GENERIC_GPIO has been made equivalent to GPIOLIB in architecture code
    and all driver code has been switch to depend on GPIOLIB. It is thus
    safe to have GENERIC_GPIO removed.

    Signed-off-by: Alexandre Courbot
    Acked-by: Linus Walleij
    Acked-by: Grant Likely

    Alexandre Courbot
     

08 Apr, 2013

2 commits

  • Signed-off-by: Thomas Gleixner
    Cc: Linus Torvalds
    Cc: Rusty Russell
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Reviewed-by: Cc: Srivatsa S. Bhat
    Cc: Magnus Damm
    Cc: James Hogan
    Link: http://lkml.kernel.org/r/20130321215234.606480852@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • Move it to a common place. Preparatory patch for implementing
    set/clear for the idle need_resched poll implementation.

    Signed-off-by: Thomas Gleixner
    Cc: Linus Torvalds
    Cc: Rusty Russell
    Cc: Paul McKenney
    Cc: Peter Zijlstra
    Reviewed-by: Cc: Srivatsa S. Bhat
    Cc: Magnus Damm
    Link: http://lkml.kernel.org/r/20130321215233.446034505@linutronix.de
    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     

27 Mar, 2013

3 commits


20 Mar, 2013

1 commit

  • The Kconfig symbol ARCH_POPULATES_NODE_MAP was killed in v3.3. After
    that it popped up again in microblaze and metag. Nobody noticed,
    probably because these Kconfig symbols are entirely unused and these
    architectures both select HAVE_MEMBLOCK_NODE_MAP. Anyhow, these two
    entries can also be killed.

    Signed-off-by: Paul Bolle
    Acked-by: Michal Simek
    Signed-off-by: James Hogan

    Paul Bolle
     

15 Mar, 2013

13 commits

  • Compilation is broken when the kernel is destined to live in the global
    part of the virtual address space:

    arch/metag/kernel/cachepart.c In function 'get_thread_cache_size':
    arch/metag/kernel/cachepart.c +71 : error: implicit declaration of function 'get_global_dache_size'

    Fix the typo.

    Signed-off-by: James Hogan

    James Hogan
     
  • The CORE_CONFIG2 register has bits to indicate that the data or code
    cache is small, i.e. that the size described in the field should be
    divided by 64. Take this into account in get_icache_size() and
    get_dcache_size().

    Signed-off-by: James Hogan

    James Hogan
     
  • When starting an SMP hardware thread, copy the cache partition
    configuration so that the threads share the same cache partitions. Also
    enable the GCOn bit if running in the local half of the virtual address
    space to enable coherency of shared local cache partitions. An atomic
    unlock system event is executed by the new cpu before any memory is read
    to ensure that any writes made by the boot cpu prior to full coherency
    taking effect are visible to the new cpu.

    This is to allow SMP to work even when the bootloader hasn't configured
    the caches for coherency. A log message is printed to describe the cache
    partition changes so that the user is aware of potential unintentional
    cache wastage if they've configured the cache partitions in the wrong
    way.

    Signed-off-by: James Hogan

    James Hogan
     
  • Add OProfile support for metag, using the perf backend, and falling back
    to generic timer based sampling if perf counter interrupt support is
    disabled.

    The oprofile code prepends "metag/" to the perf pmu name to give
    "metag/meta2" which is more consistent with other oprofile arch names.

    The backtrace code makes use of for kernel
    backtracing, and a simple frame pointer walk for userland backtracing.

    Signed-off-by: James Hogan
    Cc: Robert Richter
    Cc: oprofile-list@lists.sf.net

    James Hogan
     
  • To allow our perf_events code to work with oprofile the PERF_TYPE_RAW
    event type attribute is implemented, which allows the internal encoding
    of events to be used externally (this requires some tweaks so that it
    handles invalid event types more gracefully), and perf_pmu_name() is
    adjusted to return metag_pmu->name instead of metag_pmu->pmu.name (which
    is changed to "meta2").

    Signed-off-by: James Hogan
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo
    Cc: Robert Richter
    Cc: oprofile-list@lists.sf.net

    James Hogan
     
  • The thread active cycle counter TXTACTCYC is used in __delay so it
    shouldn't really be reset to zero by perf. Fix perf to just read the
    value, and instead of clearing it, record the prev_count value in
    enable_counter so that the delta calculations know about the previous
    value.

    Signed-off-by: James Hogan
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo

    James Hogan
     
  • Use hard_processor_id() to get the current thread number rather than
    get_cpu() and the hardware thread mapping. There was no matching
    put_cpu(), and in any case this should be slightly more efficient.

    Signed-off-by: James Hogan
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo

    James Hogan
     
  • Frequency sampling mode dynamically adjusts the sample period so as to
    hit a particular frequency of samples. The sample period starts at just
    1 and then gets increased if the interrupt rate is too high. This
    changed sample period needs handling in metag_pmu_event_set_period to
    update period_left (as the ARM equivalent does). The calculated delta
    also needs subtracting from period_left in metag_pmu_event_update in
    order to hit the conditional blocks in metag_pmu_event_set_period which
    update last_period (which is used in the dynamic sampling period
    calculation).

    Signed-off-by: James Hogan
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo

    James Hogan
     
  • The prev_count needs setting when changing the counter value, otherwise
    the calculated delta will be wrong, which for frequency sampling
    (dynamic period sampling) results in sampling at too high a frequency.

    For non-interrupting performance counters it should also be cleared when
    enabling the counter since the write to the PERF_COUNT register will
    clear the perf counter.

    This also includes a minor change to remove the u64 cast from the
    metag_pmu->write() call as metag_pmu->write() takes a u32 anyway, and in
    any case GCC is smart enough to optimise away the cast.

    Signed-off-by: James Hogan
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo

    James Hogan
     
  • The overflow handler needs to read modify write when re-enabling the
    counter so as not to change the counter value as it may have been
    changed to ready the next interrupt on overflow. Similarly for
    interrupting counters metag_pmu_enable_counter needs to leave the
    counter value unchanged rather than resetting it to zero.

    Signed-off-by: James Hogan
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo

    James Hogan
     
  • When calculating the delta, mask with MAX_PERIOD (24 bits) to handle
    wrapping, which particularly happens with periodic sampling since the
    value is intentionally set so that it will overflow soon.

    Signed-off-by: James Hogan
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo

    James Hogan
     
  • The value written to the PERF_ICOREx or PERF_CHANx register to select
    the performance events for the core internal and perf channel events was
    (tmp & 0x0f), but tmp was set to (config & 0xf0) so it would always be
    0. Correct it to use config instead of tmp.

    Signed-off-by: James Hogan
    Cc: Peter Zijlstra
    Cc: Paul Mackerras
    Cc: Ingo Molnar
    Cc: Arnaldo Carvalho de Melo

    James Hogan
     
  • We have CONFIG_SYMBOL_PREFIX, which three archs define to the string
    "_". But Al Viro broke this in "consolidate cond_syscall and
    SYSCALL_ALIAS declarations" (in linux-next), and he's not the first to
    do so.

    Using CONFIG_SYMBOL_PREFIX is awkward, since we usually just want to
    prefix it so something. So various places define helpers which are
    defined to nothing if CONFIG_SYMBOL_PREFIX isn't set:

    1) include/asm-generic/unistd.h defines __SYMBOL_PREFIX.
    2) include/asm-generic/vmlinux.lds.h defines VMLINUX_SYMBOL(sym)
    3) include/linux/export.h defines MODULE_SYMBOL_PREFIX.
    4) include/linux/kernel.h defines SYMBOL_PREFIX (which differs from #7)
    5) kernel/modsign_certificate.S defines ASM_SYMBOL(sym)
    6) scripts/modpost.c defines MODULE_SYMBOL_PREFIX
    7) scripts/Makefile.lib defines SYMBOL_PREFIX on the commandline if
    CONFIG_SYMBOL_PREFIX is set, so that we have a non-string version
    for pasting.

    (arch/h8300/include/asm/linkage.h defines SYMBOL_NAME(), too).

    Let's solve this properly:
    1) No more generic prefix, just CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX.
    2) Make linux/export.h usable from asm.
    3) Define VMLINUX_SYMBOL() and VMLINUX_SYMBOL_STR().
    4) Make everyone use them.

    Signed-off-by: Rusty Russell
    Reviewed-by: James Hogan
    Tested-by: James Hogan (metag)

    Rusty Russell
     

04 Mar, 2013

3 commits

  • The metag NUMA implementation follows the SH model, using different nodes for
    memories with different latencies. As such, we ensure that automated balancing
    between nodes is inhibited, by way of the new ARCH_WANT_VARIABLE_LOCALITY.

    Signed-off-by: Paul Mundt
    Signed-off-by: James Hogan

    Paul Mundt
     
  • Commit e72837e3e7bae3f182c4ac63c9424e86f1158dd0 ("default
    SET_PERSONALITY() in linux/elf.h").

    The above commit moved the common definition of SET_PERSONALITY() in a
    bunch of the arch headers to linux/elf.h. Metag shares that common
    definition so remove it from arch/metag/include/asm/elf.h too.

    Signed-off-by: James Hogan

    James Hogan
     
  • Pull new ImgTec Meta architecture from James Hogan:
    "This adds core architecture support for Imagination's Meta processor
    cores, followed by some later miscellaneous arch/metag cleanups and
    fixes which I kept separate to ease review:

    - Support for basic Meta 1 (ATP) and Meta 2 (HTP) core architecture
    - A few fixes all over, particularly for symbol prefixes
    - A few privilege protection fixes
    - Several cleanups (setup.c includes, split out a lot of
    metag_ksyms.c)
    - Fix some missing exports
    - Convert hugetlb to use vm_unmapped_area()
    - Copy device tree to non-init memory
    - Provide dma_get_sgtable()"

    * tag 'metag-v3.9-rc1-v4' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: (61 commits)
    metag: Provide dma_get_sgtable()
    metag: prom.h: remove declaration of metag_dt_memblock_reserve()
    metag: copy devicetree to non-init memory
    metag: cleanup metag_ksyms.c includes
    metag: move mm/init.c exports out of metag_ksyms.c
    metag: move usercopy.c exports out of metag_ksyms.c
    metag: move setup.c exports out of metag_ksyms.c
    metag: move kick.c exports out of metag_ksyms.c
    metag: move traps.c exports out of metag_ksyms.c
    metag: move irq enable out of irqflags.h on SMP
    genksyms: fix metag symbol prefix on crc symbols
    metag: hugetlb: convert to vm_unmapped_area()
    metag: export clear_page and copy_page
    metag: export metag_code_cache_flush_all
    metag: protect more non-MMU memory regions
    metag: make TXPRIVEXT bits explicit
    metag: kernel/setup.c: sort includes
    perf: Enable building perf tools for Meta
    metag: add boot time LNKGET/LNKSET check
    metag: add __init to metag_cache_probe()
    ...

    Linus Torvalds
     

03 Mar, 2013

4 commits

  • metag/allmodconfig:

    drivers/media/v4l2-core/videobuf2-dma-contig.c: In function 'vb2_dc_get_base_sgt':
    drivers/media/v4l2-core/videobuf2-dma-contig.c:387: error: implicit declaration of function 'dma_get_sgtable'

    For architectures using dma_map_ops, dma_get_sgtable() is provided in
    .

    Metag does not use dma_map_ops yet, hence it should implement it as an
    inline stub using dma_common_get_sgtable().

    Signed-off-by: James Hogan
    Cc: Geert Uytterhoeven
    Acked-by: Marek Szyprowski

    James Hogan
     
  • Metag doesn't have a metag_dt_memblock_reserve() function so remove the
    declaration from asm/prom.h.

    Signed-off-by: James Hogan

    James Hogan
     
  • Make a copy of the device tree blob in non-init memory. It is required
    when using built-in device tree files that the platform code copies the
    blob to non-init memory prior to calling unflatten_device_tree(),
    otherwise the strings that the device tree refer to will get poisoned
    and potentially reused, breaking later reading of the device tree
    post-init (such as compatible matching in modules, debugfs, and the
    procfs interface).

    Signed-off-by: James Hogan
    Reviewed-by: Vineet Gupta

    James Hogan
     
  • Minimise metag_ksyms.c includes to directly include the files
    that declare a particular symbol, and not include any unnecessary ones.

    Signed-off-by: James Hogan

    James Hogan