18 Nov, 2010

1 commit

  • GCC's __builtin_prefetch() was introduced a long time ago, all
    supported GCC versions have it. So this patch is to use it for
    implementing the prefetch on SH2A and SH4.

    The current prefetch implementation is almost equivalent with
    __builtin_prefetch.
    The third parameter in the __builtin_prefetch is the locality
    that it's not supported on SH architectures. It has been set
    to three and it should be verified if it's suitable for SH2A
    as well. I didn't test on this architecture.

    The builtin usage should be more efficient that an __asm__
    because less barriers, and because the compiler doesn't see the
    inst as a "black box" allowing better code generation.

    This has been already done on other architectures (see the commit:
    0453fb3c528c5eb3483441a466b24a4cb409eec5).

    Many thanks to Christian Bruel for his
    support on evaluate the impact of the gcc built-in on SH4 arch.

    No regressions found while testing with LMbench on STLinux targets.

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

    Giuseppe CAVALLARO
     

08 Nov, 2010

1 commit


04 Nov, 2010

3 commits


29 Oct, 2010

6 commits

  • Trivial shuffling and tidying.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • This code has been untouched since it was merged many years ago, and has
    severely bitrotted since, suggesting that the board has no real users
    left. Notice of intent to remove has been sent out over the last few
    years, with no takers. Kill it off.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Only the secureedge5410 was ever supported by this code, so make the
    board specification explicit rather than perpetuating a mach group.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • None of these PIO routines do anything other than basic error checking,
    get rid of them and use the generic fallbacks.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • The microdev only has to contend with silly PIO mangling on anything
    within the SuperIO range. As each of the SuperIO modules is already
    speciail cased, we just shift that logic over to the ioport map.

    With microdev PCI never being merged (and being fudamentally broken in
    hardware), and the ethernet chip only doing 16-bit accesses already,
    there's no need to maintain any of the extra special casing. Kill it all
    off.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (32 commits)
    sh: intc: switch irq_desc iteration to new active IRQ iterator.
    sh: fix up cpu hotplug IRQ migration for irq_data changes.
    sh: oprofile: Make sure the backtrace op is available for timer-fallback.
    sh64: oprofile: Fix up kernel stack pointer size mismatch.
    sh: oprofile: Fix up and extend op_name_from_perf_id().
    sh: lockless get_user_pages_fast()
    sh64: _PAGE_SPECIAL support.
    sound: sh: ctrl_in/outX to __raw_read/writeX conversion.
    sh: disable deprecated genirq support.
    sh: update show_interrupts() for irq_data chip lookup.
    sh: intc: irq_data conversion.
    sh64: irq_data conversion.
    sh64: update for IRQ flag handling naming changes.
    rtc: rtc-rs5c313: ctrl_in/outX to __raw_read/writeX conversion.
    sh: mach-se: irq_data conversion.
    input: hp680_ts_input: ctrl_in/outX to __raw_read/writeX conversion.
    input: jornada680_kbd: ctrl_in/outX to __raw_read/writeX conversion.
    sh: hd64461: irq_data conversion.
    sh: mach-x3proto: irq_data conversion.
    sh: mach-systemh: irq_data conversion.
    ...

    Linus Torvalds
     

27 Oct, 2010

2 commits

  • Now that sh64 has grown extended page flag support we finally have a free
    bit for _PAGE_SPECIAL. Wire it up.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Since we no longer need to provide KM_type, the whole pte_*map_nested()
    API is now redundant, remove it.

    Signed-off-by: Peter Zijlstra
    Acked-by: Chris Metcalf
    Cc: David Howells
    Cc: Hugh Dickins
    Cc: Rik van Riel
    Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Cc: "H. Peter Anvin"
    Cc: Steven Rostedt
    Cc: Russell King
    Cc: Ralf Baechle
    Cc: David Miller
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

26 Oct, 2010

1 commit

  • CPUs can be in either the legacy 29-bit or 32-bit physical addressing
    modes. This follows the x86 approach of tracking the phys bits in cpuinfo
    and exposing it to userspace through procfs.

    This change was requested to permit kexec-tools to detect the physical
    addressing mode in order to determine the appropriate address mangling.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

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
     

22 Oct, 2010

