1. 12 5月, 2007 2 次提交
    • K
      [POWERPC] Don't complain if size-cells == 0 in prom_parse() · fd6e9d39
      Kim Phillips 提交于
      An mdio bus scan was added with ucc_geth phylib
      migration patches, now machines complain on boot, saying:
      
      prom_parse: Bad cell count for /qe@e0100000/mdio@2120/ethernet-phy@00
      prom_parse: Bad cell count for /qe@e0100000/mdio@2120/ethernet-phy@01
      
      since size-cells can indeed be 0, this patch fixes the check.
      Signed-off-by: NKim Phillips <kim.phillips@freescale.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      fd6e9d39
    • W
      [POWERPC] Simplify smp_space_timers · e147ec8f
      will schmidt 提交于
      Greatly simplify the function smp_space_timers.
      
      The stolen time calculation (per comment within the code) doesn't need the
      half-jiffy stagger any more.  There isn't an issue with bouncing off global
      locks, so we really shouldn't need any sort of staggering at all.
      
      However, the last_jiffy value still needs to be set.   This removes the
      extra stagger logic, and just sets the values.
      
      This change should benefit applications that rely on barrier
      synchronization, and will help cut down OS jitter.
      
      Boot tested across the board (G5,power3,power4,power5,970mp blade).
      Signed-off-by: NWill Schmidt <will_schmidt@vnet.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      e147ec8f
  2. 11 5月, 2007 3 次提交
  3. 10 5月, 2007 4 次提交
    • M
      [POWERPC] Split initrd logic out of early_init_dt_scan_chosen() to fix warning · 40472a55
      Michael Ellerman 提交于
      If CONFIG_BLK_DEV_INITRD is not defined the prop variable in
      early_init_dt_scan_chosen() is unused, causing a compiler warning.
      
      So split the initrd logic into a separate function, allowing us to
      declare prop only when we need it.
      
      Built for both cases and booted with an initrd.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      40472a55
    • P
      [POWERPC] Fix incorrect calculation of I/O window addresses · 31e92e0a
      Paul Mackerras 提交于
      My patch "Cope with PCI host bridge I/O window not starting at 0"
      introduced a bug in the calculation of the virtual addresses for the
      I/O windows of PCI host bridges other than the first, because it
      didn't account for the fact that hose->io_resource gets offset so that
      it reflects the range of global I/O port numbers assigned to the
      bridge.  This fixes it and simplifies get_bus_io_range() in the
      process.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      31e92e0a
    • R
      rename thread_info to stack · f7e4217b
      Roman Zippel 提交于
      This finally renames the thread_info field in task structure to stack, so that
      the assumptions about this field are gone and archs have more freedom about
      placing the thread_info structure.
      
      Nonbroken archs which have a proper thread pointer can do the access to both
      current thread and task structure via a single pointer.
      
      It'll allow for a few more cleanups of the fork code, from which e.g.  ia64
      could benefit.
      Signed-off-by: NRoman Zippel <zippel@linux-m68k.org>
      [akpm@linux-foundation.org: build fix]
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ian Molton <spyro@f2s.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Hirokazu Takata <takata@linux-m32r.org>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Cc: Greg Ungerer <gerg@uclinux.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Cc: Kazumoto Kojima <kkojima@rr.iij4u.or.jp>
      Cc: Richard Curnow <rc@rc0.org.uk>
      Cc: William Lee Irwin III <wli@holomorphy.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
      Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
      Cc: Andi Kleen <ak@muc.de>
      Cc: Chris Zankel <chris@zankel.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f7e4217b
    • R
      Add suspend-related notifications for CPU hotplug · 8bb78442
      Rafael J. Wysocki 提交于
      Since nonboot CPUs are now disabled after tasks and devices have been
      frozen and the CPU hotplug infrastructure is used for this purpose, we need
      special CPU hotplug notifications that will help the CPU-hotplug-aware
      subsystems distinguish normal CPU hotplug events from CPU hotplug events
      related to a system-wide suspend or resume operation in progress.  This
      patch introduces such notifications and causes them to be used during
      suspend and resume transitions.  It also changes all of the
      CPU-hotplug-aware subsystems to take these notifications into consideration
      (for now they are handled in the same way as the corresponding "normal"
      ones).
      
      [oleg@tv-sign.ru: cleanups]
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Cc: Gautham R Shenoy <ego@in.ibm.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: NOleg Nesterov <oleg@tv-sign.ru>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8bb78442
  4. 09 5月, 2007 8 次提交
    • B
      [POWERPC] Introduce address space "slices" · d0f13e3c
      Benjamin Herrenschmidt 提交于
      The basic issue is to be able to do what hugetlbfs does but with
      different page sizes for some other special filesystems; more
      specifically, my need is:
      
       - Huge pages
      
       - SPE local store mappings using 64K pages on a 4K base page size
      kernel on Cell
      
       - Some special 4K segments in 64K-page kernels for mapping a dodgy
      type of powerpc-specific infiniband hardware that requires 4K MMU
      mappings for various reasons I won't explain here.
      
      The main issues are:
      
       - To maintain/keep track of the page size per "segment" (as we can
      only have one page size per segment on powerpc, which are 256MB
      divisions of the address space).
      
       - To make sure special mappings stay within their allotted
      "segments" (including MAP_FIXED crap)
      
       - To make sure everybody else doesn't mmap/brk/grow_stack into a
      "segment" that is used for a special mapping
      
      Some of the necessary mechanisms to handle that were present in the
      hugetlbfs code, but mostly in ways not suitable for anything else.
      
      The patch relies on some changes to the generic get_unmapped_area()
      that just got merged.  It still hijacks hugetlb callbacks here or
      there as the generic code hasn't been entirely cleaned up yet but
      that shouldn't be a problem.
      
      So what is a slice ?  Well, I re-used the mechanism used formerly by our
      hugetlbfs implementation which divides the address space in
      "meta-segments" which I called "slices".  The division is done using
      256MB slices below 4G, and 1T slices above.  Thus the address space is
      divided currently into 16 "low" slices and 16 "high" slices.  (Special
      case: high slice 0 is the area between 4G and 1T).
      
      Doing so simplifies significantly the tracking of segments and avoids
      having to keep track of all the 256MB segments in the address space.
      
      While I used the "concepts" of hugetlbfs, I mostly re-implemented
      everything in a more generic way and "ported" hugetlbfs to it.
      
      Slices can have an associated page size, which is encoded in the mmu
      context and used by the SLB miss handler to set the segment sizes.  The
      hash code currently doesn't care, it has a specific check for hugepages,
      though I might add a mechanism to provide per-slice hash mapping
      functions in the future.
      
      The slice code provide a pair of "generic" get_unmapped_area() (bottomup
      and topdown) functions that should work with any slice size.  There is
      some trickiness here so I would appreciate people to have a look at the
      implementation of these and let me know if I got something wrong.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d0f13e3c
    • S
      [POWERPC] iSeries: suppress build warning in lparmap.c · 8cf44080
      Stephen Rothwell 提交于
      lparmap.c: Assembler messages:
      lparmap.c:51: Warning: ignoring changed section attributes for .text
      
      Idea from Segher Boessenkool.
      Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      8cf44080
    • A
      Kprobes: The ON/OFF knob thru debugfs · bf8f6e5b
      Ananth N Mavinakayanahalli 提交于
      This patch provides a debugfs knob to turn kprobes on/off
      
      o A new file /debug/kprobes/enabled indicates if kprobes is enabled or
        not (default enabled)
      o Echoing 0 to this file will disarm all installed probes
      o Any new probe registration when disabled will register the probe but
        not arm it. A message will be printed out in such a case.
      o When a value 1 is echoed to the file, all probes (including ones
        registered in the intervening period) will be enabled
      o Unregistration will happen irrespective of whether probes are globally
        enabled or not.
      o Update Documentation/kprobes.txt to reflect these changes. While there
        also update the doc to make it current.
      
      We are also looking at providing sysrq key support to tie to the disabling
      feature provided by this patch.
      
      [akpm@linux-foundation.org: Use bool like a bool!]
      [akpm@linux-foundation.org: add printk facility levels]
      [cornelia.huck@de.ibm.com: Add the missing arch_trampoline_kprobe() for s390]
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Signed-off-by: NSrinivasa DS <srinivasa@in.ibm.com>
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      bf8f6e5b
    • C
      kprobes: kretprobes simplifications · 4c4308cb
      Christoph Hellwig 提交于
       - consolidate duplicate code in all arch_prepare_kretprobe instances
         into common code
       - replace various odd helpers that use hlist_for_each_entry to get
         the first elemenet of a list with either a hlist_for_each_entry_save
         or an opencoded access to the first element in the caller
       - inline add_rp_inst into it's only remaining caller
       - use kretprobe_inst_table_head instead of opencoding it
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Acked-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4c4308cb
    • A
      Kprobes: print details of kretprobe on assertion failure · 0f95b7fc
      Ananth N Mavinakayanahalli 提交于
      In certain cases like when the real return address can't be found or when
      the number of tracked calls to a kretprobed function is less than the
      number of returns, we may not be able to find the correct return address
      after processing a kretprobe.  Currently we just do a BUG_ON, but no
      information is provided about the actual failing kretprobe.
      
      Print out details of the kretprobe before calling BUG().
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
      Cc: Jim Keniston <jkenisto@us.ibm.com>
      Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
      Cc: Maneesh Soni <maneesh@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0f95b7fc
    • R
      header cleaning: don't include smp_lock.h when not used · e63340ae
      Randy Dunlap 提交于
      Remove includes of <linux/smp_lock.h> where it is not used/needed.
      Suggested by Al Viro.
      
      Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
      sparc64, and arm (all 59 defconfigs).
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e63340ae
    • C
      move die notifier handling to common code · 1eeb66a1
      Christoph Hellwig 提交于
      This patch moves the die notifier handling to common code.  Previous
      various architectures had exactly the same code for it.  Note that the new
      code is compiled unconditionally, this should be understood as an appel to
      the other architecture maintainer to implement support for it aswell (aka
      sprinkling a notify_die or two in the proper place)
      
      arm had a notifiy_die that did something totally different, I renamed it to
      arm_notify_die as part of the patch and made it static to the file it's
      declared and used at.  avr32 used to pass slightly less information through
      this interface and I brought it into line with the other architectures.
      
      [akpm@linux-foundation.org: build fix]
      [akpm@linux-foundation.org: fix vmalloc_sync_all bustage]
      [bryan.wu@analog.com: fix vmalloc_sync_all in nommu]
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: <linux-arch@vger.kernel.org>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NBryan Wu <bryan.wu@analog.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1eeb66a1
    • G
      Fixes and cleanups for earlyprintk aka boot console · 69331af7
      Gerd Hoffmann 提交于
      The console subsystem already has an idea of a boot console, using the
      CON_BOOT flag.  The implementation has some flaws though.  The major
      problem is that presence of a boot console makes register_console() ignore
      any other console devices (unless explicitly specified on the kernel
      command line).
      
      This patch fixes the console selection code to *not* consider a boot
      console a full-featured one, so the first non-boot console registering will
      become the default console instead.  This way the unregister call for the
      boot console in the register_console() function actually triggers and the
      handover from the boot console to the real console device works smoothly.
      Added a printk for the handover, so you know which console device the
      output goes to when the boot console stops printing messages.
      
      The disable_early_printk() call is obsolete with that patch, explicitly
      disabling the early console isn't needed any more as it works automagically
      with that patch.
      
      I've walked through the tree, dropped all disable_early_printk() instances
      found below arch/ and tagged the consoles with CON_BOOT if needed.  The
      code is tested on x86, sh (thanks to Paul) and mips (thanks to Ralf).
      
      Changes to last version: Rediffed against -rc3, adapted to mips cleanups by
      Ralf, fixed "udbg-immortal" cmd line arg on powerpc.
      Signed-off-by: NGerd Hoffmann <kraxel@exsuse.de>
      Acked-by: NPaul Mundt <lethal@linux-sh.org>
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Richard Henderson <rth@twiddle.net>
      Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      69331af7
  5. 08 5月, 2007 8 次提交
    • D
      [POWERPC] Early serial debug support for PPC44x · d9b55a03
      David Gibson 提交于
      This adds support for early serial debugging via the built in
      port on IBM/AMCC PowerPC 44x CPUs.  It uses a bolted TLB entry in
      address space 1 for the UART's mapping, allowing robust debugging both
      before and after the initialization of the MMU.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      d9b55a03
    • D
      [POWERPC] Add powerpc/platforms/44x, disable platforms/4xx for now · 2cd97647
      David Gibson 提交于
      This prepares for Ebony/440 support by creating an
      arch/powerpc/platforms/44x directory.  It is populated with a single
      misc_44x.S file, into which is moved the 44x specific reset code from
      head_44x.S (on the grounds that we should really stop clogging up the
      head_* files with random asm helper routines).
      
      At the same time, we disable the (empty save Kconfig and Makefile)
      arch/powerpc/platforms/4xx directory from the arch/powerpc/platforms
      Makefile.  Contrary to the comment in
      arch/powerpc/platforms/4xx/Makefile, attempting to build such an empty
      Makefile will fail, thus breaking compile for the 44x platforms we're
      about to add.  It can go back in once we start porting some of the 40x
      platforms (and thus it becomes non-empty).
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      2cd97647
    • M
      [POWERPC] Tell Phyp we support MSI · 014dad90
      Michael Ellerman 提交于
      Tell Phyp we support MSI via the client architecture support mechanism.
      Signed-off-by: NJake Moilanen <moilanen@austin.ibm.com>
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      014dad90
    • M
      [POWERPC] PowerPC MSI infrastructure · df87ef55
      Michael Ellerman 提交于
      This provides the architecture specific hooks to support MSI on
      powerpc.  We implement the newly added arch_setup_msi_irqs() and
      arch_teardown_msi_irqs(), and then delegate to ppc_md routines.
      
      Platforms that don't implement MSI will leave the ppc_md calls blank,
      arch_msi_check_device() will detect this and return ENOSYS. Drivers
      should detect this error and continue to use LSI.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      df87ef55
    • M
      [POWERPC] Rip out the existing powerpc msi stubs · f728b5c3
      Michael Ellerman 提交于
      Rip out the existing powerpc msi stubs. These were the start of an
      implementation based on ppc_md calls, but were never used in mainline.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      f728b5c3
    • M
      [POWERPC] Add __init annotations to reserve_mem() and stabs_alloc() · 0108d3fe
      Michael Ellerman 提交于
      reserve_mem() and stabs_alloc() are both called only from other __init
      routines, so can be marked __init.
      Signed-off-by: NMichael Ellerman <michael@ellerman.id.au>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      0108d3fe
    • P
      [POWERPC] Cope with PCI host bridge I/O window not starting at 0 · 11fbb00c
      Paul Mackerras 提交于
      Currently our code to set up the data structures for a PCI host bridge
      and create the mapping for its I/O window assumes that the window
      starts at I/O port 0 on the PCI side.  If this is not true, we can end
      up with I/O port numbers in the resources for PCI devices which will
      cause an oops if a driver tries to access them via inb/outb etc.,
      because there is no mapping for the corresponding addresses.
      
      Normally the I/O window starts at 0, but there are some situations on
      partitioned machines with a hypervisor where the window may not start
      at 0.
      
      This fixes the problem by allocating space for the range from 0 to the
      end of the I/O window.  That is, hose->io_base_virt contains the
      virtual address for I/O port 0 on the PCI bus, and thus the assumption
      that hose->io_base_virt - pci_io_base is the offset between the
      "global" I/O port numbers (those in the PCI device resources) and the
      I/O port numbers on the PCI bus is maintained.
      
      For PCI host bridges that are present at boot, we only map the portion
      of that range that correspond to the bridge's I/O window.  For bridges
      added after boot we ioremap the range from 0 to the end of the I/O
      window, for now; in fact hot-added bridges should be using
      reserve_phb_iospace() and __ioremap_explicit (so they get sensible
      global port numbers), but we don't have the infrastructure yet to do
      that (basically a free_phb_iospace() routine plus appropriate
      locking).
      
      Interestingly, this makes the two arms of the if statement in
      get_bus_io_range do almost exactly the same thing; that function could
      now be simplified in a further patch.
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      11fbb00c
    • D
      serial: define FIXED_PORT flag for serial_core · abb4a239
      David Gibson 提交于
      At present, the serial core always allows setserial in userspace to change the
      port address, irq and base clock of any serial port.  That makes sense for
      legacy ISA ports, but not for (say) embedded ns16550 compatible serial ports
      at peculiar addresses.  In these cases, the kernel code configuring the ports
      must know exactly where they are, and their clocking arrangements (which can
      be unusual on embedded boards).  It doesn't make sense for userspace to change
      these settings.
      
      Therefore, this patch defines a UPF_FIXED_PORT flag for the uart_port
      structure.  If this flag is set when the serial port is configured, any
      attempts to alter the port's type, io address, irq or base clock with
      setserial are ignored.
      
      In addition this patch uses the new flag for on-chip serial ports probed in
      arch/powerpc/kernel/legacy_serial.c, and for other hard-wired serial ports
      probed by drivers/serial/of_serial.c.
      Signed-off-by: NDavid Gibson <dwg@au1.ibm.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      abb4a239
  6. 07 5月, 2007 7 次提交
  7. 03 5月, 2007 4 次提交
  8. 02 5月, 2007 4 次提交