1. 28 6月, 2005 13 次提交
    • A
      [PATCH] kprobes: fix single-step out of line - take2 · 9ec4b1f3
      Ananth N Mavinakayanahalli 提交于
      Now that PPC64 has no-execute support, here is a second try to fix the
      single step out of line during kprobe execution.  Kprobes on x86_64 already
      solved this problem by allocating an executable page and using it as the
      scratch area for stepping out of line.  Reuse that.
      Signed-off-by: NAnanth N Mavinakayanahalli <ananth@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9ec4b1f3
    • M
      [PATCH] cciss: pci domain info pass 2 · cd6fb584
      Mike Miller 提交于
      This is pass 2 of my patch to add pci domain info to an existing ioctl.  This
      time I insert the domain between dev_fn and board_id as Willy suggested and
      change the var to unsigned short to ease Christoph's concerns.  Although I
      thought unsigned int was the correct var type for this.  I also thought it
      didn't matter where I inserted it in the structure.
      Signed-off-by: NMike Miller <mike.miller@hp.com>
      Acked-by: NJeff Garzik <jgarzik@pobox.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cd6fb584
    • M
      [PATCH] cciss: pci id fix · 3de0a70b
      Mike Miller 提交于
      This patch fixes a PCI ID I got wrong before.  It also adds support for
      another new SAS controller due out this summer.  I didn't have a marketing
      name prior to my last submission.  Also modifies the copyright date range.
      Signed-off-by: NMike Miller <mike.miller@hp.com>
      Acked-by: NJeff Garzik <jgarzik@pobox.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3de0a70b
    • A
      [PATCH] seccomp: tsc disable · ffaa8bd6
      Andrea Arcangeli 提交于
      I believe at least for seccomp it's worth to turn off the tsc, not just for
      HT but for the L2 cache too.  So it's up to you, either you turn it off
      completely (which isn't very nice IMHO) or I recommend to apply this below
      patch.
      
      This has been tested successfully on x86-64 against current cogito
      repository (i686 compiles so I didn't bother testing ;).  People selling
      the cpu through cpushare may appreciate this bit for a peace of mind.
      
      There's no way to get any timing info anymore with this applied
      (gettimeofday is forbidden of course).  The seccomp environment is
      completely deterministic so it can't be allowed to get timing info, it has
      to be deterministic so in the future I can enable a computing mode that
      does a parallel computing for each task with server side transparent
      checkpointing and verification that the output is the same from all the 2/3
      seller computers for each task, without the buyer even noticing (for now
      the verification is left to the buyer client side and there's no
      checkpointing, since that would require more kernel changes to track the
      dirty bits but it'll be easy to extend once the basic mode is finished).
      
      Eliminating a cold-cache read of the cr4 global variable will save one
      cacheline during the tlb flush while making the code per-cpu-safe at the
      same time.  Thanks to Mikael Pettersson for noticing the tlb flush wasn't
      per-cpu-safe.
      
      The global tlb flush can run from irq (IPI calling do_flush_tlb_all) but
      it'll be transparent to the switch_to code since the IPI won't make any
      change to the cr4 contents from the point of view of the interrupted code
      and since it's now all per-cpu stuff, it will not race.  So no need to
      disable irqs in switch_to slow path.
      Signed-off-by: NAndrea Arcangeli <andrea@cpushare.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      ffaa8bd6
    • B
      [PATCH] ppc32: Remove CONFIG_PMAC_PBOOK · 8c870933
      Benjamin Herrenschmidt 提交于
      This patch removes CONFIG_PMAC_PBOOK (PowerBook support).  This is now
      split into CONFIG_PMAC_MEDIABAY for the actual hotswap bay that some
      powerbooks have, CONFIG_PM for power management related code, and just left
      out of any CONFIG_* option for some generally useful stuff that can be used
      on non-laptops as well.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8c870933
    • B
      [PATCH] ppc32: Bump PMU interrupt priority · e4ee69c8
      Benjamin Herrenschmidt 提交于
      The Power Management Unit on PowerMacs is very sensitive to timeouts during
      async message exchanges.  It uses rather crude protocol based on a shift
      register with an interrupt and is almost continuously exchanging messages with
      the host CPU on laptops.
      
      This patch adds a routine to the open_pic driver to be able to select a PMU
      driver so that it bumps it's interrupt priority to above the normal level.
      
      This will allow PMU interrupts to occur while another interrupt is pending,
      and thus reduce the risk of machine beeing abruptly shutdown by the PMU due to
      a timeout in PMU communication caused by excessive interrupt latency.  The
      problem is very rare, and usually just doesn't happen, but it is still useful
      to make things even more robust.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e4ee69c8
    • D
      [PATCH] USB: wireless usb <linux/usb_ch9.h> declarations · 5da0106f
      David Brownell 提交于
      This provides declarations for new requests, descriptors, and bitfields as
      defined in the Wireless USB 1.0 spec.  Device support will involve a new
      "Wire Adapter" device class, connecting a USB Host to a cluster of wireless
      USB devices.  There will be two adapter types:
      
        * Host Wireless Adapter (HWA):  the downstream link is wireless, which
          connects a wireless USB host to wireless USB devices (not unlike like
          a hub) including to the second type of adapter.
      
        * Device Wireless Adapter (DWA): the upstream link is wireless, for
          connecting existing USB devices through wired links into the cluser.
      
      All wireless USB devices will need persistent (and secure!) key storage, and
      it's probable that Linux -- or device firmware -- will need to be involved
      with that to bootstrap the initial secure key exchange.
      
      Some user interface is required in that initial key exchange, and since the
      most "hands-off" one is a wired USB link, I suspect wireless operation will
      usually not be the only mode for wireless USB devices.  (Plus, devices can
      recharge batteries using wired USB...)  All other key exchange protocols need
      error prone user interactions, like copying and/or verifying keys.
      
      It'll likely be a while before we have commercial Wireless USB hardware,
      much less Linux implementations that know how to use it.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      5da0106f
    • D
      [PATCH] USB: gadget driver updates (SETUP api change) · 1bbc1696
      David Brownell 提交于
      This updates most of the gadget framework to expect SETUP packets use
      USB byteorder (matching the annotation in <linux/usb_ch9.h> and usage
      in the host side stack):
      
        - definition in <linux/usb_gadget.h>
        - gadget drivers:  Ethernet/RNDIS, serial/ACM, file_storage, gadgetfs.
        - dummy_hcd
      
      It also includes some other similar changes as suggested by "sparse",
      which was used to detect byteorder bugs.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1bbc1696
    • D
      [PATCH] USB: more omap_udc updates (dma and omap1710) · 65111084
      David Brownell 提交于
      More omap_udc updates:
      
        * OMAP 1710 updates
            - new UDC bit for clearing endpoint toggle, affecting CLEAR_HALT
            - new OTG bits affecting wakeup
        * Fix the bug Vladimir noted, that IN-DMA transfer code path kicks in
          for under 1024 bytes (not "up to 1024 bytes")
        * Handle transceiver setup more intelligently
            - use transceiver whenever one's available; this can be handy
              for GPIO based, loopback, or transceiverless configs
            - cleanup correctly after the "unrecognized HMC" case
        * DMA performance tweaks
            - allow burst/pack for memory access
            - use 16 bit DMA access most of the time on TIPB
        * Add workarounds for some DMA errata (not observed "in the wild"):
            - DMA CSAC/CDAC reads returning zero
            - RX/TX DMA config registers bit 12 always reads as zero (TI patch)
        * More "sparse" warnings removed, notably "changing" the SETUP packet
          to return data in USB byteorder (an API change, null effect on OMAP
          except for these warnings).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      65111084
    • O
      [PATCH] USB: Add isp116x-hcd USB host controller driver · 4808a1c0
      Olav Kongas 提交于
      This patch provides an "isp116x-hcd" driver for Philips'
      ISP1160/ISP1161 USB host controllers.
      
      The driver:
       - is relatively small, meant for use on embedded platforms.
       - runs usbtests 1-14 without problems for days.
       - has been in use by 6-7 different people on ARM and PPC platforms,
         running a range of devices including USB hubs.
       - supports suspend/resume of both the platform device and the root hub;
         supports remote wakeup of the root hub (but NOT the platform device)
         by USB devices.
       - does NOT support ISO transfers (nobody has asked for them).
       - is PIO-only.
      Signed-off-by: NOlav Kongas <ok@artecdesign.ee>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4808a1c0
    • J
      [PATCH] CFQ io scheduler updates · 3b18152c
      Jens Axboe 提交于
      - Adjust slice values
      
      - Instead of one async queue, one is defined per priority level. This
        prevents kernel threads (such as reiserfs/x and others) that run at
        higher io priority from conflicting with others. Previously, it was a
        coin toss what io prio the async queue got, it was defined by who
        first set up the queue.
      
      - Let a time slice only begin, when the previous slice is completely
        done. Previously we could be somewhat unfair to a new sync slice, if
        the previous slice was async and had several ios queued. This might
        need a little tweaking if throughput suffers a little due to this,
        allowing perhaps an overlap of a single request or so.
      
      - Optimize the calling of kblockd_schedule_work() by doing it only when
        it is strictly necessary (no requests in driver and work left to do).
      
      - Correct sync vs async logic. A 'normal' process can be purely async as
        well, and a flusher can be purely sync as well. Sync or async is now a
        property of the class defined and requests pending. Previously writers
        could be considered sync, when they were really async.
      
      - Get rid of the bit fields in cfqq and crq, use flags instead.
      
      - Various other cleanups and fixes
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3b18152c
    • J
      [PATCH] Update cfq io scheduler to time sliced design · 22e2c507
      Jens Axboe 提交于
      This updates the CFQ io scheduler to the new time sliced design (cfq
      v3).  It provides full process fairness, while giving excellent
      aggregate system throughput even for many competing processes.  It
      supports io priorities, either inherited from the cpu nice value or set
      directly with the ioprio_get/set syscalls.  The latter closely mimic
      set/getpriority.
      
      This import is based on my latest from -mm.
      Signed-off-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      22e2c507
    • D
      [PATCH] ARM: 2759/1: Fix IXP4xx debug code (again) · b46ffaef
      Deepak Saxena 提交于
      Patch from Deepak Saxena
      
      Accidently swapped the order of movne and orrne. Bad.
      Signed-off-by: NDeepak Saxena <dsaxena@plexity.net>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b46ffaef
  2. 27 6月, 2005 12 次提交
  3. 26 6月, 2005 15 次提交
    • C
      [PATCH] Cleanup patch for process freezing · 3e1d1d28
      Christoph Lameter 提交于
      1. Establish a simple API for process freezing defined in linux/include/sched.h:
      
         frozen(process)		Check for frozen process
         freezing(process)		Check if a process is being frozen
         freeze(process)		Tell a process to freeze (go to refrigerator)
         thaw_process(process)	Restart process
         frozen_process(process)	Process is frozen now
      
      2. Remove all references to PF_FREEZE and PF_FROZEN from all
         kernel sources except sched.h
      
      3. Fix numerous locations where try_to_freeze is manually done by a driver
      
      4. Remove the argument that is no longer necessary from two function calls.
      
      5. Some whitespace cleanup
      
      6. Clear potential race in refrigerator (provides an open window of PF_FREEZE
         cleared before setting PF_FROZEN, recalc_sigpending does not check
         PF_FROZEN).
      
      This patch does not address the problem of freeze_processes() violating the rule
      that a task may only modify its own flags by setting PF_FREEZE. This is not clean
      in an SMP environment. freeze(process) is therefore not SMP safe!
      Signed-off-by: NChristoph Lameter <christoph@lameter.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      3e1d1d28
    • A
      [PATCH] drivers/block/ll_rw_blk.c: cleanups · 93d17d3d
      Adrian Bunk 提交于
      This patch contains the following cleanups:
      - make needlessly global code static
      - remove the following unused global functions:
        - blkdev_scsi_issue_flush_fn
        - __blk_attempt_remerge
      - remove the following unused EXPORT_SYMBOL's:
        - blk_phys_contig_segment
        - blk_hw_contig_segment
        - blkdev_scsi_issue_flush_fn
        - __blk_attempt_remerge
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Acked-by: NJens Axboe <axboe@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      93d17d3d
    • A
      [PATCH] drivers/char/nvram.c: possible cleanups · 681ea4b9
      Adrian Bunk 提交于
      This patch contains the following possible cleanups:
      - make the needlessly global function __nvram_set_checksum static
      - #if 0 the unused global function nvram_set_checksum
      - remove the EXPORT_SYMBOL's for both functions
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      681ea4b9
    • N
      [PATCH] Use ALIGN to remove duplicate code · 8c0e33c1
      Nick Wilson 提交于
      This patch makes use of ALIGN() to remove duplicate round-up code.
      Signed-off-by: NNick Wilson <njw@osdl.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      8c0e33c1
    • M
      [PATCH] kexec code cleanup · 72414d3f
      Maneesh Soni 提交于
      o Following patch provides purely cosmetic changes and corrects CodingStyle
        guide lines related certain issues like below in kexec related files
      
        o braces for one line "if" statements, "for" loops,
        o more than 80 column wide lines,
        o No space after "while", "for" and "switch" key words
      
      o Changes:
        o take-2: Removed the extra tab before "case" key words.
        o take-3: Put operator at the end of line and space before "*/"
      Signed-off-by: NManeesh Soni <maneesh@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      72414d3f
    • A
      [PATCH] kdump: Use real pt_regs from exception · 6e274d14
      Alexander Nyberg 提交于
      Makes kexec_crashdump() take a pt_regs * as an argument.  This allows to
      get exact register state at the point of the crash.  If we come from direct
      panic assertion NULL will be passed and the current registers saved before
      crashdump.
      
      This hooks into two places:
      die(): check the conditions under which we will panic when calling
      do_exit and go there directly with the pt_regs that caused the fatal
      fault.
      
      die_nmi(): If we receive an NMI lockup while in the kernel use the
      pt_regs and go directly to crash_kexec(). We're probably nested up badly
      at this point so this might be the only chance to escape with proper
      information.
      Signed-off-by: NAlexander Nyberg <alexn@telia.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6e274d14
    • V
      [PATCH] kdump: Access dump file in elf format (/proc/vmcore) · 666bfddb
      Vivek Goyal 提交于
      From: "Vivek Goyal" <vgoyal@in.ibm.com>
      
      o Support for /proc/vmcore interface. This interface exports elf core image
        either in ELF32 or ELF64 format, depending on the format in which elf headers
        have been stored by crashed kernel.
      o Added support for CONFIG_VMCORE config option.
      o Removed the dependency on /proc/kcore.
      
      From: "Eric W. Biederman" <ebiederm@xmission.com>
      
      This patch has been refactored to more closely match the prevailing style in
      the affected files.  And to clearly indicate the dependency between
      /proc/kcore and proc/vmcore.c
      
      From: Hariprasad Nellitheertha <hari@in.ibm.com>
      
      This patch contains the code that provides an ELF format interface to the
      previous kernel's memory post kexec reboot.
      
      Signed off by Hariprasad Nellitheertha <hari@in.ibm.com>
      Signed-off-by: NEric Biederman <ebiederm@xmission.com>
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      666bfddb
    • V
      [PATCH] Retrieve elfcorehdr address from command line · 2030eae5
      Vivek Goyal 提交于
      This patch adds support for retrieving the address of elf core header if one
      is passed in command line.
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2030eae5
    • V
      [PATCH] kdump: Routines for copying dump pages · 60e64d46
      Vivek Goyal 提交于
      This patch provides the interfaces necessary to read the dump contents,
      treating it as a high memory device.
      
      Signed off by Hariprasad Nellitheertha <hari@in.ibm.com>
      Signed-off-by: NEric Biederman <ebiederm@xmission.com>
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      60e64d46
    • V
      [PATCH] kdump: Retrieve saved max pfn · 92aa63a5
      Vivek Goyal 提交于
      This patch retrieves the max_pfn being used by previous kernel and stores it
      in a safe location (saved_max_pfn) before it is overwritten due to user
      defined memory map.  This pfn is used to make sure that user does not try to
      read the physical memory beyond saved_max_pfn.
      Signed-off-by: NVivek Goyal <vgoyal@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      92aa63a5
    • V
      [PATCH] Kdump: Export crash notes section address through sysfs · 625f1c82
      Vivek Goyal 提交于
      o Following patch exports kexec global variable "crash_notes" to user space
        through sysfs as kernel attribute in /sys/kernel.
      Signed-off-by: NManeesh Soni <maneesh@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      625f1c82
    • H
      [PATCH] kexec: s390 support · cf13f0ea
      Heiko Carstens 提交于
      Add kexec support for s390 architecture.
      
      From: Milton Miller <miltonm@bga.com>
      
      - Fix passing of first argument to relocate_kernel assembly.
      - Fix Kconfig description.
      - Remove wrong comment and comments that describe obvious things.
      - Allow only KEXEC_TYPE_DEFAULT as image type -> dump not supported.
      Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cf13f0ea
    • R
      [PATCH] ppc64: kexec support for ppc64 · fce0d574
      R Sharada 提交于
      This patch implements the kexec support for ppc64 platforms.
      
      A couple of notes:
      
      1)  We copy the pages in virtual mode, using the full base kernel
          and a statically allocated stack.   At kexec_prepare time we
          scan the pages and if any overlap our (0, _end[]) range we
          return -ETXTBSY.
      
          On PowerPC 64 systems running in LPAR (logical partitioning)
          mode, only a small region of memory, referred to as the RMO,
          can be accessed in real mode.  Since Linux runs with only one
          zone of memory in the memory allocator, and it can be orders of
          magnitude more memory than the RMO, looping until we allocate
          pages in the source region is not feasible.  Copying in virtual
          means we don't have to write a hash table generation and call
          hypervisor to insert translations, instead we rely on the pinned
          kernel linear mapping.  The kernel already has move to linked
          location built in, so there is no requirement to load it at 0.
      
          If we want to load something other than a kernel, then a stub
          can be written to copy a linear chunk in real mode.
      
      2)  The start entry point gets passed parameters from the kernel.
          Slaves are started at a fixed address after copying code from
          the entry point.
      
          All CPUs get passed their firmware assigned physical id in r3
          (most calling conventions use this register for the first
          argument).
      
          This is used to distinguish each CPU from all other CPUs.
          Since firmware is not around, there is no other way to obtain
          this information other than to pass it somewhere.
      
          A single CPU, referred to here as the master and the one executing
          the kexec call, branches to start with the address of start in r4.
          While this can be calculated, we have to load it through a gpr to
          branch to this point so defining the register this is contained
          in is free.  A stack of unspecified size is available at r1
          (also common calling convention).
      
          All remaining running CPUs are sent to start at absolute address
          0x60 after copying the first 0x100 bytes from start to address 0.
          This convention was chosen because it matches what the kernel
          has been doing itself.  (only gpr3 is defined).
      
          Note: This is not quite the convention of the kexec bootblock v2
          in the kernel.  A stub has been written to convert between them,
          and we may adjust the kernel in the future to allow this directly
          without any stub.
      
      3)  Destination pages can be placed anywhere, even where they
          would not be accessible in real mode.  This will allow us to
          place ram disks above the RMO if we choose.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NR Sharada <sharada@in.ibm.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      fce0d574
    • R
      [PATCH] ppc64 kexec: native hash clear · f4c82d51
      R Sharada 提交于
      Add code to clear the hash table and invalidate the tlb for native (SMP,
      non-LPAR) mode.  Supports 16M and 4k pages.
      Signed-off-by: NMilton Miller <miltonm@bga.com>
      Signed-off-by: NR Sharada <sharada@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f4c82d51
    • E
      [PATCH] kexec: kexec ppc support · 70765aa4
      Eric W. Biederman 提交于
      I have tweaked this patch slightly to handle an empty list
      of pages to relocate passed to relocate_new_kernel.  And
      I have added ppc_md.machine_crash_shutdown.  To keep up with
      the changes in the generic kexec infrastructure.
      
      From: Albert Herranz <albert_herranz@yahoo.es>
      
      The following patch adds support for kexec on the ppc32 platform.
      
      Non-OpenFirmware based platforms are likely to work directly without
      additional changes on the kernel side.  The kexec-tools userland package
      may need to be slightly updated, though.
      
      For OpenFirmware based machines, additional work is still needed on the
      kernel side before kexec support is ready.  Benjamin Herrenschmidt is
      kindly working on that part.
      
      In order for a ppc platform to use the kexec kernel services it must
      implement some ppc_md hooks.  Otherwise, kexec will be explicitly disabled,
      as suggested by benh.
      
      There are 3+1 new ppc_md hooks that a platform supporting kexec may
      implement.  Two of them are mandatory for kexec to work.  See
      include/asm-ppc/machdep.h for details.
      
      - machine_kexec_prepare(image)
      
        This function is called to make any arrangements to the image before it
        is loaded.
      
        This hook _MUST_ be provided by a platform in order to activate kexec
        support for that platform.  Otherwise, the platform is considered to not
        support kexec and the kexec_load system call will fail (that makes all
        existing platforms by default non-kexec'able).
      
      - machine_kexec_cleanup(image)
      
        This function is called to make any cleanups on image after the loaded
        image data it is freed.  This hook is optional.  A platform may or may
        not provide this hook.
      
      - machine_kexec(image)
      
        This function is called to perform the _actual_ kexec.  This hook
        _MUST_ be provided by a platform in order to activate kexec support for
        that platform.
      
        If a platform provides machine_kexec_prepare but forgets to provide
        machine_kexec, a kexec will fall back to a reboot.
      
        A ready-to-use machine_kexec_simple() generic function is provided to,
        hopefully, simplify kexec adoption for embedded platforms.  A platform
        may call this function from its specific machine_kexec hook, like this:
      
      void myplatform_kexec(struct kimage *image)
      {
              machine_kexec_simple(image);
      }
      
      - machine_shutdown()
      
        This function is called to perform any machine specific shutdowns, not
        already done by drivers.  This hook is optional.  A platform may or may
        not provide this hook.
      
      An example (trimmed) platform specific module for a platform supporting
      kexec through the existing machine_kexec_simple follows:
      
      /* ... */
      
      #ifdef CONFIG_KEXEC
      int myplatform_kexec_prepare(struct kimage *image)
      {
              /* here, we can place additional preparations
      */
              return 0; /* yes, we support kexec */
      }
      
      void myplatform_kexec(struct kimage *image)
      {
              machine_kexec_simple(image);
      }
      #endif /* CONFIG_KEXEC */
      
      /* ... */
      
      void __init
      platform_init(unsigned long r3, unsigned long r4,
      unsigned long r5,
                    unsigned long r6, unsigned long r7)
      {
      
      /* ... */
      
      #ifdef CONFIG_KEXEC
              ppc_md.machine_kexec_prepare =
      myplatform_kexec_prepare;
              ppc_md.machine_kexec         =
      myplatform_kexec;
      #endif /* CONFIG_KEXEC */
      
      /* ... */
      
      }
      
      The kexec ppc kernel support has been heavily tested on the GameCube Linux
      port, and, as reported in the fastboot mailing list, it has been tested too
      on a Moto 82xx ppc by Rick Richardson.
      Signed-off-by: NAlbert Herranz <albert_herranz@yahoo.es>
      Signed-off-by: NEric Biederman <ebiederm@xmission.com>
      Acked-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      70765aa4