- Nov 09, 2012
-
-
Alessandro Rubini authored
This is an incompatible change for buffer authors. We don't think there are any out-of-tree buffers, though. The allocation function must allocate the control by itself, instead of receiving it from outside. The reason why the control was passed doesn't hold any more, and the upcoming PF_ZIO buffer will greatly benefit from this. Also, now alloc_block returns NULL on error, so it can be used directly by the caller (it used to be ERR_PTR). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
zio-mini is a very simple driver, with no attributes, that can be used to get accustomed with how ZIO and the ZIO bus work. You can create as many devices as you want, with as many channels as you want. Each device has only one input cset, that returns the struct timespec collected at raw_io() time. The driver always returns one sample only, even if the trigger asks for more. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
This replaces the previous allocation bitmask, which only supported small channel-sets, with the first-fit allocator. Minors are always taken from the smallest available slot starting from minor 0. Each cset is allocated separately, but this should not be a problem. With the zio-mini driver, which is not upstream yet, this works: insmod zio-mini.ko nchan=300 ndev=20 And we get all the devices we need. # ls -1 /sys/dev/char/250:* | wc -l 12000 The patch makes also some other renaming of functions (less underscores for functions exported by zio-cdev.c to zio-sys.c) and similar stuff that makes stuff clearer, if I happened to find them during this change. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
This is a library-like set of functions, but they are not in the kernel, as far as I know, so let's offer them here. We will use them in the vmalloc buffer, in place of the circular buffer we have now, and for allocating minor device numbers. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
Only useful to diagnose buf-vmalloc, but _there_ it is useful. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 08, 2012
-
-
Alessandro Rubini authored
The driver itself is allowed to change nsamples, because it may have less samples than requested when the trigger fires. This is done by zio-mini, for example, that will be merged soon. Therefore, the number in current_ctrl must be updated, or the previous shorter value will stick. Also, move seq_num incrementing earlier, so even if allocation fails the sequence number is updated (and we need to do alarms too for that). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
Cset 4 of zio-loop returns a combined control and data stream to /dev/zio-loop-4-r-ctrldata . The same will soon happen with PF_ZIO sockets, so add "-c" to zio-dump to support combined mode (i.e. control is followed by data). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
The driver supports an output cset that loops to an input cset, and two output csets of 1 channel each, whose output is returned to two char devices. Intended for demonstration and testing. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
This is either one-shot or periodic. For output it uses the timestamp structure in the control block, for input it doesn't yet. Output may have some buglets; I'll fix when zio-loop is in place for diagnostics. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
Just like drivers should update current_ctrl and not block->ctrl, the same happens to buffers. This only applies to vmalloc, though. Bug introduced by my commit 6a7378a5 : zio-sys: delay copying current_ctrl to block->ctrl Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Nov 05, 2012
-
-
Alessandro Rubini authored
This removes the annyoing message about the missing attribute. Simple driver can choose to not have attributes at all, which simplifies source code, so the core should better not complain about them. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Federico Vaga authored
This fixes all public names to use zio_ or ZIO_ as a prefix. This introduces incompatibilities for the users, but was a bad design choice that stuck for too long. We are going to tag 1.0 soon, so this was unavoidable.
-
Federico Vaga authored
This patch removes the union field priv in the zio_attribute and it introduces the id field. From our experience, the priv.ptr pointer is useless; the priv.addr field can be used for every purpose, also if you have your own private structure. The new field id replaces the role of priv.addr. It can represent a register address, a register offset, an index of a vector of private structure which describe how to gain access to a register, or whatever can describe uniquely a register (or register field) Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
This function can be used outside the ZIO core. At the moment there are not driver which use this function, but it can be useful in the future. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
This function can be used outside the ZIO core (e.g. AD788x driver). A driver can be interested to know how many channel are active during an acquisition to allocate the proper buffer/structure Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 04, 2012
-
-
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
This is more in line with current kernel practices. We do not use zio_ here because the context is always clear when this macro is used. Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 03, 2012
-
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
Federico Vaga authored
Signed-off-by:
Federico Vaga <federico.vaga@gmail.com> Acked-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 01, 2012
-
-
Alessandro Rubini authored
Changes attribute print-out to only show attributes that are defined (using the mask). Show them as both decimal and hex. All lines are grep-friendly, as the used to be. You can grep for "Ctrl:" or "Data:" or specific attributes. Example (with "-a"): Ctrl: version 0.7, trigger user, dev zloop-0000, cset 1, chan 1 Ctrl: seq 18, n 16, size 1, bits 8, flags 01000001 (little-endian) Ctrl: stamp 1351773544.171337188 (0) Ctrl: trigger-std-mask: 0x0002 Ctrl: trigger-std-1 0x00000010 16 Data: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 For those who, sometimes, want to see all attributes, even when the mask is zero, there is the "-A" option. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
Alessandro Rubini authored
So the inline that followed is in the right place Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-
- Oct 31, 2012
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is a potentially incompatible change: if your driver fills attributes in the input block at raw_io() time, it won't work any more. You should fill chan->current_ctrl instead, which will be visible as a binary blob in sysfs soon. Moving the memcpy() to a later point doesn't change overhead. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Acked-by:
Federico Vaga <federico.vaga@gmail.com>
-