1. 17 8月, 2007 1 次提交
  2. 03 8月, 2007 1 次提交
  3. 26 7月, 2007 2 次提交
    • K
      [POWREPC] Fixup a number of modpost warnings on ppc32 · 282045b4
      Kumar Gala 提交于
      Fixed the following warnings:
      
      WARNING: vmlinux.o(.text+0x2934): Section mismatch: reference to .init.text:__alloc_bootmem (between 'irq_alloc_host' and 'irq_set_default_host')
      WARNING: vmlinux.o(.text+0xb2aa): Section mismatch: reference to .init.data:boot_command_line (between 'register_early_udbg_console' and 'udbg_printf')
      WARNING: vmlinux.o(.text+0xb2b2): Section mismatch: reference to .init.data:boot_command_line (between 'register_early_udbg_console' and 'udbg_printf')
      WARNING: vmlinux.o(.text+0xe354): Section mismatch: reference to .init.text:__alloc_bootmem (between 'pcibios_alloc_controller' and 'pci_domain_nr')
      WARNING: vmlinux.o(.text+0x12768): Section mismatch: reference to .init.text:update_bridge_resource (between 'quirk_fsl_pcie_transparent' and 'indirect_read_config')
      WARNING: vmlinux.o(.text+0x127a8): Section mismatch: reference to .init.text:update_bridge_resource (between 'quirk_fsl_pcie_transparent' and 'indirect_read_config')
      WARNING: vmlinux.o(.text+0x17566c): Section mismatch: reference to .init.text:pcibios_fixup_bus (between 'pci_scan_child_bus' and 'pci_scan_bus_parented')
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      282045b4
    • K
      [POWERPC] Don't try to allocate resources for a Freescale POWERPC PHB · 2052d6d2
      Kumar Gala 提交于
      The Freescale PCI PHBs actual report back values in the BAR registers
      this causes issues in that we try to allocate resources for them
      and will get error messages like the following on MPC8544 DS:
      
      PCI: Failed to allocate mem resource #1:80000000@0 for 0000:00:00.0
      
      To address this if we are class PCI_CLASS_PROCESSOR_POWERPC, a normal
      header type, and the PHB we clear out all the resources.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      2052d6d2
  4. 24 7月, 2007 1 次提交
  5. 23 7月, 2007 1 次提交
  6. 12 7月, 2007 1 次提交
    • M
      PCI: Make pcibios_add_platform_entries() return errors · a2cd52ca
      Michael Ellerman 提交于
      Currently pcibios_add_platform_entries() returns void, but could fail,
      so instead have it return an int and propagate errors up to
      pci_create_sysfs_dev_files().
      
      Fixes:
      arch/powerpc/kernel/pci_64.c: In function 'pcibios_add_platform_entries':
      arch/powerpc/kernel/pci_64.c:878: warning: ignoring return value of
      	'device_create_file', declared with attribute warn_unused_result
      arch/powerpc/kernel/pci_32.c: In function 'pcibios_add_platform_entries':
        arch/powerpc/kernel/pci_32.c:1043: warning: ignoring return value of
      	'device_create_file', declared with attribute warn_unused_result
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      a2cd52ca
  7. 03 7月, 2007 1 次提交
  8. 29 6月, 2007 7 次提交
  9. 02 5月, 2007 1 次提交
    • D
      [POWERPC] Fix STRICT_MM_TYPECHECKS · 69d48b40
      David Gibson 提交于
      Since we don't have it active by default, the STRICT_MM_TYPECHECKS
      option has bitrotted again.  This patch fixes a couple of simple build
      fixes if the option is selected.  First, pud_t mustn't be defined in
      page.h on 32-bit systems, because it conflicts with the version in the
      generic pud-folding code.  Second, pci_32.c is missing a __pgprot()
      wrapper call.  Third, a couple of PS3 files use constants of type
      pgprot_t when they need the raw values, we add pgprot_val() calls to
      fix this.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      69d48b40
  10. 24 4月, 2007 2 次提交
  11. 13 4月, 2007 3 次提交
  12. 24 1月, 2007 1 次提交
  13. 22 1月, 2007 1 次提交
  14. 14 12月, 2006 1 次提交
    • R
      [PATCH] getting rid of all casts of k[cmz]alloc() calls · 5cbded58
      Robert P. J. Day 提交于
      Run this:
      
      	#!/bin/sh
      	for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
      	  echo "De-casting $f..."
      	  perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
      	done
      
      And then go through and reinstate those cases where code is casting pointers
      to non-pointers.
      
      And then drop a few hunks which conflicted with outstanding work.
      
      Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Jens Axboe <jens.axboe@oracle.com>
      Cc: Paul Fulghum <paulkf@microgate.com>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Karsten Keil <kkeil@suse.de>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      Cc: Jeff Garzik <jeff@garzik.org>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Cc: Ian Kent <raven@themaw.net>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Jaroslav Kysela <perex@suse.cz>
      Cc: Takashi Iwai <tiwai@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5cbded58
  15. 11 12月, 2006 1 次提交
    • B
      [POWERPC] Fix irq routing on some 32-bit PowerMacs · dae4828d
      Benjamin Herrenschmidt 提交于
      The changes to use pci_read_irq_line() broke interrupt parsing
      on some 32-bit powermacs (oops).  The reason is a bit obscure.
      The code to parse interrupts happens earlier now, during
      pcibios_fixup() as the PCI bus is being probed.  However, the
      current implementation pci_device_to_OF_node() for 32-bit
      powerpc relies, on machines like PowerMac which renumber PCI buses,
      on a table called pci_OF_bus_map containing a map of bus numbers
      between the kernel and the firmware which is setup only later.
      Thus, it fails to match the device node.  In addition, some of
      Apple internal PCI devices lack a proper PCI_INTERRUPT_PIN, thus
      preventing the fallback mapping code to work.
      
      This patch fixes it by making pci_device_to_OF_node() 32-bit
      implementation use a different algorithm that works without
      using the pci_OF_bus_map thing (which I intend to deprecate
      anyway). It's a bit slower but that function isn't called in
      any hot path hopefully.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      dae4828d
  16. 08 12月, 2006 1 次提交
    • B
      [POWERPC] Fix mmap of PCI resource with hack for X · 396a1a58
      Benjamin Herrenschmidt 提交于
      The powerpc version of pci_resource_to_user() and associated hooks
      used by /proc/bus/pci and /sys/bus/pci mmap have been broken for some
      time on machines that don't have a 1:1 mapping of devices (basically
      on non-PowerMacs) and have PCI devices above 32 bits.
      
      This attempts to fix it as well as possible.
      
      The rule is supposed to be that pci_resource_to_user() always converts
      the resources back into a BAR values since that's what the /proc
      interface was supposed to deal with. However, for X to work on
      platforms where PCI MMIO is not mapped 1:1, it became a habit of
      platforms like powerpc to pass "fixed up" values there since X expects
      to be able to use values from /proc/bus/pci/devices as offsets to mmap
      of /dev/mem...
      
      So we keep that contraption here, causing also /sys/*/resource to
      expose fully absolute MMIO addresses instead of BAR values, which is
      ugly, but should still work as long as those are only used to calculate
      alignment within a page.
      
      X is still broken when built 32 bits on machines where PCI MMIO can be
      above 32-bit space unfortunately.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      396a1a58
  17. 04 12月, 2006 5 次提交
  18. 16 10月, 2006 1 次提交
  19. 31 7月, 2006 1 次提交
  20. 11 7月, 2006 1 次提交
    • B
      [PATCH] powerpc: fix trigger handling in the new irq code · 6e99e458
      Benjamin Herrenschmidt 提交于
      This patch slightly reworks the new irq code to fix a small design error.  I
      removed the passing of the trigger to the map() calls entirely, it was not a
      good idea to have one call do two different things.  It also fixes a couple of
      corner cases.
      
      Mapping a linux virtual irq to a physical irq now does only that.  Setting the
      trigger is a different action which has a different call.
      
      The main changes are:
      
      - I no longer call host->ops->map() for an already mapped irq, I just return
        the virtual number that was already mapped.  It was called before to give an
        opportunity to change the trigger, but that was causing issues as that could
        happen while the interrupt was in use by a device, and because of the
        trigger change, map would potentially muck around with things in a racy way.
         That was causing much burden on a given's controller implementation of
        map() to get it right.  This is much simpler now.  map() is only called on
        the initial mapping of an irq, meaning that you know that this irq is _not_
        being used.  You can initialize the hardware if you want (though you don't
        have to).
      
      - Controllers that can handle different type of triggers (level/edge/etc...)
        now implement the standard irq_chip->set_type() call as defined by the
        generic code.  That means that you can use the standard set_irq_type() to
        configure an irq line manually if you wish or (though I don't like that
        interface), pass explicit trigger flags to request_irq() as defined by the
        generic kernel interfaces.  Also, using those interfaces guarantees that
        your controller set_type callback is called with the descriptor lock held,
        thus providing locking against activity on the same interrupt (including
        mask/unmask/etc...) automatically.  A result is that, for example, MPIC's
        own map() implementation calls irq_set_type(NONE) to configure the hardware
        to the default triggers.
      
      - To allow the above, the irq_map array entry for the new mapped interrupt
        is now set before map() callback is called for the controller.
      
      - The irq_create_of_mapping() (also used by irq_of_parse_and_map()) function
        for mapping interrupts from the device-tree now also call the separate
        set_irq_type(), and only does so if there is a change in the trigger type.
      
      - While I was at it, I changed pci_read_irq_line() (which is the helper I
        would expect most archs to use in their pcibios_fixup() to get the PCI
        interrupt routing from the device tree) to also handle a fallback when the
        DT mapping fails consisting of reading the PCI_INTERRUPT_PIN to know wether
        the device has an interrupt at all, and the the PCI_INTERRUPT_LINE to get an
        interrupt number from the device.  That number is then mapped using the
        default controller, and the trigger is set to level low.  That default
        behaviour works for several platforms that don't have a proper interrupt
        tree like Pegasos.  If it doesn't work for your platform, then either
        provide a proper interrupt tree from the firmware so that fallback isn't
        needed, or don't call pci_read_irq_line()
      
      - Add back a bit that got dropped by my main rework patch for properly
        clearing pending IPIs on pSeries when using a kexec
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6e99e458
  21. 03 7月, 2006 1 次提交
    • B
      [POWERPC] Add new interrupt mapping core and change platforms to use it · 0ebfff14
      Benjamin Herrenschmidt 提交于
      This adds the new irq remapper core and removes the old one.  Because
      there are some fundamental conflicts with the old code, like the value
      of NO_IRQ which I'm now setting to 0 (as per discussions with Linus),
      etc..., this commit also changes the relevant platform and driver code
      over to use the new remapper (so as not to cause difficulties later
      in bisecting).
      
      This patch removes the old pre-parsing of the open firmware interrupt
      tree along with all the bogus assumptions it made to try to renumber
      interrupts according to the platform. This is all to be handled by the
      new code now.
      
      For the pSeries XICS interrupt controller, a single remapper host is
      created for the whole machine regardless of how many interrupt
      presentation and source controllers are found, and it's set to match
      any device node that isn't a 8259.  That works fine on pSeries and
      avoids having to deal with some of the complexities of split source
      controllers vs. presentation controllers in the pSeries device trees.
      
      The powerpc i8259 PIC driver now always requests the legacy interrupt
      range. It also has the feature of being able to match any device node
      (including NULL) if passed no device node as an input. That will help
      porting over platforms with broken device-trees like Pegasos who don't
      have a proper interrupt tree.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0ebfff14
  22. 01 7月, 2006 1 次提交
  23. 28 6月, 2006 2 次提交
  24. 26 6月, 2006 1 次提交
  25. 15 6月, 2006 1 次提交
    • P
      powerpc: Simplify push_end definition in pci_32.c · 0f582bc1
      Paul Mackerras 提交于
      The push_end macro in arch/powerpc/kernel/pci_32.c uses integer
      division and multiplication to achieve the effect of rounding a
      resource end address up and then advancing it to the end of a
      power-of-2 sized region.  This changes it to an equivalent computation
      that only needs an integer add and OR.  This is partly based on an
      earlier patch by Mel Gorman.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0f582bc1