Re: [PATCH v3 0/3] ACPI: container hot remove support.

2012-11-26 Thread Hanjun Guo
On 2012/11/26 14:06, Tang Chen wrote: > On 11/26/2012 01:42 PM, Hanjun Guo wrote: >> >> Hi all, >> I think Yasuaki mentioned the key point for the container device remove, >> that is dependency. >> >> Currently, container, processor, and memory hotpulg are m

Re: [PATCH v3 0/3] ACPI: container hot remove support.

2012-11-27 Thread Hanjun Guo
On 2012/11/27 10:38, Tang Chen wrote: > On 11/27/2012 09:08 AM, Hanjun Guo wrote: >> On 2012/11/26 14:06, Tang Chen wrote: >>> On 11/26/2012 01:42 PM, Hanjun Guo wrote: >>>> >>>> Hi all, >>>> I think Yasuaki mentioned the key point fo

Re: [RFC PATCH v3 0/3] acpi: Introduce prepare_remove device operation

2012-11-28 Thread Hanjun Guo
g system 6) post_unconfigure(): free resources used by devices In this way, we can easily rollback if error happens. How do you think of this solution, any suggestion ? I think we can achieve a better way for sharing ideas. :) Thanks Hanjun Guo > > With this patchset, only acpi memory

Re: [RFC PATCH v3 0/3] acpi: Introduce prepare_remove device operation

2012-11-28 Thread Hanjun Guo
On 2012/11/29 2:41, Toshi Kani wrote: > On Wed, 2012-11-28 at 19:05 +0800, Hanjun Guo wrote: >> On 2012/11/24 1:50, Vasilis Liaskovitis wrote: >>> As discussed in https://patchwork.kernel.org/patch/1581581/ >>> the driver core remove function needs to always succeed. Thi

Re: [PATCH V2 2/2] ia64: iosapic: fix kexec oops when iosapic was removed

2013-03-18 Thread Hanjun Guo
ping... On 2013/3/8 12:33, Hanjun Guo wrote: > Ioapic hotplug was supported in IA64 code, but will lead to kexec oops > when iosapic was removed. here is the code logic: > > iosapic_remove > iosapic_free > memset(&iosapic_lists[index], 0, sizeof(iosapic_lists[0]))

[PATCH 1/6] ACPI / processor: Introduce apic_id in struct processor to save parsed APIC id

2013-08-31 Thread Hanjun Guo
() acpi_map_lsapic() will evaluate _MAT again; This can be done more effectively, this patch introduces apic_id in struct processor to save parsed APIC id, and then we can use it and remove the duplicated _MAT evaluation. Signed-off-by: Jiang Liu Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c

[PATCH 2/6] ACPI / processor: use apic_id and remove duplicated _MAT evaluation

2013-08-31 Thread Hanjun Guo
From: Jiang Liu Since APIC id is saved in processor struct, just use it and remove the duplicated _MAT evaluation. Signed-off-by: Jiang Liu Signed-off-by: Hanjun Guo --- arch/ia64/kernel/acpi.c | 38 -- arch/x86/kernel/acpi/boot.c | 38

[PATCH 3/6] x86: simplify _acpi_map_lsapic()

2013-08-31 Thread Hanjun Guo
From: Jiang Liu In acpi_register_lapic(), it will generates a new logical cpu number and maps to the local APIC id, this logical cpu number can be returned to simplify _acpi_map_lsapic() implementation. Signed-off-by: Jiang Liu Signed-off-by: Hanjun Guo --- arch/x86/include/asm/mpspec.h

[PATCH 4/6] ACPI / processor: remove some dead code in acpi_processor_get_info()

2013-08-31 Thread Hanjun Guo
From: Jiang Liu errata.smp is used by anywhere, so variable assignment is meanless, remove it. Signed-off-by: Jiang Liu Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi

[PATCH 5/6] ACPI / processor: remove unnecessary if (!pr) check

2013-08-31 Thread Hanjun Guo
t into void. Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index a2a71d0..d1cabe5 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/a

[PATCH 6/6] ACPI / processor: Remove outdated comments

2013-08-31 Thread Hanjun Guo
acpi_get_processor_id() can be find nowhere, and the acpi id is synchronized to APIC id when acpi_get_cpuid() is called, so the comments can be removed. Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c |5 - 1 file changed, 5 deletions(-) diff --git a/drivers/acpi

Re: [PATCH 3/6] x86: simplify _acpi_map_lsapic()

