mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-22 20:30:58 +02:00
Merge tag 'powerpc-5.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Michael Ellerman: - Fix a possible stack corruption and subsequent DLPAR failure in the rpadlpar_io PCI hotplug driver - Two build fixes for uncommon configurations Thanks to Christophe Leroy and Tyrel Datwyler. * tag 'powerpc-5.12-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: PCI: rpadlpar: Fix potential drc_name corruption in store functions powerpc: Force inlining of cpu_has_feature() to avoid build failure powerpc/vdso32: Add missing _restgpr_31_x to fix build failure
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
#include <linux/bug.h>
|
#include <linux/bug.h>
|
||||||
#include <asm/cputable.h>
|
#include <asm/cputable.h>
|
||||||
|
|
||||||
static inline bool early_cpu_has_feature(unsigned long feature)
|
static __always_inline bool early_cpu_has_feature(unsigned long feature)
|
||||||
{
|
{
|
||||||
return !!((CPU_FTRS_ALWAYS & feature) ||
|
return !!((CPU_FTRS_ALWAYS & feature) ||
|
||||||
(CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature));
|
(CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature));
|
||||||
@@ -46,7 +46,7 @@ static __always_inline bool cpu_has_feature(unsigned long feature)
|
|||||||
return static_branch_likely(&cpu_feature_keys[i]);
|
return static_branch_likely(&cpu_feature_keys[i]);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline bool cpu_has_feature(unsigned long feature)
|
static __always_inline bool cpu_has_feature(unsigned long feature)
|
||||||
{
|
{
|
||||||
return early_cpu_has_feature(feature);
|
return early_cpu_has_feature(feature);
|
||||||
}
|
}
|
||||||
|
@@ -65,3 +65,14 @@ V_FUNCTION_END(__kernel_clock_getres)
|
|||||||
V_FUNCTION_BEGIN(__kernel_time)
|
V_FUNCTION_BEGIN(__kernel_time)
|
||||||
cvdso_call_time __c_kernel_time
|
cvdso_call_time __c_kernel_time
|
||||||
V_FUNCTION_END(__kernel_time)
|
V_FUNCTION_END(__kernel_time)
|
||||||
|
|
||||||
|
/* Routines for restoring integer registers, called by the compiler. */
|
||||||
|
/* Called with r11 pointing to the stack header word of the caller of the */
|
||||||
|
/* function, just beyond the end of the integer restore area. */
|
||||||
|
_GLOBAL(_restgpr_31_x)
|
||||||
|
_GLOBAL(_rest32gpr_31_x)
|
||||||
|
lwz r0,4(r11)
|
||||||
|
lwz r31,-4(r11)
|
||||||
|
mtlr r0
|
||||||
|
mr r1,r11
|
||||||
|
blr
|
||||||
|
@@ -34,12 +34,11 @@ static ssize_t add_slot_store(struct kobject *kobj, struct kobj_attribute *attr,
|
|||||||
if (nbytes >= MAX_DRC_NAME_LEN)
|
if (nbytes >= MAX_DRC_NAME_LEN)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
memcpy(drc_name, buf, nbytes);
|
strscpy(drc_name, buf, nbytes + 1);
|
||||||
|
|
||||||
end = strchr(drc_name, '\n');
|
end = strchr(drc_name, '\n');
|
||||||
if (!end)
|
if (end)
|
||||||
end = &drc_name[nbytes];
|
*end = '\0';
|
||||||
*end = '\0';
|
|
||||||
|
|
||||||
rc = dlpar_add_slot(drc_name);
|
rc = dlpar_add_slot(drc_name);
|
||||||
if (rc)
|
if (rc)
|
||||||
@@ -65,12 +64,11 @@ static ssize_t remove_slot_store(struct kobject *kobj,
|
|||||||
if (nbytes >= MAX_DRC_NAME_LEN)
|
if (nbytes >= MAX_DRC_NAME_LEN)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
memcpy(drc_name, buf, nbytes);
|
strscpy(drc_name, buf, nbytes + 1);
|
||||||
|
|
||||||
end = strchr(drc_name, '\n');
|
end = strchr(drc_name, '\n');
|
||||||
if (!end)
|
if (end)
|
||||||
end = &drc_name[nbytes];
|
*end = '\0';
|
||||||
*end = '\0';
|
|
||||||
|
|
||||||
rc = dlpar_remove_slot(drc_name);
|
rc = dlpar_remove_slot(drc_name);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
Reference in New Issue
Block a user