From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 2/3] xen: Widen flags parameter for spinlock_irqsave() and friends Date: Mon, 21 Oct 2013 14:41:32 +0100 Message-ID: <1382362893-12603-3-git-send-email-andrew.cooper3@citrix.com> References: <1382362893-12603-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1382362893-12603-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: George Dunlap , Andrew Cooper , Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org These issues were detected using the subsequent patch which forces a compilation error if the result from local_irq_save() would be truncated. Signed-off-by: Andrew Cooper CC: Keir Fraser CC: Jan Beulich CC: George Dunlap --- xen/common/sched_credit2.c | 7 ++++--- xen/common/trace.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index 84e547b..4e68375 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -1480,7 +1480,7 @@ static void * csched_alloc_domdata(const struct scheduler *ops, struct domain *dom) { struct csched_dom *sdom; - int flags; + unsigned long flags; sdom = xzalloc(struct csched_dom); if ( sdom == NULL ) @@ -1524,7 +1524,7 @@ csched_dom_init(const struct scheduler *ops, struct domain *dom) static void csched_free_domdata(const struct scheduler *ops, void *data) { - int flags; + unsigned long flags; struct csched_dom *sdom = data; spin_lock_irqsave(&CSCHED_PRIV(ops)->lock, flags); @@ -1944,7 +1944,8 @@ static void deactivate_runqueue(struct csched_private *prv, int rqi) static void init_pcpu(const struct scheduler *ops, int cpu) { - int rqi, flags; + int rqi; + unsigned long flags; struct csched_private *prv = CSCHED_PRIV(ops); struct csched_runqueue_data *rqd; spinlock_t *old_lock; diff --git a/xen/common/trace.c b/xen/common/trace.c index 63ea0b7..41ddc33 100644 --- a/xen/common/trace.c +++ b/xen/common/trace.c @@ -420,7 +420,7 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc) * hypercall returns, no more records should be placed into the buffers. */ for_each_online_cpu(i) { - int flags; + unsigned long flags; spin_lock_irqsave(&per_cpu(t_lock, i), flags); per_cpu(lost_records, i)=0; spin_unlock_irqrestore(&per_cpu(t_lock, i), flags); -- 1.7.10.4