projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
powerpc: Free up some CPU feature bits by moving out MMU-related features
[firefly-linux-kernel-4.4.55.git]
/
arch
/
powerpc
/
kernel
/
setup_64.c
diff --git
a/arch/powerpc/kernel/setup_64.c
b/arch/powerpc/kernel/setup_64.c
index 5a0401fcaebd2b078994d156253de9d2467c6ea7..959c63cf62e484100fd4b907068692b4539cf759 100644
(file)
--- a/
arch/powerpc/kernel/setup_64.c
+++ b/
arch/powerpc/kernel/setup_64.c
@@
-72,6
+72,7
@@
#endif
int boot_cpuid = 0;
#endif
int boot_cpuid = 0;
+int __initdata boot_cpu_count;
u64 ppc64_pft_size;
/* Pick defaults since we might want to patch instructions
u64 ppc64_pft_size;
/* Pick defaults since we might want to patch instructions
@@
-233,6
+234,7
@@
void early_setup_secondary(void)
void smp_release_cpus(void)
{
unsigned long *ptr;
void smp_release_cpus(void)
{
unsigned long *ptr;
+ int i;
DBG(" -> smp_release_cpus()\n");
DBG(" -> smp_release_cpus()\n");
@@
-245,7
+247,16
@@
void smp_release_cpus(void)
ptr = (unsigned long *)((unsigned long)&__secondary_hold_spinloop
- PHYSICAL_START);
*ptr = __pa(generic_secondary_smp_init);
ptr = (unsigned long *)((unsigned long)&__secondary_hold_spinloop
- PHYSICAL_START);
*ptr = __pa(generic_secondary_smp_init);
- mb();
+
+ /* And wait a bit for them to catch up */
+ for (i = 0; i < 100000; i++) {
+ mb();
+ HMT_low();
+ if (boot_cpu_count == 0)
+ break;
+ udelay(1);
+ }
+ DBG("boot_cpu_count = %d\n", boot_cpu_count);
DBG(" <- smp_release_cpus()\n");
}
DBG(" <- smp_release_cpus()\n");
}
@@
-425,7
+436,7
@@
void __init setup_system(void)
static u64 slb0_limit(void)
{
static u64 slb0_limit(void)
{
- if (
cpu_has_feature(CP
U_FTR_1T_SEGMENT)) {
+ if (
mmu_has_feature(MM
U_FTR_1T_SEGMENT)) {
return 1UL << SID_SHIFT_1T;
}
return 1UL << SID_SHIFT;
return 1UL << SID_SHIFT_1T;
}
return 1UL << SID_SHIFT;