01 May, 2010

23 commits

  • The -mfix-loongson2f-jump option provided by latest CVS binutils have fixed
    the out-of-order issue of Loongson-2F described in chapter 15 of the
    Loongson2F User Manual [1, 2], but introduced some problems.

    The option changes all of the jump target to "addr & 0xcfffffff" through the
    at($1) register, but for the reboot address of Loongson 2F 0xbfc00000 this is
    wrong. Avoids the problem via telling the assembler to not use the $at
    register.

    [1] Loongson2F User Manual (Chinese Version)
    http://www.loongson.cn/uploadfile/file/200808211
    [2] English Version of Chapter 15:
    http://groups.google.com.hk/group/loongson-dev/msg/e0d2e220958f10a6?dmode=source

    Reported-and-tested-by: Liu Shiwei
    Signed-off-by: Wu Zhangjin
    Cc: linux-mips
    Patchwork: http://patchwork.linux-mips.org/patch/1109/
    Signed-off-by: Ralf Baechle

    Wu Zhangjin
     
  • Signed-off-by: Wu Zhangjin
    Cc: linux-mips
    Patchwork: http://patchwork.linux-mips.org/patch/1106/
    Signed-off-by: Ralf Baechle

    Wu Zhangjin
     
  • With the "Fixups of Loongson2F" patch [1] having been applied to binutils
    for binutils 2.20.1 we now can use it's time to enable the options provided
    by the patch to compile the kernel.

    Without these fixups, the system may hang if the erratum is triggered.

    For more information on these fixups please refer to the following
    references.

    [1] "Fixups of Loongson2F" patch for binutils(actually for gas)
    http://sourceware.org/ml/binutils/2009-11/msg00387.html
    [2] Chapter 15 of "Loongson2F User Manual"(Chinese Version)
    http://www.loongson.cn/uploadfile/file/200808211
    [3] Chapter 15 of the English version Loongson 2F User Manual
    http://groups.google.com.hk/group/loongson-dev/msg/e0d2e220958f10a6?dmode=source

    Signed-off-by: Zhang Le
    Signed-off-by: Wu Zhangjin
    Cc: Zhang Le
    Cc: linux-mips
    Patchwork: http://patchwork.linux-mips.org/patch/1106/
    Signed-off-by: Ralf Baechle

    Wu Zhangjin
     
  • As documented in the Loongson 2F User Manual [2, 3], the old Loongson2F
    series (2F01 / 2F02) have the NOP & JUMP issues which requires workarounds
    in the kernel and binutils. This issue has been rectified in Loongson 2F
    series 2F03 so no workarounds needed.

    Now that the workarounds [1] adding the the -mfix-loongson2f-nop and
    -mfix-loongson2f-jump options have been comitted to the binutils the CVS
    repository), we can add the workarounds in the kernel.

    The workarounds have no significant side effect on the system but may
    decrease performance so we control them through a a new
    CPU_LOONGSON2F_WORKAROUNDS config option allowing the users to only enable
    it as necessary.

    [1] "Fixups of Loongson2F" patch for binutils(actually for gas)
    http://sourceware.org/ml/binutils/2009-11/msg00387.html
    [2] Chapter 15 of "Loongson2F User Manual"(Chinese Version)
    http://www.loongson.cn/uploadfile/file/200808211
    [3] English Version of the above chapter 15
    http://groups.google.com.hk/group/loongson-dev/msg/e0d2e220958f10a6?dmode=source

    Signed-off-by: Wu Zhangjin
    Cc: linux-mips
    Patchwork: http://patchwork.linux-mips.org/patch/1105/
    Signed-off-by: Ralf Baechle

    Wu Zhangjin
     
  • Signed-off-by: Florian Fainelli
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1082/
    Signed-off-by: Ralf Baechle

    Florian Fainelli
     
  • the defconfig was out-of-sync since 2.6.30-rc6, update it with the new
    symbols and enable BCM6338, 6345, wireless, b43 driver and LEDs support.

    Signed-off-by: Fainelli
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1081/
    Signed-off-by: Ralf Baechle

    Florian Fainelli
     
  • When the oprofile is compiled as a module do_IRQ() is not called in
    arch/mips/loongson/lemote-2f/irq.c due to a wrong #ifdef there.

    Signed-off-by: Wu Zhangjin
    Cc: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1143/
    Signed-off-by: Ralf Baechle

    Wu Zhangjin
     
  • There's a typo in the LOONGSON_ADDRWIN_CFG macro. The cpu window mmap
    register address should contain the destination parameters not the
    source one. This has not been noticed because the code is only using
    source = destination.

    Signed-off-by: Arnaud Patard
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1162/
    Signed-off-by: Ralf Baechle

    Arnaud Patard
     
  • The check used to determine if uncached accelerated should be used or not
    is wrong. The parenthesis are misplaced and making the test fail.

    Signed-off-by: Arnaud Patard
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1161/
    Signed-off-by: Ralf Baechle

    Arnaud Patard
     
  • This allows to use all display device for instance DISPLAY_OTHER like SM501.

    Signed-off-by: Arnaud Patard
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1160/
    Signed-off-by: Ralf Baechle

    Richard LIU
     
  • It's not "gidum" but "gdium".

    Signed-off-by: Arnaud Patard
    Cc: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1159/
    Signed-off-by: Ralf Baechle

    Arnaud Patard
     
  • "MIPS: Calculate proper ebase value for 64-bit kernels"
    9af43ea080dd5d6c7b34f38261780e5dd43537bc (lmo) rsp.
    f6be75d03c8870be91e6e2a195648ece04b6bb16 (kernel.org) broke some 64-bit
    MIPS systems.

    Before this we were using XKPHYS/cached as ebase and computed the uncached
    xphsys/unchached address for that area. After that commit ebase became a
    32-bit compat address and convert does not work anymore. We now should use
    CKSEG1 for this. CKSEG1ADDR does just that in 32-bit and 64-bit.

    Signed-off-by: Sebastian Andrzej Siewior
    To: Ralf Baechle
    Patchwork: http://patchwork.linux-mips.org/patch/1149/
    Signed-off-by: Ralf Baechle

    Sebastian Andrzej Siewior
     
  • For some combinations of PAGE_SIZE and vmbits, it is possible to have
    userspace access that are beyond what is covered by the PGD, but within
    vmbits. Such an access would cause the TLB refill handler to load garbage
    values for PMD and PTE potentially giving userspace access to parts of the
    physical address space to which it is not entitled.

    In the TLB refill hot path, we add a single dsrl instruction so we can
    check if any bits outside of the range covered by the PGD are set. In
    the vmalloc side we then separate the bad case from the normal vmalloc
    case and call tlb_do_page_fault_0 if warranted. This slows us down a
    bit, but has the benefit of yielding deterministic behavior.

    [Ralf: Fixed build error for 32-bit kernels.]
    [Ralf: Folded lmo commit c8c0e22b2aa3982852b44279638ef37f9aa31b7d into this
    commit.]

    Signed-off-by: David Daney
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1152/
    Signed-off-by: Ralf Baechle

    ---

    David Daney
     
  • This makes the code somewhat cleaner while reducing the risk of shift
    amount overflows when various page table related options are changed.

    Signed-off-by: David Daney
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1154/
    Signed-off-by: Ralf Baechle

    David Daney
     
  • This allows us to clean up the code by not having to explicitly code
    checks for shift amounts greater than 32.

    Signed-off-by: David Daney
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1153/
    Signed-off-by: Ralf Baechle

    David Daney
     
  • The MIPS implementation of die() forgets to call notify_die() and thus notifiers
    registered via register_die_notifier() are not called. This results in kgdb not
    being activated on exceptions.

    The only subtlety is that notify_die declares its regs argument w/o const, so
    the const had to be removed from mips die() as well.

    [Ralf: Fixed build error for SGI IP22 and IP28 platforms.]

    Signed-off-by: Yury Polyanskiy
    Cc: linux-mips@linux-mips.org
    Patchworks: http://patchwork.linux-mips.org/patch/1142/
    Acked-by: Jason Wessel
    Signed-off-by: Ralf Baechle

    ---

    Yury Polyanskiy
     
  • According to include/asm/sibyte/swarm.h both systems provide a
    platform device for the ide controler. Until now the IDE subsystem was
    used which is deprecated by now. The same structure can be used with the
    PATA driver.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: tbm@cyrius.com
    Cc: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1127/
    Signed-off-by: Ralf Baechle

    Sebastian Andrzej Siewior
     
  • Same issues as SD card detection: One of both is always triggering and the
    handlers take care to shut it up and enable the other. To avoid messages
    about "unbalanced interrupt enable/disable" they must not be automatically
    enabled when initally requested.

    This was not an issue with the db1200_defconfig due to fortunate timings;
    on a build without network chip support the warnings appear.

    Signed-off-by: Manuel Lauss
    To: Linux-MIPS
    Patchwork: http://patchwork.linux-mips.org/patch/1133/
    Signed-off-by: Ralf Baechle

    Manuel Lauss
     
  • | arch/mips/pci/pci-sb1250.c: In function sb1250_pcibios_init:
    | arch/mips/pci/pci-sb1250.c:257: warning: assignment makes integer from pointer without a cast
    | arch/mips/pci/pci-sb1250.c:285: error: MAX_NR_CONSOLES undeclared (first use in this function)
    | arch/mips/pci/pci-sb1250.c:285: error: (Each undeclared identifier is reported only once
    | arch/mips/pci/pci-sb1250.c:285: error: for each function it appears in.)

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1136/
    Signed-off-by: Ralf Baechle

    Sebastian Andrzej Siewior
     
  • |arch/mips/sibyte/swarm/setup.c:153:
    | warning: large integer implicitly truncated to unsigned type

    The field was changed in d9b26352 aka ("x86, setup: Store the boot
    cursor state"). This patch changes the values back they way they were
    before this extra field got introduced.

    While here, the other two boards are also converted to C99 initializer.

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1137/
    Signed-off-by: Ralf Baechle

    Sebastian Andrzej Siewior
     
  • Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • In the 64-bit kernel we use swapper_pg_dir for three different things.

    1) xuseg mappings for kernel threads.

    2) vmap mappings for all kernel-space accesses in xkseg.

    3) vmap mappings for kernel modules in ksseg (kseg2).

    Due to how the TLB refill handlers work, any mapping established in
    xkseg or ksseg will also establish a xuseg mapping that should never
    be used by the kernel.

    In order to be able to use exceptions to trap NULL pointer
    dereferences, we need to ensure that nothing is mapped at address
    zero. Since vmap mappings in xkseg are reflected in xuseg, this means
    we need to ensure that there are no vmap mappings established at the
    start of xkseg. So we move back VMALLOC_START to avoid establishing
    vmap mappings at the start of xkseg.

    Signed-off-by: David Daney
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1129/
    Signed-off-by: Ralf Baechle

    David Daney
     
  • commit 5a0e3ad6af8660be21ca98a971cd00f331318c05
    Author: Tejun Heo
    Date: Wed Mar 24 17:04:11 2010 +0900

    include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

    Since a while the few headers included don't drag in
    anymore, thus no more prototype of printk() resulting in:

    CC arch/mips/nxp/pnx8550/common/reset.o
    /home/ralf/src/linux/upstream-linus/arch/mips/nxp/pnx8550/common/reset.c: In function 'pnx8550_machine_restart':
    /home/ralf/src/linux/upstream-linus/arch/mips/nxp/pnx8550/common/reset.c:31: error: implicit declaration of function 'printk'
    /home/ralf/src/linux/upstream-linus/arch/mips/nxp/pnx8550/common/reset.c:33: error: 'NULL' undeclared (first use in this function)
    /home/ralf/src/linux/upstream-linus/arch/mips/nxp/pnx8550/common/reset.c:33: error: (Each undeclared identifier is reported only once
    /home/ralf/src/linux/upstream-linus/arch/mips/nxp/pnx8550/common/reset.c:33: error: for each function it appears in.)
    make[3]: *** [arch/mips/nxp/pnx8550/common/reset.o] Error 1

    Fixed by including

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

