1. 23 4月, 2012 5 次提交
    • M
      m68k: Correct the Atari ALLOWINT definition · c6636005
      Mikael Pettersson 提交于
      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: NMikael Pettersson <mikpe@it.uu.se>
      Tested-by: Michael Schmitz <schmitzmic@googlemail.com> (on Falcon/CT60)
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      c6636005
    • G
      m68k/video: Create <asm/vga.h> · 5c3f9687
      Geert Uytterhoeven 提交于
      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: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: linux-fbdev@vger.kernel.org
      Cc: dri-devel@lists.freedesktop.org
      5c3f9687
    • G
      m68k: Make sure {read,write}s[bwl]() are always defined · f5db9c6a
      Geert Uytterhoeven 提交于
      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: NGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: NFelipe Balbi <balbi@ti.com>
      f5db9c6a
    • G
      m68k/atari: Change VME irq numbers from unsigned long to unsigned int · 44883eb0
      Geert Uytterhoeven 提交于
      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: NGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: netdev@vger.kernel.org
      44883eb0
    • G
      2712a643
  2. 02 4月, 2012 1 次提交
    • G
      m68k: include asm/cmpxchg.h in our m68k atomic.h · 7224c0d1
      Greg Ungerer 提交于
      After commit 9ffc93f2 ("Remove all
      
        CC      init/main.o
      In file included from include/linux/mm.h:15:0,
                       from include/linux/ring_buffer.h:5,
                       from include/linux/ftrace_event.h:4,
                       from include/trace/syscall.h:6,
                       from include/linux/syscalls.h:78,
                       from init/main.c:16:
      include/linux/debug_locks.h: In function ‘__debug_locks_off’:
      include/linux/debug_locks.h:16:2: error: implicit declaration of function ‘xchg’
      
      There is no indirect inclusions of the new asm/cmpxchg.h for m68k here.
      Looking at most other architectures they include asm/cmpxchg.h in their
      asm/atomic.h. M68k currently does not do this. Including this in atomic.h
      fixes all m68k build problems.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      Acked-by: NDavid Howells <dhowells@redhat.com>
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      7224c0d1
  3. 29 3月, 2012 3 次提交
  4. 05 3月, 2012 30 次提交
    • G
      m68knommu: make 528x CPU reset register addressing consistent · 645e5333
      Greg Ungerer 提交于
      If we make all MCF_RCR (CPU reset register) addressing consistent across all
      ColdFire CPU family members that use it then we will be able to remove the
      duplicated copies of the code that use it.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      645e5333
    • G
      m68knommu: make 527x CPU reset register addressing consistent · 0b2a2139
      Greg Ungerer 提交于
      If we make all MCF_RCR (CPU reset register) addressing consistent across all
      ColdFire CPU family members that use it then we will be able to remove the
      duplicated copies of the code that use it.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      0b2a2139
    • G
      m68knommu: make 523x CPU reset register addressing consistent · 320de7d0
      Greg Ungerer 提交于
      If we make all MCF_RCR (CPU reset register) addressing consistent across all
      ColdFire CPU family members that use it then we will be able to remove the
      duplicated copies of the code that use it.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      320de7d0
    • G
      m68knommu: make 532x QSPI platform addressing consistent · ed8a2798
      Greg Ungerer 提交于
      If we make all QSPI (SPI protocol) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and code and use a single setup for all.
      
      So modify the ColdFire 532x QSPI addressing so that:
      
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      . move chip select definitions (CS) to appropriate header
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      ed8a2798
    • G
      m68knommu: make 528x QSPI platform addressing consistent · 3b2039b2
      Greg Ungerer 提交于
      If we make all QSPI (SPI protocol) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and code and use a single setup for all.
      
      So modify the ColdFire 528x QSPI addressing so that:
      
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      . move chip select definitions (CS) to appropriate header
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      3b2039b2
    • G
      m68knommu: make 527x QSPI platform addressing consistent · 6c84a60e
      Greg Ungerer 提交于
      If we make all QSPI (SPI protocol) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and code and use a single setup for all.
      
      So modify the ColdFire 527x QSPI addressing so that:
      
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      . move chip select definitions (CS) to appropriate header
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      6c84a60e
    • G
      m68knommu: make 5249 QSPI platform addressing consistent · 2424f549
      Greg Ungerer 提交于
      If we make all QSPI (SPI protocol) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and code and use a single setup for all.
      
      So modify the ColdFire 5249 QSPI addressing so that:
      
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      . move chip select definitions (CS) to appropriate header
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      2424f549
    • G
      m68knommu: make 523x QSPI platform addressing consistent · 36d175a4
      Greg Ungerer 提交于
      If we make all QSPI (SPI protocol) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and code and use a single setup for all.
      
      So modify the ColdFire 523x QSPI addressing so that:
      
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      . move chip select definitions (CS) to appropriate header
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      36d175a4
    • G
      m68knommu: make 520x QSPI platform addressing consistent · a4e2e2ac
      Greg Ungerer 提交于
      If we make all QSPI (SPI protocol) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and code and use a single setup for all.
      
      So modify the ColdFire 520x QSPI addressing so that:
      
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      . move chip select definitions (CS) to appropriate header
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      a4e2e2ac
    • G
      m68knommu: make 532x FEC platform addressing consistent · 50469547
      Greg Ungerer 提交于
      If we make all FEC (ethernet) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and use a single setup for all.
      
      So modify the ColdFire 532x FEC addressing so that:
      
      . FECs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      50469547
    • G
      m68knommu: make 528x FEC platform addressing consistent · 4f8f9fb8
      Greg Ungerer 提交于
      If we make all FEC (ethernet) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and use a single setup for all.
      
      So modify the ColdFire 528x FEC addressing so that:
      
      . FECs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      4f8f9fb8
    • G
      m68knommu: make 527x FEC platform addressing consistent · 308bfc12
      Greg Ungerer 提交于
      If we make all FEC (ethernet) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and use a single setup for all.
      
      So modify the ColdFire 527x FEC addressing so that:
      
      . FECs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      308bfc12
    • G
      m68knommu: make 5272 FEC platform addressing consistent · 9a11b493
      Greg Ungerer 提交于
      If we make all FEC (ethernet) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and use a single setup for all.
      
      So modify the ColdFire 5272 FEC addressing so that:
      
      . FECs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      9a11b493
    • G
      m68knommu: make 523x FEC platform addressing consistent · 21634593
      Greg Ungerer 提交于
      If we make all FEC (ethernet) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and use a single setup for all.
      
      So modify the ColdFire 523x FEC addressing so that:
      
      . FECs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      21634593
    • G
      m68knommu: make 520x FEC platform addressing consistent · d4e08372
      Greg Ungerer 提交于
      If we make all FEC (ethernet) addressing consistent across all ColdFire
      family members then we will be able to remove the duplicated plaform data
      and use a single setup for all.
      
      So modify the ColdFire 520x FEC addressing so that:
      
      . FECs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      d4e08372
    • G
      m68knommu: merge common ColdFire UART IRQ setup · 55148f6f
      Greg Ungerer 提交于
      Some ColdFire CPU UART hardware modules can configure the IRQ they use.
      Currently the same setup code is duplicated in the init code for each of
      these ColdFire CPUs. Merge all this code to a single instance.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      55148f6f
    • G
      m68knommu: make 54xx UART platform addressing consistent · bbbeeaf2
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 54xx UART addressing so that:
      
      . UARTs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      bbbeeaf2
    • G
      m68knommu: make 5407 UART platform addressing consistent · 69d23b61
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 5407 UART addressing so that:
      
      . UARTs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      69d23b61
    • G
      m68knommu: make 532x UART platform addressing consistent · 35b7cf22
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 532x UART addressing so that:
      
      . UARTs are numbered from 0 up
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      35b7cf22
    • G
      m68knommu: make 528x UART platform addressing consistent · f8bb5327
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 528x UART addressing so that:
      
      . UARTs are numbered from 0 up
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      f8bb5327
    • G
      m68knommu: make 5307 UART platform addressing consistent · 909159fe
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 5307 UART addressing so that:
      
      . UARTs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      909159fe
    • G
      m68knommu: make 527x UART platform addressing consistent · 20e681fd
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 527x UART addressing so that:
      
      . UARTs are numbered from 0 up
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      20e681fd
    • G
      m68knommu: make 5272 UART platform addressing consistent · 023e0555
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 5272 UART addressing so that:
      
      . UARTs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      023e0555
    • G
      m68knommu: make 5249 UART platform addressing consistent · e8f69e54
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 5249 UART addressing so that:
      
      . UARTs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      e8f69e54
    • G
      m68knommu: make 523x UART platform addressing consistent · 13682af3
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 523x UART addressing so that:
      
      . UARTs are numbered from 0 up
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      13682af3
    • G
      m68knommu: make 520x UART platform addressing consistent · ffc203bc
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 520x UART addressing so that:
      
      . UARTs are numbered from 0 up
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      ffc203bc
    • G
      m68knommu: make 5206 UART platform addressing consistent · 8400ca32
      Greg Ungerer 提交于
      If we make all UART addressing consistent across all ColdFire family members
      then we will be able to remove the duplicated plaform data and use a single
      setup for all.
      
      So modify the ColdFire 5206 UART addressing so that:
      
      . UARTs are numbered from 0 up
      . base addresses are absolute (not relative to MBAR peripheral register)
      . use a common name for IRQs used
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      8400ca32
    • G
      m68knommu: modify timer init code to make it consistent with m68k code · 35aefb26
      Greg Ungerer 提交于
      With a few small changes we can make the m68knommu timer init code the
      same as the m68k code. By using the mach_sched_init function pointer
      and reworking the current timer initializers to keep track of the common
      m68k timer_interrupt() handler we end up with almost identical code for
      m68knommu.
      
      This will allow us to more easily merge the mmu and non-mmu m68k time.c
      in future patches.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      35aefb26
    • G
      m68knommu: make persistent clock code consistent with m68k · 95177461
      Greg Ungerer 提交于
      The read_persistent_clock() code is different on m68knommu, for really no
      reason. With a few changes to support function names and some code
      re-organization the code can be made the same.
      
      This will make it easier to merge the arch/m68k/kernel/time.c for m68k and
      m68knommu in a future patch.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      95177461
    • P
      BUG: headers with BUG/BUG_ON etc. need linux/bug.h · 187f1882
      Paul Gortmaker 提交于
      If a header file is making use of BUG, BUG_ON, BUILD_BUG_ON, or any
      other BUG variant in a static inline (i.e. not in a #define) then
      that header really should be including <linux/bug.h> and not just
      expecting it to be implicitly present.
      
      We can make this change risk-free, since if the files using these
      headers didn't have exposure to linux/bug.h already, they would have
      been causing compile failures/warnings.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      187f1882
  5. 24 2月, 2012 1 次提交