1. 23 12月, 2013 4 次提交
  2. 28 11月, 2013 1 次提交
  3. 15 11月, 2013 1 次提交
  4. 12 11月, 2013 1 次提交
  5. 07 11月, 2013 2 次提交
  6. 06 11月, 2013 14 次提交
    • V
      ARC: [SMP] Fix build failures for large NR_CPUS · 57e26e57
      Vineet Gupta 提交于
      ST.as only takes S9 (255) for offset. This was going out of range when
      accessing a task_struct field with 4k NR_CPUS (due to 128b of coumaks
      itself in there).
      
      Workaround by using an intermediate register to do the address scaling.
      
      There is some duplication of fix for ctx_sw.c and ctx_sw_asm.S however
      given that C version will go away soon I'm not bothering to factor out
      the common code.
      Reported-by: NNoam Camus <noamc@ezchip.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      57e26e57
    • V
      ARC: [SMP] TLB flush · 5ea72a90
      Vineet Gupta 提交于
      - Add mm_cpumask setting (aggregating only, unlike some other arches)
        used to restrict the TLB flush cross-calling
      
      - cross-calling versions of TLB flush routines (thanks to Noam)
      Signed-off-by: NNoam Camus <noamc@ezchip.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      5ea72a90
    • C
      arc: export symbol for pm_power_off in reset.c · b6fe8e7c
      Chen Gang 提交于
      Need export symbol for it, or can not pass compiling, the related error
      with allmodconfig:
      
          MODPOST 2994 modules
        ERROR: "pm_power_off" [drivers/mfd/retu-mfd.ko] undefined!
        ERROR: "pm_power_off" [drivers/char/ipmi/ipmi_poweroff.ko] undefined!
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      b6fe8e7c
    • C
      arc: export symbol for save_stack_trace() in stacktrace.c · 8f146d02
      Chen Gang 提交于
      Need export its symbol just like other architectures done, or can not
      pass compiling with allmodconfig, the related error:
      
          MODPOST 2994 modules
        ERROR: "save_stack_trace" [kernel/backtracetest.ko] undefined!
        ERROR: "save_stack_trace" [drivers/md/persistent-data/dm-persistent-data.ko] undefined!
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      8f146d02
    • C
      arc: remove '__init' for get_hw_config_num_irq() · 4782f7f9
      Chen Gang 提交于
      get_hw_config_num_irq() may be called by normal iss_model_init_smp()
      which is a function pointer for 'init_smp' which may be called by
      first_lines_of_secondary() which also need be normal too.
      
      The related warning (with allmodconfig):
      
          MODPOST vmlinux.o
        WARNING: vmlinux.o(.text+0x5814): Section mismatch in reference from the function iss_model_init_smp() to the function .init.text:get_hw_config_num_irq()
        The function iss_model_init_smp() references
        the function __init get_hw_config_num_irq().
        This is often because iss_model_init_smp lacks a __init
        annotation or the annotation of get_hw_config_num_irq is wrong.
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      4782f7f9
    • C
      arc: remove '__init' for first_lines_of_secondary() · 8f5d221b
      Chen Gang 提交于
      first_lines_of_secondary() is a '__init' function, but it may be called
      by __cpu_up() by _cpu_up() by cpu_up() which is a normal export symbol
      function. So recommend to remove '__init'.
      
      The related warning (with allmodconfig):
      
          MODPOST vmlinux.o
        WARNING: vmlinux.o(.text+0x315c): Section mismatch in reference from the function __cpu_up() to the function .init.text:first_lines_of_secondary()
        The function __cpu_up() references
        the function __init first_lines_of_secondary().
        This is often because __cpu_up lacks a __init
        annotation or the annotation of first_lines_of_secondary is wrong.
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      8f5d221b
    • C
      arc: kgdb: add default implementation for kgdb_roundup_cpus() · 3d01c1ce
      Chen Gang 提交于
      arc supports kgdb, but need update -- add function kgdb_roundup_cpus(),
      or can not pass compiling. At present, add the simple generic one just
      like other architectures(e.g. tile, mips ...).
      
      The related error (with allmodconfig):
      
        kernel/built-in.o: In function `kgdb_cpu_enter':
        kernel/debug/debug_core.c:580: undefined reference to `kgdb_roundup_cpus'
      Signed-off-by: NChen Gang <gang.chen@asianux.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      3d01c1ce
    • V
      ARC: Add support for irqflags tracing and lockdep · 0dafafc3
      Vineet Gupta 提交于
      Lockdep required a small fix to stacktrace API which was incorrectly
      unwindign out of __switch_to for the current call frame.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      0dafafc3
    • V
      ARC: Reset the value of Interrupt Priority Register · 54c8bff1
      Vineet Gupta 提交于
      In case bootloader has changed the priority of one/more IRQ lines
      Reported-by: NNoam Camus <noamc@ezchip.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      54c8bff1
    • V
      ARC: Reduce #ifdef'ery for unaligned access emulation · 07ba69a4
      Vineet Gupta 提交于
      Emulation not enabled is treated as if the fixup failed, so no need for
      special #ifdef checks.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      07ba69a4
    • V
      ARC: Change calling convention of do_page_fault() · 21a63b56
      Vineet Gupta 提交于
      switch the args (address, pt_regs) to match with all the other "C"
      exception handlers.
      
      This removes the awkwardness in EV_ProtV for page fault vs. unaligned
      access.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      21a63b56
    • V
      ARC: use __weak instead of __attribute__((weak)) · 064a6269
      Vineet Gupta 提交于
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      064a6269
    • V
      ARC: Annotate some functions as static · 8e457d6a
      Vineet Gupta 提交于
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      8e457d6a
    • C
      arc: Replace __get_cpu_var uses · 6855e95c
      Christoph Lameter 提交于
      __get_cpu_var() is used for multiple purposes in the kernel source. One of them is
      address calculation via the form &__get_cpu_var(x). This calculates the address for
      the instance of the percpu variable of the current processor based on an offset.
      
      Other use cases are for storing and retrieving data from the current processors percpu area.
      __get_cpu_var() can be used as an lvalue when writing data or on the right side of an assignment.
      
      __get_cpu_var() is defined as :
      
      #define __get_cpu_var(var) (*this_cpu_ptr(&(var)))
      
      __get_cpu_var() always only does an address determination. However, store and retrieve operations
      could use a segment prefix (or global register on other platforms) to avoid the address calculation.
      
      this_cpu_write() and this_cpu_read() can directly take an offset into a percpu area and use
      optimized assembly code to read and write per cpu variables.
      
      This patch converts __get_cpu_var into either an explicit address calculation using this_cpu_ptr()
      or into a use of this_cpu operations that use the offset. Thereby address calcualtions are avoided
      and less registers are used when code is generated.
      
      At the end of the patchset all uses of __get_cpu_var have been removed so the macro is removed too.
      
      The patchset includes passes over all arches as well. Once these operations are used throughout then
      specialized macros can be defined in non -x86 arches as well in order to optimize per cpu access by
      f.e. using a global register that may be set to the per cpu base.
      
      Transformations done to __get_cpu_var()
      
      1. Determine the address of the percpu instance of the current processor.
      
      	DEFINE_PER_CPU(int, y);
      	int *x = &__get_cpu_var(y);
      
          Converts to
      
      	int *x = this_cpu_ptr(&y);
      
      2. Same as #1 but this time an array structure is involved.
      
      	DEFINE_PER_CPU(int, y[20]);
      	int *x = __get_cpu_var(y);
      
          Converts to
      
      	int *x = this_cpu_ptr(y);
      
      3. Retrieve the content of the current processors instance of a per cpu variable.
      
      	DEFINE_PER_CPU(int, u);
      	int x = __get_cpu_var(y)
      
         Converts to
      
      	int x = __this_cpu_read(y);
      
      4. Retrieve the content of a percpu struct
      
      	DEFINE_PER_CPU(struct mystruct, y);
      	struct mystruct x = __get_cpu_var(y);
      
         Converts to
      
      	memcpy(this_cpu_ptr(&x), y, sizeof(x));
      
      5. Assignment to a per cpu variable
      
      	DEFINE_PER_CPU(int, y)
      	__get_cpu_var(y) = x;
      
         Converts to
      
      	this_cpu_write(y, x);
      
      6. Increment/Decrement etc of a per cpu variable
      
      	DEFINE_PER_CPU(int, y);
      	__get_cpu_var(y)++
      
         Converts to
      
      	this_cpu_inc(y)
      Acked-by: NVineet Gupta <vgupta@synopsys.com>
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      6855e95c
  7. 14 10月, 2013 1 次提交
  8. 12 10月, 2013 1 次提交
    • V
      ARC: Ignore ptrace SETREGSET request for synthetic register "stop_pc" · 5b242828
      Vineet Gupta 提交于
      ARCompact TRAP_S insn used for breakpoints, commits before exception is
      taken (updating architectural PC). So ptregs->ret contains next-PC and
      not the breakpoint PC itself. This is different from other restartable
      exceptions such as TLB Miss where ptregs->ret has exact faulting PC.
      gdb needs to know exact-PC hence ARC ptrace GETREGSET provides for
      @stop_pc which returns ptregs->ret vs. EFA depending on the
      situation.
      
      However, writing stop_pc (SETREGSET request), which updates ptregs->ret
      doesn't makes sense stop_pc doesn't always correspond to that reg as
      described above.
      
      This was not an issue so far since user_regs->ret / user_regs->stop_pc
      had same value and both writing to ptregs->ret was OK, needless, but NOT
      broken, hence not observed.
      
      With gdb "jump", they diverge, and user_regs->ret updating ptregs is
      overwritten immediately with stop_pc, which this patch fixes.
      Reported-by: NAnton Kolesov <akolesov@synopsys.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      5b242828
  9. 10 10月, 2013 4 次提交
  10. 03 10月, 2013 1 次提交
  11. 27 9月, 2013 2 次提交
  12. 12 9月, 2013 1 次提交
    • N
      ARC: SMP failed to boot due to missing IVT setup · c3567f8a
      Noam Camus 提交于
      Commit 05b016ec "ARC: Setup Vector Table Base in early boot" moved
      the Interrupt vector Table setup out of arc_init_IRQ() which is called
      for all CPUs, to entry point of boot cpu only, breaking booting of others.
      
      Fix by adding the same to entry point of non-boot CPUs too.
      
      read_arc_build_cfg_regs() printing IVT Base Register didn't help the
      casue since it prints a synthetic value if zero which is totally bogus,
      so fix that to print the exact Register.
      
      [vgupta: Remove the now stale comment from header of arc_init_IRQ and
      also added the commentary for halt-on-reset]
      
      Cc: Gilad Ben-Yossef <gilad@benyossef.com>
      Cc: Cc: <stable@vger.kernel.org> #3.11
      Signed-off-by: NNoam Camus <noamc@ezchip.com>
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c3567f8a
  13. 05 9月, 2013 2 次提交
  14. 29 8月, 2013 1 次提交
  15. 26 8月, 2013 3 次提交
    • V
      ARC: Entry Handler tweaks: Optimize away redundant IRQ_DISABLE_SAVE · fce16bc3
      Vineet Gupta 提交于
      In the exception return path, for both U/K cases, intr are already
      disabled (for various existing reasons). So when we drop down to
      @restore_regs, we need not redo that.
      
      There was subtle issue - when intr were NOT being disabled for
      ret-to-kernel-but-no-preemption case - now fixed by moving the
      IRQ_DISABLE further up in @resume_kernel_mode.
      
      So what do we gain:
      
      * Shaves off a few insn in return path.
      
      * Eliminates the need for IRQ_DISABLE_SAVE assembler macro for ARCv2
        hence allows for entry code sharing.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      fce16bc3
    • V
      ARC: Exception Handlers Code consolidation · 37f3ac49
      Vineet Gupta 提交于
      After the recent cleanups, all the exception handlers now have same
      boilerplate prologue code. Move that into common macro.
      
      This reduces readability but helps greatly with sharing / duplicating
      entry code with ARCv2 ISA where the handlers are pretty much the same,
      just the entry prologue is different (due to hardware assist).
      
      Also while at it, add the missing FAKE_RET_FROM_EXCPN calls in couple of
      places to drop down to pure kernel mode (from exception mode) before
      jumping off into "C" code.
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      37f3ac49
    • V
      ARC: Add some .gitignore entries · fe240f11
      Vineet Gupta 提交于
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      fe240f11
  16. 29 6月, 2013 1 次提交