aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-17 13:08:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-17 13:08:59 -0400
commit80111bfb672d8c04d60c25559243554f732f2848 (patch)
treecd8d31f04532d9be6a43f344213bf85e5a228577 /drivers
parentbf8a9a4755737f6630756f0d87bea9b38f0ed369 (diff)
parentf3e20ad67b4c8365df9818fd3c8026e105d6b53a (diff)
Merge tag 's390-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull more s390 updates from Martin Schwidefsky: - Enhancements for the QDIO layer - Remove the RCP trace event - Avoid three build issues - Move the defconfig to the configs directory * tag 's390-5.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: move arch/s390/defconfig to arch/s390/configs/defconfig s390/qdio: optimize state inspection of HW-owned SBALs s390/qdio: use get_buf_state() in debug_get_buf_state() s390/qdio: allow to scan all Output SBALs in one go s390/cio: Remove tracing for rchp instruction s390/kasan: adapt disabled_wait usage to avoid build error latent_entropy: avoid build error when plugin cflags are not set s390/boot: fix compiler error due to missing awk strtonum
Diffstat (limited to 'drivers')
-rw-r--r--drivers/s390/cio/qdio_main.c19
-rw-r--r--drivers/s390/cio/trace.c1
-rw-r--r--drivers/s390/cio/trace.h23
3 files changed, 11 insertions, 32 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c
index cfce255521ac..7b7620de2acd 100644
--- a/drivers/s390/cio/qdio_main.c
+++ b/drivers/s390/cio/qdio_main.c
@@ -205,17 +205,22 @@ static inline int get_buf_states(struct qdio_q *q, unsigned int bufnr,
205 int auto_ack, int merge_pending) 205 int auto_ack, int merge_pending)
206{ 206{
207 unsigned char __state = 0; 207 unsigned char __state = 0;
208 int i; 208 int i = 1;
209 209
210 if (is_qebsm(q)) 210 if (is_qebsm(q))
211 return qdio_do_eqbs(q, state, bufnr, count, auto_ack); 211 return qdio_do_eqbs(q, state, bufnr, count, auto_ack);
212 212
213 /* get initial state: */ 213 /* get initial state: */
214 __state = q->slsb.val[bufnr]; 214 __state = q->slsb.val[bufnr];
215
216 /* Bail out early if there is no work on the queue: */
217 if (__state & SLSB_OWNER_CU)
218 goto out;
219
215 if (merge_pending && __state == SLSB_P_OUTPUT_PENDING) 220 if (merge_pending && __state == SLSB_P_OUTPUT_PENDING)
216 __state = SLSB_P_OUTPUT_EMPTY; 221 __state = SLSB_P_OUTPUT_EMPTY;
217 222
218 for (i = 1; i < count; i++) { 223 for (; i < count; i++) {
219 bufnr = next_buf(bufnr); 224 bufnr = next_buf(bufnr);
220 225
221 /* merge PENDING into EMPTY: */ 226 /* merge PENDING into EMPTY: */
@@ -228,6 +233,8 @@ static inline int get_buf_states(struct qdio_q *q, unsigned int bufnr,
228 if (q->slsb.val[bufnr] != __state) 233 if (q->slsb.val[bufnr] != __state)
229 break; 234 break;
230 } 235 }
236
237out:
231 *state = __state; 238 *state = __state;
232 return i; 239 return i;
233} 240}
@@ -382,7 +389,7 @@ int debug_get_buf_state(struct qdio_q *q, unsigned int bufnr,
382{ 389{
383 if (need_siga_sync(q)) 390 if (need_siga_sync(q))
384 qdio_siga_sync_q(q); 391 qdio_siga_sync_q(q);
385 return get_buf_states(q, bufnr, state, 1, 0, 0); 392 return get_buf_state(q, bufnr, state, 0);
386} 393}
387 394
388static inline void qdio_stop_polling(struct qdio_q *q) 395static inline void qdio_stop_polling(struct qdio_q *q)
@@ -719,11 +726,7 @@ static int get_outbound_buffer_frontier(struct qdio_q *q, unsigned int start)
719 multicast_outbound(q))) 726 multicast_outbound(q)))
720 qdio_siga_sync_q(q); 727 qdio_siga_sync_q(q);
721 728
722 /* 729 count = atomic_read(&q->nr_buf_used);
723 * Don't check 128 buffers, as otherwise qdio_inbound_q_moved
724 * would return 0.
725 */
726 count = min(atomic_read(&q->nr_buf_used), QDIO_MAX_BUFFERS_MASK);
727 if (!count) 730 if (!count)
728 return 0; 731 return 0;
729 732
diff --git a/drivers/s390/cio/trace.c b/drivers/s390/cio/trace.c
index e331cd97e83b..882ee538ca30 100644
--- a/drivers/s390/cio/trace.c
+++ b/drivers/s390/cio/trace.c
@@ -21,5 +21,4 @@ EXPORT_TRACEPOINT_SYMBOL(s390_cio_csch);
21EXPORT_TRACEPOINT_SYMBOL(s390_cio_hsch); 21EXPORT_TRACEPOINT_SYMBOL(s390_cio_hsch);
22EXPORT_TRACEPOINT_SYMBOL(s390_cio_xsch); 22EXPORT_TRACEPOINT_SYMBOL(s390_cio_xsch);
23EXPORT_TRACEPOINT_SYMBOL(s390_cio_rsch); 23EXPORT_TRACEPOINT_SYMBOL(s390_cio_rsch);
24EXPORT_TRACEPOINT_SYMBOL(s390_cio_rchp);
25EXPORT_TRACEPOINT_SYMBOL(s390_cio_chsc); 24EXPORT_TRACEPOINT_SYMBOL(s390_cio_chsc);
diff --git a/drivers/s390/cio/trace.h b/drivers/s390/cio/trace.h
index 0ebb29b6fd6d..4803139bce14 100644
--- a/drivers/s390/cio/trace.h
+++ b/drivers/s390/cio/trace.h
@@ -274,29 +274,6 @@ DEFINE_EVENT(s390_class_schid, s390_cio_rsch,
274 TP_ARGS(schid, cc) 274 TP_ARGS(schid, cc)
275); 275);
276 276
277/**
278 * s390_cio_rchp - Reset Channel Path (RCHP) instruction was performed
279 * @chpid: Channel-Path Identifier
280 * @cc: Condition code
281 */
282TRACE_EVENT(s390_cio_rchp,
283 TP_PROTO(struct chp_id chpid, int cc),
284 TP_ARGS(chpid, cc),
285 TP_STRUCT__entry(
286 __field(u8, cssid)
287 __field(u8, id)
288 __field(int, cc)
289 ),
290 TP_fast_assign(
291 __entry->cssid = chpid.cssid;
292 __entry->id = chpid.id;
293 __entry->cc = cc;
294 ),
295 TP_printk("chpid=%x.%02x cc=%d", __entry->cssid, __entry->id,
296 __entry->cc
297 )
298);
299
300#define CHSC_MAX_REQUEST_LEN 64 277#define CHSC_MAX_REQUEST_LEN 64
301#define CHSC_MAX_RESPONSE_LEN 64 278#define CHSC_MAX_RESPONSE_LEN 64
302 279