mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
s390/pci: Get rid of MACHINE_HAS_PCI_MIO
Remove MACHINE_FLAG_PCI_MIO/MACHINE_HAS_PCI_MIO and implement the identical functionality with set_machine_feature(), clear_machine_feature() and test_machine_feature(). Acked-by: Niklas Schnelle <schnelle@linux.ibm.com> Tested-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
parent
e4da8249cf
commit
a1a8da0dec
6 changed files with 9 additions and 9 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include <asm/extmem.h>
|
||||
#include <asm/sections.h>
|
||||
#include <asm/maccess.h>
|
||||
#include <asm/machine.h>
|
||||
#include <asm/cpu_mf.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/kasan.h>
|
||||
|
|
@ -57,6 +58,8 @@ static void detect_facilities(void)
|
|||
segment_noexec_mask &= ~_SEGMENT_ENTRY_NOEXEC;
|
||||
region_noexec_mask &= ~_REGION_ENTRY_NOEXEC;
|
||||
}
|
||||
if (IS_ENABLED(CONFIG_PCI) && test_facility(153))
|
||||
set_machine_feature(MFEATURE_PCI_MIO);
|
||||
}
|
||||
|
||||
static int cmma_test_essa(void)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#include <linux/const.h>
|
||||
|
||||
#define MFEATURE_LOWCORE 0
|
||||
#define MFEATURE_PCI_MIO 1
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@
|
|||
#define MACHINE_FLAG_TE BIT(11)
|
||||
#define MACHINE_FLAG_TLB_GUEST BIT(14)
|
||||
#define MACHINE_FLAG_SCC BIT(17)
|
||||
#define MACHINE_FLAG_PCI_MIO BIT(18)
|
||||
|
||||
#define LPP_MAGIC BIT(31)
|
||||
#define LPP_PID_MASK _AC(0xffffffff, UL)
|
||||
|
|
@ -78,7 +77,6 @@ extern unsigned long mio_wb_bit_mask;
|
|||
#define MACHINE_HAS_TE (get_lowcore()->machine_flags & MACHINE_FLAG_TE)
|
||||
#define MACHINE_HAS_TLB_GUEST (get_lowcore()->machine_flags & MACHINE_FLAG_TLB_GUEST)
|
||||
#define MACHINE_HAS_SCC (get_lowcore()->machine_flags & MACHINE_FLAG_SCC)
|
||||
#define MACHINE_HAS_PCI_MIO (get_lowcore()->machine_flags & MACHINE_FLAG_PCI_MIO)
|
||||
|
||||
/*
|
||||
* Console mode. Override with conmode=
|
||||
|
|
|
|||
|
|
@ -249,10 +249,6 @@ static __init void detect_machine_facilities(void)
|
|||
clock_comparator_max = -1ULL >> 1;
|
||||
system_ctl_set_bit(0, CR0_CLOCK_COMPARATOR_SIGN_BIT);
|
||||
}
|
||||
if (IS_ENABLED(CONFIG_PCI) && test_facility(153)) {
|
||||
get_lowcore()->machine_flags |= MACHINE_FLAG_PCI_MIO;
|
||||
/* the control bit is set during PCI initialization */
|
||||
}
|
||||
}
|
||||
|
||||
static inline void save_vector_registers(void)
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
#include <linux/cpu.h>
|
||||
#include <linux/smp.h>
|
||||
#include <asm/text-patching.h>
|
||||
#include <asm/machine.h>
|
||||
#include <asm/diag.h>
|
||||
#include <asm/facility.h>
|
||||
#include <asm/elf.h>
|
||||
|
|
@ -248,7 +249,7 @@ static int __init setup_hwcaps(void)
|
|||
if (cpu_has_gs())
|
||||
elf_hwcap |= HWCAP_GS;
|
||||
|
||||
if (MACHINE_HAS_PCI_MIO)
|
||||
if (test_machine_feature(MFEATURE_PCI_MIO))
|
||||
elf_hwcap |= HWCAP_PCI_MIO;
|
||||
|
||||
/* virtualization support */
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
#include <linux/lockdep.h>
|
||||
#include <linux/list_sort.h>
|
||||
|
||||
#include <asm/machine.h>
|
||||
#include <asm/isc.h>
|
||||
#include <asm/airq.h>
|
||||
#include <asm/facility.h>
|
||||
|
|
@ -1073,7 +1074,7 @@ char * __init pcibios_setup(char *str)
|
|||
return NULL;
|
||||
}
|
||||
if (!strcmp(str, "nomio")) {
|
||||
get_lowcore()->machine_flags &= ~MACHINE_FLAG_PCI_MIO;
|
||||
clear_machine_feature(MFEATURE_PCI_MIO);
|
||||
return NULL;
|
||||
}
|
||||
if (!strcmp(str, "force_floating")) {
|
||||
|
|
@ -1148,7 +1149,7 @@ static int __init pci_base_init(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (MACHINE_HAS_PCI_MIO) {
|
||||
if (test_machine_feature(MFEATURE_PCI_MIO)) {
|
||||
static_branch_enable(&have_mio);
|
||||
system_ctl_set_bit(2, CR2_MIO_ADDRESSING_BIT);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue