1. 10 Nov, 2005 29 commits
    • David Gibson's avatar
      [PATCH] powerpc: Merge cacheflush.h and cache.h · 26ef5c09
      David Gibson authored
      The ppc32 and ppc64 versions of cacheflush.h were almost identical.
      The two versions of cache.h are fairly similar, except for a bunch of
      register definitions in the ppc32 version which probably belong better
      elsewhere.  This patch, therefore, merges both headers.  Notable
      points:
      	- there are several functions in cacheflush.h which exist only
      on ppc32 or only on ppc64.  These are handled by #ifdef for now, but
      these should probably be consolidated, along with the actual code
      behind them later.
      	- Confusingly, both ppc32 and ppc64 have a
      flush_dcache_range(), but they're subtly different: it uses dcbf on
      ppc32 and dcbst on ppc64, ppc64 has a flush_inval_dcache_range() which
      uses dcbf.  These too should be merged and consolidated later.
      	- Also flush_dcache_range() was defined in cacheflush.h on
      ppc64, and in cache.h on ppc32.  In the merged version it's in
      cacheflush.h
      	- On ppc32 flush_icache_range() is a normal function from
      misc.S.  On ppc64, it was wrapper, testing a feature bit before
      calling __flush_icache_range() which does the actual flush.  This
      patch takes the ppc64 approach, which amounts to no change on ppc32,
      since CPU_FTR_COHERENT_ICACHE will never be set there, but does mean
      renaming flush_icache_range() to __flush_icache_range() in
      arch/ppc/kernel/misc.S and arch/powerpc/kernel/misc_32.S
      	- The PReP register info from asm-ppc/cache.h has moved to
      arch/ppc/platforms/prep_setup.c
      	- The 8xx register info from asm-ppc/cache.h has moved to a
      new asm-powerpc/reg_8xx.h, included from reg.h
      	- flush_dcache_all() was defined on ppc32 (only), but was
      never called (although it was exported).  Thus this patch removes it
      from cacheflush.h and from ARCH=powerpc (misc_32.S) entirely.  It's
      left in ARCH=ppc for now, with the prototype moved to ppc_ksyms.c.
      
      Built for Walnut (ARCH=ppc), 32-bit multiplatform (pmac, CHRP and PReP
      ARCH=ppc, pmac and CHRP ARCH=powerpc).  Built and booted on POWER5
      LPAR (ARCH=powerpc and ARCH=ppc64).
      
      Built for 32-bit powermac (ARCH=ppc and ARCH=powerpc).  Built and
      booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64).  Built and booted
      on G5 (ARCH=powerpc)
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      26ef5c09
    • Paul Mackerras's avatar
      e130bedb
    • Paul Mackerras's avatar
      powerpc: Fix find_next_bit on 32-bit · 00557b59
      Paul Mackerras authored
      We had a "64" that didn't get changed to BITS_PER_LONG, resulting
      in find_next_bit not working correctly.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      00557b59
    • Paul Mackerras's avatar
      ppc/powerpc: workarounds for old Open Firmware versions · a23414be
      Paul Mackerras authored
      This adds code to work around some problems with old versions of
      Open Firmware, such as on the early powermacs (7500 etc.) and the
      "Longtrail" CHRP machine.  On these machines we have to claim
      the physical and virtual address ranges explicitly when claiming
      memory and then set up a V->P mapping.
      
      The Longtrail has more problems: setprop doesn't work, and we have
      to set an "allow-reclaim" variable to 0 in order to get claim on
      physical memory ranges to fail if the memory is already claimed.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      a23414be
    • Linas Vepstas's avatar
      [PATCH] ppc64: Save & restore of PCI device BARS · 8b553f32
      Linas Vepstas authored
      14-eeh-device-bar-save.patch
      
      After a PCI device has been resest, the device BAR's and other config
      space info must be restored to the same state as they were in when
      the firmware first handed us this device.  This will allow the
      PCI device driver, when restarted, to correctly recognize and set up
      the device.
      
      Tis patch saves the device config space as early as reasonable after
      the firmware has handed over the device.  Te state resore funcion
      is inteded for use by the EEH recovery routines.
      Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      8b553f32
    • Linas Vepstas's avatar
      [PATCH] ppc64: PCI reset support routines · 6dee3fb9
      Linas Vepstas authored
      13-eeh-recovery-support-routines.patch
      
      EEH Recovery support routines
      
      This patch adds routines required to help drive the recovery of
      EEH-frozen slots.  The main function is to drive the PCI #RST
      signal line high for a qurter of a second, and then allow for
      a second & a half of settle time.
      Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      6dee3fb9
    • Linas Vepstas's avatar
      [PATCH] ppc64: PCI error event dispatcher · 172ca926
      Linas Vepstas authored
      12-eeh-event-dispatcher.patch
      
      ppc64: EEH Recovery dispatcher thread
      
      This patch adds a mechanism to create recovery threads when an
      EEH event is received.  Since an EEH freeze state may be detected
      within an interrupt context, we need to get out of the interrupt
      context before starting recovery. This dispatcher does this in
      two steps: first, it uses a workqueue to get out, and then
      lanuches a kernel thread, so that the recovery routine can
      sleep for exteded periods without upseting the keventd.
      
      A kernel thread is created with each EEH event, rather than
      having one long-running daemon started at boot time.  This is
      because it is anticipated that EEH events will be very rare
      (very very rare, ideally) and so its pointless to cluter the
      process tables with a daemon that will almost never run.
      Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      172ca926
    • Linas Vepstas's avatar
      [PATCH] ppc64: move eeh.c to powerpc directory from ppc64 · 7f79da7a
      Linas Vepstas authored
      11-eeh-move-to-powerpc.patch
      
      Move arch/ppc64/kernel/eeh.c to arch//powerpc/platforms/pseries/eeh.c
      No other changes (except for Makefile to build it)
      Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      7f79da7a
    • Linas Vepstas's avatar
      [PATCH] ppc64: bugfix: don't silently ignore PCI errors · f8632c82
      Linas Vepstas authored
      10-EEH-enable-bugfix.patch
      
      Bugfix: With the curent linux-2.6.14-rc2-git6, EEH errors are
      ignored because thier detection requires an unused, uninitialized
      flag to be set.  This patch removes the unused flag.
      Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      f8632c82
    • Linas Vepstas's avatar
      [PATCH] ppc64: bugfix: crash on PCI hotplug · 18126f35
      Linas Vepstas authored
      09-hotplug-bugfix.patch
      
      In the current 2.6.14-rc2-git6 kernel, performing a Dynamic LPAR Add
      of a hotplug slot will crash the system, with the following (abbreviated)
      stack trace:
      
      cpu 0x3: Vector: 700 (Program Check) at [c000000053dff7f0]
          pc: c0000000004f5974: .__alloc_bootmem+0x0/0xb0
          lr: c0000000000258a0: .update_dn_pci_info+0x108/0x118
              c0000000000257c8 .update_dn_pci_info+0x30/0x118 (unreliable)
              c0000000000258fc .pci_dn_reconfig_notifier+0x4c/0x64
              c000000000060754 .notifier_call_chain+0x68/0x9c
      
      The root cause was that __init __alloc_bootmem() was called long after
      boot had finished, resulting in a crash because this routine is undefined
      after boot time.  The patch below fixes this crash, and adds some docs to
      clarify the code.
      Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      18126f35
    • Linas Vepstas's avatar
      [PATCH] ppc64: escape hatch for spinning interrupt deadlocks · 5c1344e9
      Linas Vepstas authored
      08-eeh-spin-counter.patch
      
      One an EEH event is triggers, all further I/O to a device is blocked (until
      reset).  Bad device drivers may end up spinning in their interrupt handlers,
      trying to read an interrupt status register that will never change state.
      This patch moves that spin counter to a per-device structure, and adds
      some diagnostic prints to help locate the bad driver.
      Signed-off-by: default avatarLinas Vepstas <linas@linas.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      5c1344e9
    • Linas Vepstas's avatar
      [PATCH] ppc64: serialize reports of PCI errors · fd761fd8
      Linas Vepstas authored
      07-eeh-report-race.patch
      
      When a PCI slot is isolated, all PCI functions under that slot are affected.
      If hese functions have separate device drivers, the EEH isolation event
      might be reported multiple times. This patch adds a lock to prevent the
      racing of such multiple reports. It also marks every device under the slot
      as having experienced an EEH event, so that multiple reports may be
      recognized more easily.
      Signed-off-by: default avatarLinas Vepstas <linas@linas.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      fd761fd8
    • Linas Vepstas's avatar
      [PATCH] ppc64: avoid PCI error reporting for empty slots · 76e6faf7
      Linas Vepstas authored
      06-eeh-empty-slot-error.patch
      
      Performing PCI config-space reads to empty PCI slots can lead to reports of
      "permanent failure" from the firmware. Ignore permanent failures on empty slots.
      Signed-off-by: default avatarLinas Vepstas <linas@linas.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      76e6faf7
    • Linas Vepstas's avatar
      [PATCH] ppc64: RTAS error reporting restructuring · df7242b1
      Linas Vepstas authored
      05-eeh-slot-error-detail.patch
      
      This patch encapsulates a section of code that reports the EEH event.
      The new subroutine can be used in several places to report the error.
      Signed-off-by: default avatarLinas Vepstas <linas@linas.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      df7242b1
    • Linas Vepstas's avatar
      [PATCH] ppc64: PCI error rate statistics · 177bc936
      Linas Vepstas authored
      04-eeh-statistics.patch
      
      This minor patch adds some statistics-gathering counters that allow the
      behaviour of the EEH subsystem o be monitored. While far from perfect,
      it does provide a rudimentary device that makes understanding of the
      current state of the system a bit easier.
      Signed-off-by: default avatarLinas Vepstas <linas@linas.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      177bc936
    • Linas Vepstas's avatar
      [PATCH] ppc64: PCI address cache minor fixes · 56b0fca3
      Linas Vepstas authored
      03-eeh-addr-cache-cleanup.patch
      
      This is a minor patch to clean up a buglet related to the PCI address cache.
      (The buglet doesn't manifes itself unless there are also bugs elsewhere,
      which is why its minor.).  Also:
      
      -- Improved debug printing.
      -- Declare some private routines as static
      -- Adds reference counting to struct pci_dn->pcidev structure
      Signed-off-by: default avatarLinas Vepstas <linas@linas.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      56b0fca3
    • Linas Vepstas's avatar
      [PATCH] ppc64: misc minor cleanup · 69376502
      Linas Vepstas authored
      02-eeh-minor-cleanup.patch
      
      This patch performs some minor cleanup of the eeh.c file, including:
      -- trim some trailing whitespace
      -- remove extraneous #includes
      -- use the macro PCI_DN uniformly, instead of the void pointer chase.
      -- typos in comments
      -- improved debug printk's
      Signed-off-by: default avatarLinas Vepstas <linas@linas.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      69376502
    • linas's avatar
      [PATCH] ppc64: uniform usage of bus unit id interfaces · ae65a391
      linas authored
      01-pci-dn-uniformization.patch
      
      This patch changes the rtas_pci interface to use the new struct pci_dn
      structure for two routines that work with pci device nodes.
      
      This patch also does some minor janitorial work: it uses some handy macros
      and cleans up some trailing whitespace in the affected file.
      Signed-off-by: default avatarLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      ae65a391
    • Benjamin Herrenschmidt's avatar
      [PATCH] ppc64: Don't panic when early __ioremap fails · 77ac166f
      Benjamin Herrenschmidt authored
      Early calls to __ioremap() will panic if the hash insertion fails. This
      patch makes them return NULL instead. It happens with some pSeries users
      who enabled CONFIG_BOOTX_TEXT. The later is getting an incorrect address
      for the fame buffer and the hash insertion fails. With this patch, it
      will display an error instead of crashing at boot.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      77ac166f
    • Olaf Hering's avatar
      [PATCH] ppc64 boot: fix compile warnings · c44bc68d
      Olaf Hering authored
      Fix a few compile warnings
      
      arch/ppc64/boot/addRamDisk.c:166: warning: int format, long unsigned int arg (arg 2)
      arch/ppc64/boot/addRamDisk.c:170: warning: int format, long unsigned int arg (arg 2)
      arch/ppc64/boot/addRamDisk.c:265: warning: unsigned int format, long unsigned int arg (arg 2)
      arch/ppc64/boot/addRamDisk.c:302: warning: unsigned int format, long unsigned int arg (arg 3)
      Signed-off-by: default avatarOlaf Hering <olh@suse.de>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      c44bc68d
    • Olaf Hering's avatar
      [PATCH] ppc64 boot: remove sysmap from required filenames · 681c774d
      Olaf Hering authored
      A stripped vmlinux does not contain enough symbols to recreate the
      System.map.  The System.map file is only used to determine the end of
      the runtime memory size.  This is the same value (rounded up to
      PAGE_SIZE) as ->memsiz in the ELF program header.
      
      Also, the target vmlinux.initrd doesnt work in 2.6.14:
      
        arch/ppc64/boot/addRamDisk arch/ppc64/boot/ramdisk.image.gz vmlinux.strip arch/ppc64/boot/vmlinux.initrd
        Name of vmlinux output file missing.
      Signed-off-by: default avatarOlaf Hering <olh@suse.de>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      681c774d
    • Olaf Hering's avatar
      [PATCH] ppc64 boot: remove argv usage · 58638bff
      Olaf Hering authored
      Use a local variable for the input filenames.
      Signed-off-by: default avatarOlaf Hering <olh@suse.de>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      58638bff
    • Olaf Hering's avatar
      [PATCH] ppc64 boot: remove local initializers · eba2fb2d
      Olaf Hering authored
      Remove initialization of local variables.
      They get all values assigned before use.
      Signed-off-by: default avatarOlaf Hering <olh@suse.de>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      eba2fb2d
    • Marcelo Tosatti's avatar
      [PATCH] fs_enet build fix · f7b99969
      Marcelo Tosatti authored
      Due to the recent update of the platform code, some platform device 
      drivers fail to compile. This fix is for fs_enet, adding #include of a 
      new header, to which a number of platform stuff has been relocated.
      Signed-off-by: default avatarVitaly Bordug <vbordug@ru.mvista.com>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      f7b99969
    • Matt Porter's avatar
      [PATCH] ppc32: fix ppc44x fpu build · 43cefe29
      Matt Porter authored
      Fixes ppc44x fpu support that broke from a bad arch/powerpc merge.
      Instead of adding KernelFP back in (which duplicates code) we use
      the same kernel fpu unavailable handler as classic PPC processors.
      Signed-off-by: default avatarMatt Porter <mporter@kernel.crashing.org>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      43cefe29
    • David Gibson's avatar
      [PATCH] powerpc: Move various ppc64 files with no ppc32 equivalent to powerpc · 8882a4da
      David Gibson authored
      This patch moves a bunch of files from arch/ppc64 and
      include/asm-ppc64 which have no equivalents in ppc32 code into
      arch/powerpc and include/asm-powerpc.  The file affected are:
      	abs_addr.h
      	compat.h
      	lppaca.h
      	paca.h
      	tce.h
      	cpu_setup_power4.S
      	ioctl32.c
      	firmware.c
      	pacaData.c
      
      The only changes apart from the move and corresponding Makefile
      changes are:
      	- #ifndef/#define in includes updated to _ASM_POWERPC_ form
      	- trailing whitespace removed
      	- comments giving full paths removed
      	- pacaData.c renamed paca.c to remove studlyCaps
      	- Misplaced { moved in lppaca.h
      
      Built and booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64), built
      for 32-bit powermac (ARCH=powerpc).
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      8882a4da
    • David Gibson's avatar
      [PATCH] powerpc: Merge current.h · 584224e4
      David Gibson authored
      This patch merges current.h.  This is a one-big-ifdef merge, but both
      versions are so tiny, I think we can live with it.  While we're at it,
      we get rid of the fairly pointless redirection through get_current()
      in the ppc64 version.
      
      Built and booted on POWER5 LPAR (ARCH=powerpc & ARCH=ppc64).  Built
      for 32-bit pmac (ARCH=powerpc & ARCH=ppc).
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      584224e4
    • David Gibson's avatar
      [PATCH] powerpc: Merge signal.h · c5ff7001
      David Gibson authored
      Having already merged the ppc and ppc64 versions of signal.c, this
      patch finishes the job by merging signal.h.  The two versions were
      almost identical already.  Notable changes:
      	- We use BITS_PER_LONG to correctly size sigset_t
      	- Remove some uneeded #includes and struct forward
      declarations.  This does mean adding an include to signal_32.c which
      relied on the indirect inclusion of sigcontext.h
      	- As the ppc64 version, the merged signal.h has prototypes for
      do_signal() and do_signal32().  Thus remove extra prototypes from
      ppc_ksyms.c which had them directly.
      
      Built and booted on POWER5 LPAR (ARCH=ppc64 and ARCH=powerpc).  Built
      for 32-bit powermac (ARCH=ppc and ARCH=powerpc) and Walnut (ARCH=ppc).
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      c5ff7001
    • Paul Mackerras's avatar
      Merge ../linux-2.6 · 31e7f1ff
      Paul Mackerras authored
      31e7f1ff
  2. 09 Nov, 2005 11 commits