Re: why iowrite32_rep() doesn't work, I have to use the iowrite32() with a loop

2017-11-18 Thread ayaka
On 11/18/2017 11:50 PM, Max Filippov wrote: > On Thu, Nov 16, 2017 at 12:12 PM, ayaka wrote: >> #if 1 >> for (i = 0; i < count; i++) { >> u32 *cur = (u32 *)buffer; >> u32 pos = offset + i * 4; >> >> cur += i; >> mp

Re: Invoking a system call from within the kernel

2017-11-18 Thread valdis . kletnieks
On Sat, 18 Nov 2017 14:09:31 -0500, Demi Marie Obenour said: > Only whitelisted system calls would be allowed, such as open(), read(), > and write(). Async getuid() would not be allowed. Nor would async > exit() or exit_group(). You missed the point - If you allow async calls, you need to deal

Re: Invoking a system call from within the kernel

2017-11-18 Thread Demi Marie Obenour
On Sat, Nov 18, 2017 at 01:44:44PM -0500, valdis.kletni...@vt.edu wrote: > On Sat, 18 Nov 2017 13:15:27 -0500, Demi Marie Obenour said: > > > However, the ioctl I actually want to implement (see above) does the > > system call asynchronously. That isn???t possible using the existing > > APIs. >

Re: Invoking a system call from within the kernel

2017-11-18 Thread valdis . kletnieks
On Sat, 18 Nov 2017 13:15:27 -0500, Demi Marie Obenour said: > However, the ioctl I actually want to implement (see above) does the > system call asynchronously. That isn’t possible using the existing > APIs. Ever consider that it's because there's no clear semantics to what executing an arbit

Re: Invoking a system call from within the kernel

2017-11-18 Thread Demi Marie Obenour
On Thu, Nov 16, 2017 at 10:54:24AM +0100, Greg KH wrote: > On Wed, Nov 15, 2017 at 09:16:35PM -0500, Demi Marie Obenour wrote: > > I am looking to write my first driver. This driver will create a single > > character device, which can be opened by any user. The device will > > support one ioctl:

why iowrite32_rep() doesn't work, I have to use the iowrite32() with a loop

2017-11-18 Thread ayaka
Hello All:   I am writing a driver, I need to write a series of values into the registers. The old code use the writel_relaxed() to avoid flushing cache between echo of register. I want to use the recommended way of the io operations, so I choose the iowrite32()_req(), but I found what it wrot

Is there a to prevent a file descriptor being closed

2017-11-18 Thread ayaka
Hello   I am writing a driver to operation with the dma-buf, a problem I meet is that a dma-buf maybe closed by the other driver or userspace application, then the same number of the file descriptor will be assigned with the other thing, its private data is different. I watch what the drm sys

Re: git pull

2017-11-18 Thread Michael Ellerman
Linus Torvalds writes: > On Tue, Nov 14, 2017 at 1:33 PM, Tobin C. Harding wrote: >> >> Linus do you care what protocol? I'm patching Documentation and since >> the point is creating pull requests for you 'some people' don't matter. > > I actually tend to prefer the regular git:// protocol and s

Re: why iowrite32_rep() doesn't work, I have to use the iowrite32() with a loop

2017-11-18 Thread Max Filippov
On Thu, Nov 16, 2017 at 12:12 PM, ayaka wrote: > #if 1 > for (i = 0; i < count; i++) { > u32 *cur = (u32 *)buffer; > u32 pos = offset + i * 4; > > cur += i; > mpp_debug(DEBUG_SET_REG, "write reg[%03d]: %08x\n", > pos, *cu

Re: git pull

2017-11-18 Thread Ulf Hansson
[...] > > An example pull request of mine might look like: > Char/Misc patches for 4.15-rc1 > > Here is the big char/misc patch set for the 4.15-rc1 merge > window. Contained in here is the normal set of new functions > added to all of these crazy drivers, as well

Re: My first patch - patch for adl_pci9118.c

2017-11-18 Thread Greg KH
On Sat, Nov 18, 2017 at 01:07:30PM +0100, Fabian Baumanis wrote: > Hi there, > > this morning i created my first patch for the Linux kernel. > It fixes a style issue which was reported by using checkpatch.pl on > drivers/staging/comedi/drivers/adl_pci9118.c > > Although it's a very small patch, i

My first patch - patch for adl_pci9118.c

2017-11-18 Thread Fabian Baumanis
Hi there, this morning i created my first patch for the Linux kernel. It fixes a style issue which was reported by using checkpatch.pl on drivers/staging/comedi/drivers/adl_pci9118.c Although it's a very small patch, i hope this is useful. My question now is: how can i submit the patch to the