From owner-svn-src-head@freebsd.org Mon Mar 6 14:56:58 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A49E6CFAC3B; Mon, 6 Mar 2017 14:56:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FDC710F7; Mon, 6 Mar 2017 14:56:58 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v26Euv2P006531; Mon, 6 Mar 2017 14:56:57 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v26EuvnE006529; Mon, 6 Mar 2017 14:56:57 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201703061456.v26EuvnE006529@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 6 Mar 2017 14:56:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r314774 - in head/sys/compat/linuxkpi/common: include/linux src X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2017 14:56:58 -0000 Author: hselasky Date: Mon Mar 6 14:56:57 2017 New Revision: 314774 URL: https://svnweb.freebsd.org/changeset/base/314774 Log: Implement add_timer_on() function in the LinuxKPI. Obtained from: kmacy @ MFC after: 1 week Sponsored by: Mellanox Technologies Modified: head/sys/compat/linuxkpi/common/include/linux/timer.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/timer.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/timer.h Mon Mar 6 14:09:54 2017 (r314773) +++ head/sys/compat/linuxkpi/common/include/linux/timer.h Mon Mar 6 14:56:57 2017 (r314774) @@ -62,6 +62,7 @@ do { \ extern void mod_timer(struct timer_list *, unsigned long); extern void add_timer(struct timer_list *); +extern void add_timer_on(struct timer_list *, int cpu); #define del_timer(timer) callout_stop(&(timer)->timer_callout) #define del_timer_sync(timer) callout_drain(&(timer)->timer_callout) Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Mon Mar 6 14:09:54 2017 (r314773) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Mon Mar 6 14:56:57 2017 (r314774) @@ -1023,6 +1023,15 @@ add_timer(struct timer_list *timer) &linux_timer_callback_wrapper, timer); } +void +add_timer_on(struct timer_list *timer, int cpu) +{ + + callout_reset_on(&timer->timer_callout, + linux_timer_jiffies_until(timer->expires), + &linux_timer_callback_wrapper, timer, cpu); +} + static void linux_timer_init(void *arg) {