2013-09-01 Thread Hanjun Guo
On 2013-9-1 4:14, Rafael J. Wysocki wrote: > On Saturday, August 31, 2013 06:15:58 PM Hanjun Guo wrote: [...] >> +static int acpi_register_lapic(int id, u8 enabled) >> { >> unsigned int ver = 0; >> >> if (id >= (MAX_LOCAL_APIC-1)) { >>

[PATCH v2 0/6] Remove the duplicated _MAT evaluation and simplify _acpi_map_lsapic()

2013-09-01 Thread Hanjun Guo
ted in acpi_register_lapic(), this can be returned to remove the cpumask allocation and operation to simplify _acpi_map_lsapic(). There are also some cleanups for the ACPI processor dirver code. Hanjun Guo (2): ACPI / processor: remove unnecessary if (!pr) check ACPI / processor: Remove outda

[PATCH v2 1/6] ACPI / processor: Introduce apic_id in struct processor to save parsed APIC id

2013-09-01 Thread Hanjun Guo
() acpi_map_lsapic() will evaluate _MAT again; This can be done more effectively, this patch introduces apic_id in struct processor to save parsed APIC id, and then we can use it and remove the duplicated _MAT evaluation. Signed-off-by: Jiang Liu Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c

[PATCH v2 2/6] ACPI / processor: use apic_id and remove duplicated _MAT evaluation

2013-09-01 Thread Hanjun Guo
From: Jiang Liu Since APIC id is saved in processor struct, just use it and remove the duplicated _MAT evaluation. Signed-off-by: Jiang Liu Signed-off-by: Hanjun Guo --- arch/ia64/kernel/acpi.c | 38 -- arch/x86/kernel/acpi/boot.c | 38

[PATCH v2 3/6] x86 / ACPI: simplify _acpi_map_lsapic()

2013-09-01 Thread Hanjun Guo
From: Jiang Liu In acpi_register_lapic(), it will generates a new logical cpu number and maps to the local APIC id, this logical cpu number can be returned to simplify _acpi_map_lsapic() implementation. Signed-off-by: Jiang Liu Signed-off-by: Hanjun Guo --- arch/x86/include/asm/mpspec.h

[PATCH v2 4/6] ACPI / processor: remove some dead code in acpi_processor_get_info()

2013-09-01 Thread Hanjun Guo
From: Jiang Liu errata.smp is used by nowhere, so the variable assignment is meanless, remove it. Signed-off-by: Jiang Liu Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi

[PATCH v2 5/6] ACPI / processor: remove unnecessary if (!pr) check

2013-09-01 Thread Hanjun Guo
change the argument into void too. Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index 5364d02..7ce0750 100644 --- a/drivers/acpi/acpi_proce

[PATCH v2 6/6] ACPI / processor: Remove outdated comments

2013-09-01 Thread Hanjun Guo
acpi_get_processor_id() can be find nowhere, and the acpi id is synchronized to APIC id when acpi_get_cpuid() is called, so the comments can be removed. Signed-off-by: Hanjun Guo --- drivers/acpi/acpi_processor.c |5 - 1 file changed, 5 deletions(-) diff --git a/drivers/acpi

Re: [PATCH 1/4] driver core: introduce helper macro initcall_driver()

2013-09-30 Thread Hanjun Guo
On 2013年09月30日 17:16, Mark Brown wrote: On Mon, Sep 30, 2013 at 01:13:52PM +0800, Hanjun Guo wrote: For some devices especially on platform/I2C/SPI bus, they want to be initialized earlier than other devices, so the driver use initcall such as subsys_initcall to make this device initialize

Re: [PATCH 1/4] driver core: introduce helper macro initcall_driver()

2013-09-30 Thread Hanjun Guo
On 2013年09月30日 18:15, Wolfram Sang wrote: On Mon, Sep 30, 2013 at 01:13:52PM +0800, Hanjun Guo wrote: For some devices especially on platform/I2C/SPI bus, they want to be initialized earlier than other devices, so the driver use initcall such as subsys_initcall to make this device initialize

[PATCH] Staging / quickstart: remove reduplicate if(acpi_disabled) check

2013-09-22 Thread Hanjun Guo
In acpi_bus_register_driver(), there is an if (acpi_disabled) check, so the if(acpi_disabled) before it is reduplicate, remove it. Signed-off-by: Hanjun Guo --- drivers/staging/quickstart/quickstart.c |4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/quickstart

Re: [RFC PATCH v3 0/3] acpi: Introduce prepare_remove device operation

2012-12-02 Thread Hanjun Guo
On 2012/11/30 6:27, Toshi Kani wrote: > On Thu, 2012-11-29 at 12:48 +0800, Hanjun Guo wrote: >> On 2012/11/29 2:41, Toshi Kani wrote: >>> On Wed, 2012-11-28 at 19:05 +0800, Hanjun Guo wrote: >>>> On 2012/11/24 1:50, Vasilis Liaskovitis wrote: >>>>>

Re: [RFC PATCH v3 0/3] acpi: Introduce prepare_remove device operation

2012-12-04 Thread Hanjun Guo
On 2012/12/4 8:10, Toshi Kani wrote: > On Mon, 2012-12-03 at 12:25 +0800, Hanjun Guo wrote: >> On 2012/11/30 6:27, Toshi Kani wrote: >>> On Thu, 2012-11-29 at 12:48 +0800, Hanjun Guo wrote: >>>> On 2012/11/29 2:41, Toshi Kani wrote: >>>>> On Wed

Re: [RFC PATCH v3 0/3] acpi: Introduce prepare_remove device operation

2012-12-05 Thread Hanjun Guo
On 2012/12/5 7:23, Toshi Kani wrote: > On Tue, 2012-12-04 at 17:16 +0800, Hanjun Guo wrote: >> On 2012/12/4 8:10, Toshi Kani wrote: >>> On Mon, 2012-12-03 at 12:25 +0800, Hanjun Guo wrote: >>>> On 2012/11/30 6:27, Toshi Kani wrote: >>>>> On Thu

[PATCH] Documentation / cpu hotplug: remove outdated description for MADT entries

2013-06-20 Thread Hanjun Guo
More than 256 entries in ACPI MADT is supported from ACPI 3.0 Specification, So the outdated description for MADT entries should be removed. Signed-off-by: Hanjun Guo --- Documentation/cpu-hotplug.txt |3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/cpu-hotplug.txt b

Re: [PATCH] Documentation / cpu hotplug: remove outdated description for MADT entries

2013-06-20 Thread Hanjun Guo
On 2013-6-21 3:52, Rafael J. Wysocki wrote: > On Thursday, June 20, 2013 04:54:42 PM Hanjun Guo wrote: >> More than 256 entries in ACPI MADT is supported from ACPI 3.0 Specification, >> So the outdated description for MADT entries should be removed. > > Well, it kind of is st

Re: [PATCH] ACPI: Fix potential NULL pointer dereference in acpi_processor_add()

2013-05-29 Thread Hanjun Guo
On 2013-5-29 19:07, Martin Mokrejs wrote: > Hanjun Guo wrote: >> On 2013-5-29 7:30, Rafael J. Wysocki wrote: >>> On Thursday, May 23, 2013 08:44:26 PM Hanjun Guo wrote: >>>> In acpi_processor_add(), get_cpu_device() will return NULL sometimes, >>>> althoug

Re: [PATCH] ACPI: Fix potential NULL pointer dereference in acpi_processor_add()

2013-05-30 Thread Hanjun Guo
On 2013-5-31 6:25, Greg Kroah-Hartman wrote: > On Thu, May 30, 2013 at 03:57:58PM +0200, Rafael J. Wysocki wrote: >> On Thursday, May 30, 2013 10:29:54 AM Hanjun Guo wrote: >>> On 2013-5-29 19:07, Martin Mokrejs wrote: >>>> Hanjun Guo wrote: >>>>&g

[PATCH v2] Documentation / cpu hotplug: Rephrase the outdated description for MADT entries

2013-06-21 Thread Hanjun Guo
More than 256 entries in ACPI MADT is supported from ACPI 3.0, so the information should be updated. -v2: Rephrase the information instead of simply removing it according to Rafael's advice. Suggested-by: Rafael J. Wysocki Signed-off-by: Hanjun Guo --- Documentation/cpu-hotplug.txt |

[PATCH] ACPI / processor: Remove unused macros in processor_driver.c

2013-06-24 Thread Hanjun Guo
ACPI_PROCESSOR_LIMIT_THERMAL are not used by any code, remove them too. Signed-off-by: Hanjun Guo --- drivers/acpi/processor_driver.c |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index d93963f..823be116 100644 --- a/drivers

Re: [RFC][PATCH 1/2] ARM64: add cpu topology definition

2013-08-14 Thread Hanjun Guo
On 2013-8-14 19:27, Catalin Marinas wrote: > On Mon, Jul 29, 2013 at 10:54:01AM +0100, Will Deacon wrote: >> On Mon, Jul 29, 2013 at 10:46:06AM +0100, Vincent Guittot wrote: >>> On 27 July 2013 12:42, Hanjun Guo wrote: >>>> Power aware scheduling needs the cpu topol

Re: [PATCH 1/3] drivers / base: Fix sysfs_deprecated_setup() __init attribute location

2013-08-19 Thread Hanjun Guo
Hi Greg, I sent [PATCH 3/3] twice because of my bad email client, sorry for the noise, please ignore the duplicated [PATCH 3/3]. Thanks Hanjun On 2013-8-17 20:42, Hanjun Guo wrote: > __init belongs after the return type on functions, not before it. > > Signed-off-by: H

[PATCH 1/3] cpu topology: remove stale arch_provides_topology_pointers and define_siblings_show_map/list()

2013-07-26 Thread Hanjun Guo
s to 'unsigned int' on all supported arches. So this arch_provides_topology_pointers define is pointless and only cause obfuscation now, remove it. Tested on x86 machine, topology information in sys/devices/system/cpu/ cpuX/topology/ is the same after appling this patch set. Signed-o

[PATCH 2/3] x86 / cpu topology: remove the stale macro arch_provides_topology_pointers

2013-07-26 Thread Hanjun Guo
Macro arch_provides_topology_pointers is pointless now, remove it. Signed-off-by: Hanjun Guo --- arch/x86/include/asm/topology.h |3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h index 095b215..d35f24e 100644 --- a/arch

[PATCH 3/3] tile / cpu topology: remove stale Macro arch_provides_topology_pointers

2013-07-26 Thread Hanjun Guo
Macro arch_provides_topology_pointers is pointless now, remove it. Signed-off-by: Hanjun Guo --- arch/tile/include/asm/topology.h |3 --- 1 file changed, 3 deletions(-) diff --git a/arch/tile/include/asm/topology.h b/arch/tile/include/asm/topology.h index d5e86c9..d15c0d8 100644 --- a/arch

[RFC][PATCH 1/2] ARM64: add cpu topology definition

2013-07-27 Thread Hanjun Guo
, and replaced the topology array with per cpu variable. Signed-off-by: Hanjun Guo --- arch/arm64/Kconfig|9 +++ arch/arm64/include/asm/cputype.h | 11 arch/arm64/include/asm/topology.h | 41 arch/arm64/kernel/Makefile|1 + arch/arm64/kernel

[RFC][PATCH 2/2] ARM64: introduce cluster id and make a difference between socket id

2013-07-27 Thread Hanjun Guo
64 bit and introduce another affinity level, we can use this affinity level for socket id and use the third highest level affinity for cluster id, which make the socket id behavior in its original way. Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/topology.h |1 + arch/arm64/kernel

Re: [RFC][PATCH 2/2] ARM64: introduce cluster id and make a difference between socket id

2013-07-30 Thread Hanjun Guo
On 2013-7-29 17:38, Vincent Guittot wrote: > On 27 July 2013 12:42, Hanjun Guo wrote: >> In the cpu topology information, we define topology_physical_package_id() >> as cpu socket id, which means that the socket id is the idenfication for >> physical processor, not for a

Re: [RFC][PATCH 1/2] ARM64: add cpu topology definition

2013-07-30 Thread Hanjun Guo
On 2013-7-29 17:46, Vincent Guittot wrote: > On 27 July 2013 12:42, Hanjun Guo wrote: >> Power aware scheduling needs the cpu topology information to improve the >> cpu scheduler decision making. > > It's not only power aware scheduling. The scheduler already uses &g

Re: [RFC][PATCH 1/2] ARM64: add cpu topology definition

2013-07-30 Thread Hanjun Guo
On 2013-7-29 21:36, Dave Martin wrote: > On Mon, Jul 29, 2013 at 10:54:01AM +0100, Will Deacon wrote: >> On Mon, Jul 29, 2013 at 10:46:06AM +0100, Vincent Guittot wrote: >>> On 27 July 2013 12:42, Hanjun Guo wrote: >>>> Power aware scheduling needs the cpu topol

[PATCH 1/2] ia64: iosapic: fix a minor typo in comments

2013-03-03 Thread Hanjun Guo
describeinterrupts -> describe interrupts Signed-off-by: Hanjun Guo --- arch/ia64/kernel/iosapic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index ee33c3a..a6e2f75 100644 --- a/arch/ia64/kernel/iosapi

[PATCH 2/2] ia64: iosapic: fix kexec oops when iosapic was removed

2013-03-03 Thread Hanjun Guo
l+0x0/0x20 sp=e0078f76fe30 bsp=e0078f761120 Kernel panic - not syncing: Fatal exception With Tony and Toshi's advice, the patch removes the "rte" from rte_list when the iosapic was removed. Signed-off-by: Hanjun Guo Signed-off-by: Jianguo Wu --- arch/ia6

[PATCH 0/4] ACPI and PM patches for Euler stable from mainline v3.6

2013-04-10 Thread Hanjun Guo
Hi Zefan, These four patches are bugfix for ACPI and power management from mainline v3.6, comments are welcomed! Thanks Hanjun Guo Colin Cross (1): cpuidle: fix error handling in __cpuidle_register_device Stephen Boyd (1): cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency

[PATCH 4/4] ACPI: Only count valid srat memory structures

2013-04-10 Thread Hanjun Guo
8 On this machine (ProLiant ML570 G3) the SRAT table contains: - No processor affinities - One memory affinity structure (which is set disabled) CC: Per Jessen CC: Andi Kleen Signed-off-by: Thomas Renninger Signed-off-by: Len Brown Integrated-by: Hanjun Guo --- arch/ia64/kernel/acpi.c |5 +

[PATCH 2/4] cpufreq: Fix sysfs deadlock with concurrent hotplug/frequency switch

2013-04-10 Thread Hanjun Guo
igned-off-by: Stephen Boyd Signed-off-by: Rafael J. Wysocki Integrated-by: Hanjun Guo --- drivers/cpufreq/cpufreq.c | 35 +++ 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 7f2f149..fb

[PATCH 1/4] cpuidle: fix error handling in __cpuidle_register_device

2013-04-10 Thread Hanjun Guo
, which will simplify the error handling when coupled states are added. Reviewed-by: Santosh Shilimkar Tested-by: Santosh Shilimkar Reviewed-by: Kevin Hilman Tested-by: Kevin Hilman Signed-off-by: Colin Cross Reviewed-by: Rafael J. Wysocki Signed-off-by: Len Brown Integrated-by: Hanjun Guo

[PATCH 3/4] ACPI: Untangle a return statement for better readability

2013-04-10 Thread Hanjun Guo
-by: Thomas Renninger Signed-off-by: Len Brown Integrated-by: Hanjun Guo --- drivers/acpi/numa.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index e56f3be..2a63993 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi

Re: [PATCH 0/4] ACPI and PM patches for Euler stable from mainline v3.6

2013-04-10 Thread Hanjun Guo
I made a mistake in sending email, sorry for the bothering, please ignore it. On 2013/4/10 18:22, Hanjun Guo wrote: > Hi Zefan, > > These four patches are bugfix for ACPI and power management from mainline > v3.6, comments are welcomed! > > Thanks > Hanjun Guo &

[PATCH] ACPI: Fix potential NULL pointer dereference in acpi_processor_add()

2013-05-23 Thread Hanjun Guo
In acpi_processor_add(), get_cpu_device() will return NULL sometimes, although the chances are small, I think it should be fixed. Signed-off-by: Hanjun Guo --- drivers/acpi/processor_driver.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/acpi

Re: [PATCH] ACPI: Fix potential NULL pointer dereference in acpi_processor_add()

2013-05-28 Thread Hanjun Guo
On 2013-5-29 7:30, Rafael J. Wysocki wrote: > On Thursday, May 23, 2013 08:44:26 PM Hanjun Guo wrote: >> In acpi_processor_add(), get_cpu_device() will return NULL sometimes, >> although the chances are small, I think it should be fixed. >> >> Signed-off-by: Hanjun

Re: [PATCH 2/2] ia64: iosapic: fix kexec oops when iosapic was removed

2013-03-07 Thread Hanjun Guo
On 2013/3/7 1:38, Toshi Kani wrote: > On Mon, 2013-03-04 at 11:47 +0800, Hanjun Guo wrote: >> Ioapic hotplug was supported in IA64 code, but will lead to kexec oops >> when iosapic was removed. here is the code logic: >> >> iosapic_remove >> iosapic_free >&

[PATCH V2 1/2] ia64: iosapic: fix a minor typo in comments

2013-03-07 Thread Hanjun Guo
describeinterrupts -> describe interrupts Signed-off-by: Hanjun Guo --- arch/ia64/kernel/iosapic.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index ee33c3a..a6e2f75 100644 --- a/arch/ia64/kernel/iosapi

[PATCH V2 2/2] ia64: iosapic: fix kexec oops when iosapic was removed

2013-03-07 Thread Hanjun Guo
shi's advice. Signed-off-by: Hanjun Guo Signed-off-by: Jianguo Wu Acked-by: Toshi Kani --- arch/ia64/kernel/iosapic.c | 32 +++- 1 files changed, 31 insertions(+), 1 deletions(-) diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index a6e2

[RFC PATCH] mm: introduce N_LRU_MEMORY to distinguish between normal and movable memory

2012-08-08 Thread Hanjun Guo
From: Wu Jianguo Hi all, Now, We have node masks for both N_NORMAL_MEMORY and N_HIGH_MEMORY to distinguish between normal and highmem on platforms such as x86. But we still don't have such a mechanism to distinguish between "normal" and "movable" memory. As suggested by Christoph Lameter in th

[BUGFIX PATCH] kexec & iosapic: kexec oops when iosapic was removed

2012-08-10 Thread Hanjun Guo
x480/0x4e0 sp=e0078f76fd30 bsp=e0078f761128 [] ia64_ret_from_syscall+0x0/0x20 sp=e0078f76fe30 bsp=e0078f761120 Kernel panic - not syncing: Fatal exception irq 69: nobody cared (try booting with the "irqpoll" option) Signed-off-by: Ha

Re: [RFC PATCH] mm: introduce N_LRU_MEMORY to distinguish between normal and movable memory

2012-08-10 Thread Hanjun Guo
On 2012/8/9 22:06, Christoph Lameter (Open Source) wrote: > On Thu, 9 Aug 2012, Hanjun Guo wrote: > >> Now, We have node masks for both N_NORMAL_MEMORY and >> N_HIGH_MEMORY to distinguish between normal and highmem on platforms such as >> x86. >> But we still

[RFC PATCH][RESEND] Fusion MPT: disable pci device when mpt map resoures failed

2012-08-10 Thread Hanjun Guo
(MPT_ADAPTER *ioc), it forgot disable the pci device when error happened, the irq and gsi will never be released. this patch will fix it. Signed-off-by: Hanjun Guo Signed-off-by: Jiang Liu --- drivers/message/fusion/mptbase.c | 18 +++--- 1 files changed, 11 insertions(+), 7 deletions

[BUGFIX PATCH][RESEND] kexec & iosapic: kexec oops when iosapic was removed

2012-08-10 Thread Hanjun Guo
x480/0x4e0 sp=e0078f76fd30 bsp=e0078f761128 [] ia64_ret_from_syscall+0x0/0x20 sp=e0078f76fe30 bsp=e0078f761120 Kernel panic - not syncing: Fatal exception irq 69: nobody cared (try booting with the "irqpoll" option) Signed-off-by: Ha

Re: [RFC PATCH] mm: introduce N_LRU_MEMORY to distinguish between normal and movable memory

2012-08-14 Thread Hanjun Guo
On 2012/8/10 22:12, Christoph Lameter (Open Source) wrote: > On Fri, 10 Aug 2012, Hanjun Guo wrote: > >> On 2012/8/9 22:06, Christoph Lameter (Open Source) wrote: >>> On Thu, 9 Aug 2012, Hanjun Guo wrote: >>> >>>> Now, We have node masks for both

Re: [RFC PATCH] mm: introduce N_LRU_MEMORY to distinguish between normal and movable memory

2012-08-16 Thread Hanjun Guo
On 2012/8/14 22:14, Christoph Lameter wrote: > On Tue, 14 Aug 2012, Hanjun Guo wrote: > >> N_NORMAL_MEMORY means !LRU allocs possible. > > Ok. I am fine with that change. However this is a significant change that > needs to be mentioned prominently in the changelog and th

Re: [BUGFIX PATCH][RESEND] kexec & iosapic: kexec oops when iosapic was removed

2012-08-16 Thread Hanjun Guo
E when unregister a GSI, and increase the rte->refcnt if the RTE is already existing when register a GSI, so "rte" will not removed from rte_list when the iosapic is removed. Actually, the rte_list will keep static when remove/add a existing iosapic after boot up. Should we remove t

[PATCH V2] mm: introduce N_LRU_MEMORY to distinguish between normal and movable memory

2012-08-16 Thread Hanjun Guo
From: Wu Jianguo Hi Christoph, Now, We have node masks for both N_NORMAL_MEMORY and N_HIGH_MEMORY to distinguish between normal and highmem on platforms such as x86. But we still don't have such a mechanism to distinguish between "normal" and "movable" memory. So this patch introduce N_L

Re: [BUGFIX PATCH][RESEND] kexec & iosapic: kexec oops when iosapic was removed

2012-08-20 Thread Hanjun Guo
On 2012/8/17 3:33, Toshi Kani wrote: > On Thu, 2012-08-16 at 18:28 +0800, Hanjun Guo wrote: >> On 2012/8/13 10:54, Luck, Tony wrote: >>>>vec = irq_to_vector(irq); >>>>list_for_each_entry(rte, &info->rtes,

Re: [PATCH v3 0/3] ACPI: container hot remove support.

2012-11-25 Thread Hanjun Guo
2) Remove SCK1 after SCK0. we should remove the host bridge PCI0 first, or the system will crash down. yes, dynamic dependency analysis is needed here. and the ACPI hotplug driver totally have no idea of this. so, should we do something to settle this down ? Thanks Hanjun Guo > The exampl

Re: [PATCH v3 0/3] ACPI: container hot remove support.

2012-11-26 Thread Hanjun Guo
On 2012/11/26 14:06, Tang Chen wrote: > On 11/26/2012 01:42 PM, Hanjun Guo wrote: >> >> Hi all, >> I think Yasuaki mentioned the key point for the container device remove, >> that is dependency. >> >> Currently, container, processor, and memory hotpulg are m

Re: [RFC PATCH v2 11/11] irqchip: mbigen: promote mbigen init

2016-09-19 Thread Hanjun Guo
On 2016/9/19 18:12, Marc Zyngier wrote: > On 19/09/16 10:49, Hanjun Guo wrote: >> On 2016/9/15 23:24, Marc Zyngier wrote: >>> On 14/09/16 15:21, Hanjun Guo wrote: >>>> From: Hanjun Guo >>>> >>>> mbigen is an irqchip and it needs to be probe

Re: [RFC] Arm64 boot fail with numa enable in BIOS

2016-09-19 Thread Hanjun Guo
On 2016/9/19 22:07, Mark Rutland wrote: > [adding LAKML, arm64 maintainers] > > On Mon, Sep 19, 2016 at 09:05:26PM +0800, Yisheng Xie wrote: >> hi all, > Hi, > > In future, please make sure to Cc LAKML along with relevant parties when > sending arm64 patches/queries. > > For everyone newly Cc'd, th

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Hanjun Guo
pu >= NR_CPUS) + return 0; + + nid = cpu_to_node_map[cpu]; + if (nid == NUMA_NO_NODE) + nid = 0; + return nid; +} +EXPORT_SYMBOL(cpu_to_node); + /** * numa_add_memblk - Set node id to memblk * @nid: NUMA node ID of the new memblk Reviewe

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Hanjun Guo
+Cc Yisheng, On 09/20/2016 06:43 PM, Robert Richter wrote: David, On 19.09.16 11:49:30, David Daney wrote: Fix by supplying a cpu_to_node() implementation that returns correct node mappings. +int cpu_to_node(int cpu) +{ + int nid; + + /* +* Return 0 for unknown mapping s

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-20 Thread Hanjun Guo
On 09/20/2016 09:38 PM, Robert Richter wrote: On 20.09.16 19:32:34, Hanjun Guo wrote: On 09/20/2016 06:43 PM, Robert Richter wrote: Instead we need to make sure the set_*numa_node() functions are called earlier before secondary cpus are booted. My suggested change for that is this: diff

Re: [PATCH V7 1/8] ACPI: I/O Remapping Table (IORT) initial support

2016-06-21 Thread Hanjun Guo
27;t get device full path name\n"); + break; + } + + if (!strcmp(ncomp->device_name, (char *)buffer.pointer)) + return AE_OK; ... we need to kfree(buffer.pointer) before we return or break. With this fixed,

Re: [PATCH V7 2/8] ACPI: Add new IORT functions to support MSI domain handling

2016-06-21 Thread Hanjun Guo
d iort_table_detect(void) { } +static inline u32 iort_msi_map_rid(struct device *dev, u32 req_id) +{ return req_id; } +static inline struct irq_domain * +iort_get_device_domain(struct device *dev, u32 req_id) { return NULL; } #endif Reviewed-by: Hanjun Guo Thanks Hanjun

Re: [PATCH V7 3/8] PCI/MSI: Setup MSI domain on a per-device basis using IORT ACPI table

2016-06-21 Thread Hanjun Guo
domain(&pdev->dev, rid); + return dom; } #endif /* CONFIG_PCI_MSI_IRQ_DOMAIN */ Reviewed-by: Hanjun Guo Thanks Hanjun

