13 Nov, 2012

1 commit

  • The CBUS UART's interrupt number was wrong conflicting with the interrupt
    being tied to the Intel PIIX4. Since the PIIX4's interrupt is registered
    before the CBUS UART which is not being used on most systems this would
    not be noticed.

    Attempts to open the ttyS2 CBUS UART would result in:

    genirq: Flags mismatch irq 18. 00000000 (serial) vs. 00010000 (XT-PIC cascade)
    serial_link_irq_chain: request failed: -16 for irq: 18

    Qemu was written to match the kernel so will need to be fixed also.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

28 Sep, 2012

2 commits


17 Sep, 2012

1 commit

  • 48d480b0bde794781fcae9501fb043c1bac0e523 [[MIPS] Malta: Fix off by one bug in interrupt
    handler.] did not take in account that irq_ffs() will also return 0 if for some reason
    the set of pending interrupts happens to be empty.

    This is trivial to trigger with a RM5261 CPU module running a 64-bit kernel and results
    in something like the following:

    CPU 0 Unable to handle kernel paging request at virtual address 0000000000000000, epc == ffffffff801772d0, ra == ffffffff8017ad24
    Oops[#1]:
    Cpu 0
    $ 0 : 0000000000000000 ffffffff9000a4e0 ffffffff9000a4e0 ffffffff9000a4e0
    $ 4 : ffffffff80592be0 0000000000000000 00000000000000d6 ffffffff80322ed0
    $ 8 : ffffffff805fe538 0000000000000000 ffffffff9000a4e0 ffffffff80590000
    $12 : 00000000000000d6 0000000000000000 ffffffff80600000 ffffffff805fe538
    $16 : 0000000000000000 0000000000000010 ffffffff80592be0 0000000000000010
    $20 : 0000000000000000 0000000000500001 0000000000000000 ffffffff8051e078
    $24 : 0000000000000028 ffffffff803226e8
    $28 : 9800000003828000 980000000382b900 ffffffff8051e060 ffffffff8017ad24
    Hi : 0000000000000000
    Lo : 0000006388974000
    epc : ffffffff801772d0 handle_irq_event_percpu+0x70/0x2f0
    Not tainted
    ra : ffffffff8017ad24 handle_percpu_irq+0x54/0x88
    Status: 9000a4e2 KX SX UX KERNEL EXL
    Cause : 00808008
    BadVA : 0000000000000000
    PrId : 000028a0 (Nevada)
    Modules linked in:
    Process init (pid: 1, threadinfo=9800000003828000, task=9800000003827968, tls=0000000077087490)
    Stack : ffffffff80592be0 ffffffff8058d248 0000000000000040 0000000000000000
    ffffffff80613340 0000000000500001 ffffffff805a0000 0000000000000882
    9800000003b89000 ffffffff8017ad24 00000000000000d5 0000000000000010
    ffffffff9000a4e1 ffffffff801769f4 ffffffff9000a4e0 ffffffff801037f8
    0000000000000000 ffffffff80101c44 0000000000000000 ffffffff9000a4e0
    0000000000000000 9000000018000000 90000000180003f9 0000000000000001
    0000000000000000 00000000000000ff 0000000000000018 0000000000000001
    0000000000000001 00000000003fffff 0000000000000020 ffffffff802cf7ac
    ffffffff80208918 000000007fdadf08 ffffffff80612d88 ffffffff9000a4e1
    0000000000000040 0000000000000000 ffffffff80613340 0000000000500001
    ...
    Call Trace:
    [] handle_irq_event_percpu+0x70/0x2f0
    [] handle_percpu_irq+0x54/0x88
    [] generic_handle_irq+0x44/0x60
    [] do_IRQ+0x48/0x70
    [] ret_from_irq+0x0/0x4
    [] serial8250_startup+0x310/0x870
    [] uart_startup.part.7+0x9c/0x330
    [] uart_open+0x15c/0x1b0
    [] tty_open+0x1fc/0x720
    [] chrdev_open+0x7c/0x180
    [] do_dentry_open.isra.14+0x288/0x390
    [] nameidata_to_filp+0x5c/0xc0
    [] do_last.isra.33+0x330/0x8f0
    [] path_openat+0xbc/0x440
    [] do_filp_open+0x38/0xa8
    [] do_sys_open+0x124/0x218
    [] handle_sys+0x118/0x13c

    Code: 02d5a825 12800012 02a0b02d de850008 0040f809 0220202d 0040a82d 40026000
    ---[ end trace 5d8e7b9a86badd2d ]---
    Kernel panic - not syncing: Fatal exception in interrupt

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

14 Sep, 2012

2 commits

  • YAMON requires and enforces the RTC Data Mode (Register B, DM bit) to
    binary, that is the bit is set every time the board goes through the
    firmware bootstrap sequence. Likewise its calendar manipulation commands
    interpret or set the RTC registers unconditionally as binary, never
    actually checking what the value of the DM bit is, under the (correct)
    assumption that it has been previously set, to indicate the binary mode.

    A change to Linux a while ago however introduced a platform-specific
    tweak that clears that bit and therefore forces the data mode to BCD.
    This causes clock corruption and misinterpretation that has to be fixed up
    by user-mode tools in system startup scripts as the initial clock is often
    incorrect according to the BCD interpretation forced.

    This change removes the hack; a comment included refers to alarm code,
    but even if it was broken at one point by requiring the BCD mode, it
    should have been trivially corrected and even if not, given how rarely the
    alarm feature is used, that was not really a reasonable justification to
    break the system clock that is indeed used by virtually everything. And
    either way the alarm code has been since fixed anyway.

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

    Maciej W. Rozycki
     
  • The GIC interrupt code is used by multiple platforms and the
    current code was half Malta dependent code. These changes
    abstract away the platform specific differences.

    Signed-off-by: Steven J. Hill

    Steven J. Hill
     

17 Aug, 2012

1 commit

  • 2ec8663f9c03a96f2c328c7c483603c31d62ad37 (lmo) rsp.
    497e5ff03f58583ada469db8a1aa34eced9dd63e (kernel.org) [MIPS: Malta: Move
    PIIX4 PCI fixup to where it belongs.] attempted to move this PCI fixup
    but really only added it at it's new location without deleting the old
    instance.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

19 Jul, 2012

3 commits

  • Fixups are executed once the pci-device is found which is during boot
    process so __init seems fine as long as the platform does not support
    hotplug.
    However it is possible to remove the PCI bus at run time and have it
    rediscovered again via "echo 1 > /sys/bus/pci/rescan" and this will call
    the fixups again.

    [ralf@linux-mips.org: Made piixirqmap[] in malta_piix_func0_fixup()
    __initdata.]

    Signed-off-by: Sebastian Andrzej Siewior
    Cc: linux-mips@linux-mips.org
    Signed-off-by: Ralf Baechle

    Sebastian Andrzej Siewior
     
  • As long as there is no other non-const variable marked __initdata in the
    same compilation unit it doesn't hurt. If there were one however
    compilation would fail with

    error: $variablename causes a section type conflict

    because a section containing const variables is marked read only and so
    cannot contain non-const variables.

    Signed-off-by: Uwe Kleine-König
    Cc: linux-mips@linux-mips.org
    Cc: linux-mips@linux-mips.org
    Cc: linux-kernel@vger.kernel.org
    Cc: kernel@pengutronix.de
    Patchwork: https://patchwork.linux-mips.org/patch/3565/
    Signed-off-by: Ralf Baechle

    Uwe Kleine-König
     
  • There are ACPI and SMB devices in the 0x1000..0x1fff address range.

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

    Steven J. Hill
     

29 Mar, 2012

1 commit


08 Dec, 2011

1 commit

  • Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
    We run all interrupt handlers with interrupts disabled and we even check
    and yell when an interrupt handler returns with interrupts enabled (see
    commit [b738a50a: genirq: Warn when handler enables interrupts]).

    So now this flag is a NOOP and can be removed.

    [ralf@linux-mips.org: Fixed up conflicts in
    arch/mips/alchemy/common/dbdma.c, arch/mips/cavium-octeon/smp.c and
    arch/mips/kernel/perf_event.c.]

    Signed-off-by: Yong Zhang
    To: linux-kernel@vger.kernel.org
    Cc: tglx@linutronix.de
    linux-mips@linux-mips.org
    Patchwork: https://patchwork.linux-mips.org/patch/2835/
    Signed-off-by: Ralf Baechle

    Yong Zhang
     

21 Sep, 2011

1 commit


27 Jul, 2011

1 commit

  • * 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (31 commits)
    MIPS: Close races in TLB modify handlers.
    MIPS: Add uasm UASM_i_SRL_SAFE macro.
    MIPS: RB532: Use hex_to_bin()
    MIPS: Enable cpu_has_clo_clz for MIPS Technologies' platforms
    MIPS: PowerTV: Provide cpu-feature-overrides.h
    MIPS: Remove pointless return statement from empty void functions.
    MIPS: Limit fixrange_init() to the FIXMAP region
    MIPS: Install handlers for software IRQs
    MIPS: Move FIXADDR_TOP into spaces.h
    MIPS: Add SYNC after cacheflush
    MIPS: pfn_valid() is broken on low memory HIGHMEM systems
    MIPS: HIGHMEM DMA on noncoherent MIPS32 processors
    MIPS: topdown mmap support
    MIPS: Remove redundant addr_limit assignment on exec.
    MIPS: AR7: Replace __attribute__((__packed__)) with __packed
    MIPS: AR7: Remove 'space before tabs' in platform.c
    MIPS: Lantiq: Add missing clk_enable and clk_disable functions.
    MIPS: AR7: Fix trailing semicolon bug in clock.c
    MAINTAINERS: Update MIPS entry.
    MIPS: BCM63xx: Remove duplicate PERF_IRQSTAT_REG definition
    ...

    Linus Torvalds
     

21 Jul, 2011

2 commits

  • Since 6be63bbbdab66b9185dc6f67c8b1bacb6f37f946 (lmo) rsp.
    af3a1f6f4813907e143f87030cde67a9971db533 (kernel.org) the Malta code does
    no longer probe for presence of GCMP if CMP is not configured. This means
    that the variable gcmp_present well be left at its default value of -1
    which normally is meant to indicate that GCMP has not yet been mmapped.
    This non-zero value is now interpreted as GCMP being present resulting
    in a write attempt to a GCMP register resulting in a crash.

    Reported and a build fix on top of my fix by Rob Landley .

    Reported-by: Rob Landley
    Signed-off-by: Ralf Baechle
    Patchwork: https://patchwork.linux-mips.org/patch/2413/

    Ralf Baechle
     
  • Commit a561b02a2577aec51277ba39c82bd192a79c0267 (lmo) rsp.
    7c8d948f1633da5ff81e4f5b31ef237d74c40127 (kernel.org) ["MIPS: i8259: Convert
    to new irq_chip functions"] missed one location to modify resulting in
    build breakage.

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

09 Jun, 2011

1 commit

  • Signed-off-by: Ralf Baechle
    Cc: linux-mips@linux-mips.org
    Link: http://lkml.kernel.org/r/20110601180610.054254048@duck.linux-mips.net
    Signed-off-by: Thomas Gleixner

    arch/arm/mach-footbridge/isa-timer.c | 2 +-
    arch/mips/cobalt/time.c | 2 +-
    arch/mips/jazz/irq.c | 2 +-
    arch/mips/kernel/i8253.c | 2 +-
    arch/mips/mti-malta/malta-time.c | 2 +-
    arch/mips/sgi-ip22/ip22-time.c | 2 +-
    arch/mips/sni/time.c | 2 +-
    arch/x86/kernel/apic/apic.c | 2 +-
    arch/x86/kernel/apm_32.c | 2 +-
    arch/x86/kernel/hpet.c | 2 +-
    arch/x86/kernel/i8253.c | 2 +-
    arch/x86/kernel/time.c | 2 +-
    drivers/block/hd.c | 2 +-
    drivers/clocksource/i8253.c | 2 +-
    drivers/input/gameport/gameport.c | 2 +-
    drivers/input/joystick/analog.c | 2 +-
    drivers/input/misc/pcspkr.c | 2 +-
    include/linux/i8253.h | 11 +++++++++++
    sound/drivers/pcsp/pcsp.h | 2 +-
    19 files changed, 29 insertions(+), 18 deletions(-)

    Ralf Baechle
     

20 May, 2011

1 commit

  • …kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

    * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (60 commits)
    sched: Fix and optimise calculation of the weight-inverse
    sched: Avoid going ahead if ->cpus_allowed is not changed
    sched, rt: Update rq clock when unthrottling of an otherwise idle CPU
    sched: Remove unused parameters from sched_fork() and wake_up_new_task()
    sched: Shorten the construction of the span cpu mask of sched domain
    sched: Wrap the 'cfs_rq->nr_spread_over' field with CONFIG_SCHED_DEBUG
    sched: Remove unused 'this_best_prio arg' from balance_tasks()
    sched: Remove noop in alloc_rt_sched_group()
    sched: Get rid of lock_depth
    sched: Remove obsolete comment from scheduler_tick()
    sched: Fix sched_domain iterations vs. RCU
    sched: Next buddy hint on sleep and preempt path
    sched: Make set_*_buddy() work on non-task entities
    sched: Remove need_migrate_task()
    sched: Move the second half of ttwu() to the remote cpu
    sched: Restructure ttwu() some more
    sched: Rename ttwu_post_activation() to ttwu_do_wakeup()
    sched: Remove rq argument from ttwu_stat()
    sched: Remove rq->lock from the first half of ttwu()
    sched: Drop rq->lock from sched_exec()
    ...

    * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: Fix rt_rq runtime leakage bug

    Linus Torvalds
     

11 May, 2011

2 commits

  • CC arch/mips/mti-malta/malta-int.o
    arch/mips/mti-malta/malta-int.c: In function 'mips_pcibios_iack':
    arch/mips/mti-malta/malta-int.c:59:6: error: variable 'dummy' set but not used [-Werror=unused-but-set-variable]
    cc1: all warnings being treated as errors

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     
  • CC arch/mips/mti-malta/malta-init.o
    arch/mips/mti-malta/malta-init.c: In function 'prom_init':
    arch/mips/mti-malta/malta-init.c:196:6: error: variable 'result' set but not used [-Werror=unused-but-set-variable]
    cc1: all warnings being treated as errors

    Signed-off-by: Ralf Baechle

    Ralf Baechle
     

14 Apr, 2011

1 commit

  • For future rework of try_to_wake_up() we'd like to push part of that
    function onto the CPU the task is actually going to run on.

    In order to do so we need a generic callback from the existing scheduler IPI.

    This patch introduces such a generic callback: scheduler_ipi() and
    implements it as a NOP.

    BenH notes: PowerPC might use this IPI on offline CPUs under rare conditions!

    Acked-by: Russell King
    Acked-by: Martin Schwidefsky
    Acked-by: Chris Metcalf
    Acked-by: Jesper Nilsson
    Acked-by: Benjamin Herrenschmidt
    Signed-off-by: Ralf Baechle
    Reviewed-by: Frank Rowand
    Cc: Mike Galbraith
    Cc: Nick Piggin
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Signed-off-by: Ingo Molnar
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110405152728.744338123@chello.nl

    Peter Zijlstra
     

31 Mar, 2011

1 commit


29 Mar, 2011

1 commit


26 Mar, 2011

2 commits


02 Nov, 2010

1 commit

  • "gadget", "through", "command", "maintain", "maintain", "controller", "address",
    "between", "initiali[zs]e", "instead", "function", "select", "already",
    "equal", "access", "management", "hierarchy", "registration", "interest",
    "relative", "memory", "offset", "already",

    Signed-off-by: Uwe Kleine-König
    Signed-off-by: Jiri Kosina

    Uwe Kleine-König
     

07 Oct, 2010

1 commit

  • Add missing #inclusions of to a whole bunch of files that should
    really include it. Note that this can replace #inclusions of .

    This is required for the patch to sort out irqflags handling function naming to
    compile on MIPS.

    The problem is that these files require access to things like setup_irq() -
    which isn't available by #including

    Signed-off-by: David Howells
    Acked-by: Ralf Baechle

    David Howells
     

05 Oct, 2010

1 commit


05 Aug, 2010

1 commit


27 Jul, 2010

1 commit

  • Several MIPS platforms don't set pci_controller::io_map_base for their
    PCI bridges. This results in a panic in pci_iomap(). (The panic is
    conditional on CONFIG_PCI_DOMAINS, but that is now enabled for all PCI
    MIPS systems.)

    Signed-off-by: Ben Hutchings
    Cc: linux-mips@linux-mips.org
    Cc: Martin Michlmayr
    Cc: Aurelien Jarno
    Cc: 584784@bugs.debian.org
    Patchwork: https://patchwork.linux-mips.org/patch/1377/
    Signed-off-by: Ralf Baechle

    Ben Hutchings
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

27 Feb, 2010

1 commit


13 Jan, 2010

1 commit


17 Dec, 2009

1 commit


14 Nov, 2009

1 commit

  • Since commit 22242681cff52bfb7cba5d2a37b91802be7a4e4c ("MIPS: Extend
    COMMAND_LINE_SIZE"), CL_SIZE is 4096 and local array variables with this
    size will cause an build failure with default CONFIG_FRAME_WARN settings.

    Although current users of such array variables are all early bootstrap
    code and not likely to cause real stack overflow (thread_info corruption),
    it is preferable to to declare these arrays static with __initdata.

    Signed-off-by: Atsushi Nemoto
    Signed-off-by: Ralf Baechle

    Atsushi Nemoto
     

02 Nov, 2009

5 commits