summaryrefslogtreecommitdiff
path: root/curvetun/nacl_path.sh
blob: 9f492ba012286c4f3c71d713e5b0dfa52aaf2830 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# -*- coding: utf-8 -*-
#
# nacl_path.sh -- NaCl path export script
#
# Copyright (C) 2009-2011 Emmanuel Roullit <emmanuel@netsniff-ng.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.

nacl_include_path="$1"
nacl_lib_path="$2"

if test -z $nacl_include_path || test -z $nacl_lib_path; then
	echo "Please input the path where NaCl is like the following:"
	echo "./$0.sh <include_path> <lib_path>"
	exit 1
fi

echo "export NACL_INC_DIR=$nacl_include_path" >> ~/.bashrc
echo "export NACL_LIB_DIR=$nacl_lib_path" >> ~/.bashrc
0 commit8ef0b5383110977d81746cd0b09c3877d51c3a67 (patch) treee401faaa6f7119157efc52da52ffb2eb0a59d09d /drivers/staging parent60793c9be9a140e2102a0f64a38d34e9b28a1357 (diff)
greybus: arche-platform: Reset SVC & APB only if turned off by SUSPEND_PREPARE
There is possible race condition in arche platform driver for maintaining of ->state field, when shared with timesync driver. Assume device booted fine, all connected modules have been enumerated correctly. As part of suspend-resume operation we have pm_notifier callback, where we turn off SVC & APB and coldboot on resume. In the process of resume, all modules gets enumerated again, and timesync driver does come into picture everytime. So when timesync driver requests arche-platform to change the state to TIMESYNC and in the middle of sync operation, if suspend gets triggered, then execution lands into arche-platform->pm_notifier callback, leading to race condition in the driver, where it checks for (state != ACTIVE) in PM_SUSPEND_PREPARE and returns, but in PM_POST_SUSPEND it just simply coldboots SVC & APB, which would inbalance all resources (including IRQ). So we need a add check in PM_POST_SUSPEND, to make sure that, we only coldboot devices if they are in to off state, i.e. if (state != OFF) then return. Testing Done: Done regressive suspend/resume testing on EVT2 platform. Note that, I some time hit issue. Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging')