From: Rafael J. Wysocki Date: Mon, 8 Aug 2011 21:43:04 +0000 (+0200) Subject: PM / Domains: Implement subdomain counters as atomic fields X-Git-Tag: v3.2-rc1~178^2~23^2~17 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4bb3160c8823d3a1e581d7e05fb8b343097e7c8;p=pandora-kernel.git PM / Domains: Implement subdomain counters as atomic fields Currently, pm_genpd_poweron() and pm_genpd_poweroff() need to take the parent PM domain's lock in order to modify the parent's counter of active subdomains in a nonracy way. This causes the locking to be considerably complex and in fact is not necessary, because the subdomain counters may be implemented as atomic fields and they won't have to be modified under a lock. Replace the unsigned in sd_count field in struct generic_pm_domain by an atomic_t one and modify the code in drivers/base/power/domain.c to take this change into account. This patch doesn't change the locking yet, that is going to be done in a separate subsequent patch. Signed-off-by: Rafael J. Wysocki --- Reading git-diff-tree failed