1. 16 3月, 2012 1 次提交
    • L
      powerpc/srio: Fix the relocation errors when building with 64bit · b6c46dcf
      Liu Gang 提交于
      For the file "arch/powerpc/sysdev/fsl_rio.c", there will be some relocation
      errors while using the corenet64_smp_defconfig:
      
      WARNING: modpost: Found 6 section mismatch(es).
      To see full details build your kernel with:
      'make CONFIG_DEBUG_SECTION_MISMATCH=y'
        GEN     .version
        CHK     include/generated/compile.h
        UPD     include/generated/compile.h
        CC      init/version.o
        LD      init/built-in.o
        LD      .tmp_vmlinux1
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x0):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.text'+3208
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x2):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.fixup'
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x4):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.text'+3230
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x6):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.fixup'+c
      arch/powerpc/sysdev/built-in.o:(__ex_table+0x8):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.text'+3250
      arch/powerpc/sysdev/built-in.o:(__ex_table+0xa):
      	relocation truncated to fit: R_PPC64_ADDR16 against `.fixup'+18
      
      Rewrote the corresponding code with the support of 64bit building.
      Signed-off-by: NLiu Gang <Gang.Liu@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      b6c46dcf
  2. 27 2月, 2012 1 次提交
  3. 23 2月, 2012 5 次提交
    • K
      powerpc/mpic: Remove duplicate MPIC_WANTS_RESET flag · e55d7f73
      Kyle Moffett 提交于
      There are two separate flags controlling whether or not the MPIC is
      reset during initialization, which is completely unnecessary, and only
      one of them can be specified in the device tree.
      
      Also, most platforms in-tree right now do actually want to reset the
      MPIC during initialization anyways, which means lots of duplicate code
      passing the MPIC_WANTS_RESET flag.
      
      Fix all of the callers which currently do not pass the MPIC_WANTS_RESET
      flag to pass the MPIC_NO_RESET flag, then remove the MPIC_WANTS_RESET
      flag and make the code reset the MPIC by default.
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      e55d7f73
    • K
      powerpc/mpic: Add "last-interrupt-source" property to override hardware · c1b8d45d
      Kyle Moffett 提交于
      The FreeScale PowerQUICC-III-compatible (mpc85xx/mpc86xx) MPICs do not
      correctly report the number of hardware interrupt sources, so software
      needs to override the detected value with "256".
      
      To avoid needing to write custom board-specific code to detect that
      scenario, allow it to be easily overridden in the device-tree.
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      c1b8d45d
    • K
      powerpc/mpic: Remove MPIC_BROKEN_FRR_NIRQS and duplicate irq_count · 5019609f
      Kyle Moffett 提交于
      The mpic->irq_count variable is only used as a software error-checking
      limit to determine whether or not an IRQ number is valid.  In board code
      which does not manually specify an IRQ count to mpic_alloc(), i.e. 0, it
      is automatically detected from the number of ISUs and the ISU size.
      
      In practice, all hardware ends up with irq_count == num_sources, so all
      of the runtime checks on mpic->irq_count should just check the value of
      mpic->num_sources instead.
      
      When platform hardware does not correctly report the number of IRQs,
      which only happens on the MPC85xx/MPC86xx, the MPIC_BROKEN_FRR_NIRQS
      flag is used to override the detected value of num_sources with the
      manual irq_count parameter.  Since there's no need to manually specify
      the number of IRQs except in this case, the extra flag can be eliminated
      and the test changed to "irq_count != 0".
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      5019609f
    • K
      fsl/mpic: Create and document the "single-cpu-affinity" device-tree flag · 9ca163c8
      Kyle Moffett 提交于
      The Freescale MPIC (and perhaps others in the future) is incapable of
      routing non-IPI interrupts to more than once CPU at a time.  Currently
      all of the Freescale boards msut pass the MPIC_SINGLE_DEST_CPU flag to
      mpic_alloc(), but that information should really be present in the
      device-tree.
      
      Older board code can't rely on the device-tree having the property set,
      but newer platforms won't need it manually specified in the code.
      
      [BenH: Remove unrelated changes, folded in a different patch]
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      9ca163c8
    • K
      powerpc/mpic: Fix use of "flags" variable in mpic_alloc() · 3a7a7176
      Kyle Moffett 提交于
      The mpic_alloc() function takes a "flags" parameter and assigns it into
      the mpic->flags variable fairly early on, but several later pieces of
      code detect various device-tree properties and save them into the
      "mpic->flags" variable (EG: "big-endian" => MPIC_BIG_ENDIAN).
      
      Unfortunately, a number of codepaths (including several which test the
      flag MPIC_BIG_ENDIAN!) test "flags" instead of "mpic->flags", and get
      wrong answers as a result.
      
      Consolidate the device-tree flag tests early in mpic_alloc() and change
      all of the checks after "mpic->flags" is init'ed to use "mpic->flags".
      
      [BenH: Fixed up use of mpic->node before it's initialized]
      Signed-off-by: NKyle Moffett <Kyle.D.Moffett@boeing.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      3a7a7176
  4. 16 2月, 2012 1 次提交
  5. 18 1月, 2012 1 次提交
  6. 05 1月, 2012 4 次提交
    • T
      powerpc/fsl: add MSI support for the Freescale hypervisor · 446bc1ff
      Timur Tabi 提交于
      Add support for vmpic-msi nodes to the fsl_msi driver.  The MSI is
      virtualized by the hypervisor, so the vmpic-msi does not contain a 'reg'
      property.  Instead, the driver uses hcalls.
      
      Add support for the "msi-address-64" property to the fsl_pci driver.
      The Freescale hypervisor typically puts the virtualized MSIIR register
      in the page after the end of DDR, so we extend the DDR ATMU to cover it.
      Any other location for MSIIR is not supported, for now.
      Signed-off-by: NTimur Tabi <timur@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      446bc1ff
    • J
      arch/powerpc/sysdev/fsl_rmu.c: introduce missing kfree · c6ca52ad
      Julia Lawall 提交于
      rmu needs to be freed before leaving the function in an error case.
      
      A simplified version of the semantic match that finds the problem is as
      follows: (http://coccinelle.lip6.fr)
      
      // <smpl>
      @r exists@
      local idexpression x;
      statement S;
      identifier f1;
      position p1,p2;
      expression *ptr != NULL;
      @@
      
      x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...);
      ...
      if (x == NULL) S
      <... when != x
           when != if (...) { <+...x...+> }
      x->f1
      ...>
      (
       return \(0\|<+...x...+>\|ptr\);
      |
       return@p2 ...;
      )
      
      @script:python@
      p1 << r.p1;
      p2 << r.p2;
      @@
      
      print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line)
      // </smpl>
      Signed-off-by: NJulia Lawall <julia@diku.dk>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      c6ca52ad
    • P
      powerpc/fsl: Add support for Integrated Flash Controller · a20cbdef
      Prabhakar Kushwaha 提交于
      Integrated Flash Controller supports various flashes like NOR, NAND
      and other devices using NOR, NAND and GPCM Machine available on it.
      IFC supports four chip selects.
      Signed-off-by: NDipen Dudhat <Dipen.Dudhat@freescale.com>
      Signed-off-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NLi Yang <leoli@freescale.com>
      Signed-off-by: NLiu Shuo <b35362@freescale.com>
      Signed-off-by: NPrabhakar Kushwaha <prabhakar@freescale.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      a20cbdef
    • K
      powerpc/fsl-pci: Allow 64-bit PCIe devices to DMA to any memory address · 96ea3b4a
      Kumar Gala 提交于
      There is an issue on FSL-BookE 64-bit devices (P5020) in which PCIe
      devices that are capable of doing 64-bit DMAs (like an Intel e1000) do
      not function and crash the kernel if we have >4G of memory in the system.
      
      The reason is that the existing code only sets up one inbound window for
      access to system memory across PCIe.  That window is limited to a 32-bit
      address space.  So on systems we'll end up utilizing SWIOTLB for dma
      mappings.  However SWIOTLB dma ops implement dma_alloc_coherent() as
      dma_direct_alloc_coherent().  Thus we can end up with dma addresses that
      are not accessible because of the inbound window limitation.
      
      We could possibly set the SWIOTLB alloc_coherent op to
      swiotlb_alloc_coherent() however that does not address the issue since
      the swiotlb_alloc_coherent() will behave almost identical to
      dma_direct_alloc_coherent() since the devices coherent_dma_mask will be
      greater than any address allocated by swiotlb_alloc_coherent() and thus
      we'll never bounce buffer it into a range that would be dma-able.
      
      The easiest and best solution is to just make it so that a 64-bit
      capable device is able to DMA to any internal system address.
      
      We accomplish this by opening up a second inbound window that maps all
      of memory above the internal SoC address width so we can set it up to
      access all of the internal SoC address space if needed.
      
      We than fixup the dma_ops and dma_offset for PCIe devices with a dma
      mask greater than the maximum internal SoC address.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      96ea3b4a
  7. 04 1月, 2012 1 次提交
  8. 22 12月, 2011 3 次提交
    • K
      driver-core: remove sysdev.h usage. · edbaa603
      Kay Sievers 提交于
      The sysdev.h file should not be needed by any in-kernel code, so remove
      the .h file from these random files that seem to still want to include
      it.
      
      The sysdev code will be going away soon, so this include needs to be
      removed no matter what.
      
      Cc: Jiandong Zheng <jdzheng@broadcom.com>
      Cc: Scott Branden <sbranden@broadcom.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Cc: Kukjin Kim <kgene.kim@samsung.com>
      Cc: David Brown <davidb@codeaurora.org>
      Cc: Daniel Walker <dwalker@fifo99.com>
      Cc: Bryan Huntsman <bryanh@codeaurora.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Cc: Wan ZongShun <mcuos.com@gmail.com>
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
      Cc: "Venkatesh Pallipadi
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Richard Purdie <rpurdie@rpsys.net>
      Cc: Matthew Garrett <mjg@redhat.com>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      edbaa603
    • K
      power: qe_ic - convert sysdev_class to a regular subsystem · cfde779f
      Kay Sievers 提交于
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      
      Cc: Timur Tabi <timur@freescale.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cfde779f
    • K
      cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem · 8a25a2fd
      Kay Sievers 提交于
      This moves the 'cpu sysdev_class' over to a regular 'cpu' subsystem
      and converts the devices to regular devices. The sysdev drivers are
      implemented as subsystem interfaces now.
      
      After all sysdev classes are ported to regular driver core entities, the
      sysdev implementation will be entirely removed from the kernel.
      
      Userspace relies on events and generic sysfs subsystem infrastructure
      from sysdev devices, which are made available with this conversion.
      
      Cc: Haavard Skinnemoen <hskinnemoen@gmail.com>
      Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Chris Metcalf <cmetcalf@tilera.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Borislav Petkov <bp@amd64.org>
      Cc: Tigran Aivazian <tigran@aivazian.fsnet.co.uk>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8a25a2fd
  9. 13 12月, 2011 1 次提交
  10. 09 12月, 2011 4 次提交
  11. 08 12月, 2011 1 次提交
  12. 07 12月, 2011 9 次提交
  13. 28 11月, 2011 1 次提交
  14. 25 11月, 2011 2 次提交
  15. 24 11月, 2011 5 次提交