Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1679612

Re: [PATCH v5 05/12] x86/apic: Unify interrupt mode setup for SMP-capable system

From Dou Liyang <douly.fnst@cn.fujitsu.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 05/12] x86/apic: Unify interrupt mode setup for SMP-capable system
Date 2017-07-03 04:40 +0200
Message-ID <tYZrj-35L-5@gated-at.bofh.it> (permalink)
References <tXVpM-np-9@gated-at.bofh.it> <tXVpM-np-17@gated-at.bofh.it> <tYRtL-5F7-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Thomas,

At 07/03/2017 02:07 AM, Thomas Gleixner wrote:
> On Fri, 30 Jun 2017, Dou Liyang wrote:
>> -static int __init apic_intr_mode_select(void)
>> +static int __init apic_intr_mode_select(int *upmode)
>>  {
>>  	/* Check kernel option */
>>  	if (disable_apic) {
>> @@ -1206,12 +1208,30 @@ static int __init apic_intr_mode_select(void)
>>  	if (!smp_found_config) {
>>  		disable_ioapic_support();
>>
>> -		if (!acpi_lapic)
>> +		if (!acpi_lapic) {
>>  			pr_info("APIC: ACPI MADT or MP tables are not detected\n");
>> +			*upmode = true;
>
> That store and extra argument is pointless.
>
>> +
>> +			return APIC_VIRTUAL_WIRE_NO_CONFIG;
>
> You added an extra return code, which you can use exactly for that purpose
> at the callsite.
>

Actually indeed. Great! Why didn't I think of that?

>
> Aside of that, if you use int * then use numbers, if you use bool then use
> true/false. But mixing that is horrible.
>

Yes, it is, I will remove the 'upmode' argument.


Thanks,

	dou.

>> +		}
>
> Thanks,
>
> 	tglx
>
>
>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v5 05/12] x86/apic: Unify interrupt mode setup for SMP-capable system Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-06-30 06:10 +0200
  Re: [PATCH v5 05/12] x86/apic: Unify interrupt mode setup for  SMP-capable system Thomas Gleixner <tglx@linutronix.de> - 2017-07-02 20:10 +0200
    Re: [PATCH v5 05/12] x86/apic: Unify interrupt mode setup for  SMP-capable system Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-07-03 04:40 +0200

csiph-web