s390 update with bug fixes for 5.1-rc6
- Fix overwrite of the initial ramdisk due to misuse of IS_ENABLED - Fix integer overflow in the dasd driver resulting in incorrect number of blocks for large devices - Fix a lockdep false positive in the 3270 driver - Fix a deadlock in the zcrypt driver - Fix incorrect debug feature entries in the pkey api - Fix inline assembly constraints fallout with CONFIG_KASAN=y -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJcuIwlAAoJEDjwexyKj9rgCJEH/Agbx2sJlxApuKC6BMAjPZCy dJUu7hmumgtL+QI7IqQMRgfuxiC16xpJQd14GvfNoyjX1NVajepYI2+OUZHj7F6s La0fq/16fRriVByLiL+pqjV2y0c5kQ8Uhe15vwEvSmr3T/NgPLqUbIe5pwY5KS59 O6B3WpVKeIb8UOUlEAQnezTYj70jWMT783NTyzhPcYLkiN7JJ7vI21FKPRM88ElS Q7f9qxGPv0hGsOqBXCBWztxgx+ezEHsnlH4t+he0tLOGXuuiy4BrgGtgbJx17frj xNNe8gOXV83bUbYTBygITnjMjS0m/1viJ4XTBgv/HLGgcKG06n3v6U4+zefB4N4= =+41g -----END PGP SIGNATURE----- Merge tag 's390-5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 bug fixes from Martin Schwidefsky: - Fix overwrite of the initial ramdisk due to misuse of IS_ENABLED - Fix integer overflow in the dasd driver resulting in incorrect number of blocks for large devices - Fix a lockdep false positive in the 3270 driver - Fix a deadlock in the zcrypt driver - Fix incorrect debug feature entries in the pkey api - Fix inline assembly constraints fallout with CONFIG_KASAN=y * tag 's390-5.1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: correct some inline assembly constraints s390/pkey: add one more argument space for debug feature entry s390/zcrypt: fix possible deadlock situation on ap queue remove s390/3270: fix lockdep false positive on view->lock s390/dasd: Fix capacity calculation for large volumes s390/mem_detect: Use IS_ENABLED(CONFIG_BLK_DEV_INITRD)
This commit is contained in:
@ -25,7 +25,7 @@ static void *mem_detect_alloc_extended(void)
|
|||||||
{
|
{
|
||||||
unsigned long offset = ALIGN(mem_safe_offset(), sizeof(u64));
|
unsigned long offset = ALIGN(mem_safe_offset(), sizeof(u64));
|
||||||
|
|
||||||
if (IS_ENABLED(BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE &&
|
if (IS_ENABLED(CONFIG_BLK_DEV_INITRD) && INITRD_START && INITRD_SIZE &&
|
||||||
INITRD_START < offset + ENTRIES_EXTENDED_MAX)
|
INITRD_START < offset + ENTRIES_EXTENDED_MAX)
|
||||||
offset = ALIGN(INITRD_START + INITRD_SIZE, sizeof(u64));
|
offset = ALIGN(INITRD_START + INITRD_SIZE, sizeof(u64));
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ void __kernel_fpu_begin(struct kernel_fpu *state, u32 flags)
|
|||||||
|
|
||||||
if (flags & KERNEL_FPC)
|
if (flags & KERNEL_FPC)
|
||||||
/* Save floating point control */
|
/* Save floating point control */
|
||||||
asm volatile("stfpc %0" : "=m" (state->fpc));
|
asm volatile("stfpc %0" : "=Q" (state->fpc));
|
||||||
|
|
||||||
if (!MACHINE_HAS_VX) {
|
if (!MACHINE_HAS_VX) {
|
||||||
if (flags & KERNEL_VXR_V0V7) {
|
if (flags & KERNEL_VXR_V0V7) {
|
||||||
|
@ -37,7 +37,7 @@ static inline u64 get_vtimer(void)
|
|||||||
{
|
{
|
||||||
u64 timer;
|
u64 timer;
|
||||||
|
|
||||||
asm volatile("stpt %0" : "=m" (timer));
|
asm volatile("stpt %0" : "=Q" (timer));
|
||||||
return timer;
|
return timer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -48,7 +48,7 @@ static inline void set_vtimer(u64 expires)
|
|||||||
asm volatile(
|
asm volatile(
|
||||||
" stpt %0\n" /* Store current cpu timer value */
|
" stpt %0\n" /* Store current cpu timer value */
|
||||||
" spt %1" /* Set new value imm. afterwards */
|
" spt %1" /* Set new value imm. afterwards */
|
||||||
: "=m" (timer) : "m" (expires));
|
: "=Q" (timer) : "Q" (expires));
|
||||||
S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer;
|
S390_lowcore.system_timer += S390_lowcore.last_update_timer - timer;
|
||||||
S390_lowcore.last_update_timer = expires;
|
S390_lowcore.last_update_timer = expires;
|
||||||
}
|
}
|
||||||
@ -135,8 +135,8 @@ static int do_account_vtime(struct task_struct *tsk)
|
|||||||
#else
|
#else
|
||||||
" stck %1" /* Store current tod clock value */
|
" stck %1" /* Store current tod clock value */
|
||||||
#endif
|
#endif
|
||||||
: "=m" (S390_lowcore.last_update_timer),
|
: "=Q" (S390_lowcore.last_update_timer),
|
||||||
"=m" (S390_lowcore.last_update_clock));
|
"=Q" (S390_lowcore.last_update_clock));
|
||||||
clock = S390_lowcore.last_update_clock - clock;
|
clock = S390_lowcore.last_update_clock - clock;
|
||||||
timer -= S390_lowcore.last_update_timer;
|
timer -= S390_lowcore.last_update_timer;
|
||||||
|
|
||||||
|
@ -2004,14 +2004,14 @@ static int dasd_eckd_end_analysis(struct dasd_block *block)
|
|||||||
blk_per_trk = recs_per_track(&private->rdc_data, 0, block->bp_block);
|
blk_per_trk = recs_per_track(&private->rdc_data, 0, block->bp_block);
|
||||||
|
|
||||||
raw:
|
raw:
|
||||||
block->blocks = (private->real_cyl *
|
block->blocks = ((unsigned long) private->real_cyl *
|
||||||
private->rdc_data.trk_per_cyl *
|
private->rdc_data.trk_per_cyl *
|
||||||
blk_per_trk);
|
blk_per_trk);
|
||||||
|
|
||||||
dev_info(&device->cdev->dev,
|
dev_info(&device->cdev->dev,
|
||||||
"DASD with %d KB/block, %d KB total size, %d KB/track, "
|
"DASD with %u KB/block, %lu KB total size, %u KB/track, "
|
||||||
"%s\n", (block->bp_block >> 10),
|
"%s\n", (block->bp_block >> 10),
|
||||||
((private->real_cyl *
|
(((unsigned long) private->real_cyl *
|
||||||
private->rdc_data.trk_per_cyl *
|
private->rdc_data.trk_per_cyl *
|
||||||
blk_per_trk * (block->bp_block >> 9)) >> 1),
|
blk_per_trk * (block->bp_block >> 9)) >> 1),
|
||||||
((blk_per_trk * block->bp_block) >> 10),
|
((blk_per_trk * block->bp_block) >> 10),
|
||||||
|
@ -629,7 +629,7 @@ con3270_init(void)
|
|||||||
(void (*)(unsigned long)) con3270_read_tasklet,
|
(void (*)(unsigned long)) con3270_read_tasklet,
|
||||||
(unsigned long) condev->read);
|
(unsigned long) condev->read);
|
||||||
|
|
||||||
raw3270_add_view(&condev->view, &con3270_fn, 1);
|
raw3270_add_view(&condev->view, &con3270_fn, 1, RAW3270_VIEW_LOCK_IRQ);
|
||||||
|
|
||||||
INIT_LIST_HEAD(&condev->freemem);
|
INIT_LIST_HEAD(&condev->freemem);
|
||||||
for (i = 0; i < CON3270_STRING_PAGES; i++) {
|
for (i = 0; i < CON3270_STRING_PAGES; i++) {
|
||||||
|
@ -463,7 +463,8 @@ fs3270_open(struct inode *inode, struct file *filp)
|
|||||||
|
|
||||||
init_waitqueue_head(&fp->wait);
|
init_waitqueue_head(&fp->wait);
|
||||||
fp->fs_pid = get_pid(task_pid(current));
|
fp->fs_pid = get_pid(task_pid(current));
|
||||||
rc = raw3270_add_view(&fp->view, &fs3270_fn, minor);
|
rc = raw3270_add_view(&fp->view, &fs3270_fn, minor,
|
||||||
|
RAW3270_VIEW_LOCK_BH);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
fs3270_free_view(&fp->view);
|
fs3270_free_view(&fp->view);
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -920,7 +920,7 @@ raw3270_deactivate_view(struct raw3270_view *view)
|
|||||||
* Add view to device with minor "minor".
|
* Add view to device with minor "minor".
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn, int minor)
|
raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn, int minor, int subclass)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
struct raw3270 *rp;
|
struct raw3270 *rp;
|
||||||
@ -942,6 +942,7 @@ raw3270_add_view(struct raw3270_view *view, struct raw3270_fn *fn, int minor)
|
|||||||
view->cols = rp->cols;
|
view->cols = rp->cols;
|
||||||
view->ascebc = rp->ascebc;
|
view->ascebc = rp->ascebc;
|
||||||
spin_lock_init(&view->lock);
|
spin_lock_init(&view->lock);
|
||||||
|
lockdep_set_subclass(&view->lock, subclass);
|
||||||
list_add(&view->list, &rp->view_list);
|
list_add(&view->list, &rp->view_list);
|
||||||
rc = 0;
|
rc = 0;
|
||||||
spin_unlock_irqrestore(get_ccwdev_lock(rp->cdev), flags);
|
spin_unlock_irqrestore(get_ccwdev_lock(rp->cdev), flags);
|
||||||
|
@ -150,6 +150,8 @@ struct raw3270_fn {
|
|||||||
struct raw3270_view {
|
struct raw3270_view {
|
||||||
struct list_head list;
|
struct list_head list;
|
||||||
spinlock_t lock;
|
spinlock_t lock;
|
||||||
|
#define RAW3270_VIEW_LOCK_IRQ 0
|
||||||
|
#define RAW3270_VIEW_LOCK_BH 1
|
||||||
atomic_t ref_count;
|
atomic_t ref_count;
|
||||||
struct raw3270 *dev;
|
struct raw3270 *dev;
|
||||||
struct raw3270_fn *fn;
|
struct raw3270_fn *fn;
|
||||||
@ -158,7 +160,7 @@ struct raw3270_view {
|
|||||||
unsigned char *ascebc; /* ascii -> ebcdic table */
|
unsigned char *ascebc; /* ascii -> ebcdic table */
|
||||||
};
|
};
|
||||||
|
|
||||||
int raw3270_add_view(struct raw3270_view *, struct raw3270_fn *, int);
|
int raw3270_add_view(struct raw3270_view *, struct raw3270_fn *, int, int);
|
||||||
int raw3270_activate_view(struct raw3270_view *);
|
int raw3270_activate_view(struct raw3270_view *);
|
||||||
void raw3270_del_view(struct raw3270_view *);
|
void raw3270_del_view(struct raw3270_view *);
|
||||||
void raw3270_deactivate_view(struct raw3270_view *);
|
void raw3270_deactivate_view(struct raw3270_view *);
|
||||||
|
@ -980,7 +980,8 @@ static int tty3270_install(struct tty_driver *driver, struct tty_struct *tty)
|
|||||||
return PTR_ERR(tp);
|
return PTR_ERR(tp);
|
||||||
|
|
||||||
rc = raw3270_add_view(&tp->view, &tty3270_fn,
|
rc = raw3270_add_view(&tp->view, &tty3270_fn,
|
||||||
tty->index + RAW3270_FIRSTMINOR);
|
tty->index + RAW3270_FIRSTMINOR,
|
||||||
|
RAW3270_VIEW_LOCK_BH);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
tty3270_free_view(tp);
|
tty3270_free_view(tp);
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -751,8 +751,8 @@ void ap_queue_prepare_remove(struct ap_queue *aq)
|
|||||||
__ap_flush_queue(aq);
|
__ap_flush_queue(aq);
|
||||||
/* set REMOVE state to prevent new messages are queued in */
|
/* set REMOVE state to prevent new messages are queued in */
|
||||||
aq->state = AP_STATE_REMOVE;
|
aq->state = AP_STATE_REMOVE;
|
||||||
del_timer_sync(&aq->timeout);
|
|
||||||
spin_unlock_bh(&aq->lock);
|
spin_unlock_bh(&aq->lock);
|
||||||
|
del_timer_sync(&aq->timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ap_queue_remove(struct ap_queue *aq)
|
void ap_queue_remove(struct ap_queue *aq)
|
||||||
|
@ -51,7 +51,8 @@ static debug_info_t *debug_info;
|
|||||||
|
|
||||||
static void __init pkey_debug_init(void)
|
static void __init pkey_debug_init(void)
|
||||||
{
|
{
|
||||||
debug_info = debug_register("pkey", 1, 1, 4 * sizeof(long));
|
/* 5 arguments per dbf entry (including the format string ptr) */
|
||||||
|
debug_info = debug_register("pkey", 1, 1, 5 * sizeof(long));
|
||||||
debug_register_view(debug_info, &debug_sprintf_view);
|
debug_register_view(debug_info, &debug_sprintf_view);
|
||||||
debug_set_level(debug_info, 3);
|
debug_set_level(debug_info, 3);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user