2 commits

  • …nel/git/tip/linux-2.6-tip

    * 'core-memblock-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (74 commits)
    x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S
    xen: Cope with unmapped pages when initializing kernel pagetable
    memblock, bootmem: Round pfn properly for memory and reserved regions
    memblock: Annotate memblock functions with __init_memblock
    memblock: Allow memblock_init to be called early
    memblock/arm: Fix memblock_region_is_memory() typo
    x86, memblock: Remove __memblock_x86_find_in_range_size()
    memblock: Fix wraparound in find_region()
    x86-32, memblock: Make add_highpages honor early reserved ranges
    x86, memblock: Fix crashkernel allocation
    arm, memblock: Fix the sparsemem build
    memblock: Fix section mismatch warnings
    powerpc, memblock: Fix memblock API change fallout
    memblock, microblaze: Fix memblock API change fallout
    x86: Remove old bootmem code
    x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve
    x86: Remove not used early_res code
    x86, memblock: Replace e820_/_early string with memblock_
    x86: Use memblock to replace early_res
    x86, memblock: Use memblock_debug to control debug message print out
    ...

    Fix up trivial conflicts in arch/x86/kernel/setup.c and kernel/Makefile

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-irqflags:
    Fix IRQ flag handling naming
    MIPS: Add missing #inclusions of
    smc91x: Add missing #inclusion of
    Drop a couple of unnecessary asm/system.h inclusions
    SH: Add missing consts to sys_execve() declaration
    Blackfin: Rename IRQ flags handling functions
    Blackfin: Add missing dep to asm/irqflags.h
    Blackfin: Rename DES PC2() symbol to avoid collision
    Blackfin: Split the BF532 BFIN_*_FIO_FLAG() functions to their own header
    Blackfin: Split PLL code from mach-specific cdef headers

    Linus Torvalds
     

19 Oct, 2010

1 commit

  • Provide a mechanism that allows running code in IRQ context. It is
    most useful for NMI code that needs to interact with the rest of the
    system -- like wakeup a task to drain buffers.

    Perf currently has such a mechanism, so extract that and provide it as
    a generic feature, independent of perf so that others may also
    benefit.

    The IRQ context callback is generated through self-IPIs where
    possible, or on architectures like powerpc the decrementer (the
    built-in timer facility) is set to generate an interrupt immediately.

    Architectures that don't have anything like this get to do with a
    callback from the timer tick. These architectures can call
    irq_work_run() at the tail of any IRQ handlers that might enqueue such
    work (like the perf IRQ handler) to avoid undue latencies in
    processing the work.

    Signed-off-by: Peter Zijlstra
    Acked-by: Kyle McMartin
    Acked-by: Martin Schwidefsky
    [ various fixes ]
    Signed-off-by: Huang Ying
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

15 Oct, 2010

2 commits


14 Oct, 2010

2 commits

  • The SDK7786 FPGA has secondary control over the PCIe clocks, specifically
    relating to the slots and oscillator. This ties the FPGA clocks in to the
    clock framework and balances the refcounting similar to how the primary
    on-chip clocks are managed. While the on-chip clocks are per-port, the
    FPGA clock enable/disable is global for the entire block.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • SDK7786 supports connecting either slot3 or 4 to the same PCIe port by
    way of FPGA muxing. By default the vertical slot 3 on the baseboard is
    enabled, so this adds in a command line option for forcibly enabling the
    slot 4 edge connector.

    If nothing has been specified on the command line, we fall back to
    reading the resistor values for card presence to figure out where to
    route the port to.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

13 Oct, 2010

1 commit


07 Oct, 2010

