From: "Sachin P. Sant" <sachinp@in.ibm.com>
To: Olof Johansson <olof@lixom.net>
Cc: linuxppc-dev@ozlabs.org, ellerman@au1.ibm.com,
Milton Miller II <miltonm@us.ibm.com>
Subject: Re: [Patch 2/2] Kexec/Kdump support POWER6
Date: Wed, 23 May 2007 10:44:19 +0530 [thread overview]
Message-ID: <4653CDAB.2060407@in.ibm.com> (raw)
In-Reply-To: <20070522153419.GA22047@lixom.net>
Hi Olof, thanks for the review.
>> + if (have_vrma)
>> + pSeries_find_hpte_vrma();
>> +
>>
>
> This will break kexec builds on non-pseries. It's referring to platform
> code that might not be built.
>
>
Ok. Will call this function from lpar.c instead of
default_machine_kexec().
> Does this function find the vrma, or save it away? Seems like the name
> is misleading.
>
>
Well it finds a vrma entry and saves it. I thought of
pSeries_find_save_hpte_vrma(), but decided against it. I could
change it to pSeries_save_hpte_vrma().
> Is ppc64_vrma_page_size really the size, or the shift? Above would
> indicate that it's really a shift value.
>
>
It is a shift. I will change it to ppc64_vrma_page_shift.
> Why is 16M hardcoded here, when you're taking such great care to read
> out the pagesize earlier?
>
>
Hrmm. Ok will use the vrma_page_shift value.
>> + ((dword0 & HPTE_V_MASK) == MAGIC_SKIP_HPTE)) {
>>
> Indentation
>
Done.
>> + /* store the hpte */
>> + hpte_vrma_slots[num_hpte_vrma_slots++] = slot;
>>
>
> Here you rely on global exported state (num_hpte_vrma_slots), increasing it without
> checking for limits. What happens if this function is ever called twice? Should you
> set it to 0 in the beginning of the function and check it against the size of the
> hpte_vrma_slots array instead?
>
Will add proper checks for num_hpte_vrma_slots variable value.
>> +extern void pSeries_find_hpte_vrma(void);
>>
>>
> Same comment as above: This isn't a kexec function as much as a pseries function, so
> it should be defined in some other header instead.
>
>>
>> +#define HPTE_V_RMA_VPN ASM_CONST(0x001FFFFFF0000000)
>> +#define HPTE_V_MASK ASM_CONST(0xc000000000000000)
>> +#define MAGIC_SKIP_HPTE ASM_CONST(0x4000000000000000)
>> +#define HPTE_V_RMA_NUM 16
>>
>
> "MAGIC_SKIP_HPTE"? I'm sure there's a proper name for this field in the
> PAPR, isn't there? Also, HPTE_V_RMA_NUM isn't a HPTE_V field, it shouldn't
> have that prefix. It's not a property of the mmu in the first place.
>
> These should maybe be local defines in the pseries lpar code instead, since it's
> more of a lpar<->phyp interface than mmu programming interface.
>
Will move them to pseries lpar code.
Updated patch on its way.
Thanks
-Sachin
next prev parent reply other threads:[~2007-05-23 5:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-22 12:22 [Patch 0/2] Kexec/Kdump support POWER6 Sachin P. Sant
2007-05-22 12:24 ` [Patch 1/2] " Sachin P. Sant
2007-05-22 12:26 ` [Patch 2/2] " Sachin P. Sant
2007-05-22 15:34 ` Olof Johansson
2007-05-23 5:13 ` Sachin P. Sant
2007-05-23 5:14 ` Sachin P. Sant [this message]
2007-05-23 9:37 ` [Patch 2/2] Kexec/Kdump support - POWER6 Sachin P. Sant
2007-05-23 10:55 ` Paul Mackerras
2007-05-24 12:17 ` Mohan Kumar M
2007-05-24 14:21 ` Olof Johansson
2007-05-25 8:55 ` [Patch ] " Sachin P. Sant
2007-05-25 22:43 ` Benjamin Herrenschmidt
2007-05-28 11:40 ` Sachin P. Sant
2007-05-28 21:31 ` Benjamin Herrenschmidt
2007-05-29 6:18 ` Sachin P. Sant
2007-05-29 6:58 ` Benjamin Herrenschmidt
2007-05-29 10:14 ` Michael Ellerman
2007-05-29 11:06 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4653CDAB.2060407@in.ibm.com \
--to=sachinp@in.ibm.com \
--cc=ellerman@au1.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=miltonm@us.ibm.com \
--cc=olof@lixom.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).