1. 18 12月, 2015 2 次提交
  2. 27 11月, 2015 2 次提交
  3. 11 11月, 2015 1 次提交
  4. 03 11月, 2015 1 次提交
  5. 27 10月, 2015 1 次提交
    • H
      s390/nmi: remove casts · dc6e1555
      Heiko Carstens 提交于
      Remove all the casts to and from the machine check interruption code.
      This patch changes struct mci to a union, which contains an anonymous
      structure with the already known bits and in addition an unsigned
      long field, which contains the raw machine check interruption code.
      
      This allows to simply assign and decoce the interruption code value
      without the need for all those casts we had all the time.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      dc6e1555
  6. 25 3月, 2015 1 次提交
    • H
      s390: remove 31 bit support · 5a79859a
      Heiko Carstens 提交于
      Remove the 31 bit support in order to reduce maintenance cost and
      effectively remove dead code. Since a couple of years there is no
      distribution left that comes with a 31 bit kernel.
      
      The 31 bit kernel also has been broken since more than a year before
      anybody noticed. In addition I added a removal warning to the kernel
      shown at ipl for 5 minutes: a960062e ("s390: add 31 bit warning
      message") which let everybody know about the plan to remove 31 bit
      code. We didn't get any response.
      
      Given that the last 31 bit only machine was introduced in 1999 let's
      remove the code.
      Anybody with 31 bit user space code can still use the compat mode.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      5a79859a
  7. 22 1月, 2015 1 次提交
    • M
      s390: add SMT support · 10ad34bc
      Martin Schwidefsky 提交于
      The multi-threading facility is introduced with the z13 processor family.
      This patch adds code to detect the multi-threading facility. With the
      facility enabled each core will surface multiple hardware threads to the
      system. Each hardware threads looks like a normal CPU to the operating
      system with all its registers and properties.
      
      The SCLP interface reports the SMT topology indirectly via the maximum
      thread id. Each reported CPU in the result of a read-scp-information
      is a core representing a number of hardware threads.
      
      To reflect the reduced CPU capacity if two hardware threads run on a
      single core the MT utilization counter set is used to normalize the
      raw cputime obtained by the CPU timer deltas. This scaled cputime is
      reported via the taskstats interface. The normal /proc/stat numbers
      are based on the raw cputime and are not affected by the normalization.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      10ad34bc
  8. 09 10月, 2014 1 次提交
  9. 27 8月, 2014 1 次提交
  10. 10 6月, 2014 1 次提交
    • S
      s390/cio: silence lockdep warning · dbe33fc9
      Sebastian Ott 提交于
      On systems where a ccw based console device is used a lockdep false alarm
      could be triggered when a device driver calls printk while holding a
      subchannels lock (e.g. in it's irq handler). Since this is valid behavior
      fix this by introducing a separate lock class for the console subchannels
      lock.
      
      The lockdep warning was revealed by "printk: enable interrupts before calling
      console_trylock_for_printk()" which changed console_unlock() to be called with
      lockdep enabled.
      
      [ INFO: possible recursive locking detected ]
      3.15.0-rc5-next-20140520 #1 Not tainted
      ---------------------------------------------
      ccwgroup/2239 is trying to acquire lock:
      (&(sch->lock)->rlock){-.-...}, at: [<0000000000642a52>] raw3215_write+0x52/0x200
      
      but task is already holding lock:
      (&(sch->lock)->rlock){-.-...}, at: [<00000000005fd160>] do_cio_interrupt+0x60/0x108
      
      other info that might help us debug this:
      Possible unsafe locking scenario:
      
      CPU0
      ----
      lock(&(sch->lock)->rlock);
      lock(&(sch->lock)->rlock);
      
      *** DEADLOCK ***
      
      May be due to missing lock nesting notation
      
      8 locks held by ccwgroup/2239:
      
      stack backtrace:
      CPU: 3 PID: 2239 Comm: ccwgroup Not tainted 3.15.0-rc5-next-20140520 #1
      0000000036fab518 0000000036fab528 0000000000000002 0000000000000000
      0000000036fab5b8 0000000036fab530 0000000036fab530 00000000001116e8
      0000000000000000 0000000000986ec4 00000000009701b6 000000000000000b
      0000000036fab578 0000000036fab518 0000000000000000 0000000000000000
      0000000000000000 00000000001116e8 0000000036fab518 0000000036fab578
      Call Trace:
      ([<0000000000111626>] show_trace+0x14e/0x158)
      [<000000000011169a>] show_stack+0x6a/0xe8
      [<00000000007c6e72>] dump_stack+0x82/0xb0
      [<00000000001a95f2>] validate_chain.isra.37+0xa4a/0xbb0
      [<00000000001acaca>] __lock_acquire+0x4da/0xcd0
      [<00000000001ada1a>] lock_acquire+0xba/0x218
      [<00000000007cd634>] _raw_spin_lock_irqsave+0x6c/0xb8
      [<0000000000642a52>] raw3215_write+0x52/0x200
      [<0000000000643d16>] con3215_write+0x76/0xf8
      [<00000000001bd87a>] call_console_drivers.constprop.25+0xfa/0x210
      [<00000000001be0b0>] console_unlock+0x3e0/0x4e8
      [<00000000001be450>] vprintk_emit+0x298/0x6e0
      [<00000000005aa210>] dev_vprintk_emit+0xe0/0x1a8
      [<00000000005aa320>] dev_printk_emit+0x48/0x50
      [<00000000005aa390>] __dev_printk+0x68/0xb0
      [<00000000005aa7c2>] _dev_info+0x62/0x70
      [<0000000000657bf0>] qeth_l2_send_setmac_cb+0xd0/0x190
      [<0000000000651a1e>] qeth_send_control_data_cb+0x3a6/0x6a8
      [<0000000000655546>] qeth_irq+0x1a6/0xac0
      [<000000000060a0ac>] ccw_device_call_handler+0xa4/0xc0
      [<0000000000608b62>] ccw_device_irq+0x5a/0x190
      [<00000000005fd1ca>] do_cio_interrupt+0xca/0x108
      [<00000000001c0a2e>] handle_irq_event_percpu+0x5e/0x378
      [<00000000001c46fc>] handle_percpu_irq+0x6c/0x98
      [<00000000001c0066>] generic_handle_irq+0x46/0x68
      [<000000000010b5b6>] do_IRQ+0x5e/0x88
      [<00000000007cf304>] io_call+0x6/0x20
      [<000000000064c63a>] qeth_send_control_data+0x322/0x570
      ([<000000000064c50e>] qeth_send_control_data+0x1f6/0x570)
      [<0000000000651db2>] qeth_send_ipa_cmd+0x92/0x120
      [<000000000065b310>] __qeth_l2_set_online+0x170/0xaa8
      [<000000000060ebb6>] ccwgroup_set_online+0x56/0x90
      [<000000000060ef96>] ccwgroup_online_store+0xd6/0xe0
      [<000000000033d11a>] kernfs_fop_write+0x10a/0x188
      [<00000000002bbd00>] vfs_write+0x98/0x1c0
      [<00000000002bc8a0>] SyS_write+0x60/0xd0
      [<00000000007cee3a>] sysc_nr_ok+0x22/0x28
      [<000003fffd0c3f28>] 0x3fffd0c3f28
      Reported-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      dbe33fc9
  11. 28 5月, 2014 1 次提交
  12. 13 3月, 2014 1 次提交
    • F
      cputime: Default implementation of nsecs -> cputime conversion · bfc3f028
      Frederic Weisbecker 提交于
      The architectures that override cputime_t (s390, ppc) don't provide
      any version of nsecs_to_cputime(). Indeed this cputime_t implementation
      by backend only happens when CONFIG_VIRT_CPU_ACCOUNTING_NATIVE=y under
      which the core code doesn't make any use of nsecs_to_cputime().
      
      At least for now.
      
      We are going to make a broader use of it so lets provide a default
      version with a per usecs granularity. It should be good enough for most
      usecases.
      
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Acked-by: NRik van Riel <riel@redhat.com>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      bfc3f028
  13. 05 3月, 2014 2 次提交
    • T
      s390: Do not rely on magic indirect includes · 257ceab7
      Thomas Gleixner 提交于
      commit: 8f945a33 (genirq: Move kstat_incr_irqs_this_cpu() to core)
      unearthed the following:
      
         arch/s390/kernel/irq.c: In function 'init_IRQ':
      >> arch/s390/kernel/irq.c:93:2: error: implicit declaration of function 'irq_reserve_irqs'
      [-Werror=implicit-function-declaration]
      ....
         cc1: some warnings being treated as errors
      --
         drivers/s390/cio/cio.c: In function 'init_cio_interrupts':
      >> drivers/s390/cio/cio.c:594:2: error: implicit declaration of function
      'irq_set_chip_and_handler' [-Werror=implicit-function-declaration]
      [-Werror=implicit-function-declaration]
      ....
         cc1: some warnings being treated as errors
      
      The reason is that those files require linux/irq.h and magically
      pulled that in via linux/kernel_stat.h
      
      The commit above got rid of the pointless include of linux/irq.h in
      linux/kernel_stat.h and therefor broke the build.
      
      Include linux/irq.h
      
      Reported-by: fengguang.wu@intel.com
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: s390 <linux-s390@vger.kernel.org>
      257ceab7
    • T
      s390: Cio: Use the core irq stats function · bc5dfcff
      Thomas Gleixner 提交于
      Let the core do the irq_desc resolution.
      
      No functional change.
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: s390 <linux-s390@vger.kernel.org>
      Link: http://lkml.kernel.org/r/20140223212737.983433636@linutronix.deSigned-off-by: NThomas Gleixner <tglx@linutronix.de>
      bc5dfcff
  14. 21 2月, 2014 1 次提交
    • S
      s390: improve debug feature usage · f7e1e65d
      Sebastian Ott 提交于
      The maximum usable buffer size of the s390 debug feature (when using
      the sprintf_view) is 11 * sizeof(long) (1 pointer for the format
      string + 10 arguments). When a larger buffer size is specified the
      additional memory is unused and wasted per debug entry. So reducing
      the buffer size to its maximum (or to the actual buffer size used)
      will make more precious debug feature space usable.
      
      For pci_msg, chsc_msg, and cio_crw we use the additional usable dbf
      space to reduce the number of allocated pages.
      Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      f7e1e65d
  15. 06 2月, 2014 1 次提交
  16. 22 10月, 2013 1 次提交
    • M
      s390/time: correct use of store clock fast · 8c071b0f
      Martin Schwidefsky 提交于
      The result of the store-clock-fast (STCKF) instruction is a bit fuzzy.
      It can happen that the value stored on one CPU is smaller than the value
      stored on another CPU, although the order of the stores is the other
      way around. This can cause deltas of get_tod_clock() values to become
      negative when they should not be.
      
      We need to be more careful with store-clock-fast, this patch partially
      reverts git commit e4b7b4238e666682555461fa52eecd74652f36bb "time:
      always use stckf instead of stck if available". The get_tod_clock()
      function now uses the store-clock-extended (STCKE) instruction.
      get_tod_clock_fast() can be used if the fuzziness of store-clock-fast
      is acceptable e.g. for wait loops local to a CPU.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      8c071b0f
  17. 22 8月, 2013 1 次提交
    • M
      s390: convert interrupt handling to use generic hardirq · 1f44a225
      Martin Schwidefsky 提交于
      With the introduction of PCI it became apparent that s390 should
      convert to generic hardirqs as too many drivers do not have the
      correct dependency for GENERIC_HARDIRQS. On the architecture
      level s390 does not have irq lines. It has external interrupts,
      I/O interrupts and adapter interrupts. This patch hard-codes all
      external interrupts as irq #1, all I/O interrupts as irq #2 and
      all adapter interrupts as irq #3. The additional information from
      the lowcore associated with the interrupt is stored in the
      pt_regs of the interrupt frame, where the interrupt handler can
      pick it up. For PCI/MSI interrupts the adapter interrupt handler
      scans the relevant bit fields and calls generic_handle_irq with
      the virtual irq number for the MSI interrupt.
      Reviewed-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      1f44a225
  18. 27 6月, 2013 1 次提交
  19. 26 4月, 2013 1 次提交
  20. 17 4月, 2013 4 次提交
  21. 14 2月, 2013 1 次提交
  22. 08 1月, 2013 2 次提交
    • H
      s390/irq: remove split irq fields from /proc/stat · 420f42ec
      Heiko Carstens 提交于
      Now that irq sum accounting for /proc/stat's "intr" line works again we
      have the oddity that the sum field (first field) contains only the sum
      of the second (external irqs) and third field (I/O interrupts).
      The reason for that is that these two fields are already sums of all other
      fields. So if we would sum up everything we would count every interrupt
      twice.
      This is broken since the split interrupt accounting was merged two years
      ago: 052ff461 "[S390] irq: have detailed
      statistics for interrupt types".
      To fix this remove the split interrupt fields from /proc/stat's "intr"
      line again and only have them in /proc/interrupts.
      
      This restores the old behaviour, seems to be the only sane fix and mimics
      a behaviour from other architectures where /proc/interrupts also contains
      more than /proc/stat's "intr" line does.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      420f42ec
    • H
      s390/irq: enable irq sum accounting for /proc/stat again · add9bde2
      Heiko Carstens 提交于
      For more than two years, since f2c66cd8
      "/proc/stat: scalability of irq num per cpu" the output of /proc/stat is
      broken.
      The first field in the "intr" line should contain the sum of all interrupts,
      however since the above mentioned change it is always zero.
      
      The reason for that is that a per cpu irq sum variable had been introduced
      which got incremented when calling kstat_incr_irqs_this_cpu(). However
      on s390 we directly incremented only the per cpu per irq counter by accessing
      the array element via kstat_cpu(smp_processor_id()).irqs[...].
      So fix this and use the kstat_incr_irqs_this_cpu() wrapper which increments
      both: the per cpu per irq counter and the per cpu irq sum counter.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      add9bde2
  23. 26 9月, 2012 1 次提交
  24. 20 7月, 2012 1 次提交
    • H
      s390/comments: unify copyright messages and remove file names · a53c8fab
      Heiko Carstens 提交于
      Remove the file name from the comment at top of many files. In most
      cases the file name was wrong anyway, so it's rather pointless.
      
      Also unify the IBM copyright statement. We did have a lot of sightly
      different statements and wanted to change them one after another
      whenever a file gets touched. However that never happened. Instead
      people start to take the old/"wrong" statements to use as a template
      for new files.
      So unify all of them in one go.
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      a53c8fab
  25. 16 5月, 2012 1 次提交
  26. 11 3月, 2012 1 次提交
    • M
      [S390] rework idle code · 4c1051e3
      Martin Schwidefsky 提交于
      Whenever the cpu loads an enabled wait PSW it will appear as idle to the
      underlying host system. The code in default_idle calls vtime_stop_cpu
      which does the necessary voodoo to get the cpu time accounting right.
      The udelay code just loads an enabled wait PSW. To correct this rework
      the vtime_stop_cpu/vtime_start_cpu logic and move the difficult parts
      to entry[64].S, vtime_stop_cpu can now be called from anywhere and
      vtime_start_cpu is gone. The correction of the cpu time during wakeup
      from an enabled wait PSW is done with a critical section in entry[64].S.
      As vtime_start_cpu is gone, s390_idle_check can be removed as well.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      4c1051e3
  27. 30 10月, 2011 2 次提交
  28. 26 9月, 2011 1 次提交
  29. 16 3月, 2011 2 次提交
  30. 17 12月, 2010 1 次提交
    • C
      drivers: Replace __get_cpu_var with __this_cpu_read if not used for an address. · 4a6f4fe8
      Christoph Lameter 提交于
      __get_cpu_var() can be replaced with this_cpu_read and will then use a single
      read instruction with implied address calculation to access the correct per cpu
      instance.
      
      However, the address of a per cpu variable passed to __this_cpu_read() cannot be
      determed (since its an implied address conversion through segment prefixes).
      Therefore apply this only to uses of __get_cpu_var where the addres of the
      variable is not used.
      
      V3->V4:
      	- Move one instance of this_cpu_inc_return to a later patch
      	  so that this one can go in without percpu infrastructrure
      	  changes.
      
      Sedat: fixed compile failure caused by an extra ')'.
      
      Cc: Neil Horman <nhorman@tuxdriver.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Sedat Dilek <sedat.dilek@gmail.com>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NChristoph Lameter <cl@linux.com>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      4a6f4fe8
  31. 17 5月, 2010 1 次提交
    • M
      [S390] idle time accounting vs. machine checks · 6377981f
      Martin Schwidefsky 提交于
      A machine check can interrupt the i/o and external interrupt handler
      anytime. If the machine check occurs while the interrupt handler is
      waking up from idle vtime_start_cpu can get executed a second time
      and the int_clock / async_enter_timer values in the lowcore get
      clobbered. This can confuse the cpu time accounting.
      To fix this problem two changes are needed. First the machine check
      handler has to use its own copies of int_clock and async_enter_timer,
      named mcck_clock and mcck_enter_timer. Second the nested execution
      of vtime_start_cpu has to be prevented. This is done in s390_idle_check
      by checking the wait bit in the program status word.
      Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
      6377981f