From owner-svn-src-head@freebsd.org Tue Nov 17 14:41:24 2020 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 69B2E2EEA5A; Tue, 17 Nov 2020 14:41:24 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cb7tD2Zw0z4l18; Tue, 17 Nov 2020 14:41:24 +0000 (UTC) (envelope-from manu@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4C29F2157A; Tue, 17 Nov 2020 14:41:24 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 0AHEfOlm021159; Tue, 17 Nov 2020 14:41:24 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 0AHEfNgn021156; Tue, 17 Nov 2020 14:41:23 GMT (envelope-from manu@FreeBSD.org) Message-Id: <202011171441.0AHEfNgn021156@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Tue, 17 Nov 2020 14:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367764 - in head/sys/contrib/vchiq/interface: compat vchiq_arm X-SVN-Group: head X-SVN-Commit-Author: manu X-SVN-Commit-Paths: in head/sys/contrib/vchiq/interface: compat vchiq_arm X-SVN-Commit-Revision: 367764 X-SVN-Commit-Repository: base 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.34 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: Tue, 17 Nov 2020 14:41:24 -0000 Author: manu Date: Tue Nov 17 14:41:23 2020 New Revision: 367764 URL: https://svnweb.freebsd.org/changeset/base/367764 Log: vchiq: Rename timer func so they do not conflict with linuxkpi Modified: head/sys/contrib/vchiq/interface/compat/vchi_bsd.c head/sys/contrib/vchiq/interface/compat/vchi_bsd.h head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Modified: head/sys/contrib/vchiq/interface/compat/vchi_bsd.c ============================================================================== --- head/sys/contrib/vchiq/interface/compat/vchi_bsd.c Tue Nov 17 14:07:27 2020 (r367763) +++ head/sys/contrib/vchiq/interface/compat/vchi_bsd.c Tue Nov 17 14:41:23 2020 (r367764) @@ -77,7 +77,7 @@ run_timer(void *arg) } void -init_timer(struct timer_list *t) +vchiq_init_timer(struct timer_list *t) { mtx_init(&t->mtx, "dahdi timer lock", NULL, MTX_SPIN); callout_init(&t->callout, 1); @@ -89,15 +89,15 @@ init_timer(struct timer_list *t) } void -setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data) +vchiq_setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data) { t->function = function; t->data = data; - init_timer(t); + vchiq_init_timer(t); } void -mod_timer(struct timer_list *t, unsigned long expires) +vchiq_mod_timer(struct timer_list *t, unsigned long expires) { mtx_lock_spin(&t->mtx); callout_reset(&t->callout, expires - jiffies, run_timer, t); @@ -105,13 +105,13 @@ mod_timer(struct timer_list *t, unsigned long expires) } void -add_timer(struct timer_list *t) +vchiq_add_timer(struct timer_list *t) { - mod_timer(t, t->expires); + vchiq_mod_timer(t, t->expires); } int -del_timer_sync(struct timer_list *t) +vchiq_del_timer_sync(struct timer_list *t) { mtx_lock_spin(&t->mtx); callout_stop(&t->callout); @@ -122,9 +122,9 @@ del_timer_sync(struct timer_list *t) } int -del_timer(struct timer_list *t) +vchiq_del_timer(struct timer_list *t) { - del_timer_sync(t); + vchiq_del_timer_sync(t); return 0; } Modified: head/sys/contrib/vchiq/interface/compat/vchi_bsd.h ============================================================================== --- head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Tue Nov 17 14:07:27 2020 (r367763) +++ head/sys/contrib/vchiq/interface/compat/vchi_bsd.h Tue Nov 17 14:41:23 2020 (r367764) @@ -196,12 +196,12 @@ struct timer_list { unsigned long data; }; -void init_timer(struct timer_list *t); -void setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data); -void mod_timer(struct timer_list *t, unsigned long expires); -void add_timer(struct timer_list *t); -int del_timer(struct timer_list *t); -int del_timer_sync(struct timer_list *t); +void vchiq_init_timer(struct timer_list *t); +void vchiq_setup_timer(struct timer_list *t, void (*function)(unsigned long), unsigned long data); +void vchiq_mod_timer(struct timer_list *t, unsigned long expires); +void vchiq_add_timer(struct timer_list *t); +int vchiq_del_timer(struct timer_list *t); +int vchiq_del_timer_sync(struct timer_list *t); /* * Completion API Modified: head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c ============================================================================== --- head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Tue Nov 17 14:07:27 2020 (r367763) +++ head/sys/contrib/vchiq/interface/vchiq_arm/vchiq_arm.c Tue Nov 17 14:41:23 2020 (r367764) @@ -1754,7 +1754,7 @@ vchiq_arm_init_state(VCHIQ_STATE_T *state, VCHIQ_ARM_S arm_state->suspend_timer_timeout = SUSPEND_TIMER_TIMEOUT_MS; arm_state->suspend_timer_running = 0; - init_timer(&arm_state->suspend_timer); + vchiq_init_timer(&arm_state->suspend_timer); arm_state->suspend_timer.data = (unsigned long)(state); arm_state->suspend_timer.function = suspend_timer_callback; @@ -1892,11 +1892,11 @@ set_resume_state(VCHIQ_ARM_STATE_T *arm_state, inline void start_suspend_timer(VCHIQ_ARM_STATE_T *arm_state) { - del_timer(&arm_state->suspend_timer); + vchiq_del_timer(&arm_state->suspend_timer); arm_state->suspend_timer.expires = jiffies + msecs_to_jiffies(arm_state-> suspend_timer_timeout); - add_timer(&arm_state->suspend_timer); + vchiq_add_timer(&arm_state->suspend_timer); arm_state->suspend_timer_running = 1; } @@ -1905,7 +1905,7 @@ static inline void stop_suspend_timer(VCHIQ_ARM_STATE_T *arm_state) { if (arm_state->suspend_timer_running) { - del_timer(&arm_state->suspend_timer); + vchiq_del_timer(&arm_state->suspend_timer); arm_state->suspend_timer_running = 0; } }