Re: Kernel header inclusion practice

2017-07-05 Thread Greg KH
On Wed, Jul 05, 2017 at 02:50:59PM +0800, Shiyao MA wrote: > Hi, > > How do you include the kernel headers? > > For example, > Currently I have the headers: > #include > #include > #include > > And now I wanna use the `struct workqueue_struct'. It turns out I > don't have to include the

Re: Kernel header inclusion practice

2017-07-05 Thread Shiyao Ma
Thanks! > On 5 Jul 2017, at 20:07, Greg KH wrote: > >> >> If there is any documentation about the API of the headers (e.g., what >> they include), that will be great. > > What exactly do you mean by this? I mean if any kernel documentation specifies what the headers provide,

Kernel header inclusion practice

2017-07-05 Thread Shiyao MA
Hi, How do you include the kernel headers? For example, Currently I have the headers: #include #include #include And now I wanna use the `struct workqueue_struct'. It turns out I don't have to include the "linux/workqueue.h". So it must have already been included by the three headers

How to alloc_pages from a given physical memory?

2017-07-05 Thread kipade
Here I want to allocate a block of shared memory from a given physical address, such as 0x9000, 6M. However, alloc_pages can't fit this point. I had reserved enugh pages via cmem, there also have enough continous pages for such allocation anywhere else. What should I do?

Re: Kernel header inclusion practice

2017-07-05 Thread Greg KH
On Wed, Jul 05, 2017 at 08:13:08PM +0800, Shiyao Ma wrote: > Thanks! > > > On 5 Jul 2017, at 20:07, Greg KH wrote: > > > >> > >> If there is any documentation about the API of the headers (e.g., what > >> they include), that will be great. > > > > What exactly do you mean by

Can I use the same .config file to compile 32-bit and 64-bit kernel?

2017-07-05 Thread Hao Lee
Hi, I'm currently configuring a custom kernel on Fedora x86_64. The first option on the configuration menu is "64-bit kernel" which I think is the only option controlling the architecture of kernel. Copying this .config file to a 32-bit system directly and turning off this option, can I compile a