1. 13 Apr, 2012 1 commit
    • David S. Miller's avatar
      sparc64: Fix bootup crash on sun4v. · 9e0daff3
      David S. Miller authored
      
      
      The DS driver registers as a subsys_initcall() but this can be too
      early, in particular this risks registering before we've had a chance
      to allocate and setup module_kset in kernel/params.c which is
      performed also as a subsyts_initcall().
      
      Register DS using device_initcall() insteal.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      Cc: stable@vger.kernel.org
      9e0daff3
  2. 27 Mar, 2012 1 commit
  3. 04 Dec, 2011 1 commit
  4. 11 Aug, 2011 1 commit
  5. 02 Aug, 2011 1 commit
  6. 16 May, 2011 1 commit
  7. 30 Mar, 2011 1 commit
    • David S. Miller's avatar
      sparc64: Fix section mis-match errors. · 3628aa06
      David S. Miller authored
      
      
      Fix all of the problems spotted by CONFIG_DEBUG_SECTION_MISMATCH under
      arch/sparc during a 64-bit defconfig build.
      
      They fall into two categorites:
      
      1) of_device_id is marked as __initdata, and we can never do this
         since these objects sit in the device core data structures way
         past boot.  So even if a driver will never be reloaded, we have
         to keep the device ID table around.
      
         Mark such cases const instead.
      
      2) The bootmem alloc/free handling code in mdesc.c was not fully
         marked __init as it should be, thus generating a reference
         to free_bootmem_late() (which is __init) from non-__init code.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3628aa06
  8. 16 Jun, 2009 2 commits
  9. 15 Mar, 2009 1 commit
  10. 06 Jan, 2009 1 commit
    • Sam Ravnborg's avatar
      sparc64: Use unsigned long long for u64. · 90181136
      Sam Ravnborg authored
      
      
      Andrew Morton wrote:
      
          People keep on doing
      
                  printk("%llu", some_u64);
      
          testing it only on x86_64 and this generates a warning storm on
          powerpc, sparc64, etc.  Because they use `long', not `long long'.
      
          Quite a few 64-bit architectures are using `long' for their
          s64/u64 types.  We should convert them all to `long long'.
      
      Update types.h so we use unsigned long long for u64 and
      fix all warnings in sparc64 code.
      Tested with an allnoconfig, defconfig and allmodconfig builds.
      
      This patch introduces additional warnings in several drivers.
      These will be dealt with in separate patches.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      90181136
  11. 04 Dec, 2008 1 commit
    • Sam Ravnborg's avatar
      sparc,sparc64: unify kernel/ · a88b5ba8
      Sam Ravnborg authored
      
      
      o Move all files from sparc64/kernel/ to sparc/kernel
        - rename as appropriate
      o Update sparc/Makefile to the changes
      o Update sparc/kernel/Makefile to include the sparc64 files
      
      NOTE: This commit changes link order on sparc64!
      
      Link order had to change for either of sparc32 and sparc64.
      And assuming sparc64 see more testing than sparc32 change link
      order on sparc64 where issues will be caught faster.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a88b5ba8
  12. 01 Sep, 2008 1 commit
  13. 17 Jul, 2008 1 commit
    • Adrian Bunk's avatar
      sparc64/kernel/: make code static · 908f5162
      Adrian Bunk authored
      
      
      This patch makes the following needlessly global code static:
      - central.c: struct central_bus
      - central.c: struct fhc_list
      - central.c: apply_fhc_ranges()
      - central.c: apply_central_ranges()
      - ds.c: struct ds_states_template[]
      - pci_msi.c: sparc64_setup_msi_irq()
      - pci_msi.c: sparc64_teardown_msi_irq()
      - pci_sun4v.c: struct sun4v_dma_ops
      - sys_sparc32.c: cp_compat_stat64()
      Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      908f5162
  14. 23 Mar, 2008 1 commit
  15. 24 Feb, 2008 1 commit
    • Sam Ravnborg's avatar
      [SPARC64]: Fix section mismatchs from dr_cpu_data · 7769bd1c
      Sam Ravnborg authored
      
      
      Fix following warnings:
      WARNING: vmlinux.o(.text+0x4b258): Section mismatch in reference from the function dr_cpu_data() to the function .devinit.text:mdesc_fill_in_cpu_data()
      WARNING: vmlinux.o(.text+0x4b290): Section mismatch in reference from the function dr_cpu_data() to the function .cpuinit.text:cpu_up()
      
      mdesc_fill_in_cpu_data() is only used during early init and for
      cpu hotplug so the __cpuinit annotation is the correct choice.
      We have the call chain:
      dr_cpu_data() => dr_cpu_configure() => mdesc_fill_in_cpu_data()
      
      dr_cpu_data() is used only during early init and for cpu
      hotplug. So annotating them all __cpuinit solves the
      section mismatch and should be correct.
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7769bd1c
  16. 06 Nov, 2007 1 commit
  17. 20 Jul, 2007 2 commits
  18. 19 Jul, 2007 1 commit
  19. 18 Jul, 2007 1 commit
  20. 16 Jul, 2007 11 commits
    • David S. Miller's avatar
      [SPARC64]: Fix race between MD update and dr-cpu add. · 778feeb4
      David S. Miller authored
      
      
      We need to make sure the MD update occurs before we try to
      process dr-cpu configure requests.  MD update and dr-cpu
      were being processed by seperate threads so that did not
      happen occaisionally.
      
      Fix this by executing all domain services data packets from
      a single thread, in order.
      
      This will help simplify some other things as well.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      778feeb4
    • David S. Miller's avatar
      e0204409
    • David S. Miller's avatar
      [SPARC64]: Give more accurate errors in dr_cpu_configure(). · 9918cc2e
      David S. Miller authored
      
      
      When cpu_up() fails, we can discern the most likely cause.
      
      If cpu_present() is false, this means the cpu did not appear
      in the MD.  If -ENODEV is the error return value, then
      the processor did not boot properly into the kernel.
      
      Pass this information back in the dr-cpu response packet.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      9918cc2e
    • David S. Miller's avatar
      [SPARC64]: Process dr-cpu events in a kthread instead of workqueue. · bd0e11ff
      David S. Miller authored
      
      
      This will be necessary to handle unconfigure requests
      properly.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bd0e11ff
    • David S. Miller's avatar
      [SPARC64]: SMP build fixes. · 27a2ef38
      David S. Miller authored
      
      
      With the move of ldom_startcpu_cpuid() into smp.c some other
      things need to follow along:
      
      1) smp.c is not a driver so we can't use "PFX" macro in the
         printk calls.
      
      2) smp.c now needs asm/io.h and asm/hvtramp.h, ds.c no longer
         does
      
      3) kimage_addr_to_ra() also needs to move into smp.c
      
      While we're here, update copyright info and my email address
      in smp.c
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27a2ef38
    • David S. Miller's avatar
      [SPARC64]: Fix build regressions added by dr-cpu changes. · b14f5c10
      David S. Miller authored
      
      
      Do not select HOTPLUG_CPU from SUN_LDOMS, that causes
      HOTPLUG_CPU to be selected even on non-SMP which is
      illegal.
      
      Only build hvtramp.o when SMP, just like trampoline.o
      
      Protect dr-cpu code in ds.c with HOTPLUG_CPU.
      
      Likewise move ldom_startcpu_cpuid() to smp.c and protect
      it and the call site with SUN_LDOMS && HOTPLUG_CPU.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b14f5c10
    • David S. Miller's avatar
      [SPARC64]: Initial LDOM cpu hotplug support. · 4f0234f4
      David S. Miller authored
      
      
      Only adding cpus is supports at the moment, removal
      will come next.
      
      When new cpus are configured, the machine description is
      updated.  When we get the configure request we pass in a
      cpu mask of to-be-added cpus to the mdesc CPU node parser
      so it only fetches information for those cpus.  That code
      also proceeds to update the SMT/multi-core scheduling bitmaps.
      
      cpu_up() does all the work and we return the status back
      over the DS channel.
      
      CPUs via dr-cpu need to be booted straight out of the
      hypervisor, and this requires:
      
      1) A new trampoline mechanism.  CPUs are booted straight
         out of the hypervisor with MMU disabled and running in
         physical addresses with no mappings installed in the TLB.
      
         The new hvtramp.S code sets up the critical cpu state,
         installs the locked TLB mappings for the kernel, and
         turns the MMU on.  It then proceeds to follow the logic
         of the existing trampoline.S SMP cpu bringup code.
      
      2) All calls into OBP have to be disallowed when domaining
         is enabled.  Since cpus boot straight into the kernel from
         the hypervisor, OBP has no state about that cpu and therefore
         cannot handle being invoked on that cpu.
      
         Luckily it's only a handful of interfaces which can be called
         after the OBP device tree is obtained.  For example, rebooting,
         halting, powering-off, and setting options node variables.
      
      CPU removal support will require some infrastructure changes
      here.  Namely we'll have to process the requests via a true
      kernel thread instead of in a workqueue.  workqueues run on
      a per-cpu thread, but when unconfiguring we might need to
      force the thread to execute on another cpu if the current cpu
      is the one being removed.  Removal of a cpu also causes the kernel
      to destroy that cpu's workqueue running thread.
      
      Another issue on removal is that we may have interrupts still
      pointing to the cpu-to-be-removed.  So new code will be needed
      to walk the active INO list and retarget those cpus as-needed.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4f0234f4
    • David S. Miller's avatar
      [SPARC64]: Fix setting of variables in LDOM guest. · b3e13fbe
      David S. Miller authored
      
      
      There is a special domain services capability for setting
      variables in the OBP options node.  Guests don't have permanent
      store for the OBP variables like a normal system, so they are
      instead maintained in the LDOM control node or in the SC.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3e13fbe
    • David S. Miller's avatar
      [SPARC64]: Abstract out mdesc accesses for better MD update handling. · 43fdf274
      David S. Miller authored
      
      
      Since we have to be able to handle MD updates, having an in-tree
      set of data structures representing the MD objects actually makes
      things more painful.
      
      The MD itself is easy to parse, and we can implement the existing
      interfaces using direct parsing of the MD binary image.
      
      The MD is now reference counted, so accesses have to now take the
      form:
      
      	handle = mdesc_grab();
      
      	... operations on MD ...
      
      	mdesc_release(handle);
      
      The only remaining issue are cases where code holds on to references
      to MD property values.  mdesc_get_property() returns a direct pointer
      to the property value, most cases just pull in the information they
      need and discard the pointer, but there are few that use the pointer
      directly over a long lifetime.  Those will be fixed up in a subsequent
      changeset.
      
      A preliminary handler for MD update events from domain services is
      there, it is rudimentry but it works and handles all of the reference
      counting.  It does not check the generation number of the MDs,
      and it does not generate a "add/delete" list for notification to
      interesting parties about MD changes but that will be forthcoming.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      43fdf274
    • David S. Miller's avatar
      [SPARC64]: Use more mearningful names for IRQ registry. · 133f09a1
      David S. Miller authored
      
      
      All of the interrupts say "LDX RX" and "LDX TX" currently
      which is next to useless.  Put a device specific prefix
      before "RX" and "TX" instead which makes it much more
      useful.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      133f09a1
    • David S. Miller's avatar
      e450992d