Re: [PATCH V7 6/8] irqchip/gicv3-its: Probe ITS in the ACPI way

2016-06-21 Thread Hanjun Guo
its_of_probe(of_node); else - return -ENODEV; + its_acpi_probe(); if (list_empty(&its_nodes)) { pr_warn("ITS: No ITS available, not enabling LPIs\n"); Reviewed-by: Hanjun Guo Thanks Hanjun

Re: [PATCH V7 4/8] irqchip/gicv3-its: Cleanup for ITS domain initialization

2016-06-21 Thread Hanjun Guo
); + continue; + } + its_probe(np, parent_domain); } Reviewed-by: Hanjun Guo Thanks Hanjun

Re: [PATCH V7 8/8] irqchip/gicv3-its: Use MADT ITS subtable to do PCI/MSI domain initialization

2016-06-21 Thread Hanjun Guo
return 0; +} +#else +static int __init its_pci_acpi_msi_init(void) +{ + return 0; +} +#endif + static int __init its_pci_msi_init(void) { its_pci_of_msi_init(); + its_pci_acpi_msi_init(); return 0; } Reviewed-by: Hanjun Guo Thanks Hanjun

Re: [RFC PATCH v2 00/15] ACPI IORT ARM SMMU v3 support

2016-06-21 Thread Hanjun Guo
Hi Lorenzo, On 2016/6/7 21:30, Lorenzo Pieralisi wrote: This RFC patch series is v2 of a previous posting: https://lkml.org/lkml/2016/4/14/702 v1 -> v2: - Rebased on top of dependencies series [1][2][3](v4.7-rc1) - Removed IOMMU fwnode generalization - Implemented ARM S

