When the need for CPUs is more than the active CPUs and there are some
isolated CPUs, we wakeup the core_ctl thread to unisolate some CPUs.
The core_ctl task can't unisolate any CPU if all of them are isolated
by other clients. Track the number of isolated CPUs by core_ctl and
wakeup the core_ctl task when adjustment is really possible.
Change-Id: I11ef10860532df25cbde572aabd4b925320db8fe
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
The cluster->active_cpus is not updated in eval_need(). The new need
for CPUs is compared against the previous cluster->active_cpus. If
another client isolates a CPU, cluster->active_cpus becomes stale and
we fail to detect the change in need for CPUs.
Change-Id: Ib58b8f0bd03dd2b4a174de2ac54eb0c60c59f9f7
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
We are interested in only CPU_ONLINE and CPU_DEAD notifications. Don't
do anything when other notifications arrive.
Change-Id: Iea2e0e1c93e67ef278ee7c5a9813fbab6cea5c74
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Enable page poisoning by default on MSM8998
and SDM660.
Change-Id: If0b873888f21fd7e7057df43cf223e3c50372bed
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Add a config option to enable page poisoning by
default. The kernel command line option "page_poison"
can be used to change the behaviour during boot.
Change-Id: Ie70763841191a722b1c6125dfad119a29ed0f605
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
On SPARSEMEM systems page poisoning is enabled after buddy is up, because
of the dependency on page extension init. This causes the pages released
by free_all_bootmem not to be poisoned. This either delays or misses the
identification of some issues because the pages have to undergo another
cycle of alloc-free-alloc for any corruption to be detected.
Enable page poisoning early by getting rid of the PAGE_EXT_DEBUG_POISON
flag. Since all the free pages will now be poisoned, the flag need not be
verified before checking the poison during an alloc.
Link: http://lkml.kernel.org/r/1490358246-11001-1-git-send-email-vinmenon@codeaurora.org
Acked-by: Laura Abbott <labbott@redhat.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[vinmenon@codeaurora.org: resolve trivial merge conflicts.
Remove the redundant free pages RO feature from the
page_poison.c file which is the reason for conflicts +
squash the addendum commit 40961ef8d65f51093bc94de110b97b590b6b9275
('mm-enable-page-poisoning-early-at-boot-v2')]
Git-commit: c5b7cd344fd6341e6db79e55c0f1f4d1d9c67a7e
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Change-Id: I1bb1f99d3a2e1135131911905e0916c837ba9d8a
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
By default, page poisoning uses a poison value (0xaa) on free. If this
is changed to 0, the page is not only sanitized but zeroing on alloc
with __GFP_ZERO can be skipped as well. The tradeoff is that detecting
corruption from the poisoning is harder to detect. This feature also
cannot be used with hibernation since pages are not guaranteed to be
zeroed after hibernation.
Credit to Grsecurity/PaX team for inspiring this work
Change-Id: If7116e6bff246abbafc38bdfeb3601d3ea063ad2
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
Acked-by: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 1414c7f4f7d72d138fff35f00151d15749b5beda
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Page poisoning is currently set up as a feature if architectures don't
have architecture debug page_alloc to allow unmapping of pages. It has
uses apart from that though. Clearing of the pages on free provides an
increase in security as it helps to limit the risk of information leaks.
Allow page poisoning to be enabled as a separate option independent of
kernel_map pages since the two features do separate work. Because of
how hiberanation is implemented, the checks on alloc cannot occur if
hibernation is enabled. The runtime alloc checks can also be enabled
with an option when !HIBERNATION.
Credit to Grsecurity/PaX team for inspiring this work
Change-Id: I77a36f844ddae54695089c98a97bf0a6e226a025
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 8823b1dbc05fab1a8bec275eeae4709257c2661d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Add a device tree property to override the minimum and maximum
charger buck/boost switching frequency.
Change-Id: I6b827157c23a389edf2daa412e6825b6ce07a886
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
On PM660 the charger buck/boost frequency is configured in
the same register. Present ordering of the sink/source
removal function call causes incorrect charger frequency
configuration.
Fix this by first calling sink_removal and then source_insertion
function. Also, configure the buck frequency to the initial
5V USB value during source insertion.
Change-Id: I0d436f7e0843f2ddaa3d09db05cec403d03b6893
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
An error message is printed even when the task's scheduling class
is switched back successfully. Fix the error condition check and
print the error value in the message.
Change-Id: Ib75c4cfa22d58dd9309542e96096ac4e91f0c3db
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This patch updates the global variables and checks
for the logging mode status to mark the buffer
status properly.
CRs-Fixed: 2033760
Change-Id: I29a13e2fecaecacc1a0f46358ae7d4db1d2b3786
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
Unlock spin lock before returning in case of
tasklet overflow. Increase tasklet queue size
to avoid tasklet overflow.
Change-Id: If9dc03b8dc0bd026b904b6339dd7a7c9c6443871
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>