1. 06 11月, 2008 1 次提交
    • B
      powerpc/pci: Split pcibios_fixup_bus() into bus setup and device setup · 8b8da358
      Benjamin Herrenschmidt 提交于
      Currently, our PCI code uses the pcibios_fixup_bus() callback, which
      is called by the generic code when probing PCI buses, for two
      different things.
      
      One is to set up things related to the bus itself, such as reading
      bridge resources for P2P bridges, fixing them up, or setting up the
      iommu's associated with bridges on some platforms.
      
      The other is some setup for each individual device under that bridge,
      mostly setting up DMA mappings and interrupts.
      
      The problem is that this approach doesn't work well with PCI hotplug
      when an existing bus is re-probed for new children.  We fix this
      problem by splitting pcibios_fixup_bus into two routines:
      
      	pcibios_setup_bus_self() is now called to setup the bus itself
      
      	pcibios_setup_bus_devices() is now called to setup devices
      
      pcibios_fixup_bus() is then modified to call these two after reading the
      bridge bases, and the OF based PCI probe is modified to avoid calling
      into the first one when rescanning an existing bridge.
      
      [paulus@samba.org - fixed eeh.h for 32-bit compile now that pci-common.c
      is including it unconditionally.]
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8b8da358
  2. 05 11月, 2008 12 次提交
    • B
      powerpc/pci: Remove pcibios_do_bus_setup() · ab56ced9
      Benjamin Herrenschmidt 提交于
      The function pcibios_do_bus_setup() was used by pcibios_fixup_bus()
      to perform setup that is different between the 32-bit and 64-bit
      code.  This difference no longer exists, thus the function is removed
      and the setup now done directly from pci-common.c.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ab56ced9
    • B
      powerpc/pci: Use common PHB resource hookup · 53280323
      Benjamin Herrenschmidt 提交于
      The 32-bit and 64-bit powerpc PCI code used to set up the resource
      pointers of the root bus of a given PHB in completely different
      places.
      
      This unifies this in large part, by making 32-bit use a routine very
      similar to what 64-bit does when initially scanning the PCI busses.
      
      The actual setup of the PHB resources itself is then moved to a
      common function in pci-common.c.
      
      This should cause no functional change on 64-bit.  On 32-bit, the
      effect is that the PHB resources are going to be setup a bit earlier,
      instead of being setup from pcibios_fixup_bus().
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      53280323
    • B
      powerpc/pci: Cleanup debug printk's · b0494bc8
      Benjamin Herrenschmidt 提交于
      This removes the various DBG() macro from the powerpc PCI code and
      makes it use the standard pr_debug instead.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b0494bc8
    • M
      powerpc: Update 64bit memcpy() using CPU_FTR_UNALIGNED_LD_STD · 25d6e2d7
      Mark Nelson 提交于
      Update memcpy() to add two new feature sections: one for aligning the
      destination before copying and one for copying using aligned load
      and store doubles.
      
      These new feature sections will only affect Power6 and Cell because
      the CPU feature bit was only added to these two processors.
      
      Power6 gets its best performance in memcpy() when aligning neither the
      source nor the destination, while Cell gets its best performance when
      just the destination is aligned. But in order to save on CPU feature
      bits we can use the previously added CPU_FTR_CP_USE_DCBTZ feature bit
      to differentiate between Power6 and Cell (because CPU_FTR_CP_USE_DCBTZ
      was added to Cell but not Power6).
      
      The first feature section acts to nop out the branch that takes us to
      the code that aligns us to an eight byte boundary for the destination.
      We only want to nop out this branch on Power6.
      
      So the ALT_FTR_SECTION_END() for this feature section creates a test
      mask of the two feature bits ORed together and provides an expected
      result of just CPU_FTR_UNALIGNED_LD_STD, thus we nop out the branch
      if we're on a CPU that has CPU_FTR_UNALIGNED_LD_STD set and
      CPU_FTR_CP_USE_DCBTZ unset.
      
      For the second feature section added, if we're on a CPU that has the
      CPU_FTR_UNALIGNED_LD_STD bit set then we don't want to do the copy
      with aligned loads and stores (and the appropriate shifting left and
      right instructions), so we want to nop out the branch to
      .Lsrc_unaligned.
      
      The andi. used for this branch is moved to just above the branch
      because this allows us to nop out both instructions with just one
      feature section which gives us better performance and doesn't hurt
      readability which two separate feature sections did.
      
      Moving the andi. to just above the branch doesn't have any noticeable
      negative effect on the remaining 64bit processors (the ones that
      didn't have this feature bit added).
      
      On Cell this simple modification results in an improvement to measured
      memcpy() bandwidth of up to 50% in the hot cache case and up to 15% in
      the cold cache case.
      
      On Power6 we get memory bandwidth results that are up to three times
      faster in the hot cache case and up to 50% faster in the cold cache
      case.
      
      Commit 2a929436 ("powerpc: Add new CPU
      feature: CPU_FTR_CP_USE_DCBTZ") was where CPU_FTR_CP_USE_DCBTZ was
      added.
      
      To say that Cell gets its best performance in memcpy() with just the
      destination aligned is true but only for the reason that the indirect
      shift and rotate instructions, sld and srd, are microcoded on Cell.
      This means that either the destination or the source can be aligned,
      but not both, and seeing as we get better performance with the
      destination aligned we choose this option.
      
      While we're at it make a one line change from cmpldi r1,... to
      cmpldi cr1,... for consistency.
      Signed-off-by: NMark Nelson <markn@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      25d6e2d7
    • M
      powerpc: Add new CPU feature: CPU_FTR_UNALIGNED_LD_STD · 4ec577a2
      Mark Nelson 提交于
      Add a new CPU feature bit, CPU_FTR_UNALIGNED_LD_STD, to be added
      to the 64bit powerpc chips that can do unaligned load double and
      store double without any performance hit.
      
      This is added to Power6 and Cell and will be used in the next commit
      to disable the code that gets the destination address aligned on
      those CPUs where doing that doesn't improve performance.
      Signed-off-by: NMark Nelson <markn@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      4ec577a2
    • B
      powerpc: Update page-in counter for CMM · 40900194
      Brian King 提交于
      A new field has been added to the VPA as a method for the client OS to
      communicate to firmware the number of page-ins it is performing when
      running collaborative memory overcommit.  The hypervisor will use this
      information to better determine if a partition is experiencing memory
      pressure and needs more memory allocated to it.
      Signed-off-by: NBrian King <brking@linux.vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      40900194
    • S
      powerpc/pseries: Fix getting the server number size · 1ef8014d
      Sebastien Dugue 提交于
      The 'ibm,interrupt-server#-size' properties are not in the cpu nodes,
      which is where we currently look for them, but rather live under the
      interrupt source controller nodes (which have "ibm,ppc-xics" in their
      compatible property).
      
      This moves the code that looks for the ibm,interrupt-server#-size
      properties from xics_update_irq_servers() into xics_init_IRQ().
      
      Also this adds a check for mismatched sizes across the interrupt
      source controller nodes.  Not sure this is necessary as in this case
      the firmware might be seriously busted.
      
      This property only appears on POWER6 boxes and is only used in the
      set-indicator(gqirm) call, and apparently firmware currently ignores
      the value we pass.  Nevertheless we need to fix it in case future
      firmware versions use it.
      Signed-off-by: NSebastien Dugue <sebastien.dugue@bull.net>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Acked-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1ef8014d
    • A
      powerpc: Remove device_type = "rtc" properties in .dts files · 691de576
      Anton Vorontsov 提交于
      We don't want to encourage the device_type usage.  It isn't used in
      the code, so we can simply remove it from the dts files.
      Suggested-by: NScott Wood <scottwood@freescale.com>
      Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
      Acked-by: NGrant Likely <grant.likely@secretlab.ca>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      691de576
    • B
      powerpc: Silence software timebase sync · a6a8e009
      Benjamin Herrenschmidt 提交于
      When no hardware method is provided to sync the timebase registers
      across the machine, and the platform doesn't sync them for us, then we
      use a generic software implementation.  Currently, the code for that
      has many printks, and they don't have log levels.  Most of the printks
      are only useful for debugging the code, and since we haven't had any
      problems with it for years, this turns them into pr_debug.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a6a8e009
    • B
      powerpc: Fix domain numbers in /proc on 64-bit · 1fd0f525
      Benjamin Herrenschmidt 提交于
      The code to properly expose domain numbers in /proc is somewhat
      bogus on ppc64 as it depends on the "buid" field being non-0,
      but that field is really pseries specific.
      
      This removes that code and makes ppc64 use the same code as 32-bit
      which effectively decides whether to expose domains based on
      ppc_pci_flags set by the platform, and sets the default for 64-bit
      to enable domains and enable compatibility for domain 0 (which
      strips the domain number for domain 0 to help with X servers).
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1fd0f525
    • S
      powerpc: Fix "unused variable" warning in pci_dlpar.c · 454666eb
      Stephen Rothwell 提交于
      This gets rid of this build warning:
      
      arch/powerpc/platforms/pseries/pci_dlpar.c: In function 'init_phb_dynamic':
      arch/powerpc/platforms/pseries/pci_dlpar.c:192: warning: unused variable 'b'
      
      This is one of the very few warnings left in a ppc64_defconfig build and
      getting rid of it will make it easier to see future introduced ones (in
      fact this was introduced very recently).
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      454666eb
    • A
      powerpc/cell: Fix compile error in ras.c · 9c8b4aff
      Alexey Dobriyan 提交于
      This fixes this error on Cell when CONFIG_KEXEC = n:
      
      arch/powerpc/platforms/cell/ras.c:299: error: implicit declaration of function 'crash_shutdown_register'
      
      We have to include <asm/kexec.h> because it contains the dummy
      definition of crash_shutdown_register that is used when
      CONFIG_KEXEC=n, but <linux/kexec.h> doesn't include <asm/kexec.h> in
      that case.
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      9c8b4aff
  3. 31 10月, 2008 20 次提交
    • P
      Revert "powerpc: Sync RPA note in zImage with kernel's RPA note" · 5663a123
      Paul Mackerras 提交于
      This reverts commit 91a00302, plus
      commit 0dcd4401 ("powerpc: Revert CHRP
      boot wrapper to real-base = 12MB on 32-bit") which depended on it.
      
      Commit 91a00302 was causing NVRAM corruption on some pSeries machines,
      for as-yet unknown reasons, so this reverts it until the cause is
      identified.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      5663a123
    • P
      powerpc: Fix compile errors with CONFIG_BUG=n · ebdba9af
      Paul Mackerras 提交于
      This makes sure we don't try to call find_bug or is_warning_bug when
      CONFIG_BUG=n and CONFIG_XMON=y.  Otherwise we get these errors:
      
      arch/powerpc/xmon/xmon.c: In function ‘print_bug_trap’:
      arch/powerpc/xmon/xmon.c:1364: error: implicit declaration of function ‘find_bug’
      arch/powerpc/xmon/xmon.c:1364: warning: assignment makes pointer from integer without a cast
      arch/powerpc/xmon/xmon.c:1367: error: implicit declaration of function ‘is_warning_bug’
      arch/powerpc/xmon/xmon.c:1374: error: dereferencing pointer to incomplete type
      make[2]: *** [arch/powerpc/xmon/xmon.o] Error 1
      make[1]: *** [arch/powerpc/xmon] Error 2
      make: *** [sub-make] Error 2
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      ebdba9af
    • J
      powerpc: Fix format string warning in arch/powerpc/boot/main.c · 8ba4773a
      Jon Smirl 提交于
      Fix format string warning in arch/powerpc/boot/main.c.  Also correct
      a typo ("uncomressed") on the same line.
      
       BOOTCC  arch/powerpc/boot/main.o
      arch/powerpc/boot/main.c: In function 'prep_kernel':
      arch/powerpc/boot/main.c:65: warning: format '%08x' expects type
      'unsigned int', but argument 3 has type 'long unsigned int'
      Signed-off-by: NJon Smirl <jonsmirl@gmail.com>
      Acked-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8ba4773a
    • D
      powerpc: Fix bug in kernel copy of libfdt's fdt_subnode_offset_namelen() · 2dccbf4e
      David Gibson 提交于
      There's currently an off-by-one bug in fdt_subnode_offset_namelen()
      which causes it to keep searching after it's finished the subnodes of
      the given parent, and into the subnodes of siblings of the original
      node which come after it in the tree.  This bug was introduced in
      commit ed95d745 ("powerpc: Update
      in-kernel dtc and libfdt to version 1.2.0").
      
      A patch has already been submitted to dtc/libfdt mainline.  We don't
      really want to pull in a new upstream version during the 2.6.28 cycle,
      but we should still fix this bug, hence this standalone version of the
      fix for the in-kernel libfdt.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      2dccbf4e
    • M
      powerpc: Remove duplicate DMA entry from mpc8313erdb device tree · 65325d5c
      Mike Dyer 提交于
      Commit 57436612 added a duplicate
      DMA controller node.
      Signed-off-by: NMike Dyer <mike.dyer@provision-comm.com>
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      65325d5c
    • C
      powerpc/cell/OProfile: Fix on-stack array size in activate spu profiling function · 210434d7
      Carl Love 提交于
      The size of the pm_signal_local array should be equal to the
      number of SPUs being configured in the array.  Currently, the
      array is of size 4 (NR_PHYS_CTRS) but being indexed by a for
      loop from 0 to 7 (NUM_SPUS_PER_NODE).  This could potentially
      cause an oops or random memory corruption since the pm_signal_local
      array is on the stack.  This fixes it.
      Signed-off-by: NCarl Love <carll@us.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      210434d7
    • K
      powerpc/mpic: Fix regression caused by change of default IRQ affinity · 3c10c9c4
      Kumar Gala 提交于
      The Freescale implementation of MPIC only allows a single CPU destination
      for non-IPI interrupts.  We add a flag to the mpic_init to distinquish
      these variants of MPIC.  We pull in the irq_choose_cpu from sparc64 to
      select a single CPU as the destination of the interrupt.
      
      This is to deal with the fact that the default smp affinity was
      changed by commit 18404756 ("genirq:
      Expose default irq affinity mask (take 3)") to be all CPUs.
      Signed-off-by: NKumar Gala <galak@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3c10c9c4
    • M
      powerpc: Update remaining dma_mapping_ops to use map/unmap_page · f9226d57
      Mark Nelson 提交于
      After the merge of the 32 and 64bit DMA code, dma_direct_ops lost
      their map/unmap_single() functions but gained map/unmap_page().  This
      caused a problem for Cell because Cell's dma_iommu_fixed_ops called
      the dma_direct_ops if the fixed linear mapping was to be used or the
      iommu ops if the dynamic window was to be used.  So in order to fix
      this problem we need to update the 64bit DMA code to use
      map/unmap_page.
      
      First, we update the generic IOMMU code so that iommu_map_single()
      becomes iommu_map_page() and iommu_unmap_single() becomes
      iommu_unmap_page().  Then we propagate these changes up through all
      the callers of these two functions and in the process update all the
      dma_mapping_ops so that they have map/unmap_page rahter than
      map/unmap_single.  We can do this because on 64bit there is no HIGHMEM
      memory so map/unmap_page ends up performing exactly the same function
      as map/unmap_single, just taking different arguments.
      
      This has no affect on drivers because the dma_map_single_attrs() just
      ends up calling the map_page() function of the appropriate
      dma_mapping_ops and similarly the dma_unmap_single_attrs() calls
      unmap_page().
      
      This fixes an oops on Cell blades, which oops on boot without this
      because they call dma_direct_ops.map_single, which is NULL.
      Signed-off-by: NMark Nelson <markn@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f9226d57
    • B
      powerpc/pci: Fix unmapping of IO space on 64-bit · b30115ea
      Benjamin Herrenschmidt 提交于
      A typo/thinko made us pass the wrong argument to __flush_hash_table_range
      when unplugging bridges, thus not flushing all the translations for
      the IO space on unplug.  The third parameter to __flush_hash_table_range
      is `end', not `size'.
      
      This causes the hypervisor to refuse unplugging slots.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b30115ea
    • N
      powerpc/pci: Properly allocate bus resources for hotplug PHBs · e90a1318
      Nathan Fontenot 提交于
      Resources for PHB's that are dynamically added to a system are not
      properly allocated in the resource tree.
      
      Not having these resources allocated causes an oops when removing
      the PHB when we try to release them.
      
      The diff appears a bit messy, this is mainly due to moving everything
      one tab to the left in the pcibios_allocate_bus_resources routine.
      The functionality change in this routine is only that the
      list_for_each_entry() loop is pulled out and moved to the necessary
      calling routine.
      Signed-off-by: NNathan Fontenot <nfont@austin.ibm.com>
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e90a1318
    • J
      OF-device: Don't overwrite numa_node in device registration · 6098e2ee
      Jeremy Kerr 提交于
      Currently, the numa_node of OF-devices will be overwritten during
      device_register, which simply sets the node to -1.  On cell machines,
      this means that devices can't find their IOMMU, which is referenced
      through the device's numa node.
      
      Set the numa node for OF devices with no parent, and use the
      lower-level device_initialize and device_add functions, so that the
      node is preserved.
      
      We can remove the call to set_dev_node in of_device_alloc, as it
      will be overwritten during register.
      Signed-off-by: NJeremy Kerr <jk@ozlabs.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6098e2ee
    • M
      powerpc: Fix swapcontext system for VSX + old ucontext size · 16c29d18
      Michael Neuling 提交于
      Since VSX support was added, we now have two sizes of ucontext_t;
      the older, smaller size without the extra VSX state, and the new
      larger size with the extra VSX state.  A program using the
      sys_swapcontext system call and supplying smaller ucontext_t
      structures will currently get an EINVAL error if the task has
      used VSX (e.g. because of calling library code that uses VSX) and
      the old_ctx argument is non-NULL (i.e. the program is asking for
      its current context to be saved).  Thus the program will start
      getting EINVAL errors on calls that previously worked.
      
      This commit changes this behaviour so that we don't send an EINVAL in
      this case.  It will now return the smaller context but the VSX MSR bit
      will always be cleared to indicate that the ucontext_t doesn't include
      the extra VSX state, even if the task has executed VSX instructions.
      
      Both 32 and 64 bit cases are updated.
      
      [paulus@samba.org - also fix some access_ok() and get_user() calls]
      
      Thanks to Ben Herrenschmidt for noticing this problem.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      16c29d18
    • M
      powerpc: Fix compiler warning for the relocatable kernel · b160544c
      Michael Neuling 提交于
      Fixes this warning:
       arch/powerpc/kernel/setup_64.c:447:5: warning: "kernstart_addr" is not defined
      
      which arises because PHYSICAL_START is no longer a constant when
      CONFIG_RELOCATABLE=y.
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      b160544c
    • P
      powerpc: Work around ld bug in older binutils · 2a4b9c5a
      Paul Mackerras 提交于
      Commit 549e8152 ("powerpc: Make the
      64-bit kernel as a position-independent executable") added lines to
      vmlinux.lds.S to add the extra sections needed to implement a
      relocatable kernel.  However, those lines seem to trigger a bug in
      older versions of GNU ld (such as 2.16.1) when building a
      non-relocatable kernel.  Since ld 2.16.1 is still a popular choice for
      cross-toolchains, this adds an #ifdef to vmlinux.lds.S so the added
      lines are only included when building a relocatable kernel.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      2a4b9c5a
    • M
      powerpc/ppc64/kdump: Better flag for running relocatable · 8b8b0cc1
      Milton Miller 提交于
      The __kdump_flag ABI is overly constraining for future development.
      
      As of 2.6.27, the kernel entry point has 4 constraints:  Offset 0 is
      the starting point for the master (boot) cpu (entered with r3 pointing
      to the device tree structure), offset 0x60 is code for the slave cpus
      (entered with r3 set to their device tree physical id), offset 0x20 is
      used by the iseries hypervisor, and secondary cpus must be well behaved
      when the first 256 bytes are copied to address 0.
      
      Placing the __kdump_flag at 0x18 is bad because:
      
      - It was taking the last 8 bytes before the iseries hypervisor data.
      - It was 8 bytes for a boolean flag
      - It had no way of identifying that the flag was present
      - It does leave any room for the master to add any additional code
        before branching, which hurts debug.
      - It will be unnecessarily hard for 32 bit code to be common (8 bytes)
      
      Now that we have eliminated the use of __kdump_flag in favor of
      the standard is_kdump_kernel(), this flag only controls run without
      relocating the kernel to PHYSICAL_START (0), so rename it __run_at_load.
      
      Move the flag to 0x5c, 1 word before the secondary cpu entry point at
      0x60.  Initialize it with "run0" to say it will run at 0 unless it is
      set to 1.  It only exists if we are relocatable.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NMichael Neuling <mikey@neuling.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8b8b0cc1
    • M
      powerpc: Use is_kdump_kernel() · 62a8bd6c
      Milton Miller 提交于
      linux/crash_dump.h defines is_kdump_kernel() to be used by code that
      needs to know if the previous kernel crashed instead of a (clean) boot
      or reboot.
      
      This updates the just added powerpc code to use it.  This is needed
      for the next commit, which will remove __kdump_flag.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      62a8bd6c
    • M
      powerpc: Kexec exit should not use magic numbers · 1767c8f3
      Milton Miller 提交于
      Commit 54622f10 ("powerpc: Support for
      relocatable kdump kernel") added a magic flag value in a register to
      tell purgatory that it should be a panic kernel.  This part is wrong
      and is reverted by this commit.
      
      The kernel gets a list of memory blocks and a entry point from user space.
      Its job is to copy the blocks into place and then branch to the designated
      entry point (after turning "off" the mmu).
      
      The user space tool inserts a trampoline, called purgatory, that runs
      before the user supplied code.   Its job is to establish the entry
      environment for the new kernel or other application based on the contents
      of memory.  The purgatory code is compiled and embedded in the tool,
      where it is later patched using the elf symbol table using elf symbols.
      
      Since the tool knows it is creating a purgatory that will run after a
      kernel crash, it should just patch purgatory (or the kernel directly)
      if something needs to happen.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      1767c8f3
    • T
      gianfar: Fix race in TBI/SerDes configuration · c132419e
      Trent Piepho 提交于
      The init_phy() function attaches to the PHY, then configures the
      SerDes<->TBI link (in SGMII mode).  The TBI is on the MDIO bus with the PHY
      (sort of) and is accessed via the gianfar's MDIO registers, using the
      functions gfar_local_mdio_read/write(), which don't do any locking.
      
      The previously attached PHY will start a work-queue on a timer, and
      probably an irq handler as well, which will talk to the PHY and thus use
      the MDIO bus.  This uses phy_read/write(), which have locking, but not
      against the gfar_local_mdio versions.
      
      The result is that PHY code will try to use the MDIO bus at the same time
      as the SerDes setup code, corrupting the transfers.
      
      Setting up the SerDes before attaching to the PHY will insure that there is
      no race between the SerDes code and *our* PHY, but doesn't fix everything.
      Typically the PHYs for all gianfar devices are on the same MDIO bus, which
      is associated with the first gianfar device.  This means that the first
      gianfar's SerDes code could corrupt the MDIO transfers for a different
      gianfar's PHY.
      
      The lock used by phy_read/write() is contained in the mii_bus structure,
      which is pointed to by the PHY.  This is difficult to access from the
      gianfar drivers, as there is no link between a gianfar device and the
      mii_bus which shares the same MDIO registers.  As far as the device layer
      and drivers are concerned they are two unrelated devices (which happen to
      share registers).
      
      Generally all gianfar devices' PHYs will be on the bus associated with the
      first gianfar.  But this might not be the case, so simply locking the
      gianfar's PHY's mii bus might not lock the mii bus that the SerDes setup
      code is going to use.
      
      We solve this by having the code that creates the gianfar platform device
      look in the device tree for an mdio device that shares the gianfar's
      registers.  If one is found the ID of its platform device is saved in the
      gianfar's platform data.
      
      A new function in the gianfar mii code, gfar_get_miibus(), can use the bus
      ID to search through the platform devices for a gianfar_mdio device with
      the right ID.  The platform device's driver data is the mii_bus structure,
      which the SerDes setup code can use to lock the current bus.
      Signed-off-by: NTrent Piepho <tpiepho@freescale.com>
      CC: Andy Fleming <afleming@freescale.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c132419e
    • J
      powerpc/44x: Update 44x defconfigs · 8531b7a8
      Josh Boyer 提交于
      Update the PowerPC 44x defconfigs for 2.6.28
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      8531b7a8
    • J
      powerpc/40x: Update 40x defconfigs · c4cd9ec4
      Josh Boyer 提交于
      Update the PowerPC 40x defconfigs for 2.6.28
      Signed-off-by: NJosh Boyer <jwboyer@linux.vnet.ibm.com>
      c4cd9ec4
  4. 28 10月, 2008 4 次提交
  5. 23 10月, 2008 3 次提交