Re: [RFC PATCH v2 00/15] ACPI IORT ARM SMMU v3 support

2016-06-21 Thread Hanjun Guo
On 2016/6/21 22:27, Lorenzo Pieralisi wrote: Hi Hanjun, On Tue, Jun 21, 2016 at 06:37:17PM +0800, Hanjun Guo wrote: Hi Lorenzo, On 2016/6/7 21:30, Lorenzo Pieralisi wrote: This RFC patch series is v2 of a previous posting: https://lkml.org/lkml/2016/4/14/702 v1 -> v2: - Rebased

Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

2016-09-26 Thread Hanjun Guo
On 09/20/2016 09:21 PM, Robert Richter wrote: On 20.09.16 19:32:34, Hanjun Guo wrote: On 09/20/2016 06:43 PM, Robert Richter wrote: Unfortunately either your nor my code does fix the BUG_ON() I see with the numa kernel: kernel BUG at mm/page_alloc.c:1848! See below for the core dump. It

Re: [PATCH v10 3/4] ARM64: ACPI: enable ACPI_SPCR_TABLE

2016-09-08 Thread Hanjun Guo
ACPI is disabled. Hi Will, Catalin, Can you review this patch and consider ACKing it please? Hanjun, Al, Mark, Graeme -- any comments on this? We tested this patch on D02, although d02 is 8250 based uart, but this patch is the core part, which makes sense to me, Acked-by: Hanjun Guo T

