summaryrefslogtreecommitdiffstats
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index d42dbec0608..e8b4039cfb2 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -40,6 +40,7 @@
#include <linux/cpumask.h>
#include <linux/seqlock.h>
#include <linux/lockdep.h>
+#include <linux/completion.h>
/**
* struct rcu_head - callback structure for use with RCU
@@ -168,6 +169,27 @@ struct rcu_head {
(p) = (v); \
})
+/* Infrastructure to implement the synchronize_() primitives. */
+
+struct rcu_synchronize {
+ struct rcu_head head;
+ struct completion completion;
+};
+
+extern void wakeme_after_rcu(struct rcu_head *head);
+
+#define synchronize_rcu_xxx(name, func) \
+void name(void) \
+{ \
+ struct rcu_synchronize rcu; \
+ \
+ init_completion(&rcu.completion); \
+ /* Will wake me after RCU finished. */ \
+ func(&rcu.head, wakeme_after_rcu); \
+ /* Wait for it. */ \
+ wait_for_completion(&rcu.completion); \
+}
+
/**
* synchronize_sched - block until all CPUs have exited any non-preemptive
* kernel code sequences.
@@ -224,8 +246,8 @@ extern void call_rcu_bh(struct rcu_head *head,
/* Exported common interfaces */
extern void synchronize_rcu(void);
extern void rcu_barrier(void);
-extern long rcu_batches_completed(void);
-extern long rcu_batches_completed_bh(void);
+extern void rcu_barrier_bh(void);
+extern void rcu_barrier_sched(void);
/* Internal to kernel */
extern void rcu_init(void);
ss="hl ppc">#define DIO_PAD_CFG (MUX_PAD_CTRL(IRQ_PAD_CTRL) | MUX_MODE_SION) #define PC MUX_PAD_CTRL(I2C_PAD_CTRL) /* * each baseboard has an optional set user configurable Digital IO lines which * can be pinmuxed as a GPIO or in some cases a PWM */ struct dio_cfg { iomux_v3_cfg_t gpio_padmux[2]; unsigned gpio_param; iomux_v3_cfg_t pwm_padmux[2]; unsigned pwm_param; }; struct ventana { /* pinmux */ iomux_v3_cfg_t const *gpio_pads; int num_pads; /* DIO pinmux/val */ struct dio_cfg *dio_cfg; int dio_num; /* various gpios (0 if non-existent) */ int leds[3]; int pcie_rst; int mezz_pwren; int mezz_irq; int rs485en; int gps_shdn; int vidin_en; int dioi2c_en; int pcie_sson; int usb_sel; int wdis; int msata_en; int rs232_en; int otgpwr_en; int vsel_pin; int mmc_cd; /* various features */ bool usd_vsel; bool nand; }; extern struct ventana gpio_cfg[GW_UNKNOWN]; /* configure i2c iomux */ void setup_ventana_i2c(int); /* configure uart iomux */ void setup_iomux_uart(void); /* conifgure PMIC */ void setup_pmic(void); /* configure gpio iomux/defaults */ void setup_iomux_gpio(int board, struct ventana_board_info *); /* late setup of GPIO (configuration per baseboard and env) */ void setup_board_gpio(int board, struct ventana_board_info *); #endif /* #ifndef _GWVENTANA_COMMON_H_ */