1. 22 Apr, 2012 12 commits
    • Mikael Pettersson's avatar
      m68k: Correct the Atari ALLOWINT definition · c6636005
      Mikael Pettersson authored
      Booting a 3.2, 3.3, or 3.4-rc4 kernel on an Atari using the
      `nfeth' ethernet device triggers a WARN_ONCE() in generic irq
      handling code on the first irq for that device:
      
      WARNING: at kernel/irq/handle.c:146 handle_irq_event_percpu+0x134/0x142()
      irq 3 handler nfeth_interrupt+0x0/0x194 enabled interrupts
      Modules linked in:
      Call Trace: [<000299b2>] warn_slowpath_common+0x48/0x6a
       [<000299c0>] warn_slowpath_common+0x56/0x6a
       [<00029a4c>] warn_slowpath_fmt+0x2a/0x32
       [<0005b34c>] handle_irq_event_percpu+0x134/0x142
       [<0005b34c>] handle_irq_event_percpu+0x134/0x142
       [<0000a584>] nfeth_interrupt+0x0/0x194
       [<001ba0a8>] schedule_preempt_disabled+0x0/0xc
       [<0005b37a>] handle_irq_event+0x20/0x2c
       [<0005add4>] generic_handle_irq+0x2c/0x3a
       [<00002ab6>] do_IRQ+0x20/0x32
       [<0000289e>] auto_irqhandler_fixup+0x4/0x6
       [<00003144>] cpu_idle+0x22/0x2e
       [<001b8a78>] printk+0x0/0x18
       [<0024d112>] start_kernel+0x37a/0x386
       [<0003021d>] __do_proc_dointvec+0xb1/0x366
       [<0003021d>] __do_proc_dointvec+0xb1/0x366
       [<0024c31e>] _sinittext+0x31e/0x9c0
      
      After invoking the irq's handler the kernel sees !irqs_disabled()
      and concludes that the handler erroneously enabled interrupts.
      
      However, debugging shows that !irqs_disabled() is true even before
      the handler is invoked, which indicates a problem in the platform
      code rather than the specific driver.
      
      The warning does not occur in 3.1 or older kernels.
      
      It turns out that the ALLOWINT definition for Atari is incorrect.
      
      The Atari definition of ALLOWINT is ~0x400, the stated purpose of
      that is to avoid taking HSYNC interrupts.  irqs_disabled() returns
      true if the 3-bit ipl & 4 is non-zero.  The nfeth interrupt runs at
      ipl 3 (it's autovector 3), but 3 & 4 is zero so irqs_disabled() is
      false, and the warning above is generated.
      
      When interrupts are explicitly disabled, ipl is set to 7.  When they
      are enabled, ipl is masked with ALLOWINT.  On Atari this will result
      in ipl = 3, which blocks interrupts at ipl 3 and below.  So how come
      nfeth interrupts at ipl 3 are received at all?  That's because ipl
      is reset to 2 by Atari-specific code in default_idle(), again with
      the stated purpose of blocking HSYNC interrupts.  This discrepancy
      means that ipl 3 can remain blocked for longer than intended.
      
      Both default_idle() and falcon_hblhandler() identify HSYNC with
      ipl 2, and the "Atari ST/.../F030 Hardware Register Listing" agrees,
      but ALLOWINT is defined as if HSYNC was ipl 3.
      
      [As an experiment I modified default_idle() to reset ipl to 3, and
      as expected that resulted in all nfeth interrupts being blocked.]
      
      The fix is simple: define ALLOWINT as ~0x500 instead.  This makes
      arch_local_irq_enable() consistent with default_idle(), and prevents
      the !irqs_disabled() problems for ipl 3 interrupts.
      
      Tested on Atari running in an Aranym VM.
      Signed-off-by: default avatarMikael Pettersson <mikpe@it.uu.se>
      Tested-by: Michael Schmitz <schmitzmic@googlemail.com> (on Falcon/CT60)
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      c6636005
    • Geert Uytterhoeven's avatar
      m68k/video: Create <asm/vga.h> · 5c3f9687
      Geert Uytterhoeven authored
      For now, it just contains the hack for cirrusfb on Amiga, which is moved
      out of <video/vga.h> with some slight modifications (use raw_*() instead of
      z_*(), which are defined on all m68k platforms).
      
      This makes it safe to include <video/vga.h> in all contexts. Before it
      could fail to compile with
      
      include/video/vga.h: In function ‘vga_mm_r’:
      include/video/vga.h:242: error: implicit declaration of function ‘z_readb’
      include/video/vga.h: In function ‘vga_mm_w’:
      include/video/vga.h:247: error: implicit declaration of function ‘z_writeb’
      include/video/vga.h: In function ‘vga_mm_w_fast’:
      include/video/vga.h:253: error: implicit declaration of function ‘z_writew’
      
      or
      
      include/video/vga.h:23:21: error: asm/vga.h: No such file or directory
      
      depending on the value of CONFIG_AMIGA.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: linux-fbdev@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      5c3f9687
    • Geert Uytterhoeven's avatar
      m68k: Make sure {read,write}s[bwl]() are always defined · f5db9c6a
      Geert Uytterhoeven authored
      drivers/usb/musb/musb_io.h provides default implementations for
      {read,write}s[bwl]() on most platforms, some of which will conflict soon
      with platform-specific counterparts on m68k.
      
      To avoid having to add more platform-specific checks to musb_io.h later,
      make sure {read,write}s[bwl]() are always defined on m68k, and disable the
      default implementations in musb_io.h on m68k, like is already done for
      several other architectures.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarFelipe Balbi <balbi@ti.com>
      f5db9c6a
    • Kautuk Consul's avatar
      m68k/mm: Port OOM changes to do_page_fault() · b637a6b1
      Kautuk Consul authored
      Commit d065bd81
      (mm: retry page fault when blocking on disk transfer) and
      commit 37b23e05
      (x86,mm: make pagefault killable)
      
      The above commits introduced changes into the x86 pagefault handler
      for making the page fault handler retryable as well as killable.
      
      These changes reduce the mmap_sem hold time, which is crucial
      during OOM killer invocation.
      
      Port these changes to m68k.
      Signed-off-by: default avatarKautuk Consul <consul.kautuk@gmail.com>
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      b637a6b1
    • Geert Uytterhoeven's avatar
      scsi/atari: Make more functions static · 107b5d53
      Geert Uytterhoeven authored
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Michael Schmitz <schmitzmic@googlemail.com>
      Cc: James E.J. Bottomley <JBottomley@parallels.com>
      Cc: linux-scsi@vger.kernel.org
      107b5d53
    • Geert Uytterhoeven's avatar
      scsi/atari: Revive "atascsi=" setup option · 7b54e43a
      Geert Uytterhoeven authored
      It was documented in Documentation/m68k/kernel-options.txt and
      Documentation/scsi/scsi-parameters.txt, but the implementation was
      missing.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Michael Schmitz <schmitzmic@googlemail.com>
      Cc: James E.J. Bottomley <JBottomley@parallels.com>
      Cc: linux-scsi@vger.kernel.org
      7b54e43a
    • Geert Uytterhoeven's avatar
      net/ariadne: Improve debug prints · 0eb8694b
      Geert Uytterhoeven authored
      Remove casts and use proper printf()-style format specifiers instead.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: netdev@vger.kernel.org
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      0eb8694b
    • Geert Uytterhoeven's avatar
      m68k/atari: Change VME irq numbers from unsigned long to unsigned int · 44883eb0
      Geert Uytterhoeven authored
      Device interrupts numbers were changed to unsigned int in 1997, the year
      IRQ_MACHSPEC was killed as well.
      
      Also kill a related cast while we're at it.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: netdev@vger.kernel.org
      44883eb0
    • Geert Uytterhoeven's avatar
      m68k/amiga: Use arch_initcall() for registering platform devices · e2b56288
      Geert Uytterhoeven authored
      module_init() maps to device_initcall(), opening the possibility of
      race conditions between platform_driver_probe() and registering platform
      devices.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      e2b56288
    • Geert Uytterhoeven's avatar
    • Geert Uytterhoeven's avatar
      m68k/amiga: Mark z_dev_present() __init · 943ce308
      Geert Uytterhoeven authored
      It's called from amiga_init_devices() only, which is __init.
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      943ce308
    • Geert Uytterhoeven's avatar
  2. 21 Apr, 2012 23 commits
  3. 20 Apr, 2012 5 commits
    • Linus Torvalds's avatar
      Merge tag 'for-torvalds-20120418' of... · 3b422e9c
      Linus Torvalds authored
      Merge tag 'for-torvalds-20120418' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
      
      Pull pinctrl fixes from Linus Walleij:
       - Fixed compilation errors and warnings
       - Stricter checks on the ops vtable
      
      * tag 'for-torvalds-20120418' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: implement pinctrl_check_ops
        pinctrl: include <linux/bug.h> to prevent compile errors
        pinctrl: fix compile error if not select PINMUX support
      3b422e9c
    • Linus Torvalds's avatar
      Merge tag 'tty-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty · 3a537430
      Linus Torvalds authored
      Pull 3 tiny tty bugfixes from Greg Kroah-Hartman.
      
      * tag 'tty-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
        drivers/tty/amiserial.c: add missing tty_unlock
        pch_uart: Fix dma channel unallocated issue
        ARM: clps711x: serial driver hungs are a result of call disable_irq within ISR
      3a537430
    • Linus Torvalds's avatar
      Merge tag 'usb-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 1cd653a6
      Linus Torvalds authored
      Pull USB fixes from Greg Kroah-Hartman:
       "Here are a number of tiny USB fixes for 3.4-rc4.
      
        Most of them are in the USB gadget area, but a few other minor USB
        driver and core fixes are here as well.
      
        Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
      
      * tag 'usb-3.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (36 commits)
        USB: serial: cp210x: Fixed usb_control_msg timeout values
        USB: ehci-tegra: don't call set_irq_flags(IRQF_VALID)
        USB: yurex: Fix missing URB_NO_TRANSFER_DMA_MAP flag in urb
        USB: yurex: Remove allocation of coherent buffer for setup-packet buffer
        drivers/usb/misc/usbtest.c: add kfrees
        USB: ehci-fsl: Fix kernel crash on mpc5121e
        uwb: fix error handling
        uwb: fix use of del_timer_sync() in interrupt
        EHCI: always clear the STS_FLR status bit
        EHCI: fix criterion for resuming the root hub
        USB: sierra: avoid QMI/wwan interface on MC77xx
        usb: usbtest: avoid integer overflow in alloc_sglist()
        usb: usbtest: avoid integer overflow in test_ctrl_queue()
        USB: fix deadlock in bConfigurationValue attribute method
        usb: gadget: eliminate NULL pointer dereference (bugfix)
        usb: gadget: uvc: Remove non-required locking from 'uvc_queue_next_buffer' routine
        usb: gadget: rndis: fix Missing req->context assignment
        usb: musb: omap: fix the error check for pm_runtime_get_sync
        usb: gadget: udc-core: fix asymmetric calls in remove_driver
        usb: musb: omap: fix crash when musb glue (omap) gets initialized
        ...
      1cd653a6
    • Linus Torvalds's avatar
      Merge tag 'stable/for-linus-3.4-rc3-tag' of... · c1acb0ba
      Linus Torvalds authored
      Merge tag 'stable/for-linus-3.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
      
      Pull xen fixes from Konrad Rzeszutek Wilk:
       - mechanism to work with misconfigured backends (where they are
         advertised but in reality don't exist).
       - two tiny compile warning fixes.
       - proper error handling in gnttab_resume
       - Not using VM_PFNMAP anymore to allow backends in the same domain.
      
      * tag 'stable/for-linus-3.4-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen:
        Revert "xen/p2m: m2p_find_override: use list_for_each_entry_safe"
        xen/resume: Fix compile warnings.
        xen/xenbus: Add quirk to deal with misconfigured backends.
        xen/blkback: Fix warning error.
        xen/p2m: m2p_find_override: use list_for_each_entry_safe
        xen/gntdev: do not set VM_PFNMAP
        xen/grant-table: add error-handling code on failure of gnttab_resume
      c1acb0ba
    • Linus Torvalds's avatar
      Revert "ACPI: ignore FADT reset-reg-sup flag" · 19244ad0
      Linus Torvalds authored
      This reverts commit cf450136.
      
      It breaks reboot on at least one Thinkpad T43, as reported by Jörg Otte:
       "On reboot it shuts down as normal.
        The last lines displayed are:
      
        >Unmounting temporary filesystems.. [OK]
        >Deactivating swap...               [OK]
        >Unmounting local filesystems...    [OK]
        >Will now restart
        >    Restarting system
      
        Then I hear it accessing the cd-drive, but then it's being stuck."
      
      Jörg bisected the regression to this commit.
      
      That commit fixes another machine (see
      
        https://bugzilla.kernel.org/show_bug.cgi?id=11533
      
      for details) that has a BIOS bug and doesn't support ACPI reset.
      However, at least one of those other reporters no longer even has the
      machine in question, and had a different workaround to begin with.
      Besides, it clearly was a buggy BIOS.  Let's not break the correct case
      to fix that case.
      Reported-and-bisected-by: default avatarJörg Otte <jrg.otte@googlemail.com>
      Cc: linux-acpi@vger.kernel.org
      Cc: Len Brown <lenb@kernel.org>
      Cc: Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      19244ad0