Re: [PATCH v10 3/4] ARM64: ACPI: enable ACPI_SPCR_TABLE

2016-09-09 Thread Hanjun Guo
On 2016/9/9 0:34, Mark Salter wrote: On Thu, 2016-09-08 at 12:16 +0100, Will Deacon wrote: On Wed, Sep 07, 2016 at 12:30:19PM +0300, Aleksey Makarov wrote: On 09/05/2016 03:36 PM, Aleksey Makarov wrote: SBBR mentions SPCR as a mandatory ACPI table. So enable it for ARM64 Earlycon should b

Re: [PATCH v5 07/14] drivers: acpi: iort: add support for ARM SMMU platform devices creation

2016-09-13 Thread Hanjun Guo
iort_iommu_config) that contains hooks (to be defined when the corresponding ARM SMMU driver support is added to the kernel) to be used to define the platform devices names, init the IOMMUs, count their resources and finally initialize them. Signed-off-by: Lorenzo Pieralisi Cc: Hanjun Guo Cc

Re: [PATCH v5 14/14] drivers: acpi: iort: introduce iort_iommu_configure

2016-09-13 Thread Hanjun Guo
and hook it up in the ACPI kernel layer that implements DMA configuration for a device. Signed-off-by: Lorenzo Pieralisi Cc: Hanjun Guo Cc: Tomasz Nowicki Cc: "Rafael J. Wysocki" --- drivers/acpi/arm64/iort.c | 96 +++ drivers/acpi/scan.c

