Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon: - Fix spurious CPU hotplug warning message from SETEND emulation code - Fix the build when GCC wasn't inlining our I/O accessor internals * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64/io: add constant-argument check arm64: armv8_deprecated: Fix warning in isndep cpuhp starting process
This commit is contained in:
@ -153,8 +153,9 @@ extern void __memset_io(volatile void __iomem *, int, size_t);
|
|||||||
* emit the large TLP from the CPU.
|
* emit the large TLP from the CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static inline void __const_memcpy_toio_aligned32(volatile u32 __iomem *to,
|
static __always_inline void
|
||||||
const u32 *from, size_t count)
|
__const_memcpy_toio_aligned32(volatile u32 __iomem *to, const u32 *from,
|
||||||
|
size_t count)
|
||||||
{
|
{
|
||||||
switch (count) {
|
switch (count) {
|
||||||
case 8:
|
case 8:
|
||||||
@ -196,24 +197,22 @@ static inline void __const_memcpy_toio_aligned32(volatile u32 __iomem *to,
|
|||||||
|
|
||||||
void __iowrite32_copy_full(void __iomem *to, const void *from, size_t count);
|
void __iowrite32_copy_full(void __iomem *to, const void *from, size_t count);
|
||||||
|
|
||||||
static inline void __const_iowrite32_copy(void __iomem *to, const void *from,
|
static __always_inline void
|
||||||
size_t count)
|
__iowrite32_copy(void __iomem *to, const void *from, size_t count)
|
||||||
{
|
{
|
||||||
if (count == 8 || count == 4 || count == 2 || count == 1) {
|
if (__builtin_constant_p(count) &&
|
||||||
|
(count == 8 || count == 4 || count == 2 || count == 1)) {
|
||||||
__const_memcpy_toio_aligned32(to, from, count);
|
__const_memcpy_toio_aligned32(to, from, count);
|
||||||
dgh();
|
dgh();
|
||||||
} else {
|
} else {
|
||||||
__iowrite32_copy_full(to, from, count);
|
__iowrite32_copy_full(to, from, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#define __iowrite32_copy __iowrite32_copy
|
||||||
|
|
||||||
#define __iowrite32_copy(to, from, count) \
|
static __always_inline void
|
||||||
(__builtin_constant_p(count) ? \
|
__const_memcpy_toio_aligned64(volatile u64 __iomem *to, const u64 *from,
|
||||||
__const_iowrite32_copy(to, from, count) : \
|
size_t count)
|
||||||
__iowrite32_copy_full(to, from, count))
|
|
||||||
|
|
||||||
static inline void __const_memcpy_toio_aligned64(volatile u64 __iomem *to,
|
|
||||||
const u64 *from, size_t count)
|
|
||||||
{
|
{
|
||||||
switch (count) {
|
switch (count) {
|
||||||
case 8:
|
case 8:
|
||||||
@ -255,21 +254,18 @@ static inline void __const_memcpy_toio_aligned64(volatile u64 __iomem *to,
|
|||||||
|
|
||||||
void __iowrite64_copy_full(void __iomem *to, const void *from, size_t count);
|
void __iowrite64_copy_full(void __iomem *to, const void *from, size_t count);
|
||||||
|
|
||||||
static inline void __const_iowrite64_copy(void __iomem *to, const void *from,
|
static __always_inline void
|
||||||
size_t count)
|
__iowrite64_copy(void __iomem *to, const void *from, size_t count)
|
||||||
{
|
{
|
||||||
if (count == 8 || count == 4 || count == 2 || count == 1) {
|
if (__builtin_constant_p(count) &&
|
||||||
|
(count == 8 || count == 4 || count == 2 || count == 1)) {
|
||||||
__const_memcpy_toio_aligned64(to, from, count);
|
__const_memcpy_toio_aligned64(to, from, count);
|
||||||
dgh();
|
dgh();
|
||||||
} else {
|
} else {
|
||||||
__iowrite64_copy_full(to, from, count);
|
__iowrite64_copy_full(to, from, count);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#define __iowrite64_copy __iowrite64_copy
|
||||||
#define __iowrite64_copy(to, from, count) \
|
|
||||||
(__builtin_constant_p(count) ? \
|
|
||||||
__const_iowrite64_copy(to, from, count) : \
|
|
||||||
__iowrite64_copy_full(to, from, count))
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* I/O memory mapping functions.
|
* I/O memory mapping functions.
|
||||||
|
@ -462,6 +462,9 @@ static int run_all_insn_set_hw_mode(unsigned int cpu)
|
|||||||
for (int i = 0; i < ARRAY_SIZE(insn_emulations); i++) {
|
for (int i = 0; i < ARRAY_SIZE(insn_emulations); i++) {
|
||||||
struct insn_emulation *insn = insn_emulations[i];
|
struct insn_emulation *insn = insn_emulations[i];
|
||||||
bool enable = READ_ONCE(insn->current_mode) == INSN_HW;
|
bool enable = READ_ONCE(insn->current_mode) == INSN_HW;
|
||||||
|
if (insn->status == INSN_UNAVAILABLE)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (insn->set_hw_mode && insn->set_hw_mode(enable)) {
|
if (insn->set_hw_mode && insn->set_hw_mode(enable)) {
|
||||||
pr_warn("CPU[%u] cannot support the emulation of %s",
|
pr_warn("CPU[%u] cannot support the emulation of %s",
|
||||||
cpu, insn->name);
|
cpu, insn->name);
|
||||||
|
Reference in New Issue
Block a user