3 commits

  • Fix the IRQ flag handling naming. In linux/irqflags.h under one configuration,
    it maps:

    local_irq_enable() -> raw_local_irq_enable()
    local_irq_disable() -> raw_local_irq_disable()
    local_irq_save() -> raw_local_irq_save()
    ...

    and under the other configuration, it maps:

    raw_local_irq_enable() -> local_irq_enable()
    raw_local_irq_disable() -> local_irq_disable()
    raw_local_irq_save() -> local_irq_save()
    ...

    This is quite confusing. There should be one set of names expected of the
    arch, and this should be wrapped to give another set of names that are expected
    by users of this facility.

    Change this to have the arch provide:

    flags = arch_local_save_flags()
    flags = arch_local_irq_save()
    arch_local_irq_restore(flags)
    arch_local_irq_disable()
    arch_local_irq_enable()
    arch_irqs_disabled_flags(flags)
    arch_irqs_disabled()
    arch_safe_halt()

    Then linux/irqflags.h wraps these to provide:

    raw_local_save_flags(flags)
    raw_local_irq_save(flags)
    raw_local_irq_restore(flags)
    raw_local_irq_disable()
    raw_local_irq_enable()
    raw_irqs_disabled_flags(flags)
    raw_irqs_disabled()
    raw_safe_halt()

    with type checking on the flags 'arguments', and then wraps those to provide:

    local_save_flags(flags)
    local_irq_save(flags)
    local_irq_restore(flags)
    local_irq_disable()
    local_irq_enable()
    irqs_disabled_flags(flags)
    irqs_disabled()
    safe_halt()

    with tracing included if enabled.

    The arch functions can now all be inline functions rather than some of them
    having to be macros.

    Signed-off-by: David Howells [X86, FRV, MN10300]
    Signed-off-by: Chris Metcalf [Tile]
    Signed-off-by: Michal Simek [Microblaze]
    Tested-by: Catalin Marinas [ARM]
    Acked-by: Thomas Gleixner
    Acked-by: Haavard Skinnemoen [AVR]
    Acked-by: Tony Luck [IA-64]
    Acked-by: Hirokazu Takata [M32R]
    Acked-by: Greg Ungerer [M68K/M68KNOMMU]
    Acked-by: Ralf Baechle [MIPS]
    Acked-by: Kyle McMartin [PA-RISC]
    Acked-by: Paul Mackerras [PowerPC]
    Acked-by: Martin Schwidefsky [S390]
    Acked-by: Chen Liqin [Score]
    Acked-by: Matt Fleming [SH]
    Acked-by: David S. Miller [Sparc]
    Acked-by: Chris Zankel [Xtensa]
    Reviewed-by: Richard Henderson [Alpha]
    Reviewed-by: Yoshinori Sato [H8300]
    Cc: starvik@axis.com [CRIS]
    Cc: jesper.nilsson@axis.com [CRIS]
    Cc: linux-cris-kernel@axis.com

    David Howells
     
  • Add missing consts to the sys_execve() declaration which result in the
    following error:

    arch/sh/kernel/process_32.c:303: error: conflicting types for 'sys_execve'
    /warthog/nfs/linux-2.6-fscache/arch/sh/include/asm/syscalls_32.h:24: error: previous declaration of 'sys_execve' was here

    Signed-off-by: David Howells

    David Howells
     
  • SH-3 lacks an MMUCR_TI definition for global TLB flushes. As SH-3 parts
    lack a split TLB, the same global flush behaviour is accomplished
    through the flush bit, which just happens to be the same as on SH-4.

    This fixes up the build for all SH-3 MMU parts.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

04 Oct, 2010

2 commits


03 Oct, 2010

1 commit


02 Oct, 2010

1 commit


01 Oct, 2010

1 commit


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
     

20 Sep, 2010

1 commit

  • This copies the pci_config_lock idea from x86 over, allowing us to kill
    off a couple of existing private locks. At the same time, these need to
    be converted to raw spinlocks for -rt kernels, so we make that change at
    the same time. This should make it easier for future parts to get the
    locking right instead of inevitable ending up with lock type mismatches.

    Signed-off-by: Paul Mundt

    Paul Mundt
     

14 Sep, 2010

2 commits

  • Now that the rest of the socket calls are provided through their own
    paths, do the same for sys_recvmmsg. It's unlikely we'll ever be able to
    kill off the socketcall path, but this at least permits userspace to
    gradually begin migrating.

    Signed-off-by: Paul Mundt

    Paul Mundt
     
  • Linux kernel already has socket syscalls that can be invoked
    without the multiplexing sys_socketcall wrapper.
    C library wrappers are ready to use them directly. It needs just
    to define the missing syscall numbers and provide the related entries
    into the syscalls table, like sh64 aleady does.

    Signed-off-by: Francesco Rundo
    Signed-off-by: Carmelo Amoroso
    Signed-off-by: Paul Mundt

    Carmelo AMOROSO
     

31 Aug, 2010

1 commit


20 Aug, 2010

1 commit


16 Aug, 2010

2 commits


15 Aug, 2010

1 commit