Message ID | 1376189294-32022-27-git-send-email-yinghai@kernel.org |
---|---|
State | Not Applicable |
Headers | show |
On 8/11/13, Yinghai Lu <yinghai@kernel.org> wrote: > During ioapic hotplug, acpi_register_ioapic will be called. > Now for x86, that function is blank. > Fill that will update __mp_register_ioapic to use those ioapic. > > Signed-off-by: Yinghai Lu <yinghai@kernel.org> > --- > arch/x86/kernel/acpi/boot.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c > index 5be15d1..4a5336d 100644 > --- a/arch/x86/kernel/acpi/boot.c > +++ b/arch/x86/kernel/acpi/boot.c > @@ -707,16 +707,18 @@ EXPORT_SYMBOL(acpi_unmap_lsapic); > > int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) > { > - /* TBD */ > - return -EINVAL; > + unsigned long long id = 0; > + > + acpi_evaluate_integer(handle, "_UID", NULL, &id); We cannot assume that "_UID" is an integer. "_UID" can be either an integer or a string. Need to consider the case when it is a string. Thanks Rui > + > + return __mp_register_ioapic(id, phys_addr, gsi_base, true); > } > > EXPORT_SYMBOL(acpi_register_ioapic); > > int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base) > { > - /* TBD */ > - return -EINVAL; > + return mp_unregister_ioapic(gsi_base); > } > > EXPORT_SYMBOL(acpi_unregister_ioapic); > -- > 1.8.1.4 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Aug 23, 2013 at 5:51 PM, rui wang <ruiv.wang@gmail.com> wrote: > On 8/11/13, Yinghai Lu <yinghai@kernel.org> wrote: >> During ioapic hotplug, acpi_register_ioapic will be called. >> Now for x86, that function is blank. >> Fill that will update __mp_register_ioapic to use those ioapic. >> >> Signed-off-by: Yinghai Lu <yinghai@kernel.org> >> --- >> arch/x86/kernel/acpi/boot.c | 10 ++++++---- >> 1 file changed, 6 insertions(+), 4 deletions(-) >> >> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c >> index 5be15d1..4a5336d 100644 >> --- a/arch/x86/kernel/acpi/boot.c >> +++ b/arch/x86/kernel/acpi/boot.c >> @@ -707,16 +707,18 @@ EXPORT_SYMBOL(acpi_unmap_lsapic); >> >> int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) >> { >> - /* TBD */ >> - return -EINVAL; >> + unsigned long long id = 0; >> + >> + acpi_evaluate_integer(handle, "_UID", NULL, &id); > > We cannot assume that "_UID" is an integer. "_UID" can be either an > integer or a string. Need to consider the case when it is a string. Yes. But do you have test case for ioapic that _UID is not integer? Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 8/27/13, Yinghai Lu <yinghai@kernel.org> wrote: > On Fri, Aug 23, 2013 at 5:51 PM, rui wang <ruiv.wang@gmail.com> wrote: >> On 8/11/13, Yinghai Lu <yinghai@kernel.org> wrote: >>> During ioapic hotplug, acpi_register_ioapic will be called. >>> Now for x86, that function is blank. >>> Fill that will update __mp_register_ioapic to use those ioapic. >>> >>> Signed-off-by: Yinghai Lu <yinghai@kernel.org> >>> --- >>> arch/x86/kernel/acpi/boot.c | 10 ++++++---- >>> 1 file changed, 6 insertions(+), 4 deletions(-) >>> >>> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c >>> index 5be15d1..4a5336d 100644 >>> --- a/arch/x86/kernel/acpi/boot.c >>> +++ b/arch/x86/kernel/acpi/boot.c >>> @@ -707,16 +707,18 @@ EXPORT_SYMBOL(acpi_unmap_lsapic); >>> >>> int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 >>> gsi_base) >>> { >>> - /* TBD */ >>> - return -EINVAL; >>> + unsigned long long id = 0; >>> + >>> + acpi_evaluate_integer(handle, "_UID", NULL, &id); >> >> We cannot assume that "_UID" is an integer. "_UID" can be either an >> integer or a string. Need to consider the case when it is a string. > > Yes. > > But do you have test case for ioapic that _UID is not integer? > Yes I have an IOAPIC with an _UID of: Name (_UID, "IOAPIC01") // _UID: Unique ID It's a bit challenge how you'll conjure unique identifiers from both integers and strings. If you have a new patch I can help try it out. Thanks Rui > Thanks > > Yinghai > -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Aug 26, 2013 at 11:44 PM, rui wang <ruiv.wang@gmail.com> wrote: > On 8/27/13, Yinghai Lu <yinghai@kernel.org> wrote: >> On Fri, Aug 23, 2013 at 5:51 PM, rui wang <ruiv.wang@gmail.com> wrote: >>> On 8/11/13, Yinghai Lu <yinghai@kernel.org> wrote: >>>> During ioapic hotplug, acpi_register_ioapic will be called. >>>> Now for x86, that function is blank. >>>> Fill that will update __mp_register_ioapic to use those ioapic. >>>> >>>> Signed-off-by: Yinghai Lu <yinghai@kernel.org> >>>> --- >>>> arch/x86/kernel/acpi/boot.c | 10 ++++++---- >>>> 1 file changed, 6 insertions(+), 4 deletions(-) >>>> >>>> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c >>>> index 5be15d1..4a5336d 100644 >>>> --- a/arch/x86/kernel/acpi/boot.c >>>> +++ b/arch/x86/kernel/acpi/boot.c >>>> @@ -707,16 +707,18 @@ EXPORT_SYMBOL(acpi_unmap_lsapic); >>>> >>>> int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 >>>> gsi_base) >>>> { >>>> - /* TBD */ >>>> - return -EINVAL; >>>> + unsigned long long id = 0; >>>> + >>>> + acpi_evaluate_integer(handle, "_UID", NULL, &id); >>> >>> We cannot assume that "_UID" is an integer. "_UID" can be either an >>> integer or a string. Need to consider the case when it is a string. >> >> Yes. >> >> But do you have test case for ioapic that _UID is not integer? >> > > Yes I have an IOAPIC with an _UID of: > > Name (_UID, "IOAPIC01") // _UID: Unique ID > > It's a bit challenge how you'll conjure unique identifiers from both > integers and strings. If you have a new patch I can help try it out. Then do you have _MAT with that ioapic device or else? need to find the _MAT entry with GSM matching to find out ioapic id. Thanks Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 8/27/13, Yinghai Lu <yinghai@kernel.org> wrote: > On Mon, Aug 26, 2013 at 11:44 PM, rui wang <ruiv.wang@gmail.com> wrote: >> On 8/27/13, Yinghai Lu <yinghai@kernel.org> wrote: >>> On Fri, Aug 23, 2013 at 5:51 PM, rui wang <ruiv.wang@gmail.com> wrote: >>>> On 8/11/13, Yinghai Lu <yinghai@kernel.org> wrote: >>>>> During ioapic hotplug, acpi_register_ioapic will be called. >>>>> Now for x86, that function is blank. >>>>> Fill that will update __mp_register_ioapic to use those ioapic. >>>>> >>>>> Signed-off-by: Yinghai Lu <yinghai@kernel.org> >>>>> --- >>>>> arch/x86/kernel/acpi/boot.c | 10 ++++++---- >>>>> 1 file changed, 6 insertions(+), 4 deletions(-) >>>>> >>>>> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c >>>>> index 5be15d1..4a5336d 100644 >>>>> --- a/arch/x86/kernel/acpi/boot.c >>>>> +++ b/arch/x86/kernel/acpi/boot.c >>>>> @@ -707,16 +707,18 @@ EXPORT_SYMBOL(acpi_unmap_lsapic); >>>>> >>>>> int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 >>>>> gsi_base) >>>>> { >>>>> - /* TBD */ >>>>> - return -EINVAL; >>>>> + unsigned long long id = 0; >>>>> + >>>>> + acpi_evaluate_integer(handle, "_UID", NULL, &id); >>>> >>>> We cannot assume that "_UID" is an integer. "_UID" can be either an >>>> integer or a string. Need to consider the case when it is a string. >>> >>> Yes. >>> >>> But do you have test case for ioapic that _UID is not integer? >>> >> >> Yes I have an IOAPIC with an _UID of: >> >> Name (_UID, "IOAPIC01") // _UID: Unique ID >> >> It's a bit challenge how you'll conjure unique identifiers from both >> integers and strings. If you have a new patch I can help try it out. > > Then do you have _MAT with that ioapic device or else? > > need to find the _MAT entry with GSM matching to find out ioapic id. > There's no _MAT for the IOAPICs. I only find _MAT for the LAPICs. But there's a static MADT in APIC.dsl which contains IOAPIC entries with ioapic ids. Thanks Rui > > Thanks > > Yinghai > -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Aug 27, 2013 at 3:08 AM, rui wang <ruiv.wang@gmail.com> wrote: > On 8/27/13, Yinghai Lu <yinghai@kernel.org> wrote: >>> It's a bit challenge how you'll conjure unique identifiers from both >>> integers and strings. If you have a new patch I can help try it out. >> >> Then do you have _MAT with that ioapic device or else? >> >> need to find the _MAT entry with GSM matching to find out ioapic id. >> > > There's no _MAT for the IOAPICs. I only find _MAT for the LAPICs. But > there's a static MADT in APIC.dsl which contains IOAPIC entries with > ioapic ids. ok, will change to check _MAT at first and fall back to MADT. Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 5be15d1..4a5336d 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -707,16 +707,18 @@ EXPORT_SYMBOL(acpi_unmap_lsapic); int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base) { - /* TBD */ - return -EINVAL; + unsigned long long id = 0; + + acpi_evaluate_integer(handle, "_UID", NULL, &id); + + return __mp_register_ioapic(id, phys_addr, gsi_base, true); } EXPORT_SYMBOL(acpi_register_ioapic); int acpi_unregister_ioapic(acpi_handle handle, u32 gsi_base) { - /* TBD */ - return -EINVAL; + return mp_unregister_ioapic(gsi_base); } EXPORT_SYMBOL(acpi_unregister_ioapic);
During ioapic hotplug, acpi_register_ioapic will be called. Now for x86, that function is blank. Fill that will update __mp_register_ioapic to use those ioapic. Signed-off-by: Yinghai Lu <yinghai@kernel.org> --- arch/x86/kernel/acpi/boot.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)