1. 04 1月, 2013 1 次提交
    • G
      SPARC: drivers: remove __dev* attributes. · 7c9503b8
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      7c9503b8
  2. 14 4月, 2012 1 次提交
    • D
      sparc64: Fix bootup crash on sun4v. · 9e0daff3
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      Cc: stable@vger.kernel.org
      9e0daff3
  3. 28 3月, 2012 1 次提交
  4. 29 2月, 2012 1 次提交
  5. 05 12月, 2011 1 次提交
  6. 12 8月, 2011 1 次提交
  7. 03 8月, 2011 1 次提交
  8. 17 5月, 2011 1 次提交
  9. 31 3月, 2011 1 次提交
    • D
      sparc64: Fix section mis-match errors. · 3628aa06
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      3628aa06
  10. 16 6月, 2009 2 次提交
  11. 16 3月, 2009 1 次提交
  12. 07 1月, 2009 1 次提交
    • S
      sparc64: Use unsigned long long for u64. · 90181136
      Sam Ravnborg 提交于
      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: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      90181136
  13. 05 12月, 2008 1 次提交
    • S
      sparc,sparc64: unify kernel/ · a88b5ba8
      Sam Ravnborg 提交于
      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: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a88b5ba8
  14. 01 9月, 2008 1 次提交
  15. 18 7月, 2008 1 次提交
    • A
      sparc64/kernel/: make code static · 908f5162
      Adrian Bunk 提交于
      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: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      908f5162
  16. 24 3月, 2008 1 次提交
  17. 25 2月, 2008 1 次提交
    • S
      [SPARC64]: Fix section mismatchs from dr_cpu_data · 7769bd1c
      Sam Ravnborg 提交于
      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: NSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7769bd1c
  18. 07 11月, 2007 1 次提交
  19. 21 7月, 2007 2 次提交
  20. 20 7月, 2007 1 次提交
  21. 18 7月, 2007 1 次提交
  22. 17 7月, 2007 1 次提交
  23. 16 7月, 2007 10 次提交
    • D
      [SPARC64]: dr-cpu unconfigure support. · e0204409
      David S. Miller 提交于
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e0204409
    • D
      [SPARC64]: Give more accurate errors in dr_cpu_configure(). · 9918cc2e
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      9918cc2e
    • D
      [SPARC64]: Process dr-cpu events in a kthread instead of workqueue. · bd0e11ff
      David S. Miller 提交于
      This will be necessary to handle unconfigure requests
      properly.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bd0e11ff
    • D
      [SPARC64]: SMP build fixes. · 27a2ef38
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      27a2ef38
    • D
      [SPARC64]: Fix build regressions added by dr-cpu changes. · b14f5c10
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      b14f5c10
    • D
      [SPARC64]: Initial LDOM cpu hotplug support. · 4f0234f4
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      4f0234f4
    • D
      [SPARC64]: Fix setting of variables in LDOM guest. · b3e13fbe
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      b3e13fbe
    • D
      [SPARC64]: Abstract out mdesc accesses for better MD update handling. · 43fdf274
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      43fdf274
    • D
      [SPARC64]: Use more mearningful names for IRQ registry. · 133f09a1
      David S. Miller 提交于
      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: NDavid S. Miller <davem@davemloft.net>
      133f09a1
    • D
      [SPARC64]: Initial domain-services driver. · e450992d
      David S. Miller 提交于
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e450992d