13 Apr, 2010

17 commits

  • The ebase is relative to CKSEG0 not CAC_BASE. On a 32-bit kernel they
    are the same thing, for a 64-bit kernel they are not.

    It happens to kind of work on a 64-bit kernel as they both reference
    the same physical memory. However since the CPU uses the CKSEG0 base,
    determining if a J instruction will reach always gives the wrong result
    unless we use the same number the CPU uses.

    Signed-off-by: David Daney
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1093/
    Signed-off-by: Ralf Baechle

    David Daney
     
  • While playing with the out-of-tree MAE driver module, the system would
    panic after a while in the db1200 custom wait code after wakeup due to
    a clobbered k0 register being used as target address of a store op.

    Remove the custom wait implementation and revert back to the Alchemy-
    recommended implementation already set as default.

    Signed-off-by: Manuel Lauss
    To: Linux-MIPS
    Patchwork: http://patchwork.linux-mips.org/patch/1092/
    Signed-off-by: Ralf Baechle

    Manuel Lauss
     
  • Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • Commit b3594a089f1c17ff919f8f78505c3f20e1f6f8ce (lmo) rsp.
    351336929ccf222ae38ff0cb7a8dd5fd5c6236a0 (kernel.org) break non-GPL modules
    that use __vmalloc() or any of the vmap(), vm_map_ram(), etc functions on
    MIPS.

    All those functions are EXPORT_SYMBOL() so are meant to be allowed to be
    used by non-GPL kernel modules. These calls all take page protection as
    an argument which is normally a constant like PAGE_KERNEL.

    This commit causes all protection constants like PAGE_KERNEL to not be
    constants and instead to contain the GPL-only symbol _page_cachable_default.

    This means that all calls to __vmalloc(), vmap(), etc, cause non-GPL
    modules to fail to link with the complaint that they are trying to use the
    GPL-only symbol _page_cachable_default...

    Change EXPORT_SYMBOL_GPL(_page_cachable_default) to EXPORT_SYMBOL() for
    non-GPL modules that call __vmalloc(), vmap(), vm_map_ram() etc.

    Signed-off-by: Anton Altaparmakov
    Cc: Chris Dearman
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Patchwork: http://patchwork.linux-mips.org/patch/1084/
    Signed-off-by: Ralf Baechle

    Anton Altaparmakov
     
  • The M3 workaround needs to cmpare the region and VPN2 fields only.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • Since 2083e8327aeeaf818b0e4522a9d2539835c60423, the SPROM is now registered
    in the board_prom_init callback, but it references variables and functions
    which are declared below. Move the variables and functions above
    board_prom_init.

    Signed-off-by: Florian Fainelli
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1077/
    Signed-off-by: Ralf Baechle

    Florian Fainelli
     
  • This is needed for the fix of the M3 workaround.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • Previously it was unconditionally used on all Sibyte family SOCs. The
    M3 bug has to be handled in the TLB exception handler which is extremly
    performance sensitive, so this modification is expected to deliver around
    2-3% performance improvment. This is important as required changes to the
    M3 workaround will make it more costly.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • To avoid a glitch during GPIO initialisation read GPIO output register
    values left by the firmware.

    Signed-off-by: Maxime Bizon
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/903/
    Signed-off-by: Ralf Baechle

    Maxime Bizon
     
  • Signed-off-by: Florian Fainelli
    To: Maxime Bizon
    Cc: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1017/
    Signed-off-by: Ralf Baechle

    Florian Fainelli
     
  • Fix typo: CONFIG_BCMCPU_IS_63xx does not exist;
    CONFIG_BCM63XX_CPU_63xx is the valid config option.

    Signed-off-by: Maxime Bizon
    To: linux-mips@linux-mips.org
    Cc: Maxime Bizon
    Patchwork: http://patchwork.linux-mips.org/patch/901/
    Signed-off-by: Ralf Baechle

    Maxime Bizon
     
  • The BCm63xx SOC has two uarts. Some boards use the second one for
    bluetooth. This patch changes platform device registration code to
    handle this. Changes to the UART driver were already merged in
    6a2c7eabfd09ca7986bf96b8958a87ca041a19d8.

    Signed-off-by: Maxime Bizon
    To: linux-mips@linux-mips.org
    Cc: Maxime Bizon
    Patchwork: http://patchwork.linux-mips.org/patch/900/
    Signed-off-by: Ralf Baechle

    Maxime Bizon
     
  • bcm63xx_gpio_init is already called from prom_init to allow board to use
    them early, so we can remove the unneeded arch_initcall.

    Signed-off-by: Maxime Bizon
    To: linux-mips@linux-mips.org
    Cc: Maxime Bizon
    Patchwork: http://patchwork.linux-mips.org/patch/899/
    Signed-off-by: Ralf Baechle

    Maxime Bizon
     
  • The DWVS0 board is a BCM6358-based board with an on-board OHCI controler.

    Signed-off-by: Florian Fainelli
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1015/
    Signed-off-by: Ralf Baechle

    Florian Fainelli
     
  • Signed-off-by: Florian Fainelli
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1014/
    Signed-off-by: Ralf Baechle

    Florian Fainelli
     
  • The number of GPIOs on BCM6338 is 8, while BCM6345 has only 16 GPIOs
    available.

    Signed-off-by: Florian Fainelli
    To: linux-mips@linux-mips.org
    Patchwork: http://patchwork.linux-mips.org/patch/1016/
    Signed-off-by: Ralf Baechle

    Florian Fainelli
     
  • arch/mips/lib/libgcc.h:21: ERROR: open brace '{' following union go on the same line

    Signed-off-by: Andrea Gelmini
    To: linux-kernel@vger.kernel.org
    Cc: Paul Mundt
    Cc: linux-mips@linux-mips.org
    Cc: linux-sh@vger.kernel.org
    Patchwork: http://patchwork.linux-mips.org/patch/1007/
    Signed-off-by: Ralf Baechle

    Andrea Gelmini