17 Aug, 2015

1 commit

  • commit 0cb0985f57783c2f3c6c8ffe7e7665e80c56bd92 upstream.

    get_c0_perfcount_int is tested from oprofile code. If oprofile is
    compiled as module, get_c0_perfcount_int needs to be exported, otherwise
    it cannot be resolved.

    Fixes: a669efc4a3b4 ("MIPS: Add hook to get C0 performance counter interrupt")
    Signed-off-by: Felix Fietkau
    Cc: linux-mips@linux-mips.org
    Cc: abrestic@chromium.org
    Patchwork: https://patchwork.linux-mips.org/patch/10763/
    Signed-off-by: Ralf Baechle
    Signed-off-by: Greg Kroah-Hartman

    Felix Fietkau
     

02 Apr, 2015

5 commits


01 Apr, 2015

10 commits


21 Feb, 2015

1 commit

  • Commit e9de688dac65 ("irqchip: mips-gic: Support local interrupts")
    updated several platforms. This is a copy paste error.

    Signed-off-by: Niklas Cassel
    Reviewed-by: Andrew Bresticker
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/9245/
    Signed-off-by: Ralf Baechle

    Niklas Cassel
     

15 Dec, 2014

1 commit

  • Pull driver core update from Greg KH:
    "Here's the set of driver core patches for 3.19-rc1.

    They are dominated by the removal of the .owner field in platform
    drivers. They touch a lot of files, but they are "simple" changes,
    just removing a line in a structure.

    Other than that, a few minor driver core and debugfs changes. There
    are some ath9k patches coming in through this tree that have been
    acked by the wireless maintainers as they relied on the debugfs
    changes.

    Everything has been in linux-next for a while"

    * tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (324 commits)
    Revert "ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries"
    fs: debugfs: add forward declaration for struct device type
    firmware class: Deletion of an unnecessary check before the function call "vunmap"
    firmware loader: fix hung task warning dump
    devcoredump: provide a one-way disable function
    device: Add dev__once variants
    ath: ath9k: use debugfs_create_devm_seqfile() helper for seq_file entries
    ath: use seq_file api for ath9k debugfs files
    debugfs: add helper function to create device related seq_file
    drivers/base: cacheinfo: remove noisy error boot message
    Revert "core: platform: add warning if driver has no owner"
    drivers: base: support cpu cache information interface to userspace via sysfs
    drivers: base: add cpu_device_create to support per-cpu devices
    topology: replace custom attribute macros with standard DEVICE_ATTR*
    cpumask: factor out show_cpumap into separate helper function
    driver core: Fix unbalanced device reference in drivers_probe
    driver core: fix race with userland in device_add()
    sysfs/kernfs: make read requests on pre-alloc files use the buffer.
    sysfs/kernfs: allow attributes to request write buffer be pre-allocated.
    fs: sysfs: return EGBIG on write if offset is larger than file size
    ...

    Linus Torvalds
     

12 Dec, 2014

