1. 16 3月, 2011 3 次提交
  2. 15 3月, 2011 37 次提交
    • M
      x86: stop_machine_text_poke() should issue sync_core() · 0e00f7ae
      Mathieu Desnoyers 提交于
      Intel Archiecture Software Developer's Manual section 7.1.3 specifies that a
      core serializing instruction such as "cpuid" should be executed on _each_ core
      before the new instruction is made visible.
      
      Failure to do so can lead to unspecified behavior (Intel XMC erratas include
      General Protection Fault in the list), so we should avoid this at all cost.
      
      This problem can affect modified code executed by interrupt handlers after
      interrupt are re-enabled at the end of stop_machine, because no core serializing
      instruction is executed between the code modification and the moment interrupts
      are reenabled.
      
      Because stop_machine_text_poke performs the text modification from the first CPU
      decrementing stop_machine_first, modified code executed in thread context is
      also affected by this problem. To explain why, we have to split the CPUs in two
      categories: the CPU that initiates the text modification (calls text_poke_smp)
      and all the others. The scheduler, executed on all other CPUs after
      stop_machine, issues an "iret" core serializing instruction, and therefore
      handles core serialization for all these CPUs. However, the text modification
      initiator can continue its execution on the same thread and access the modified
      text without any scheduler call. Given that the CPU that initiates the code
      modification is not guaranteed to be the one actually performing the code
      modification, it falls into the XMC errata.
      
      Q: Isn't this executed from an IPI handler, which will return with IRET (a
         serializing instruction) anyway?
      A: No, now stop_machine uses per-cpu workqueue, so that handler will be
         executed from worker threads. There is no iret anymore.
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      LKML-Reference: <20110303160137.GB1590@Krystal>
      Reviewed-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: <stable@kernel.org>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Signed-off-by: NH. Peter Anvin <hpa@linux.intel.com>
      0e00f7ae
    • G
      m68knommu: external interrupt support to ColdFire intc-simr controller · 47e0c7e1
      Greg Ungerer 提交于
      The EDGE Port module of some ColdFire parts using the intc-simr interrupt
      controller provides support for 7 external interrupts. These interrupts
      go off-chip (that is they are not for internal peripherals). They need
      some special handling and have some extra setup registers. Add code to
      support them.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      47e0c7e1
    • G
      m68knommu: external interrupt support to ColdFire intc-2 controller · 57b48143
      Greg Ungerer 提交于
      The EDGE Port module of some ColdFire parts using the intc-2 interrupt
      controller provides support for 7 external interrupts. These interrupts
      go off-chip (that is they are not for internal peripherals). They need
      some special handling and have some extra setup registers. Add code to
      support them.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      57b48143
    • G
      m68knommu: remove ColdFire CLOCK_DIV config option · ce3de78a
      Greg Ungerer 提交于
      The reality is that you do not need the abiltity to configure the
      clock divider for ColdFire CPUs. It is a fixed ratio on any given
      ColdFire family member. It is not the same for all ColdFire parts,
      but it is always the same in a model range. So hard define the divider
      for each supported ColdFire CPU type and remove the Kconfig option.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      ce3de78a
    • G
      m68knommu: fix gpio warnings for ColdFire 5407 targets · 442ca465
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      arch/m68knommu/platform/5407/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5407/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5407/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      442ca465
    • G
      m68knommu: fix gpio warnings for ColdFire 532x targets · 5d44b096
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      arch/m68knommu/platform/532x/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/532x/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/532x/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/532x/gpio.c:51:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/532x/gpio.c:52:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/532x/gpio.c:53:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/532x/gpio.c:54:3: warning: initialisation makes pointer from integer without a cast
      ...
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      5d44b096
    • G
      m68knommu: fix gpio warnings for ColdFire 5307 targets · 2af36dc4
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      arch/m68knommu/platform/5307/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5307/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5307/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      2af36dc4
    • G
      m68knommu: fix gpio warnings for ColdFire 527x targets · d5dca1e0
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      arch/m68knommu/platform/527x/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/527x/gpio.c:38:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/527x/gpio.c:39:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/527x/gpio.c:53:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/527x/gpio.c:54:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/527x/gpio.c:55:3: warning: initialisation makes pointer from integer without a cast
      ...
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      d5dca1e0
    • G
      m68knommu: fix gpio warnings for ColdFire 5272 targets · 4d1f692f
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      arch/m68knommu/platform/5272/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5272/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5272/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5272/gpio.c:51:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5272/gpio.c:52:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5272/gpio.c:53:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5272/gpio.c:67:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5272/gpio.c:68:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5272/gpio.c:69:3: warning: initialisation makes pointer from integer without a cast
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      4d1f692f
    • G
      m68knommu: fix gpio warnings for ColdFire 5249 targets · 2470758a
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      arch/m68knommu/platform/5249/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5249/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5249/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5249/gpio.c:51:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5249/gpio.c:52:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5249/gpio.c:53:3: warning: initialisation makes pointer from integer without a cast
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      2470758a
    • G
      m68knommu: fix gpio warnings for ColdFire 523x targets · 2836827d
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      arch/m68knommu/platform/523x/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/523x/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/523x/gpio.c:38:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/523x/gpio.c:52:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/523x/gpio.c:53:3: warning: initialisation makes pointer from integer without a cast
      ...
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      2836827d
    • G
      m68knommu: fix gpio warnings for ColdFire 520x targets · 9516de49
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      rch/m68knommu/platform/520x/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/520x/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/520x/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/520x/gpio.c:51:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/520x/gpio.c:52:3: warning: initialisation makes pointer from integer without a cast
      ...
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      9516de49
    • G
      m68knommu: fix gpio warnings for ColdFire 5206e targets · d5365ca5
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      arch/m68knommu/platform/5206e/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast  CC      kernel/panic.o
      arch/m68knommu/platform/5206e/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5206e/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      d5365ca5
    • G
      m68knommu: fix gpio warnings for ColdFire 5206 targets · 0bb724af
      Greg Ungerer 提交于
      Fix these compiler warnings:
      
      arch/m68knommu/platform/5206/gpio.c:35:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5206/gpio.c:36:3: warning: initialisation makes pointer from integer without a cast
      arch/m68knommu/platform/5206/gpio.c:37:3: warning: initialisation makes pointer from integer without a cast
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      0bb724af
    • A
      m68knommu: fixing compiler warnings · 62b323e2
      Alexander Kurz 提交于
      Signed-off-by: NAlexander Kurz <linux@kbdbabel.org>
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      62b323e2
    • G
      m68knommu: limit interrupts supported by ColdFire intc-simr driver · 745c061f
      Greg Ungerer 提交于
      The intc-simr interrupt controller on some ColdFire CPUs has a set range of
      interrupts its supports (64 through 128 or 192 depending on model). We
      shouldn't be setting this handler for every possible interrupt from 0 to
      255. Set more appropriate limits, and this means we can drop the interrupt
      number check in the mask and unmask routines.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      745c061f
    • G
      m68knommu: move some init code out of unmask routine for ColdFire intc-2 · 6d0f33fa
      Greg Ungerer 提交于
      Use a proper irq_startup() routine to intialize the interrupt priority
      and level register in the ColdFire intc-2 controller code. We shouldn't
      be checking if the priority/level has been set on every unmask operation.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      6d0f33fa
    • G
      m68knommu: limit interrupts supported by ColdFire intc-2 driver · 49bc6dea
      Greg Ungerer 提交于
      The intc-2 interrupt controller on some ColdFire CPUs has a set range of
      interrupts its supports (64 through 128 or 192 depending on model). We
      shouldn't be setting this handler for every possible interrupt from 0 to
      255. Set more appropriate limits, and this means we can drop the interrupt
      number check in the mask and unmask routines.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      49bc6dea
    • G
      m68knommu: add basic support for the ColdFire based FireBee board · 7badfabb
      Greg Ungerer 提交于
      The FireBee is a ColdFire 5475 based board. Add a configuration option
      to support it, and the basic platform flash layout code.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      7badfabb
    • G
      m68knommu: make ColdFire internal peripheral region configurable · d4852a34
      Greg Ungerer 提交于
      Most ColdFire CPUs have an internal peripheral set that can be mapped at
      a user selectable address. Different ColdFire parts either use an MBAR
      register of an IPSBAR register to map the peripheral region. Most boards
      use the Freescale default mappings - but not all.
      
      Make the setting of the MBAR or IPSBAR register configurable. And only make
      the selection available on the appropriate ColdFire CPU types.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      d4852a34
    • G
      m68knommu: clean up definitions of ColdFire peripheral base registers · b195c479
      Greg Ungerer 提交于
      Different ColdFire CPUs have different ways of defining where their
      internal peripheral registers sit in their address space. Some use an
      MBAR register, some use and IPSBAR register, some have a fixed mapping.
      
      Now that most of the peripheral address definitions have been cleaned up
      we can clean up the setting of the MBAR and IPSBAR defines to limit them
      to just where they are needed (and where they actually exist).
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      b195c479
    • G
      m68knommu: clean up use of MBAR for DRAM registers on ColdFire start · 6a92e198
      Greg Ungerer 提交于
      In some of the RAM size autodetection code on ColdFire CPU startup
      we reference DRAM registers relative to the MBAR register. Not all of
      the supported ColdFire CPUs have an MBAR, and currently this works
      because we fake an MBAR address on those registers. In an effort to
      clean this up, and eventually remove the fake MBAR setting make the
      DRAM register address definitions actually contain the MBAR (or IPSBAR
      as appropriate) value as required.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      6a92e198
    • G
      m68knommu: remove use of MBAR in old-style ColdFire timer · 58f0ac98
      Greg Ungerer 提交于
      Not all ColdFire CPUs that use the old style timer hardware module use
      an MBAR set peripheral region. Move the TIMER base address defines to the
      per-CPU header files where we can set it correctly based on how the
      peripherals are mapped - instead of using a fake MBAR for some platforms.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      58f0ac98
    • G
      m68knommu: move ColdFire DMA register addresses to per-cpu headers · babc08b7
      Greg Ungerer 提交于
      The base addresses of the ColdFire DMA unit registers belong with
      all the other address definitions in the per-cpu headers. The current
      definitions assume they are relative to an MBAR register. Not all
      ColdFire CPUs have an MBAR register. A clean address define can only
      be acheived in the per-cpu headers along with all the other chips
      peripheral base addresses.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      babc08b7
    • G
      m68knommu: remove use of MBAR value for ColdFire 528x peripheral addressing · a0ba4332
      Greg Ungerer 提交于
      The ColdFire 528x family of CPUs does not have an MBAR register, so don't
      define its peripheral addresses relative to one. Its internal peripherals
      are relative to the IPSBAR register, so make sure to use that.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      a0ba4332
    • G
      m68knommu: remove use of MBAR value for ColdFire 527x peripheral addressing · 9a6b0c73
      Greg Ungerer 提交于
      The ColdFire 527x family of CPUs does not have an MBAR register, so don't
      define its peripheral addresses relative to one. Its internal peripherals
      are relative to the IPSBAR register, so make sure to use that.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      9a6b0c73
    • G
      m68knommu: remove use of MBAR value for ColdFire 523x peripheral addressing · b62384af
      Greg Ungerer 提交于
      The ColdFire 523x family of CPUs does not have an MBAR register, so don't
      define its peripheral addresses relative to one. Its internal peripherals
      are relative to the IPSBAR register, so make sure to use that.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      b62384af
    • G
      m68knommu: remove MBAR and IPSBAR hacks for the ColdFire 520x CPUs · 571f0608
      Greg Ungerer 提交于
      The ColdFire 5207 and 5208 CPUs have fixed peripheral addresses.
      They do not use the setable peripheral address registers like the MBAR
      and IPSBAR used on many other ColdFire parts. Don't use fake values
      of MBAR and IPSBAR when using peripheral addresses for them, there
      is no need to.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      571f0608
    • G
      m68knommu: move ColdFire PIT timer base addresses · f317c71a
      Greg Ungerer 提交于
      The PIT hardware timer module used in some ColdFire CPU's is not always
      addressed relative to an IPSBAR register. Parts like the ColdFire 5207 and
      5208 have fixed peripheral addresses. So lets not define the register
      addresses of the PIT relative to an IPSBAR definition. Move the base
      address definitions into the per-part headers. This is a lot more consistent
      since all the other peripheral base addresses are defined in the per-part
      header files already.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      f317c71a
    • G
      m68knommu: remove bogus definition of MBAR for ColdFire 532x family · cdfc243e
      Greg Ungerer 提交于
      Remove the bogus definition of the MBAR register for the ColdFire 532x
      family. It doesn't have an MBAR register, its peripheral registers are
      at fixed addresses and are not relative to a settable base.
      
      All the code that relyed on this definition existing has been cleaned
      up. The register address definitions now include the base as required.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      cdfc243e
    • G
      m68knommu: remove kludge seting of MCF_IPSBAR for ColdFire 54xx · 254eef74
      Greg Ungerer 提交于
      The ColdFire 54xx family shares the same interrupt controller used
      on the 523x, 527x and 528x ColdFire parts, but it isn't offset
      relative to the IPSBAR register. The 54xx doesn't have an IPSBAR
      register.
      
      By including the base address of the peripheral registers in the register
      definitions (MCFICM_INTC0 and MCFICM_INTC1 in this case) we can avoid
      having to define a fake IPSBAR for the 54xx. And this makes the register
      address definitions of these more consistent, the majority of the other
      register address defines include the peripheral base address already.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      254eef74
    • G
      m68knommu: move ColdFire 5249 MBAR2 definition · f2ba710d
      Greg Ungerer 提交于
      The MBAR2 register is only used on the ColdFire 5249 part, so move its
      definition out of the common coldfire.h and into the 5249 support header.
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      f2ba710d
    • T
      m68knommu: Select GENERIC_HARDIRQS_NO_DEPRECATED · d3ff2c22
      Thomas Gleixner 提交于
      All chips converted and proper accessor functions used.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      d3ff2c22
    • T
      m68knommu: Use proper irq_desc accessors in · 5a7d2980
      Thomas Gleixner 提交于
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      5a7d2980
    • T
      m68knommu: Convert 5249 intc irq_chip to new functions · e474563e
      Thomas Gleixner 提交于
      /me idly wonders what sets the handlers for this chip.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Ungerer <gerg@uclinux.org>
      e474563e
    • T
      2730158a
    • T
      be497ddf