An error occurred fetching the project authors.
  1. 16 Jul, 2004 1 commit
  2. 02 Jul, 2004 1 commit
    • David Gibson's avatar
      [PATCH] ppc64: PACA cleanup · 16b004a7
      David Gibson authored
      Cleanup the PPC64 PACA structure.  It was previously a big mess of
      unecessary fields, overengineered cache layout and uninformative comments. 
      This is essentially a rewrite of include/asm-pp64/paca.h with associated
      changes elsewhere.  The patch:
      
      - Removes unused PACA fields
      
      - Removes uneeded #includes
      
      - Uses gcc attributes instead of explicit padding to get the desired
        cacheline layout, also rethinks the layout and comments accordingly.
      
      - Better comments where asm or firmware dependencies apply non-obvious
        layout constraints.
      
      - Splits up the pointless STAB structure, letting us move its elements
        independently.
      
      - Uses offsetof instead of hardcoded offset in spinlocks.
      
      - Eradicates xStudlyCaps identifiers
      
      - Replaces PACA guard page with an explicitly defined emergency stack
        (removing more than NR_CPUS pages from the initialized data segment).
      
      Cc: Paul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      16b004a7
  3. 24 Jun, 2004 1 commit
    • Paul Mackerras's avatar
      [PATCH] ppc64: clean up prom.c and related files · fe3a3a65
      Paul Mackerras authored
      Somebody back in the mists of time decided that call_prom and rtas_call
      should return longs even though both of those bits of firmware run in
      32-bit mode and produce a 32-bit result.  To make life more interesting,
      the 32-bit result gets zero-extended to 64 bits, which makes checking
      for a -1 return value more complicated than it should be.
      
      This patch changes call_prom and rtas_call to return an int, and makes
      the corresponding changes to use ints for the variables used to hold
      those return values. 
      
      While I was doing this I finally got annoyed enough with the strings of
      prom_print() and prom_print_hex() calls that we do to write a simple
      prom_printf.  I deliberately didn't use snprintf because the execution
      environment is weird at this point - we aren't running at the address we
      are linked at just yet - and I didn't want to inflict that on any code
      outside this file.  I also did a prom_debug() macro, which eliminated a
      few ifdefs. 
      
      There are also a bunch of other minor cleanups.  This patch makes very
      few algorithmic changes but does get rid of a lot of casts.  :)
      
      I have been running with this patch for a couple of weeks, and Anton has
      tested it too.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      fe3a3a65
  4. 01 Jun, 2004 2 commits
    • Andrew Morton's avatar
      [PATCH] ppc64: SLB accounting fix · 1348305a
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      Even though we have a variable containing the number of entries in the SLB,
      we hardwire the value at boot.  We also dont use the variable in the head.S
      fastpath handler.
      
      This patch removes it.
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      1348305a
    • Paul Mackerras's avatar
      [PATCH] ppc64: fix missing RELOCs, add linux,phandle property · f7b634c5
      Paul Mackerras authored
      This fixes a couple of bugs in arch/ppc64/kernel/prom.c.  We were
      missing a couple of places where we needed to use RELOC().  I added the
      RELOC in one case, and in the other, moved the variable that we were
      accessing onto the stack (and reduced its size).  (We use the variable
      to get a property value, but we aren't interested in the value, just in
      whether the property exists or not.  Since we pass the size of the
      variable to the OF getprop call, it won't overflow.) The effect of
      missing the RELOCs would be that random memory locations get used on IBM
      pSeries systems (possibly causing random boot failures). 
      
      The other thing that this does is add a linux,phandle property to each
      node, containing the phandle for the node, which is the token that OF
      uses to identify the node.  Some nodes reference other nodes by means
      of their phandle.  Without the linux,phandle property, userspace code
      looking at the OF device-tree image in /proc/device-tree has no way of
      knowing which other node is being referenced.
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
      f7b634c5
  5. 25 May, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] ppc64: avoid bogus real IRQ numbers · a5d436c4
      Andrew Morton authored
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      
      Early in the boot process on pSeries machines, we look in the Open Firmware
      device tree for information about the interrupt assignments, and assign
      virtual IRQ numbers for each physical IRQ.  There is currently a couple of
      bugs in this code which result in us assigning virtual IRQs for nonexistent
      physical IRQs.  This causes problems when we call the firmware to enable or
      disable those nonexistent physical IRQs.  Some versions at least of the
      firmware will hit an assertion failure and crash the machine when this
      happens.
      
      This patch fixes the bugs and ensures that we don't try and use nonexistent
      physical IRQ numbers.  One bug was that we were mapping ISA interrupts,
      which is unnecessary since virtual IRQ numbers 0 - 15 are reserved for
      them.  The other was that when we had a PCI interrupt (which is always in
      the range 1 to 4, corresponding to INTA to INTD) which didn't have a
      mapping in the PCI host bridge above it, we were just using the original
      number (usually 1) rather than ignoring it.
      a5d436c4
  6. 26 Apr, 2004 12 commits
    • Andrew Morton's avatar
      [PATCH] ppc64: prom.c fix for CONFIG_BLK_DEV_INITRD=n · 59e8d5c9
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Doesn't compile with CONFIG_BLK_DEV_INITRD=n.  Be more careful with the
      conditionals.
      
      Spotted by Dave Boutcher...
      59e8d5c9
    • Andrew Morton's avatar
      [PATCH] ppc64: Move Initrd · e51a23c6
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      This patch moves the initrd when "make_room" runs out of space, rather than
      stepping over it.  The problem with stepping over it is that it gets copied
      with the kernel when this happens, which wastes space.
      
      Also ensures that the initrd isn't where the kernel wants to be moved to: if
      it is, it gets moved out the way.
      e51a23c6
    • Andrew Morton's avatar
      [PATCH] ppc64: Initrd Cleanup · 54c832af
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Clean up initrd handling.
      
      1) Expose initrd_start and initrd_end to prom.c (replacing its local
         initrd_start and initrd_len).
      
      2) Don't hand mem (aka klimit) through functions which don't need it.
      
      3) Add more debugging under DEBUG_PROM in case we broke anything.
      54c832af
    • Andrew Morton's avatar
      [PATCH] ppc64: Clean up prom functions in prom.c · 79293254
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      1) Define PROM_ERROR: checks for call_prom() < 0 are bogus (returns ulong)
      2) All OF access functions should be marked __init.
      3) prom_strtoul isn't used at all.
      79293254
    • Andrew Morton's avatar
      [PATCH] ppc64: Fix prom.c to boot on G5 after make_room fix · 8b66a490
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Ben Herrenschmidt made this actually boot.
      8b66a490
    • Andrew Morton's avatar
      [PATCH] ppc64: make_room macro for ppc64 prom.c · efa8a179
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      copy_device_tree calls inspect_node() which recurses to copy the Open Firmware
      device tree.  It just copied into memory above the kernel for about 8MB, which
      can overwrite the initrd, and/or get truncated on big machines.
      
      The real solution is to allocate memory properly for all the prom_init memory
      users.  However, that's quite a change.  This patch introduces a "make_room"
      macro which inspect_node uses to get memory.  This does the same as before,
      except skips over the initrd if neccessary.
      efa8a179
    • Andrew Morton's avatar
      [PATCH] ppc64: Make finish_device_tree use lmb_alloc, not klimit · d6d33678
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      finish_device_tree simply allocates nodes by incrementing klimit (ie.  using
      memory on top of the kernel).  Change it to figure out how much memory it
      needs, then use lmb_alloc to allocate that, then fill it in.
      
      This gets rid of the only manipulation of klimit after prom_init.
      d6d33678
    • Andrew Morton's avatar
      [PATCH] ppc64: Rearrage Rest of prom.c in C Order · 196431fd
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Rather than pre-declaring static functions, order them so it's not neccessary.
      This makes the code easier to navigate and patch.
      196431fd
    • Andrew Morton's avatar
      [PATCH] ppc64: Rearrage interpret_funcs in C Order · 9f06f65e
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Rather than pre-declaring static functions, order them so it's not neccessary.
      This makes the code easier to navigate and patch.
      9f06f65e
    • Andrew Morton's avatar
      [PATCH] ppc64: Rearrage copy_device_tree() and its functions in C Order · cde5f62f
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Rather than pre-declaring static functions, order them so it's not neccessary.
      This makes the code easier to navigate and patch.
      cde5f62f
    • Andrew Morton's avatar
      [PATCH] ppc64: Rearrage finish_device_tree() and its functions in C Order · 5fa5de94
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Rather than pre-declaring static functions, order them so it's not neccessary.
      This makes the code easier to navigate and patch.
      5fa5de94
    • Andrew Morton's avatar
      [PATCH] ppc64: Split prom.c Into pre-reloc and post-reloc Functions · c8fbc7b9
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      Move all the functions that run normally (ie.  with the kernel in the correct
      address) to the bottom of prom.c, and keep all the functions which use RELOC()
      to the top, above "prom_init()" which calls them.
      
      Also, make prom_initialize_dart_table and prom_initialize_tce_table static.
      c8fbc7b9
  7. 15 Apr, 2004 1 commit
  8. 12 Apr, 2004 4 commits
  9. 31 Mar, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] ppc64: clean up virtual <-> absolute code · 807b9692
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
            Rusty Russell <rusty@rustcorp.com.au>
      
      The iSeries has an arch-specific mapping from physical <-> absolute
      addresses.  Fortunately this is only used in a few places.  However, the
      following arch-specific macros/functions are provided in addition to the
      standard macros:
      
      	__a2p()
      	__a2v()
      	__p2a()
      	__p2v()
      	__v2a()
      	__v2p()
      	absolute_to_phys()
      	phys_to_absolute()
      	virt_to_absolute()
      	absolute_to_virt()
      
      Reduce them to these, with slightly shorter names, and taking either pointers
      or unsigned long (as per __va and __pa) rather than making the caller cast:
      
      	abs_to_phys()
      	phys_to_abs()
      
      And helper macros:
      
      	virt_to_abs()
      	abs_to_virt()
      
      As is standard, virtual addresses are returned as void *, physical and
      absolute as unsigned long.
      
      Note that the change the iSeries_setup is a little subtle: ea is set to
      __va(pa) above, so "phys_to_abs(pa)" is the same as "virt_to_abs(ea)".
      
      Also, REALADDR is renamed to ISERIES_HV_ADDR and used in a couple of places
      where appropriate.
      807b9692
  10. 28 Mar, 2004 1 commit
    • Olof Johansson's avatar
      [PATCH] ppc64: Use full DART table on G5 · 9cfd4af7
      Olof Johansson authored
      This increases the DART table to use the full size.  We allocate a full
      16MB page anyway, so there's no difference in memory consumption. 
      
      Thanks to Ben for spotting this, it was left over from debugging...
      9cfd4af7
  11. 22 Mar, 2004 2 commits
  12. 18 Mar, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] ppc64: Fix POWER3 TCE allocation · 1c4c0ff6
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      - Fix for machines with 3GB IO holes (eg nighthawk).
      - Increase the maximum number of PHBs and warn if we exceed this (we used
        to walk off the end of the array)
      - Only allocate an 8MB TCE table on POWER4
      1c4c0ff6
  13. 15 Mar, 2004 2 commits
    • Andrew Morton's avatar
      [PATCH] ppc64: fix for massive OF properties · 48a6c2a9
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      We have some versions of firmware out there that have huge OF properties.
      So huge that we end up overwriting our initrd.
      
      Place a 1MB limit and warn bitterly if its over this.  Also fix a use of
      package-to-path where the variable was 64bytes but we would pass in a
      length of 255.
      48a6c2a9
    • Andrew Morton's avatar
      [PATCH] Fix for hotplug of multifunction cards. · 0e1311b1
      Andrew Morton authored
      From: Linda Xie <lxiep@us.ibm.com>
      
      The changes in this patch are for multifunction cards insertions/removals
      and  bug fixes:
      
      1. fix up new nodes' linux_phandle field.
      2. new nodes' phb, devfn(and so on) need to be fixed even the nodes don't
      	have "interrupts".
      3. change of_remove_node to non-recurisve func. The recursions will be done
      	by the caller.
      4. add a new function -- of_finish_dynamic_node_interrupts()
      0e1311b1
  14. 09 Mar, 2004 1 commit
    • Benjamin Herrenschmidt's avatar
      [PATCH] ppc64: Let OF initialize all displays in the system · a3c454e1
      Benjamin Herrenschmidt authored
      This patch reworks the early boot calls to OF to initialize displays.
      
      All present displays are now initialized in reverse order so the
      OF console stays on the first one. Initializing them all is necessary
      for dual head configurations as we need OF driver to properly setup
      the secondary TMDS of the video card, XFree isn't able to do that
      currently
      a3c454e1
  15. 27 Feb, 2004 4 commits
  16. 24 Feb, 2004 1 commit
    • Paul Mackerras's avatar
      [PATCH] Clean up IRQ mapping code · a9eceedc
      Paul Mackerras authored
      On the larger ppc64 machines we remap the interrupt numbers used by
      the hardware/firmware to virtual IRQ numbers < NR_IRQS.  Up until now
      we have used an array for the "real" (hardware) -> virtual IRQ number
      mapping, but with new machines coming out that will have 24-bit
      hardware IRQ numbers, this will break.  However, in fact it is only
      the XICS interrupt controller which cares about this mapping.  This
      patch moves that side of the mapping (real -> virtual) into the XICS
      code and makes it use a radix tree.
      
      On iSeries we have a similar issue, where the "real" IRQ numbers that
      we need are in fact an encoding of the bus/device/function address of
      the device.  This patch fixes iSeries to use the virt->real IRQ
      mapping, allowing us to support larger iSeries machines.  This patch
      also gets rid of the temporary hack that Stephen Rothwell submitted.
      
      On machines with OpenPIC (including the G5) the mapping is explicitly
      1-1, and that hasn't changed.  For other machines this patch cleans up
      and simplifies the code that sets up the virtual->real mapping.
      
      I have tested this code and verified that G5, pSeries and iSeries boot
      and run correctly with this patch.
      a9eceedc
  17. 23 Feb, 2004 4 commits
    • Andrew Morton's avatar
      [PATCH] ppc64: fix cmd_line bugs · 95f6d0ff
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      There were a number of bugs in our cmd_line handling:
      
      - We were looking at cmd_line after it had been tokenised. Use saved_command
        line instead
      - Use strlcpy instead of memcpy/explicit NULL set.
      - Remove magic numbers in iseries cmd_line parsing
      95f6d0ff
    • Andrew Morton's avatar
      [PATCH] ppc64: uniprocessor compile fixes · f3f62256
      Andrew Morton authored
      From: Anton Blanchard <anton@samba.org>
      
      UP compile fixes.
      f3f62256
    • Andrew Morton's avatar
      [PATCH] ppc64: set err to -ENODEV when a new node doesn't have "interrupt" property. · 87ca4494
      Andrew Morton authored
      From: Linda Xie <lxiep@us.ibm.com>
      
      set err to -ENODEV when a new node doesn't have "interrupt" property.
      87ca4494
    • Andrew Morton's avatar
      [PATCH] ppc64 cpu spinup fixes · 576a9e87
      Andrew Morton authored
      From: Rusty Russell <rusty@rustcorp.com.au>
      
      1) Check for cpuids >= NR_CPUS in prom_hold_cpus: we previously
         overflowed arrays when this happened, and checking it here ensures
         that it doesn't happen elsewhere.  Still move processors to
         secondary_hold (out of OF), but we won't release them.
      
      2) smp_iSeries_message_pass and smp_xics_message_pass don't need to
         iterate if given a specific CPU: cleanup and fix.
      
      3) kick_cpu variants don't need to check cpu range (caller is screwed
         anyway if this happened): replaced with BUG_ON for now.
      
      4) smp_openpic_probe and smp_xics_probe can use cpus_weight(): it's
         faster and simpler.
      
      5) User for_each_cpu/for_each_online_cpu as appropriate.
      576a9e87