1 commit

  • Pull MIPS updates from Ralf Baechle:
    "This is an unusually large pull request for MIPS - in parts because
    lots of patches missed the 3.18 deadline but primarily because some
    folks opened the flood gates.

    - Retire the MIPS-specific phys_t with the generic phys_addr_t.
    - Improvments for the backtrace code used by oprofile.
    - Better backtraces on SMP systems.
    - Cleanups for the Octeon platform code.
    - Cleanups and fixes for the Loongson platform code.
    - Cleanups and fixes to the firmware library.
    - Switch ATH79 platform to use the firmware library.
    - Grand overhault to the SEAD3 and Malta interrupt code.
    - Move the GIC interrupt code to drivers/irqchip
    - Lots of GIC cleanups and updates to the GIC code to use modern IRQ
    infrastructures and features of the kernel.
    - OF documentation updates for the GIC bindings
    - Move GIC clocksource driver to drivers/clocksource
    - Merge GIC clocksource driver with clockevent driver.
    - Further updates to bring the GIC clocksource driver up to date.
    - R3000 TLB code cleanups
    - Improvments to the Loongson 3 platform code.
    - Convert pr_warning to pr_warn.
    - Merge a bunch of small lantiq and ralink fixes that have been
    staged/lingering inside the openwrt tree for a while.
    - Update archhelp for IP22/IP32
    - Fix a number of issues for Loongson 1B.
    - New clocksource and clockevent driver for Loongson 1B.
    - Further work on clk handling for Loongson 1B.
    - Platform work for Broadcom BMIPS.
    - Error handling cleanups for TurboChannel.
    - Fixes and optimization to the microMIPS support.
    - Option to disable the FTLB.
    - Dump more relevant information on machine check exception
    - Change binfmt to allow arch to examine PT_*PROC headers
    - Support for new style FPU register model in O32
    - VDSO randomization.
    - BCM47xx cleanups
    - BCM47xx reimplement the way the kernel accesses NVRAM information.
    - Random cleanups
    - Add support for ATH25 platforms
    - Remove pointless locking code in some PCI platforms.
    - Some improvments to EVA support
    - Minor Alchemy cleanup"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (185 commits)
    MIPS: Add MFHC0 and MTHC0 instructions to uasm.
    MIPS: Cosmetic cleanups of page table headers.
    MIPS: Add CP0 macros for extended EntryLo registers
    MIPS: Remove now unused definition of phys_t.
    MIPS: Replace use of phys_t with phys_addr_t.
    MIPS: Replace MIPS-specific 64BIT_PHYS_ADDR with generic PHYS_ADDR_T_64BIT
    PCMCIA: Alchemy Don't select 64BIT_PHYS_ADDR in Kconfig.
    MIPS: lib: memset: Clean up some MIPS{EL,EB} ifdefery
    MIPS: iomap: Use __mem_{read,write}{b,w,l} for MMIO
    MIPS: fix indentation.
    MAINTAINERS: Add entry for BMIPS multiplatform kernel
    MIPS: Enable VDSO randomization
    MIPS: Remove a temporary hack for debugging cache flushes in SMTC configuration
    MIPS: Remove declaration of obsolete arch_init_clk_ops()
    MIPS: atomic.h: Reformat to fit in 79 columns
    MIPS: Apply `.insn' to fixup labels throughout
    MIPS: Fix microMIPS LL/SC immediate offsets
    MIPS: Kconfig: Only allow 32-bit microMIPS builds
    MIPS: signal.c: Fix an invalid cast in ISA mode bit handling
    MIPS: mm: Only build one microassembler that is suitable
    ...

    Linus Torvalds
     

24 Nov, 2014

11 commits

  • Now that the MIPS GIC irqchip lives in drivers/irqchip/, move
    its header over to include/linux/irqchip/.

    Signed-off-by: Andrew Bresticker
    Cc: Daniel Lezcano
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Paul Burton
    Cc: Qais Yousef
    Cc: John Crispin
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/8129/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • Stop using the REG macros from gic.h and instead use proper iomem
    accessors.

    Signed-off-by: Andrew Bresticker
    Cc: Daniel Lezcano
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Paul Burton
    Cc: Qais Yousef
    Cc: John Crispin
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/8125/
    Patchwork: https://patchwork.linux-mips.org/patch/8228/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • The generic plat_irq_dispatch provided in irq_cpu.c is sufficient for
    dispatching interrupts on SEAD-3 in legacy and vectored interrupt modes.

    Signed-off-by: Andrew Bresticker
    Reviewed-by: Qais Yousef
    Tested-by: Qais Yousef
    Cc: Thomas Gleixner
    Cc: Jeffrey Deans
    Cc: Markos Chandras
    Cc: Paul Burton
    Cc: Jonas Gorski
    Cc: John Crispin
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/7822/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • The MIPS GIC supports 7 local interrupts, 2 of which are the GIC
    local watchdog and count/compare timer. The remainder are CPU
    interrupts which may optionally be re-routed through the GIC.
    GIC hardware IRQs 0-6 are now used for local interrupts while
    hardware IRQs 7+ are used for external (shared) interrupts.

    Note that the 5 CPU interrupts may not be re-routable through
    the GIC. In that case mapping will fail and the vectors reported
    in C0_IntCtl should be used instead. gic_get_c0_compare_int() and
    gic_get_c0_perfcount_int() will return the correct IRQ number to
    use for the C0 timer and perfcounter interrupts based on the
    routability of those interrupts through the GIC.

    A separate irq_chip, with callbacks that mask/unmask the local
    interrupt on all CPUs, is used for the C0 timer and performance
    counter interrupts since all other platforms do not use the percpu
    IRQ API for those interrupts.

    Malta, SEAD-3, and the GIC clockevent driver have been updated
    to use local interrupts and the R4K clockevent driver has been
    updated to poll for C0 timer interrupts through the GIC when
    the GIC is present.

    Signed-off-by: Andrew Bresticker
    Acked-by: Jason Cooper
    Reviewed-by: Qais Yousef
    Tested-by: Qais Yousef
    Cc: Thomas Gleixner
    Cc: Jeffrey Deans
    Cc: Markos Chandras
    Cc: Paul Burton
    Cc: Jonas Gorski
    Cc: John Crispin
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/7819/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • Now that the GIC properly uses IRQ domains, kill off the per-platform
    routing tables that were used to make the GIC appear transparent.

    This includes:
    - removing the mapping tables and the support for applying them,
    - moving GIC IPI support to the GIC driver,
    - properly routing the i8259 through the GIC on Malta, and
    - updating IRQ assignments on SEAD-3 when the GIC is present.

    Platforms no longer will pass an interrupt mapping table to gic_init.
    Instead, they will pass the CPU interrupt vector (2 - 7) that they
    expect the GIC to route interrupts to. Note that in EIC mode this
    value is ignored and all GIC interrupts are routed to EIC vector 1.

    Signed-off-by: Andrew Bresticker
    Acked-by: Jason Cooper
    Reviewed-by: Qais Yousef
    Tested-by: Qais Yousef
    Cc: Thomas Gleixner
    Cc: Jeffrey Deans
    Cc: Markos Chandras
    Cc: Paul Burton
    Cc: Jonas Gorski
    Cc: John Crispin
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/7816/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • Use a simple IRQ domain for the MIPS GIC. Remove the gic_platform_init
    callback as it's no longer necessary for it to set the irqchip.

    Signed-off-by: Andrew Bresticker
    Acked-by: Jason Cooper
    Reviewed-by: Qais Yousef
    Tested-by: Qais Yousef
    Cc: Thomas Gleixner
    Cc: Jeffrey Deans
    Cc: Markos Chandras
    Cc: Paul Burton
    Cc: Jonas Gorski
    Cc: John Crispin
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/7811/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • There's no need for platforms to have their own GIC irq_ack/irq_eoi
    callbacks. irq_ack need only clear the GIC's edge detector on
    edge-triggered interrupts and there's no need at all for irq_eoi.
    Also get rid of the mask_ack callback since it's not necessary either.

    Signed-off-by: Andrew Bresticker
    Acked-by: Jason Cooper
    Reviewed-by: Qais Yousef
    Tested-by: Qais Yousef
    Cc: Thomas Gleixner
    Cc: Jeffrey Deans
    Cc: Markos Chandras
    Cc: Paul Burton
    Cc: Jonas Gorski
    Cc: John Crispin
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/7809/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • It's a duplicate of sead3-platform.c and is not even compiled.
    Remove it before we start fixing up IRQ assignments.

    Signed-off-by: Andrew Bresticker
    Reviewed-by: Qais Yousef
    Tested-by: Qais Yousef
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Jeffrey Deans
    Cc: Markos Chandras
    Cc: Paul Burton
    Cc: Jonas Gorski
    Cc: John Crispin
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/7807/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • Nothing calls gic_{enable,disable}_interrupt() any more.

    Signed-off-by: Andrew Bresticker
    Reviewed-by: Qais Yousef
    Tested-by: Qais Yousef
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Andrew Bresticker
    Cc: Jeffrey Deans
    Cc: Markos Chandras
    Cc: Paul Burton
    Cc: Qais Yousef
    Cc: Jonas Gorski
    Cc: John Crispin
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/7806/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • The hardware perf event driver and oprofile interpret the global
    cp0_perfcount_irq differently: in the hardware perf event driver
    it is an offset from MIPS_CPU_IRQ_BASE and in oprofile it is the
    actual IRQ number. This still works most of the time since
    MIPS_CPU_IRQ_BASE is usually 0, but is clearly wrong. Since the
    performance counter interrupt may vary from platform to platform
    like the C0 timer interrupt, add the optional get_c0_perfcount_int
    hook which returns the IRQ number of the performance counter.
    The hook should return < 0 if the performance counter interrupt is
    shared with the timer. If the hook is not present, the CPU vector
    reported in C0_IntCtl (cp0_perfcount_irq) is used.

    Signed-off-by: Andrew Bresticker
    Reviewed-by: Qais Yousef
    Tested-by: Qais Yousef
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Andrew Bresticker
    Cc: Jeffrey Deans
    Cc: Markos Chandras
    Cc: Paul Burton
    Cc: Qais Yousef
    Cc: Jonas Gorski
    Cc: John Crispin
    Cc: David Daney
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/7805/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     
  • This isn't a module and shouldn't be one.

    Signed-off-by: Ralf Baechle
    Cc: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/8202/

    Ralf Baechle
     

04 Nov, 2014

1 commit


24 Oct, 2014

2 commits

  • This isn't a module and shouldn't be one.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • A platform driver for which nothing ever registers the corresponding
    platform device.

    Also it was driving the same hardware as sead3-i2c-drv.c so redundant
    anyway and couldn't co-exist with that driver because each of them was
    using a private spinlock to protect access to the same hardware
    resources.

    This also fixes a randconfig problem:

    arch/mips/mti-sead3/sead3-pic32-i2c-drv.c: In function 'i2c_platform_probe':
    arch/mips/mti-sead3/sead3-pic32-i2c-drv.c:345:2: error: implicit declaration of
    function 'i2c_add_numbered_adapter' [-Werror=implicit-function-declaration]
    ret = i2c_add_numbered_adapter(&priv->adap);
    ^
    arch/mips/mti-sead3/sead3-pic32-i2c-drv.c: In function
    'i2c_platform_remove':
    arch/mips/mti-sead3/sead3-pic32-i2c-drv.c:361:2: error: implicit declaration
    of function 'i2c_del_adapter' [-Werror=implicit-function-declaration]
    i2c_del_adapter(&priv->adap);

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

20 Oct, 2014

1 commit


22 Sep, 2014

1 commit

  • Move the SEAD-3 device-tree to arch/mips/boot/dts/ and update the
    Makefiles accordingly. Since SEAD-3 requires the device-tree to be
    built into the kernel, select BUILTIN_DTB when building for SEAD-3.

    Signed-off-by: Andrew Bresticker
    Cc: Rob Herring
    Cc: Pawel Moll
    Cc: Mark Rutland
    Cc: Ian Campbell
    Cc: Kumar Gala
    Cc: James Hogan
    Cc: Paul Burton
    Cc: David Daney
    Cc: John Crispin
    Cc: Jayachandran C
    Cc: Qais Yousef
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Cc: devicetree@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/7555/
    Signed-off-by: Ralf Baechle

    Andrew Bresticker
     

10 Jun, 2014

1 commit

  • Pull MIPS updates from Ralf Baechle:
    - three fixes for 3.15 that didn't make it in time
    - limited Octeon 3 support.
    - paravirtualization support
    - improvment to platform support for Netlogix SOCs.
    - add support for powering down the Malta eval board in software
    - add many instructions to the in-kernel microassembler.
    - add support for the BPF JIT.
    - minor cleanups of the BCM47xx code.
    - large cleanup of math emu code resulting in significant code size
    reduction, better readability of the code and more accurate
    emulation.
    - improvments to the MIPS CPS code.
    - support C3 power status for the R4k count/compare clock device.
    - improvments to the GIO support for older SGI workstations.
    - increase number of supported CPUs to 256; this can be reached on
    certain embedded multithreaded ccNUMA configurations.
    - various small cleanups, updates and fixes

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (173 commits)
    MIPS: IP22/IP28: Improve GIO support
    MIPS: Octeon: Add twsi interrupt initialization for OCTEON 3XXX, 5XXX, 63XX
    DEC: Document the R4k MB ASIC mini interrupt controller
    DEC: Add self as the maintainer
    MIPS: Add microMIPS MSA support.
    MIPS: Replace calls to obsolete strict_strto call with kstrto* equivalents.
    MIPS: Replace obsolete strict_strto call with kstrto
    MIPS: BFP: Simplify code slightly.
    MIPS: Call find_vma with the mmap_sem held
    MIPS: Fix 'write_msa_##' inline macro.
    MIPS: Fix MSA toolchain support detection.
    mips: Update the email address of Geert Uytterhoeven
    MIPS: Add minimal defconfig for mips_paravirt
    MIPS: Enable build for new system 'paravirt'
    MIPS: paravirt: Add pci controller for virtio
    MIPS: Add code for new system 'paravirt'
    MIPS: Add functions for hypervisor call
    MIPS: OCTEON: Add OCTEON3 to __get_cpu_type
    MIPS: Add function get_ebase_cpunum
    MIPS: Add minimal support for OCTEON3 to c-r4k.c
    ...

    Linus Torvalds
     

26 May, 2014

1 commit

  • This patch moves data allocated using kzalloc to managed data allocated
    using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
    functions. Also, the now unnecessary labels out_mem and out are done
    away with. The error handling code is moved under if and return 0 is now
    at the end of the function.

    The following Coccinelle semantic patch was used for making the change:

    @platform@
    identifier p, probefn, removefn;
    @@
    struct platform_driver p = {
    .probe = probefn,
    .remove = removefn,
    };

    @prb@
    identifier platform.probefn, pdev;
    expression e, e1, e2;
    @@
    probefn(struct platform_device *pdev, ...) {
    dev, e1, e2)
    ...
    ?-kfree(e);
    ...+>
    }

    @rem depends on prb@
    identifier platform.removefn;
    expression e;
    @@
    removefn(...) {

    }

    Signed-off-by: Himangi Saraogi
    Acked-by: Julia Lawall
    Tested-by: Markos Chandras
    Reviewed-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/6977/
    Signed-off-by: Ralf Baechle

    Himangi Saraogi
     

30 Apr, 2014

1 commit


01 Apr, 2014

1 commit

  • The sead3-mtd.o is built for obj-y -- and hence this code is always
    present. It will never be modular, so using module_init as an alias
    for __initcall can be somewhat misleading.

    Fix this up now, so that we can relocate module_init from
    init.h into module.h in the future. If we don't do this, we'd
    have to add module.h to obviously non-modular code, and that
    would be a worse thing.

    Note that direct use of __initcall is discouraged, vs. one
    of the priority categorized subgroups. As __initcall gets
    mapped onto device_initcall, our use of device_initcall
    directly in this change means that the runtime impact is
    zero -- it will remain at level 6 in initcall ordering.

    We also fix a missing semicolon, which this change uncovers.

    Signed-off-by: Paul Gortmaker
    Reported-by: kbuild test robot
    Cc: linux-mips@linux-mips.org
    Cc: fengguang.wu@intel.com
    Patchwork: https://patchwork.linux-mips.org/patch/6412/
    Signed-off-by: Ralf Baechle

    Paul Gortmaker
     

25 Jan, 2014

1 commit

  • None of these files are actually using any __init type directives
    and hence don't need to include . Most are just a
    left over from __devinit and __cpuinit removal, or simply due to
    code getting copied from one driver to the next.

    Signed-off-by: Paul Gortmaker
    Signed-off-by: John Crispin
    Patchwork: http://patchwork.linux-mips.org/patch/6320/

    Paul Gortmaker