linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "tiejun.chen" <tiejun.chen@windriver.com>
To: Bhushan Bharat-R65777 <R65777@freescale.com>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [v2][PATCH 4/7] book3e/kexec/kdump: introduce a kexec kernel flag
Date: Tue, 9 Jul 2013 15:51:52 +0800	[thread overview]
Message-ID: <51DBC118.6030100@windriver.com> (raw)
In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D070947A5@039-SN2MPN1-011.039d.mgd.msft.net>

On 07/02/2013 01:37 PM, Bhushan Bharat-R65777 wrote:
>
>
>> -----Original Message-----
>> From: Linuxppc-dev [mailto:linuxppc-dev-
>> bounces+bharat.bhushan=freescale.com@lists.ozlabs.org] On Behalf Of Tiejun Chen
>> Sent: Thursday, June 20, 2013 1:23 PM
>> To: benh@kernel.crashing.org
>> Cc: linuxppc-dev@lists.ozlabs.org; linux-kernel@vger.kernel.org
>> Subject: [v2][PATCH 4/7] book3e/kexec/kdump: introduce a kexec kernel flag
>>
>> We need to introduce a flag to indicate we're already running
>> a kexec kernel then we can go proper path. For example, We
>> shouldn't access spin_table from the bootloader to up any secondary
>> cpu for kexec kernel, and kexec kernel already know how to jump to
>> generic_secondary_smp_init.
>>
>> Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
>> ---

[snip]

>> +++ b/arch/powerpc/platforms/85xx/smp.c
>> @@ -150,6 +150,9 @@ static int __cpuinit smp_85xx_kick_cpu(int nr)
>>   	int hw_cpu = get_hard_smp_processor_id(nr);
>>   	int ioremappable;
>>   	int ret = 0;
>> +#if defined(CONFIG_KEXEC) || defined(CONFIG_CRASH_DUMP)
>> +	unsigned long *ptr;
>> +#endif
>
> What about if we can remove the ifdef around *ptr ...
>
>>
>>   	WARN_ON(nr < 0 || nr >= NR_CPUS);
>>   	WARN_ON(hw_cpu < 0 || hw_cpu >= NR_CPUS);
>> @@ -238,11 +241,22 @@ out:
>>   #else
>>   	smp_generic_kick_cpu(nr);
>>
>> +#if defined(CONFIG_KEXEC) || defined(CONFIG_CRASH_DUMP)
>> +	ptr  = (unsigned long *)((unsigned long)&__run_at_kexec);
>
> ... #endif here ...
>
>> +	/* We shouldn't access spin_table from the bootloader to up any
>> +	 * secondary cpu for kexec kernel, and kexec kernel already
>> +	 * know how to jump to generic_secondary_smp_init.
>> +	 */
>> +	if (!*ptr) {
>> +#endif
>
> ... remove #endif ...
>
>>   	flush_spin_table(spin_table);
>>   	out_be32(&spin_table->pir, hw_cpu);
>>   	out_be64((u64 *)(&spin_table->addr_h),
>>   	  __pa((u64)*((unsigned long long *)generic_secondary_smp_init)));
>>   	flush_spin_table(spin_table);
>> +#if defined(CONFIG_KEXEC) || defined(CONFIG_CRASH_DUMP)
>> +	}
>> +#endif
>
> --- remove above 3 lines

I'd like to try to address your comments next version.

Thanks

Tiejun

  reply	other threads:[~2013-07-09  7:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-20  7:53 [v2][PATCH 0/7] powerpc/book3e: support kexec and kdump Tiejun Chen
2013-06-20  7:53 ` [v2][PATCH 1/7] powerpc/book3e: support CONFIG_RELOCATABLE Tiejun Chen
2013-07-02  5:00   ` Bhushan Bharat-R65777
2013-07-09  7:49     ` tiejun.chen
2013-07-03 11:52   ` Sethi Varun-B16395
2013-07-09  7:55     ` tiejun.chen
2013-06-20  7:53 ` [v2][PATCH 2/7] book3e/kexec/kdump: enable kexec for kernel Tiejun Chen
2013-07-02  5:17   ` Bhushan Bharat-R65777
2013-07-09  7:50     ` tiejun.chen
2013-06-20  7:53 ` [v2][PATCH 3/7] book3e/kexec/kdump: create a 1:1 TLB mapping Tiejun Chen
2013-06-20  7:53 ` [v2][PATCH 4/7] book3e/kexec/kdump: introduce a kexec kernel flag Tiejun Chen
2013-07-02  5:37   ` Bhushan Bharat-R65777
2013-07-09  7:51     ` tiejun.chen [this message]
2013-06-20  7:53 ` [v2][PATCH 5/7] book3e/kexec/kdump: implement ppc64 kexec specfic Tiejun Chen
2013-06-20  7:53 ` [v2][PATCH 6/7] book3e/kexec/kdump: redefine VIRT_PHYS_OFFSET Tiejun Chen
2013-06-20  7:53 ` [v2][PATCH 7/7] book3e/kexec/kdump: recover "r4 = 0" to create the initial TLB Tiejun Chen

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=51DBC118.6030100@windriver.com \
    --to=tiejun.chen@windriver.com \
    --cc=R65777@freescale.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    /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).