s390 updates for 6.4-rc6

- Avoid linker error for randomly generated config file that
   has CONFIG_BRANCH_PROFILE_NONE enabled and make it similar
   to riscv, x86 and also to commit 4bf3ec384e ("s390: disable
   branch profiling for vdso").
 
 - Currently, if the device is offline and all the channel paths are
   either configured or varied offline, the associated subchannel gets
   unregistered. Don't unregister the subchannel, instead unregister
   offline device.
 -----BEGIN PGP SIGNATURE-----
 
 iI0EABYIADUWIQQrtrZiYVkVzKQcYivNdxKlNrRb8AUCZIMTsBccYWdvcmRlZXZA
 bGludXguaWJtLmNvbQAKCRDNdxKlNrRb8GXeAP0eglohSvMEtIQT3U5CaSdg8cXP
 H3FXGtWymDiropZErQD/ZOYzbN1OBW05/ZBbdJQGYeH32FsJYXZE4JegAzDuqAY=
 =bJaO
 -----END PGP SIGNATURE-----

Merge tag 's390-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Alexander Gordeev:

 - Avoid linker error for randomly generated config file that has
   CONFIG_BRANCH_PROFILE_NONE enabled and make it similar to riscv, x86
   and also to commit 4bf3ec384e ("s390: disable branch profiling for
   vdso").

 - Currently, if the device is offline and all the channel paths are
   either configured or varied offline, the associated subchannel gets
   unregistered. Don't unregister the subchannel, instead unregister
   offline device.

* tag 's390-6.4-3' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/purgatory: disable branch profiling
  s390/cio: unregister device when the only path is gone
This commit is contained in:
Linus Torvalds 2023-06-09 09:29:51 -07:00
commit 87aceaa7f0
2 changed files with 5 additions and 1 deletions

View File

@ -26,6 +26,7 @@ KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
KBUILD_CFLAGS += -Os -m64 -msoft-float -fno-common KBUILD_CFLAGS += -Os -m64 -msoft-float -fno-common
KBUILD_CFLAGS += -fno-stack-protector KBUILD_CFLAGS += -fno-stack-protector
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
KBUILD_CFLAGS += $(CLANG_FLAGS) KBUILD_CFLAGS += $(CLANG_FLAGS)
KBUILD_CFLAGS += $(call cc-option,-fno-PIE) KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS)) KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))

View File

@ -1376,6 +1376,7 @@ void ccw_device_set_notoper(struct ccw_device *cdev)
enum io_sch_action { enum io_sch_action {
IO_SCH_UNREG, IO_SCH_UNREG,
IO_SCH_ORPH_UNREG, IO_SCH_ORPH_UNREG,
IO_SCH_UNREG_CDEV,
IO_SCH_ATTACH, IO_SCH_ATTACH,
IO_SCH_UNREG_ATTACH, IO_SCH_UNREG_ATTACH,
IO_SCH_ORPH_ATTACH, IO_SCH_ORPH_ATTACH,
@ -1408,7 +1409,7 @@ static enum io_sch_action sch_get_action(struct subchannel *sch)
} }
if ((sch->schib.pmcw.pam & sch->opm) == 0) { if ((sch->schib.pmcw.pam & sch->opm) == 0) {
if (ccw_device_notify(cdev, CIO_NO_PATH) != NOTIFY_OK) if (ccw_device_notify(cdev, CIO_NO_PATH) != NOTIFY_OK)
return IO_SCH_UNREG; return IO_SCH_UNREG_CDEV;
return IO_SCH_DISC; return IO_SCH_DISC;
} }
if (device_is_disconnected(cdev)) if (device_is_disconnected(cdev))
@ -1470,6 +1471,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
case IO_SCH_ORPH_ATTACH: case IO_SCH_ORPH_ATTACH:
ccw_device_set_disconnected(cdev); ccw_device_set_disconnected(cdev);
break; break;
case IO_SCH_UNREG_CDEV:
case IO_SCH_UNREG_ATTACH: case IO_SCH_UNREG_ATTACH:
case IO_SCH_UNREG: case IO_SCH_UNREG:
if (!cdev) if (!cdev)
@ -1503,6 +1505,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
if (rc) if (rc)
goto out; goto out;
break; break;
case IO_SCH_UNREG_CDEV:
case IO_SCH_UNREG_ATTACH: case IO_SCH_UNREG_ATTACH:
spin_lock_irqsave(sch->lock, flags); spin_lock_irqsave(sch->lock, flags);
sch_set_cdev(sch, NULL); sch_set_cdev(sch, NULL);