1. 11 11月, 2005 7 次提交
  2. 10 11月, 2005 26 次提交
    • L
      [PATCH] ppc64: mark failed devices · d9564ad1
      Linas Vepstas 提交于
      17-eeh-slot-marking-bug.patch
      
      A device that experiences a PCI outage may be just one deivce out
      of many that was affected. In order to avoid repeated reports of
      a failure, the entire tree of affected devices should be marked
      as failed. This patch marks up the entire tree.
      Signed-off-by: NLinas Vepstas <linas@linas.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d9564ad1
    • P
      powerpc: Move some extern declarations from C code into headers · 49b09853
      Paul Mackerras 提交于
      This also make klimit have the same type on 32-bit as on 64-bit,
      namely unsigned long, and defines and initializes it in one place.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      49b09853
    • D
      [PATCH] powerpc: Move more ppc64 files with no ppc32 equivalent to powerpc · d3d2176a
      David Gibson 提交于
      This patch moves a bunch more 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:
      	hvcall.h
      	proc_ppc64.c
      	sysfs.c
      	lparcfg.c
      	rtas_pci.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
      
      Built and booted on POWER5 LPAR (ARCH=powerpc and ARCH=ppc64), built
      for 32-bit powermac (ARCH=powerpc).
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d3d2176a
    • B
      [PATCH] ppc64: fix PCI IO mapping · 0f34f490
      Benjamin Herrenschmidt 提交于
      phbs_remap_io(), which maps the PCI IO space into the kernel virtual space,
      is called too early on powermac, and thus doesn't work.
      
      This fixes it by removing the call from all platforms and putting it back
      into the ppc64 common code where it belongs, after the actual probing of
      the bus.
      
      That means that before that call, only the ISA IO space (if any) is mapped,
      any PIO access (from quirks for example) will fail. This happens not to be
      a problem for now, but we'll have to rework that code if it becomes one in
      the future.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0f34f490
    • B
      [PATCH] powerpc: 64k pages vs. U3 iommu · 47c2ac8c
      Benjamin Herrenschmidt 提交于
      That DART (U3 iommu) code didn't properly scale the number of entries
      when using !4k pages. That caused crashes when booting G5s with more
      than 2Gb of RAM. This fixes it.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      47c2ac8c
    • B
      [PATCH] powerpc: 64k pages pmd alloc fix · 87655ff2
      Benjamin Herrenschmidt 提交于
      This patch makes the kernel use a different kmem cache for PMD pages
      as they are smaller than PTE pages. Avoids waste of memory.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      87655ff2
    • S
      676e2497
    • P
      powerpc: 32-bit fixes for xmon · e1449ed9
      Paul Mackerras 提交于
      This makes the memory examine/change command print the address as
      8 digits instead of 16, and makes the memory dump command print
      4 4-byte values per line instead of 2 8-byte values.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e1449ed9
    • P
      powerpc: Add user CPU features for POWER4, POWER5, POWER5+ and Cell. · a7ddc5e8
      Paul Mackerras 提交于
      This is at the request of the glibc folks, who want to use these bits
      to select libraries optimized for the microarchitecture and new
      instructions in these processors.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      a7ddc5e8
    • P
      powerpc: Fix SMP time initialization problem · cbe62e2b
      Paul Mackerras 提交于
      We were getting the last_jiffy per-cpu variable set ahead of the current
      timebase in smp_space_timers on SMP machines.  This caused the loop in
      timer_interrupt to loop virtually forever, since tb_ticks_since assumes
      that it will never be called with the timebase behind the last_jiffy
      value.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      cbe62e2b
    • P
      powerpc: Fixes for 32-bit powermac SMP · 094fe2e7
      Paul Mackerras 提交于
      A couple of bugs crept in with the merge of smp.c...
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      094fe2e7
    • P
      powerpc: Fix compile error in EEH code with gcc4 · 0a5cab42
      Paul Mackerras 提交于
      Gcc 4 doesn't like being told to inline a recursive function...
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0a5cab42
    • P
      [PATCH] powerpc: merge code values for identifying platforms · 799d6046
      Paul Mackerras 提交于
      This patch merges platform codes.  systemcfg->platform is no longer used,
      systemcfg use in general is deprecated as much as possible (and renamed
      _systemcfg before it gets completely moved elsewhere in a future patch),
      _machine is now used on ppc64 along as ppc32.  Platform codes aren't gone
      yet but we are getting a step closer. A bunch of asm code in head[_64].S
      is also turned into C code.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      799d6046
    • D
      [PATCH] powerpc: Consolidate asm compatibility macros · 3ddfbcf1
      David Gibson 提交于
      This patch consolidates macros used to generate assembly for
      compatibility across different CPUs or configs.  A new header,
      asm-powerpc/asm-compat.h contains the main compatibility macros.  It
      uses some preprocessor magic to make the macros suitable both for use
      in .S files, and in inline asm in .c files.  Headers (bitops.h,
      uaccess.h, atomic.h, bug.h) which had their own such compatibility
      macros are changed to use asm-compat.h.
      
      ppc_asm.h is now for use in .S files *only*, and a #error enforces
      that.  As such, we're a lot more careless about namespace pollution
      here than in asm-compat.h.
      
      While we're at it, this patch adds a call to the PPC405_ERR77 macro in
      futex.h which should have had it already, but didn't.
      
      Built and booted on pSeries, Maple and iSeries (ARCH=powerpc).  Built
      for 32-bit powermac (ARCH=powerpc) and Walnut (ARCH=ppc).
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      3ddfbcf1
    • D
      [PATCH] powerpc: Move scanlog.c to platforms/pseries · f6d3577d
      David Gibson 提交于
      scanlog.c is only compiled on pSeries.  Thus, this patch moves it to
      platforms/pseries.
      
      Built and booted on pSeries LPAR (ARCH=powerpc and ARCH=ppc64).  Built
      for iSeries (ARCH=powerpc).
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f6d3577d
    • D
      [PATCH] powerpc: Merge cacheflush.h and cache.h · 26ef5c09
      David Gibson 提交于
      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: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      26ef5c09
    • P
      powerpc: Fix find_next_bit on 32-bit · 00557b59
      Paul Mackerras 提交于
      We had a "64" that didn't get changed to BITS_PER_LONG, resulting
      in find_next_bit not working correctly.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      00557b59
    • P
      ppc/powerpc: workarounds for old Open Firmware versions · a23414be
      Paul Mackerras 提交于
      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: NPaul Mackerras <paulus@samba.org>
      a23414be
    • L
      [PATCH] ppc64: Save & restore of PCI device BARS · 8b553f32
      Linas Vepstas 提交于
      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: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8b553f32
    • L
      [PATCH] ppc64: PCI reset support routines · 6dee3fb9
      Linas Vepstas 提交于
      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: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      6dee3fb9
    • L
      [PATCH] ppc64: PCI error event dispatcher · 172ca926
      Linas Vepstas 提交于
      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: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      172ca926
    • L
      [PATCH] ppc64: move eeh.c to powerpc directory from ppc64 · 7f79da7a
      Linas Vepstas 提交于
      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: NLinas Vepstas <linas@austin.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      7f79da7a
    • B
      [PATCH] ppc64: Don't panic when early __ioremap fails · 77ac166f
      Benjamin Herrenschmidt 提交于
      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: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      77ac166f
    • D
      [PATCH] powerpc: Move various ppc64 files with no ppc32 equivalent to powerpc · 8882a4da
      David Gibson 提交于
      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: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8882a4da
    • D
      [PATCH] powerpc: Merge signal.h · c5ff7001
      David Gibson 提交于
      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: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      c5ff7001
    • A
      [PATCH] powerpc: sched fixups · e4d76e1c
      Andrew Morton 提交于
      - Re-add a hunk lost during merge: ppc64 is missing the hunk that disables
        preempt on the secondary CPUs before they call cpu_idle().
      
      - ppc's cpu_idle() had the need_resched() test wrong.
      
      Cc: Nick Piggin <nickpiggin@yahoo.com.au>
      CC: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Anton Blanchard <anton@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e4d76e1c
  3. 09 11月, 2005 7 次提交
    • N
      [PATCH] sched: resched and cpu_idle rework · 64c7c8f8
      Nick Piggin 提交于
      Make some changes to the NEED_RESCHED and POLLING_NRFLAG to reduce
      confusion, and make their semantics rigid.  Improves efficiency of
      resched_task and some cpu_idle routines.
      
      * In resched_task:
      - TIF_NEED_RESCHED is only cleared with the task's runqueue lock held,
        and as we hold it during resched_task, then there is no need for an
        atomic test and set there. The only other time this should be set is
        when the task's quantum expires, in the timer interrupt - this is
        protected against because the rq lock is irq-safe.
      
      - If TIF_NEED_RESCHED is set, then we don't need to do anything. It
        won't get unset until the task get's schedule()d off.
      
      - If we are running on the same CPU as the task we resched, then set
        TIF_NEED_RESCHED and no further action is required.
      
      - If we are running on another CPU, and TIF_POLLING_NRFLAG is *not* set
        after TIF_NEED_RESCHED has been set, then we need to send an IPI.
      
      Using these rules, we are able to remove the test and set operation in
      resched_task, and make clear the previously vague semantics of
      POLLING_NRFLAG.
      
      * In idle routines:
      - Enter cpu_idle with preempt disabled. When the need_resched() condition
        becomes true, explicitly call schedule(). This makes things a bit clearer
        (IMO), but haven't updated all architectures yet.
      
      - Many do a test and clear of TIF_NEED_RESCHED for some reason. According
        to the resched_task rules, this isn't needed (and actually breaks the
        assumption that TIF_NEED_RESCHED is only cleared with the runqueue lock
        held). So remove that. Generally one less locked memory op when switching
        to the idle thread.
      
      - Many idle routines clear TIF_POLLING_NRFLAG, and only set it in the inner
        most polling idle loops. The above resched_task semantics allow it to be
        set until before the last time need_resched() is checked before going into
        a halt requiring interrupt wakeup.
      
        Many idle routines simply never enter such a halt, and so POLLING_NRFLAG
        can be always left set, completely eliminating resched IPIs when rescheduling
        the idle task.
      
        POLLING_NRFLAG width can be increased, to reduce the chance of resched IPIs.
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Con Kolivas <kernel@kolivas.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      64c7c8f8
    • N
      [PATCH] sched: disable preempt in idle tasks · 5bfb5d69
      Nick Piggin 提交于
      Run idle threads with preempt disabled.
      
      Also corrected a bugs in arm26's cpu_idle (make it actually call schedule()).
      How did it ever work before?
      
      Might fix the CPU hotplugging hang which Nigel Cunningham noted.
      
      We think the bug hits if the idle thread is preempted after checking
      need_resched() and before going to sleep, then the CPU offlined.
      
      After calling stop_machine_run, the CPU eventually returns from preemption and
      into the idle thread and goes to sleep.  The CPU will continue executing
      previous idle and have no chance to call play_dead.
      
      By disabling preemption until we are ready to explicitly schedule, this bug is
      fixed and the idle threads generally become more robust.
      
      From: alexs <ashepard@u.washington.edu>
      
        PPC build fix
      
      From: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
      
        MIPS build fix
      Signed-off-by: NNick Piggin <npiggin@suse.de>
      Signed-off-by: NYoichi Yuasa <yuasa@hh.iij4u.or.jp>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5bfb5d69
    • M
      [PATCH] ppc32: fix perf_irq extern on e500 · a31751e0
      Matt Porter 提交于
      Fixes e500 build and cleans up traps.c by moving perf_irq extern to
      pmc.h.
      Signed-off-by: NMatt Porter <mporter@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>
      a31751e0
    • O
      [PATCH] ppc64: add MODALIAS= for vio bus · 143dcec2
      Olaf Hering 提交于
      A non-broken udev would autoload also the drivers for devices on the
      pseries vio bus, like ibmveth, ibmvscsic and hvsc.  This is similar to pci,
      usb and ieee1394:
      
       /lib/modules/`uname -r`/modules.alias
      alias vio:TvscsiSIBM,v-scsi* ibmvscsic
      alias vio:TnetworkSIBM,l-lan* ibmveth
      alias vio:Tserial-serverShvterm2* hvcs
      
      /events/debug.00004.pci.add.1394:MODALIAS='pci:v00001014d00000188sv00000000sd00000000bc06sc04i0f'
      /events/debug.00005.pci.add.1509:MODALIAS='pci:v00008086d00001229sv00001014sd000001FFbc02sc00i00'
      /events/debug.00026.vio.add.1519:MODALIAS='vio:TserialShvterm1'
      /events/debug.00027.vio.add.1446:MODALIAS='vio:TvscsiSIBM,v-scsi'
      /events/debug.00028.vio.add.1451:MODALIAS='vio:TnetworkSIBM,l-lan'
      
       modprobe -v vio:TnetworkSIBM,l-lan
      insmod /lib/modules/2.6.14-20051030_vio-ppc64/kernel/drivers/net/ibmveth.ko
      Signed-off-by: NOlaf Hering <olh@suse.de>
      Cc: Benjamin 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>
      143dcec2
    • S
      powerpc: merge irq.c · 756e7104
      Stephen Rothwell 提交于
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      756e7104
    • S
      ppc64: remove ppc_irq_dispatch_handler · d4be4f37
      Stephen Rothwell 提交于
      Use __do_IRQ instead.  The only difference is that every controller
      is now assumed to have an end() routine (only xics_8259 did not).
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      d4be4f37
    • S
      5a7b3ff4