19 Sep, 2013

8 commits

  • Commit 3b29aa5ba204c [MIPS: add symlink] created a symlink
    file in include/dt-bindings. Even though commit diff is fine, the symlink
    is invalid and ls -lb shows a newline character at the end of the filename:

    lrwxrwxrwx 1 maddy maddy 35 Sep 19 18:11 dt-bindings ->
    ../../../../../include/dt-bindings\n

    Signed-off-by: Madhavan Srinivasan
    Cc: steven.hill@imgtec.com
    Cc: mmarek@suse.cz
    Cc: swarren@nvidia.com
    Cc: linux-mips@linux-mips.org
    Cc: linux-kbuild@vger.kernel.org
    Cc: james.hogan@imgtec.com
    Patchwork: https://patchwork.linux-mips.org/patch/5859/
    Signed-off-by: Ralf Baechle

    Madhavan Srinivasan
     
  • It's needed for the MAX_NR_CONSOLES macro.

    Fixes the following build problem on a randconfig:

    arch/mips/pci/pci-bcm1480.c: In function 'bcm1480_pcibios_init':
    arch/mips/pci/pci-bcm1480.c:261:36: error: 'MAX_NR_CONSOLES'
    undeclared (first use in this function)
    arch/mips/pci/pci-bcm1480.c:261:36: note: each undeclared
    identifier is reported only once for each function it appears in
    make[1]: *** [arch/mips/pci/pci-bcm1480.o] Error 1

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

    Markos Chandras
     
  • Currently the kernel will always use the FR=0 register model for O32. If
    an O32 application did enable FR=1 mode, some data from another application
    might be leaked in the extra registers becoming visible.

    Iow, this patch is meant to make the kernel MIPS R5 tolerant but leaves
    proper MIPS R5 support to a future patchset.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • [ralf@linux-mips.org: This only matters to Alchemy platforms. On other
    platforms fixup_bigphys_addr is just an identidy mapping.]

    Signed-off-by: Wolfgang Grandegger
    Cc: tiejun.chen
    Cc: Linux-MIPS
    Patchwork: https://patchwork.linux-mips.org/patch/1868/
    Signed-off-by: Ralf Baechle

    Wolfgang Grandegger
     
  • Make sure 74K revision numbers are not applied to the 1074K. Also catch
    invalid usage.

    Signed-off-by: Maciej W. Rozycki
    Cc: Steven J. Hill
    Cc: Leonid Yegoshin
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5857/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • Replace hardcoded CP0 PRId and CP1 FPIR register access masks throughout.
    The change does not touch places that use shifted or partial masks.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5838/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • The commit c1bf207d6ee1eb72e9c10365edbdc7c9ff7fb9b0 (kernel.org) rsp.
    58e9ad32a48dce37ffeea912f55bd1c94b85ad7f (lmo) [MIPS: kprobe: Add support]
    introduced a useless comment.

    Signed-off-by: Wu Zhangjin
    Cc: linux-mips@linux-mips.org
    Cc: David Daney
    Patchwork: https://patchwork.linux-mips.org/patch/1765/
    Signed-off-by: Ralf Baechle

    Wu Zhangjin
     

18 Sep, 2013