Re: [PATCH v5 12/14] drivers: acpi: iort: replace rid map type with type mask

2016-09-13 Thread Hanjun Guo
common set of components (eg IOMMUs) rather than a specific node type. Upgrade the IORT iort_node_map_rid() API to work with a type mask instead of a single node type so that it can be used for mappings that span multiple components types (ie IOMMUs). Signed-off-by: Lorenzo Pieralisi Cc: Hanjun Guo

Re: [PATCH v5 07/14] drivers: acpi: iort: add support for ARM SMMU platform devices creation

2016-09-13 Thread Hanjun Guo
On 2016/9/13 16:24, Lorenzo Pieralisi wrote: On Tue, Sep 13, 2016 at 04:15:31PM +0800, Hanjun Guo wrote: [...] +static acpi_status __init iort_match_iommu_callback(struct acpi_iort_node *node, +void *context) +{ +int ret; +struct fwnode_handle *fwnode

[PATCH 0/2] minor cleanups for IORT patch set

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo Minor cleanup for IORT patches and no functional change, based on Marc's irq/irqchip-4.9 branch Hanjun Guo (2): ACPI: IORT: minor cleanup for iort_match_node_callback() irqchip: gic-v3-its: keep the head file include in alphabetic order drivers/acpi/arm64/i

[PATCH 2/2] irqchip: gic-v3-its: keep the head file include in alphabetic order

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo The head file is strictly in alphabetic order now, so let's not be the rule breaker. And acpi_iort.h includes acpi.h, remove acpi.h here. Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-gic-v3-its.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --

[PATCH 1/2] ACPI: IORT: minor cleanup for iort_match_node_callback()

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo Cleanup iort_match_node_callback() a little bit to reduce some lines of code, aslo fix the indentation in iort_scan_node(). Signed-off-by: Hanjun Guo --- drivers/acpi/arm64/iort.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/acpi

[RFC PATCH v2 10/11] irqchip: mbigen: Add ACPI support

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo With the preparation of platform msi support and interrupt producer in DSDT, we can add mbigen ACPI support now. We are using _PRS methd to indicate number of irq pins instead of num_pins in DT. For mbi-gen, Device(MBI0) { Name(_HID, "HISI0152")

[RFC PATCH v2 06/11] msi: platform: make platform_msi_create_device_domain() ACPI aware

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo With the platform msi domain created for ITS, irqchip such as mbi-gen connecting ITS, which needs ctreate its own irqdomain. Fortunately with the platform msi support upstreamed by Marc, we just need to add minor code to make it run properly. platform_msi_create_device_domain

[RFC PATCH v2 07/11] ACPI: irq: introduce interrupt producer

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo In ACPI 6.1 spec, section 19.6.62, Interrupt Resource Descriptor Macro, Interrupt (ResourceUsage, EdgeLevel, ActiveLevel, Shared, ResourceSourceIndex, ResourceSource, DescriptorName) { InterruptList } => Buffer For the arguement ResourceUsage and DescriptorName, which me

[RFC PATCH v2 02/11] ACPI: platform-msi: retrieve dev id from IORT

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo For devices connecting to ITS, it needs dev id to identify itself, and this dev id is represented in the IORT table in named componant node [1] for platform devices, so in this patch we will scan the IORT to retrieve device's dev id. Introduce iort_pmsi_get_dev_id()

[RFC PATCH v2 03/11] irqchip: gicv3-its: platform-msi: refactor its_pmsi_init() to prepare for ACPI

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo Introduce its_pmsi_init_one() to refactor the code to isolate ACPI&DT common code to prepare for ACPI later. Cc: Marc Zyngier Cc: Tomasz Nowicki Cc: Thomas Gleixner Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-gic-v3-its-platform-msi.c

[RFC PATCH v2 00/11] ACPI platform MSI, interrupt producer/consumer and its example mbi-gen

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo With platform msi support landed in the kernel, and the introduction of IORT for GICv3 ITS (PCI MSI) [1], the framework for platform msi is ready, this patch set add few patches to enable the ACPI platform msi support. For platform device connecting to ITS on arm platform, we

[RFC PATCH v2 01/11] irqchip: gicv3-its: platform-msi: refactor its_pmsi_prepare()

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo Adding ACPI support for platform MSI, we need to retrieve the dev id in ACPI way instead of device tree, we already have a well formed function its_pmsi_prepare() to get the dev id but it's OF dependent, so collect OF related code and put them into a single function to

[RFC PATCH v2 11/11] irqchip: mbigen: promote mbigen init

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo mbigen is an irqchip and it needs to be probed before devices, same logic is used for SMMU and etc., let's use arch_initcall instead of platform init for mbigen. Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Ma Jun Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-mbigen.

[RFC PATCH v2 04/11] irqchip: gicv3-its: platform-msi: scan MADT to create platform msi domain

2016-09-14 Thread Hanjun Guo
From: Hanjun Guo With the introduction of its_pmsi_init_one(), we can add some code on top for ACPI support of platform MSI. We are scanning the MADT table to get the ITS entry(ies), then use the information to create the platform msi domain for devices connect to it, just like the PCI MSI for

[RFC PATCH v2 09/11] irqchip: mbigen: introduce mbigen_of_create_domain()

2016-09-14 Thread Hanjun Guo
From: Kefeng Wang Introduce mbigen_of_create_domain() to consolidate OF related code and prepare for ACPI later. Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Ma Jun Signed-off-by: Kefeng Wang Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-mbigen.c | 42

[RFC PATCH v2 08/11] irqchip: mbigen: drop module owner

2016-09-14 Thread Hanjun Guo
From: Kefeng Wang Module owner will be set by driver core, so drop it. Cc: Marc Zyngier Cc: Thomas Gleixner Cc: Ma Jun Signed-off-by: Kefeng Wang Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-mbigen.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/irqchip/irq-mbigen.c b

  1   2   3   4   5   6   7   8   9   10   >