1. 26 6月, 2017 5 次提交
  2. 25 12月, 2016 1 次提交
  3. 25 10月, 2016 1 次提交
    • A
      sparc64: Setup a scheduling domain for highest level cache. · d624716b
      Atish Patra 提交于
      Individual scheduler domain should consist different hierarchy
      consisting of cores sharing similar property. Currently, no
      scheduler domain is defined separately for the cores that shares
      the last level cache. As a result, the scheduler fails to take
      advantage of cache locality while migrating tasks during load
      balancing.
      
      Here are the cpu masks currently present for sparc that are/can
      be used in scheduler domain construction.
      cpu_core_map : set based on the cores that shares l1 cache.
      core_core_sib_map : is set based on the socket id.
      The prior SPARC notion of socket was defined as highest level of
      shared cache. However, the MD record on T7 platforms now describes
      the CPUs that share the physical socket and this is no longer tied
      to shared cache.
      
      That's why a separate cpu mask needs to be created that truly
      represent highest level of shared cache for all platforms.
      Signed-off-by: NAtish Patra <atish.patra@oracle.com>
      Reviewed-by: NChris Hyser <chris.hyser@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d624716b
  4. 23 12月, 2015 1 次提交
  5. 23 4月, 2015 1 次提交
    • C
      sparc64: Setup sysfs to mark LDOM sockets, cores and threads correctly · acc455cf
      chris hyser 提交于
      commit 5f4826a362405748bbf73957027b77993e61e1af
      Author: chris hyser <chris.hyser@oracle.com>
      Date:   Tue Apr 21 10:31:38 2015 -0400
      
          sparc64: Setup sysfs to mark LDOM sockets, cores and threads correctly
      
          The current sparc kernel has no representation for sockets though tools
          like lscpu can pull this from sysfs. This patch walks the machine
          description cache and socket hierarchy and marks sockets as well as cores
          and threads such that a representative sysfs is created by
          drivers/base/topology.c.
      
          Before this patch:
              $ lscpu
              Architecture:          sparc64
              CPU op-mode(s):        32-bit, 64-bit
              Byte Order:            Big Endian
              CPU(s):                1024
              On-line CPU(s) list:   0-1023
              Thread(s) per core:    8
              Core(s) per socket:    1     <--- wrong
              Socket(s):             128   <--- wrong
              NUMA node(s):          4
              NUMA node0 CPU(s):     0-255
              NUMA node1 CPU(s):     256-511
              NUMA node2 CPU(s):     512-767
              NUMA node3 CPU(s):     768-1023
      
              After this patch:
              $ lscpu
              Architecture:          sparc64
              CPU op-mode(s):        32-bit, 64-bit
              Byte Order:            Big Endian
              CPU(s):                1024
              On-line CPU(s) list:   0-1023
              Thread(s) per core:    8
              Core(s) per socket:    32
              Socket(s):             4
              NUMA node(s):          4
              NUMA node0 CPU(s):     0-255
              NUMA node1 CPU(s):     256-511
              NUMA node2 CPU(s):     512-767
              NUMA node3 CPU(s):     768-1023
      
          Most of this patch was done by Chris with updates by David.
      Signed-off-by: NChris Hyser <chris.hyser@oracle.com>
      Signed-off-by: NDavid Ahern <david.ahern@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acc455cf
  6. 15 4月, 2015 1 次提交
    • M
      sparc: clarify __GFP_NOFAIL allocation · f91e8d6d
      Michal Hocko 提交于
      Commit 920c3ed7 ("[SPARC64]: Add basic infrastructure for MD
      add/remove notification") has added __GFP_NOFAIL for the allocation
      request but it hasn't mentioned why is this strict requirement really
      needed.  The code was handling an allocation failure and propagated it
      properly up the callchain so it is not clear why it is needed.
      
      Dave has clarified the intention when I tried to remove the flag as not
      being necessary:
      
      : It is a serious failure.
      :
      : If we miss an MDESC update due to this allocation failure, the update
      : is not an event which gets retransmitted so we will lose the updated
      : machine description forever.
      :
      : We really need this allocation to succeed.
      
      So add a comment to clarify the nofail flag and get rid of the failure
      check because __GFP_NOFAIL allocation doesn't fail.
      Signed-off-by: NMichal Hocko <mhocko@suse.cz>
      Cc: David Rientjes <rientjes@google.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: "Theodore Ts'o" <tytso@mit.edu>
      Cc: Mel Gorman <mgorman@suse.de>
      Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Vipul Pandya <vipul@chelsio.com>
      Cc: Jan Kara <jack@suse.cz>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f91e8d6d
  7. 22 7月, 2014 1 次提交
  8. 11 3月, 2014 1 次提交
  9. 15 7月, 2013 1 次提交
    • P
      sparc: delete __cpuinit/__CPUINIT usage from all users · 2066aadd
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      Note that some harmless section mismatch warnings may result, since
      notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
      are flagged as __cpuinit  -- so if we remove the __cpuinit from
      arch specific callers, we will also get section mismatch warnings.
      As an intermediate step, we intend to turn the linux/init.h cpuinit
      content into no-ops as early as possible, since that will get rid
      of these warnings.  In any case, they are temporary and harmless.
      
      This removes all the arch/sparc uses of the __cpuinit macros from
      C files and removes __CPUINIT from assembly files.  Note that even
      though arch/sparc/kernel/trampoline_64.S has instances of ".previous"
      in it, they are all paired off against explicit ".section" directives,
      and not implicitly paired with __CPUINIT (unlike mips and arm were).
      
      [1] https://lkml.org/lkml/2013/5/20/589
      
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: sparclinux@vger.kernel.org
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      2066aadd
  10. 07 9月, 2012 1 次提交
  11. 01 11月, 2011 2 次提交
  12. 05 8月, 2011 1 次提交
    • D
      sparc: Size mondo queues more sanely. · 961f65fc
      David S. Miller 提交于
      There is currently no upper limit on the mondo queue sizes we'll use,
      which guarentees that we'll eventually his page allocation limits, and
      thus allocation failures, due to MAX_ORDER.
      
      Cap the sizes sanely, current limits are:
      
      CPU  MONDO	2 * max_possible_cpus
      DEV  MONDO	256 (basically NR_IRQS)
      RES  MONDO	128
      NRES MONDO	4
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      961f65fc
  13. 17 5月, 2011 1 次提交
  14. 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
  15. 15 10月, 2010 1 次提交
    • A
      llseek: automatically add .llseek fop · 6038f373
      Arnd Bergmann 提交于
      All file_operations should get a .llseek operation so we can make
      nonseekable_open the default for future file operations without a
      .llseek pointer.
      
      The three cases that we can automatically detect are no_llseek, seq_lseek
      and default_llseek. For cases where we can we can automatically prove that
      the file offset is always ignored, we use noop_llseek, which maintains
      the current behavior of not returning an error from a seek.
      
      New drivers should normally not use noop_llseek but instead use no_llseek
      and call nonseekable_open at open time.  Existing drivers can be converted
      to do the same when the maintainer knows for certain that no user code
      relies on calling seek on the device file.
      
      The generated code is often incorrectly indented and right now contains
      comments that clarify for each added line why a specific variant was
      chosen. In the version that gets submitted upstream, the comments will
      be gone and I will manually fix the indentation, because there does not
      seem to be a way to do that using coccinelle.
      
      Some amount of new code is currently sitting in linux-next that should get
      the same modifications, which I will do at the end of the merge window.
      
      Many thanks to Julia Lawall for helping me learn to write a semantic
      patch that does all this.
      
      ===== begin semantic patch =====
      // This adds an llseek= method to all file operations,
      // as a preparation for making no_llseek the default.
      //
      // The rules are
      // - use no_llseek explicitly if we do nonseekable_open
      // - use seq_lseek for sequential files
      // - use default_llseek if we know we access f_pos
      // - use noop_llseek if we know we don't access f_pos,
      //   but we still want to allow users to call lseek
      //
      @ open1 exists @
      identifier nested_open;
      @@
      nested_open(...)
      {
      <+...
      nonseekable_open(...)
      ...+>
      }
      
      @ open exists@
      identifier open_f;
      identifier i, f;
      identifier open1.nested_open;
      @@
      int open_f(struct inode *i, struct file *f)
      {
      <+...
      (
      nonseekable_open(...)
      |
      nested_open(...)
      )
      ...+>
      }
      
      @ read disable optional_qualifier exists @
      identifier read_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      expression E;
      identifier func;
      @@
      ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
      {
      <+...
      (
         *off = E
      |
         *off += E
      |
         func(..., off, ...)
      |
         E = *off
      )
      ...+>
      }
      
      @ read_no_fpos disable optional_qualifier exists @
      identifier read_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      @@
      ssize_t read_f(struct file *f, char *p, size_t s, loff_t *off)
      {
      ... when != off
      }
      
      @ write @
      identifier write_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      expression E;
      identifier func;
      @@
      ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
      {
      <+...
      (
        *off = E
      |
        *off += E
      |
        func(..., off, ...)
      |
        E = *off
      )
      ...+>
      }
      
      @ write_no_fpos @
      identifier write_f;
      identifier f, p, s, off;
      type ssize_t, size_t, loff_t;
      @@
      ssize_t write_f(struct file *f, const char *p, size_t s, loff_t *off)
      {
      ... when != off
      }
      
      @ fops0 @
      identifier fops;
      @@
      struct file_operations fops = {
       ...
      };
      
      @ has_llseek depends on fops0 @
      identifier fops0.fops;
      identifier llseek_f;
      @@
      struct file_operations fops = {
      ...
       .llseek = llseek_f,
      ...
      };
      
      @ has_read depends on fops0 @
      identifier fops0.fops;
      identifier read_f;
      @@
      struct file_operations fops = {
      ...
       .read = read_f,
      ...
      };
      
      @ has_write depends on fops0 @
      identifier fops0.fops;
      identifier write_f;
      @@
      struct file_operations fops = {
      ...
       .write = write_f,
      ...
      };
      
      @ has_open depends on fops0 @
      identifier fops0.fops;
      identifier open_f;
      @@
      struct file_operations fops = {
      ...
       .open = open_f,
      ...
      };
      
      // use no_llseek if we call nonseekable_open
      ////////////////////////////////////////////
      @ nonseekable1 depends on !has_llseek && has_open @
      identifier fops0.fops;
      identifier nso ~= "nonseekable_open";
      @@
      struct file_operations fops = {
      ...  .open = nso, ...
      +.llseek = no_llseek, /* nonseekable */
      };
      
      @ nonseekable2 depends on !has_llseek @
      identifier fops0.fops;
      identifier open.open_f;
      @@
      struct file_operations fops = {
      ...  .open = open_f, ...
      +.llseek = no_llseek, /* open uses nonseekable */
      };
      
      // use seq_lseek for sequential files
      /////////////////////////////////////
      @ seq depends on !has_llseek @
      identifier fops0.fops;
      identifier sr ~= "seq_read";
      @@
      struct file_operations fops = {
      ...  .read = sr, ...
      +.llseek = seq_lseek, /* we have seq_read */
      };
      
      // use default_llseek if there is a readdir
      ///////////////////////////////////////////
      @ fops1 depends on !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier readdir_e;
      @@
      // any other fop is used that changes pos
      struct file_operations fops = {
      ... .readdir = readdir_e, ...
      +.llseek = default_llseek, /* readdir is present */
      };
      
      // use default_llseek if at least one of read/write touches f_pos
      /////////////////////////////////////////////////////////////////
      @ fops2 depends on !fops1 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier read.read_f;
      @@
      // read fops use offset
      struct file_operations fops = {
      ... .read = read_f, ...
      +.llseek = default_llseek, /* read accesses f_pos */
      };
      
      @ fops3 depends on !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier write.write_f;
      @@
      // write fops use offset
      struct file_operations fops = {
      ... .write = write_f, ...
      +	.llseek = default_llseek, /* write accesses f_pos */
      };
      
      // Use noop_llseek if neither read nor write accesses f_pos
      ///////////////////////////////////////////////////////////
      
      @ fops4 depends on !fops1 && !fops2 && !fops3 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier read_no_fpos.read_f;
      identifier write_no_fpos.write_f;
      @@
      // write fops use offset
      struct file_operations fops = {
      ...
       .write = write_f,
       .read = read_f,
      ...
      +.llseek = noop_llseek, /* read and write both use no f_pos */
      };
      
      @ depends on has_write && !has_read && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier write_no_fpos.write_f;
      @@
      struct file_operations fops = {
      ... .write = write_f, ...
      +.llseek = noop_llseek, /* write uses no f_pos */
      };
      
      @ depends on has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      identifier read_no_fpos.read_f;
      @@
      struct file_operations fops = {
      ... .read = read_f, ...
      +.llseek = noop_llseek, /* read uses no f_pos */
      };
      
      @ depends on !has_read && !has_write && !fops1 && !fops2 && !has_llseek && !nonseekable1 && !nonseekable2 && !seq @
      identifier fops0.fops;
      @@
      struct file_operations fops = {
      ...
      +.llseek = noop_llseek, /* no read or write fn */
      };
      ===== End semantic patch =====
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Julia Lawall <julia@diku.dk>
      Cc: Christoph Hellwig <hch@infradead.org>
      6038f373
  16. 14 7月, 2010 1 次提交
  17. 11 12月, 2009 1 次提交
  18. 16 6月, 2009 4 次提交
  19. 16 3月, 2009 1 次提交
  20. 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
  21. 27 12月, 2008 1 次提交
  22. 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
  23. 24 4月, 2008 1 次提交
  24. 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
  25. 17 9月, 2007 1 次提交
  26. 16 8月, 2007 1 次提交
  27. 08 8月, 2007 1 次提交
  28. 21 7月, 2007 1 次提交
  29. 20 7月, 2007 1 次提交
  30. 18 7月, 2007 1 次提交
  31. 17 7月, 2007 1 次提交
  32. 16 7月, 2007 1 次提交