3 commits

  • Use the CKSEG1ADDR macro when calculating VGA_MAP_MEM.

    [ralf@linux-mips.org: Include
    Signed-off-by: Steven J. Hill
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5814/
    Signed-off-by: Ralf Baechle

    Leonid Yegoshin
     
  • This essentially reverts commit efb9ca08b5a2374b29938cdcab417ce4feb14b54
    (kernel.org) / 58020a106879a8b372068741c81f0015c9b0b96dbv [[MIPS] Change
    get_cycles to always return 0.]

    Most users of get_cycles() invoke it as a timing interface. That's why
    in modern kernels it was never very much missed for. /dev/random however
    uses get_cycles() in the how the jitter in the interrupt timing contains
    some useful entropy.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • o Move current_cpu_type() to a separate header file
    o #ifdefing on supported CPU types lets modern GCC know that certain
    code in callers may be discarded ideally turning current_cpu_type() into
    a function returning a constant.
    o Use current_cpu_type() rather than direct access to struct cpuinfo_mips.

    Signed-off-by: Ralf Baechle
    Cc: Steven J. Hill
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5833/

    Ralf Baechle
     

17 Sep, 2013

2 commits

  • This fixes the following issue

    BUG: using smp_processor_id() in preemptible [00000000] code: kjournald/1761
    caller is blast_dcache32+0x30/0x254
    Call Trace:
    [] dump_stack+0x8/0x34
    [] debug_smp_processor_id+0xe0/0xf0
    [] blast_dcache32+0x30/0x254
    [] r4k_dma_cache_wback_inv+0x200/0x288
    [] mips_dma_map_sg+0x108/0x180
    [] ide_dma_prepare+0xf0/0x1b8
    [] do_rw_taskfile+0x1e8/0x33c
    [] ide_do_rw_disk+0x298/0x3e4
    [] do_ide_request+0x2e0/0x704
    [] __blk_run_queue+0x44/0x64
    [] queue_unplugged.isra.36+0x1c/0x54
    [] blk_flush_plug_list+0x18c/0x24c
    [] blk_finish_plug+0x18/0x48
    [] journal_commit_transaction+0x3b8/0x151c
    [] kjournald+0xec/0x238
    [] kthread+0xb8/0xc0
    [] ret_from_kernel_thread+0x14/0x1c

    Caches in most systems are identical - but not always, so we can't avoid
    the use of smp_call_function() by just looking at the boot CPU's data,
    have to fiddle with preemption instead.

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

    Ralf Baechle
     
  • boot_cpu_data is used the same as current_cpu_data but returns the CPU
    data for CPU 0. This means it doesn't have to use smp_processor_id()
    thus no need to disable preemption.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

16 Sep, 2013

1 commit

  • Pull MIPS fixes from Ralf Baechle:
    "These are four patches for three construction sites:

    - Fix register decoding for the combination of multi-core processors
    and multi-threading.

    - Two more fixes that are part of the ongoing DECstation resurrection
    work. One of these touches a DECstation-only network driver.

    - Finally Markos' trivial build fix for the AP/SP support.

    (With this applied now all MIPS defconfigs are building again)"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
    MIPS: kernel: vpe: Make vpe_attrs an array of pointers.
    MIPS: Fix SMP core calculations when using MT support.
    MIPS: DECstation I/O ASIC DMA interrupt handling fix
    MIPS: DECstation HRT initialization rearrangement

    Linus Torvalds
     

13 Sep, 2013

8 commits

  • Commit 567b21e973ccf5b0d13776e408d7c67099749eb8
    "mips: convert vpe_class to use dev_groups"

    broke the build on MIPS since vpe_attrs should be an array
    of 'struct device_attribute' pointers.

    Fixes the following build problem:
    arch/mips/kernel/vpe.c:1372:2: error: missing braces around initializer
    [-Werror=missing-braces]
    arch/mips/kernel/vpe.c:1372:2: error: (near initialization for 'vpe_attrs[0]')
    [-Werror=missing-braces]

    Cc: Ralf Baechle
    Cc: John Crispin
    Cc: Greg Kroah-Hartman
    Signed-off-by: Markos Chandras
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5819/
    Signed-off-by: Ralf Baechle

    Markos Chandras
     
  • After the last architecture switched to generic hard irqs the config
    options HAVE_GENERIC_HARDIRQS & GENERIC_HARDIRQS and the related code
    for !CONFIG_GENERIC_HARDIRQS can be removed.

    Signed-off-by: Martin Schwidefsky

    Martin Schwidefsky
     
  • The TCBIND register is only available if the core has MT support. It
    should not be read otherwise. Secondly, the number of TCs (siblings)
    are calculated differently depending on if the kernel is configured
    as SMVP or SMTC.

    Signed-off-by: Leonid Yegoshin
    Signed-off-by: Steven J. Hill
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5822/
    Signed-off-by: Ralf Baechle

    Leonid Yegoshin
     
  • This change complements commit d0da7c002f7b2a93582187a9e3f73891a01d8ee4
    and brings clear_ioasic_irq back, renaming it to clear_ioasic_dma_irq at
    the same time, to make I/O ASIC DMA interrupts functional.

    Unlike ordinary I/O ASIC interrupts DMA interrupts need to be deasserted
    by software by writing 0 to the respective bit in I/O ASIC's System
    Interrupt Register (SIR), similarly to how CP0.Cause.IP0 and CP0.Cause.IP1
    bits are handled in the CPU (the difference is SIR DMA interrupt bits are
    R/W0C so there's no need for an RMW cycle). Otherwise the handler is
    reentered over and over again.

    The only current user is the DEC LANCE Ethernet driver and its extremely
    uncommon DMA memory error handler that does not care when exactly the
    interrupt is cleared. Anticipating the use of DMA interrupts by the Zilog
    SCC driver this change however exports clear_ioasic_dma_irq for device
    drivers to choose the right application-specific sequence to clear the
    request explicitly rather than calling it implicitly in the .irq_eoi
    handler of `struct irq_chip'. Previously these interrupts were cleared in
    the .end handler of the said structure, before it was removed.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5826/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • Not all I/O ASIC versions have the free-running counter implemented, an
    early revision used in the 5000/1xx models aka 3MIN and 4MIN did not have
    it. Therefore we cannot unconditionally use it as a clock source.
    Fortunately if not implemented its register slot has a fixed value so it
    is enough if we check for the value at the end of the calibration period
    being the same as at the beginning.

    This also means we need to look for another high-precision clock source on
    the systems affected. The 5000/1xx can have an R4000SC processor
    installed where the CP0 Count register can be used as a clock source.
    Unfortunately all the R4k DECstations suffer from the missed timer
    interrupt on CP0 Count reads erratum, so we cannot use the CP0 timer as a
    clock source and a clock event both at a time. However we never need an
    R4k clock event device because all DECstations have a DS1287A RTC chip
    whose periodic interrupt can be used as a clock source.

    This gives us the following four configuration possibilities for I/O ASIC
    DECstations:

    1. No I/O ASIC counter and no CP0 timer, e.g. R3k 5000/1xx (3MIN).

    2. No I/O ASIC counter but the CP0 timer, i.e. R4k 5000/150 (4MIN).

    3. The I/O ASIC counter but no CP0 timer, e.g. R3k 5000/240 (3MAX+).

    4. The I/O ASIC counter and the CP0 timer, e.g. R4k 5000/260 (4MAX+).

    For #1 and #2 this change stops the I/O ASIC free-running counter from
    being installed as a clock source of a 0Hz frequency. For #2 it also
    arranges for the CP0 timer to be used as a clock source rather than a
    clock event device, because having an accurate wall clock is more
    important than a high-precision interval timer. For #3 there is no
    change. For #4 the change makes the I/O ASIC free-running counter
    installed as a clock source so that the CP0 timer can be used as a clock
    event device.

    Unfortunately the use of the CP0 timer as a clock event device relies on a
    succesful completion of c0_compare_interrupt. That never happens, because
    while waiting for a CP0 Compare interrupt to happen the function spins in
    a loop reading the CP0 Count register. This makes the CP0 Count erratum
    trigger reliably causing the interrupt waited for to be lost in all cases.
    As a result #4 resorts to using the CP0 timer as a clock source as well,
    just as #2. However we want to keep this separate arrangement in case
    (hope) c0_compare_interrupt is eventually rewritten such that it avoids
    the erratum.

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5825/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • Pull MIPS updates from Ralf Baechle:
    "This has been sitting in -next for a while with no objections and all
    MIPS defconfigs except one are building fine; that one platform got
    broken by another patch in your tree and I'm going to submit a patch
    separately.

    - a handful of fixes that didn't make 3.11
    - a few bits of Octeon 3 support with more to come for a later
    release
    - platform enhancements for Octeon, ath79, Lantiq, Netlogic and
    Ralink SOCs
    - a GPIO driver for the Octeon
    - some dusting off of the DECstation code
    - the usual dose of cleanups"

    * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (65 commits)
    MIPS: DMA: Fix BUG due to smp_processor_id() in preemptible code
    MIPS: kexec: Fix random crashes while loading crashkernel
    MIPS: kdump: Skip walking indirection page for crashkernels
    MIPS: DECstation HRT calibration bug fixes
    MIPS: Export copy_from_user_page() (needed by lustre)
    MIPS: Add driver for the built-in PCI controller of the RT3883 SoC
    MIPS: DMA: For BMIPS5000 cores flush region just like non-coherent R10000
    MIPS: ralink: Add support for reset-controller API
    MIPS: ralink: mt7620: Add cpu-feature-override header
    MIPS: ralink: mt7620: Add spi clock definition
    MIPS: ralink: mt7620: Add wdt clock definition
    MIPS: ralink: mt7620: Improve clock frequency detection
    MIPS: ralink: mt7620: This SoC has EHCI and OHCI hosts
    MIPS: ralink: mt7620: Add verbose ram info
    MIPS: ralink: Probe clocksources from OF
    MIPS: ralink: Add support for systick timer found on newer ralink SoC
    MIPS: ralink: Add support for periodic timer irq
    MIPS: Netlogic: Built-in DTB for XLP2xx SoC boards
    MIPS: Netlogic: Add support for USB on XLP2xx
    MIPS: Netlogic: XLP2xx update for I2C controller
    ...

    Linus Torvalds
     
  • Unlike global OOM handling, memory cgroup code will invoke the OOM killer
    in any OOM situation because it has no way of telling faults occuring in
    kernel context - which could be handled more gracefully - from
    user-triggered faults.

    Pass a flag that identifies faults originating in user space from the
    architecture-specific fault handlers to generic code so that memcg OOM
    handling can be improved.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Cc: David Rientjes
    Cc: KAMEZAWA Hiroyuki
    Cc: azurIt
    Cc: KOSAKI Motohiro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Kernel faults are expected to handle OOM conditions gracefully (gup,
    uaccess etc.), so they should never invoke the OOM killer. Reserve this
    for faults triggered in user context when it is the only option.

    Most architectures already do this, fix up the remaining few.

    Signed-off-by: Johannes Weiner
    Reviewed-by: Michal Hocko
    Acked-by: KOSAKI Motohiro
    Cc: David Rientjes
    Cc: KAMEZAWA Hiroyuki
    Cc: azurIt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

12 Sep, 2013

1 commit

  • Currently hugepage migration works well only for pmd-based hugepages
    (mainly due to lack of testing,) so we had better not enable migration of
    other levels of hugepages until we are ready for it.

    Some users of hugepage migration (mbind, move_pages, and migrate_pages) do
    page table walk and check pud/pmd_huge() there, so they are safe. But the
    other users (softoffline and memory hotremove) don't do this, so without
    this patch they can try to migrate unexpected types of hugepages.

    To prevent this, we introduce hugepage_migration_support() as an
    architecture dependent check of whether hugepage are implemented on a pmd
    basis or not. And on some architecture multiple sizes of hugepages are
    available, so hugepage_migration_support() also checks hugepage size.

    Signed-off-by: Naoya Horiguchi
    Cc: Andi Kleen
    Cc: Hillf Danton
    Cc: Wanpeng Li
    Cc: Mel Gorman
    Cc: Hugh Dickins
    Cc: KOSAKI Motohiro
    Cc: Michal Hocko
    Cc: Rik van Riel
    Cc: "Aneesh Kumar K.V"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Naoya Horiguchi
     

11 Sep, 2013

1 commit

  • Pull device tree core updates from Grant Likely:
    "Generally minor changes. A bunch of bug fixes, particularly for
    initialization and some refactoring. Most notable change if feeding
    the entire flattened tree into the random pool at boot. May not be
    significant, but shouldn't hurt either"

    Tim Bird questions whether the boot time cost of the random feeding may
    be noticeable. And "add_device_randomness()" is definitely not some
    speed deamon of a function.

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
    of/platform: add error reporting to of_amba_device_create()
    irq/of: Fix comment typo for irq_of_parse_and_map
    of: Feed entire flattened device tree into the random pool
    of/fdt: Clean up casting in unflattening path
    of/fdt: Remove duplicate memory clearing on FDT unflattening
    gpio: implement gpio-ranges binding document fix
    of: call __of_parse_phandle_with_args from of_parse_phandle
    of: introduce of_parse_phandle_with_fixed_args
    of: move of_parse_phandle()
    of: move documentation of of_parse_phandle_with_args
    of: Fix missing memory initialization on FDT unflattening
    of: consolidate definition of early_init_dt_alloc_memory_arch()
    of: Make of_get_phy_mode() return int i.s.o. const int
    include: dt-binding: input: create a DT header defining key codes.
    of/platform: Staticize of_platform_device_create_pdata()
    of: Specify initrd location using 64-bit
    dt: Typo fix
    OF: make of_property_for_each_{u32|string}() use parameters if OF is not enabled

    Linus Torvalds
     

10 Sep, 2013

1 commit

  • Pull mtd updates from David Woodhouse:
    - factor out common code from MTD tests
    - nand-gpio cleanup and portability to non-ARM
    - m25p80 support for 4-byte addressing chips, other new chips
    - pxa3xx cleanup and support for new platforms
    - remove obsolete alauda, octagon-5066 drivers
    - erase/write support for bcm47xxsflash
    - improve detection of ECC requirements for NAND, controller setup
    - NFC acceleration support for atmel-nand, read/write via SRAM
    - etc

    * tag 'for-linus-20130909' of git://git.infradead.org/linux-mtd: (184 commits)
    mtd: chips: Add support for PMC SPI Flash chips in m25p80.c
    mtd: ofpart: use for_each_child_of_node() macro
    mtd: mtdswap: replace strict_strtoul() with kstrtoul()
    mtd cs553x_nand: use kzalloc() instead of memset
    mtd: atmel_nand: fix error return code in atmel_nand_probe()
    mtd: bcm47xxsflash: writing support
    mtd: bcm47xxsflash: implement erasing support
    mtd: bcm47xxsflash: convert to module_platform_driver instead of init/exit
    mtd: bcm47xxsflash: convert kzalloc to avoid invalid access
    mtd: remove alauda driver
    mtd: nand: mxc_nand: mark 'const' properly
    mtd: maps: cfi_flagadm: add missing __iomem annotation
    mtd: spear_smi: add missing __iomem annotation
    mtd: r852: Staticize local symbols
    mtd: nandsim: Staticize local symbols
    mtd: impa7: add missing __iomem annotation
    mtd: sm_ftl: Staticize local symbols
    mtd: m25p80: add support for mr25h10
    mtd: m25p80: make CONFIG_M25PXX_USE_FAST_READ safe to enable
    mtd: m25p80: Pass flags through CAT25_INFO macro
    ...

    Linus Torvalds
     

07 Sep, 2013

3 commits

  • Pull ARM SoC platform changes from Olof Johansson:
    "This branch contains mostly additions and changes to platform
    enablement and SoC-level drivers. Since there's sometimes a
    dependency on device-tree changes, there's also a fair amount of
    those in this branch.

    Pieces worth mentioning are:

    - Mbus driver for Marvell platforms, allowing kernel configuration
    and resource allocation of on-chip peripherals.
    - Enablement of the mbus infrastructure from Marvell PCI-e drivers.
    - Preparation of MSI support for Marvell platforms.
    - Addition of new PCI-e host controller driver for Tegra platforms
    - Some churn caused by sharing of macro names between i.MX 6Q and 6DL
    platforms in the device tree sources and header files.
    - Various suspend/PM updates for Tegra, including LP1 support.
    - Versatile Express support for MCPM, part of big little support.
    - Allwinner platform support for A20 and A31 SoCs (dual and quad
    Cortex-A7)
    - OMAP2+ support for DRA7, a new Cortex-A15-based SoC.

    The code that touches other architectures are patches moving MSI
    arch-specific functions over to weak symbols and removal of
    ARCH_SUPPORTS_MSI, acked by PCI maintainers"

    * tag 'soc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (266 commits)
    tegra-cpuidle: provide stub when !CONFIG_CPU_IDLE
    PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource
    ARM: tegra: Drop ARCH_SUPPORTS_MSI and sort list
    ARM: dts: vf610-twr: enable i2c0 device
    ARM: dts: i.MX51: Add one more I2C2 pinmux entry
    ARM: dts: i.MX51: Move pins configuration under "iomuxc" label
    ARM: dtsi: imx6qdl-sabresd: Add USB OTG vbus pin to pinctrl_hog
    ARM: dtsi: imx6qdl-sabresd: Add USB host 1 VBUS regulator
    ARM: dts: imx27-phytec-phycore-som: Enable AUDMUX
    ARM: dts: i.MX27: Disable AUDMUX in the template
    ARM: dts: wandboard: Add support for SDIO bcm4329
    ARM: i.MX5 clocks: Remove optional clock setup (CKIH1) from i.MX51 template
    ARM: dts: imx53-qsb: Make USBH1 functional
    ARM i.MX6Q: dts: Enable I2C1 with EEPROM and PMIC on Phytec phyFLEX-i.MX6 Ouad module
    ARM i.MX6Q: dts: Enable SPI NOR flash on Phytec phyFLEX-i.MX6 Ouad module
    ARM: dts: imx6qdl-sabresd: Add touchscreen support
    ARM: imx: add ocram clock for imx53
    ARM: dts: imx: ocram size is different between imx6q and imx6dl
    ARM: dts: imx27-phytec-phycore-som: Fix regulator settings
    ARM: dts: i.MX27: Remove clock name from CPU node
    ...

    Linus Torvalds
     
  • Ralf Baechle
     
  • The use of current_cpu_type() in cpu_is_noncoherent_r10000() is not preemption-safe.
    Use boot_cpu_type() instead to make it preemption-safe.

    / # insmod mtd_readtest.ko dev=4
    mtd_readtest: MTD device: 4
    mtd_readtest: MTD device size 996671488, eraseblock size 524288, page size 4096, count of eraseblocks 1901, pages per eraseblock 128, OOB size 224
    mtd_readtest: scanning for bad eraseblocks
    mtd_readtest: scanned 1901 eraseblocks, 0 are bad
    mtd_readtest: testing page read
    BUG: using smp_processor_id() in preemptible [00000000] code: insmod/99
    caller is mips_dma_sync_single_for_cpu+0x2c/0x128
    CPU: 2 PID: 99 Comm: insmod Not tainted 3.10.4 #67
    Stack : 00000006 69735f63 00000000 00000000 00000000 00000000 808273d6 00000032
    80820000 00000002 8d700000 8de48fa0 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 8d6afb00 8d6afb24 80721f24 807b9927 8012c130
    80820000 80721f24 00000002 00000063 8de48fa0 8082333c 807b98e6 8d6afaa0
    ...
    Call Trace:
    [] show_stack+0x64/0x7c
    [] dump_stack+0x20/0x2c
    [] debug_smp_processor_id+0xe0/0xf0
    [] mips_dma_sync_single_for_cpu+0x2c/0x128
    [] nand_plat_read_page+0x16c/0x234
    [] nand_do_read_ops+0x194/0x480
    [] nand_read+0x50/0x7c
    [] part_read+0x70/0xc0
    [] mtd_read+0x80/0xe4
    [] init_module+0x354/0x6f8 [mtd_readtest]
    [] do_one_initcall+0x140/0x1a4
    [] load_module+0x1b5c/0x2258
    [] SyS_init_module+0xb4/0xec
    [] stack_done+0x20/0x44

    BUG: using smp_processor_id() in preemptible [00000000] code: insmod/99

    Signed-off-by: Jerin Jacob
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5800/
    Signed-off-by: Ralf Baechle

    Jerin Jacob
     

06 Sep, 2013

5 commits

  • Ralf Baechle
     
  • Fixed compilation errors in case of non-KEXEC kernel
    Rearranging code so that crashk_res gets updated.
    - crashk_res is updated after mips_parse_crashkernel(),
    after resource_init(), which is after arch_mem_init().
    - The reserved memory is actually treated as Usable memory,
    Unless we load the crash kernel, everything works.

    Signed-off-by: Prem Mallappa
    Cc: linux-mips
    Patchwork: http://patchwork.linux-mips.org/patch/5805/
    Signed-off-by: Ralf Baechle

    Prem Mallappa
     
  • KDUMP: skip indirection page, as crashkernel has already copied to destination

    [ralf@linux-mips.org: cosmetic changes.]

    Signed-off-by: Prem Mallappa
    Cc: linux-mips
    Patchwork: https://patchwork.linux-mips.org/patch/5786/
    Signed-off-by: Ralf Baechle

    Prem Mallappa
     
  • This change corrects DECstation HRT calibration, by removing the following
    bugs:

    1. Calibration period selection -- HZ / 10 has been chosen, however on
    DECstation computers, HZ never divides by 10, as the choice for HZ is
    among 128, 256 and 1024. The choice therefore results in a systematic
    calibration error, e.g. 6.25% for the usual choice of 128 for HZ:

    128 / 10 * 10 = 120

    (128 - 120) / 128 -> 6.25%

    The change therefore makes calibration use HZ / 8 that is always
    accurate for the HZ values available, getting rid of the systematic
    error.

    2. Calibration starting point synchronisation -- the duration of a number
    of intervals between DS1287A periodic interrupt assertions is measured,
    however code does not ensure at the beginning that the interrupt has
    not been previously asserted. This results in a variable error of e.g.
    up to another 6.25% for the period of HZ / 8 (8.(3)% with the original
    HZ / 10 period) and the usual choice of 128 for HZ:

    1 / 16 -> 6.25%

    1 / 12 -> 8.(3)%

    The change therefore adds an initial call to ds1287_timer_state that
    clears any previous periodic interrupt pending.

    The same issue applies to both I/O ASIC counter and R4k CP0 timer
    calibration on DECstation systems as similar code is used in both cases
    and both pieces of code are covered by this fix.

    On an R3400 test system used this fix results in a change of the I/O ASIC
    clock frequency reported from values like:

    I/O ASIC clock frequency 23185830Hz

    to:

    I/O ASIC clock frequency 24999288Hz

    removing the miscalculation by 6.25% from the systematic error and (for
    the individual sample provided) a further 1.00% from the variable error,
    accordingly. The nominal I/O ASIC clock frequency is 25MHz on this
    system.

    Here's another result, with the fix applied, from a system that has both
    HRTs available (using an R4400 at 60MHz nominal):

    MIPS counter frequency 59999328Hz
    I/O ASIC clock frequency 24999432Hz

    Signed-off-by: Maciej W. Rozycki
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5807/
    Signed-off-by: Ralf Baechle

    Maciej W. Rozycki
     
  • ERROR: "copy_from_user_page" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined!

    Signed-off-by: Geert Uytterhoeven
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/5808/
    Signed-off-by: Ralf Baechle

    Geert Uytterhoeven
     

05 Sep, 2013

6 commits

  • Pull vfs pile 1 from Al Viro:
    "Unfortunately, this merge window it'll have a be a lot of small piles -
    my fault, actually, for not keeping #for-next in anything that would
    resemble a sane shape ;-/

    This pile: assorted fixes (the first 3 are -stable fodder, IMO) and
    cleanups + %pd/%pD formats (dentry/file pathname, up to 4 last
    components) + several long-standing patches from various folks.

    There definitely will be a lot more (starting with Miklos'
    check_submount_and_drop() series)"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (26 commits)
    direct-io: Handle O_(D)SYNC AIO
    direct-io: Implement generic deferred AIO completions
    add formats for dentry/file pathnames
    kvm eventfd: switch to fdget
    powerpc kvm: use fdget
    switch fchmod() to fdget
    switch epoll_ctl() to fdget
    switch copy_module_from_fd() to fdget
    git simplify nilfs check for busy subtree
    ibmasmfs: don't bother passing superblock when not needed
    don't pass superblock to hypfs_{mkdir,create*}
    don't pass superblock to hypfs_diag_create_files
    don't pass superblock to hypfs_vm_create_files()
    oprofile: get rid of pointless forward declarations of struct super_block
    oprofilefs_create_...() do not need superblock argument
    oprofilefs_mkdir() doesn't need superblock argument
    don't bother with passing superblock to oprofile_create_stats_files()
    oprofile: don't bother with passing superblock to ->create_files()
    don't bother passing sb to oprofile_create_files()
    coh901318: don't open-code simple_read_from_buffer()
    ...

    Linus Torvalds
     
  • Pull KVM updates from Gleb Natapov:
    "The highlights of the release are nested EPT and pv-ticketlocks
    support (hypervisor part, guest part, which is most of the code, goes
    through tip tree). Apart of that there are many fixes for all arches"

    Fix up semantic conflicts as discussed in the pull request thread..

    * 'next' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (88 commits)
    ARM: KVM: Add newlines to panic strings
    ARM: KVM: Work around older compiler bug
    ARM: KVM: Simplify tracepoint text
    ARM: KVM: Fix kvm_set_pte assignment
    ARM: KVM: vgic: Bump VGIC_NR_IRQS to 256
    ARM: KVM: Bugfix: vgic_bytemap_get_reg per cpu regs
    ARM: KVM: vgic: fix GICD_ICFGRn access
    ARM: KVM: vgic: simplify vgic_get_target_reg
    KVM: MMU: remove unused parameter
    KVM: PPC: Book3S PR: Rework kvmppc_mmu_book3s_64_xlate()
    KVM: PPC: Book3S PR: Make instruction fetch fallback work for system calls
    KVM: PPC: Book3S PR: Don't corrupt guest state when kernel uses VMX
    KVM: x86: update masterclock when kvmclock_offset is calculated (v2)
    KVM: PPC: Book3S: Fix compile error in XICS emulation
    KVM: PPC: Book3S PR: return appropriate error when allocation fails
    arch: powerpc: kvm: add signed type cast for comparation
    KVM: x86: add comments where MMIO does not return to the emulator
    KVM: vmx: count exits to userspace during invalid guest emulation
    KVM: rename __kvm_io_bus_sort_cmp to kvm_io_bus_cmp
    kvm: optimize away THP checks in kvm_is_mmio_pfn()
    ...

    Linus Torvalds
     
  • Ralf Baechle
     
  • The Ralink RT3883 SoCs have a built-in PCI Host Controller
    device. The patch adds a platform driver and device tree
    binding documentation for that.

    The patch also enables the HW_HAS_PCI config option. This
    is required in order to be able to enable the PCI support.

    Signed-off-by: Gabor Juhos
    Acked-by: John Crispin
    Cc: linux-mips@linux-mips.org
    Cc: devicetree@vger.kernel.org
    Patchwork: https://patchwork.linux-mips.org/patch/5758/
    Signed-off-by: Ralf Baechle

    Gabor Juhos
     
  • The BMIPS5000 (Zephyr) processor utilizes instruction speculation. A
    stale misprediction address in either the JTB or the CRS may trigger
    a prefetch inside a region that is currently being used by a DMA engine,
    which is not IO-coherent. This prefetch will fetch a line into the
    scache, and that line will soon become stale (ie wrong) during/after the
    DMA. Mayhem ensues.

    In dma-default.c, the r10000 is handled as a special case in the same way
    that we want to handle Zephyr. So we generalize the exception cases into
    a function, and include Zephyr as one of the processors that needs this
    special care.

    Signed-off-by: Jim Quinlan
    Cc: linux-mips@linux-mips.org
    Cc: cernekee@gmail.com
    Patchwork: https://patchwork.linux-mips.org/patch/5776/
    Signed-off-by: Ralf Baechle

    Jim Quinlan
     
  • Add a helper for reseting different devices on the SoC.

    Signed-off-by: John Crispin
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5804/
    Patchwork: https://patchwork.linux-mips.org/patch/5797/
    Signed-off-by: Ralf Baechle

    John Crispin
     

04 Sep, 2013

1 commit

  • Override certain CPU features to help GCC to optimize
    the generated code. Saves about 150KB in the vmlinux
    image with a generic configuration.

    text data bss dec hex filename
    3824158 134820 234192 4193170 3ffb92 vmlinux.no-override
    3664054 138804 234192 4037050 3d99ba vmlinux.override

    Signed-off-by: Gabor Juhos
    Cc: linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/5759/
    Signed-off-by: Ralf Baechle

    Gabor Juhos