|
@@ -115,6 +115,14 @@ static struct slb_shadow * __init init_slb_shadow(int cpu)
|
|
{
|
|
{
|
|
struct slb_shadow *s = &slb_shadow[cpu];
|
|
struct slb_shadow *s = &slb_shadow[cpu];
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * When we come through here to initialise boot_paca, the slb_shadow
|
|
|
|
+ * buffers are not allocated yet. That's OK, we'll get one later in
|
|
|
|
+ * boot, but make sure we don't corrupt memory at 0.
|
|
|
|
+ */
|
|
|
|
+ if (!slb_shadow)
|
|
|
|
+ return NULL;
|
|
|
|
+
|
|
s->persistent = cpu_to_be32(SLB_NUM_BOLTED);
|
|
s->persistent = cpu_to_be32(SLB_NUM_BOLTED);
|
|
s->buffer_length = cpu_to_be32(sizeof(*s));
|
|
s->buffer_length = cpu_to_be32(sizeof(*s));
|
|
|
|
|