linux-stable/arch/x86/lib
Maciej W. Rozycki fb6a0408ea x86: Add support for 0x22/0x23 port I/O configuration space
Define macros and accessors for the configuration space addressed 
indirectly with an index register and a data register at the port I/O 
locations of 0x22 and 0x23 respectively.

This space is defined by the Intel MultiProcessor Specification for the 
IMCR register used to switch between the PIC and the APIC mode[1], by 
Cyrix processors for their configuration[2][3], and also some chipsets.

Given the lack of atomicity with the indirect addressing a spinlock is 
required to protect accesses, although for Cyrix processors it is enough 
if accesses are executed with interrupts locally disabled, because the 
registers are local to the accessing CPU, and IMCR is only ever poked at 
by the BSP and early enough for interrupts not to have been configured 
yet.  Therefore existing code does not have to change or use the new 
spinlock and neither it does.

Put the spinlock in a library file then, so that it does not get pulled 
unnecessarily for configurations that do not refer it.

Convert Cyrix accessors to wrappers so as to retain the brevity and 
clarity of the `getCx86' and `setCx86' calls.

References:

[1] "MultiProcessor Specification", Version 1.4, Intel Corporation, 
    Order Number: 242016-006, May 1997, Section 3.6.2.1 "PIC Mode", pp. 
    3-7, 3-8

[2] "5x86 Microprocessor", Cyrix Corporation, Order Number: 94192-00, 
    July 1995, Section 2.3.2.4 "Configuration Registers", p. 2-23

[3] "6x86 Processor", Cyrix Corporation, Order Number: 94175-01, March 
    1996, Section 2.4.4 "6x86 Configuration Registers", p. 2-23

Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/alpine.DEB.2.21.2107182353140.9461@angie.orcam.me.uk
2021-08-10 23:31:43 +02:00
..
.gitignore
atomic64_32.c
atomic64_386_32.S x86/alternative: Merge include files 2021-03-11 15:58:02 +01:00
atomic64_cx8_32.S x86/alternative: Merge include files 2021-03-11 15:58:02 +01:00
cache-smp.c
checksum_32.S i386: propagate the calling conventions change down to csum_partial_copy_generic() 2020-08-20 15:45:18 -04:00
clear_page_64.S
cmdline.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cmpxchg8b_emu.S
cmpxchg16b_emu.S
copy_mc.c x86, libnvdimm/test: Remove COPY_MC_TEST 2020-10-26 18:08:35 +01:00
copy_mc_64.S x86, libnvdimm/test: Remove COPY_MC_TEST 2020-10-26 18:08:35 +01:00
copy_page_64.S x86/alternative: Merge include files 2021-03-11 15:58:02 +01:00
copy_user_64.S x86/alternative: Merge include files 2021-03-11 15:58:02 +01:00
cpu.c
csum-copy_64.S amd64: switch csum_partial_copy_generic() to new calling conventions 2020-08-20 15:45:22 -04:00
csum-partial_64.c
csum-wrappers_64.c amd64: switch csum_partial_copy_generic() to new calling conventions 2020-08-20 15:45:22 -04:00
delay.c
error-inject.c
getuser.S Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00
hweight.S
inat.c x86/insn: Add a __ignore_sync_check__ marker 2021-03-15 11:00:57 +01:00
insn-eval.c x86/insn: Extend error reporting from insn_fetch_from_user[_inatomic]() 2021-06-15 11:39:30 +02:00
insn.c x86/insn: Make insn_complete() static 2021-03-15 13:03:46 +01:00
iomap_copy_64.S
iomem.c
kaslr.c
Makefile x86: Add support for 0x22/0x23 port I/O configuration space 2021-08-10 23:31:43 +02:00
memcpy_32.c
memcpy_64.S x86/alternative: Merge include files 2021-03-11 15:58:02 +01:00
memmove_64.S x86/alternative: Merge include files 2021-03-11 15:58:02 +01:00
memset_64.S x86/alternative: Merge include files 2021-03-11 15:58:02 +01:00
misc.c
mmx_32.c x86: Fix various typos in comments 2021-03-18 15:31:53 +01:00
msr-reg-export.c
msr-reg.S
msr-smp.c x86/msr: Fix wr/rdmsr_safe_regs_on_cpu() prototypes 2021-03-22 21:37:03 +01:00
msr.c x86/msr: Make locally used functions static 2021-04-08 11:57:40 +02:00
pc-conf-reg.c x86: Add support for 0x22/0x23 port I/O configuration space 2021-08-10 23:31:43 +02:00
putuser.S Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00
retpoline.S objtool/x86: Ignore __x86_indirect_alt_* symbols 2021-06-21 17:26:57 +02:00
string_32.c
strstr_32.c
usercopy.c x86/uaccess: Document copy_from_user_nmi() 2020-11-18 13:19:01 +01:00
usercopy_32.c
usercopy_64.c * Extend the recovery from MCE in kernel space also to processes which 2020-10-12 10:14:38 -07:00
x86-opcode-map.txt