I am going through the CXL support in Linux Kernel and I found that there is no function or support for cxl.cache. I'm confused if the cache part is not yet implemented in linux kernel or if the kernel should not have access to the cache commands?
(I have seen up to the latest Kernel release, 5.19)
Related
I am doing embedded system development with my EVM board. And now, i want to release my whole software to others. To get some referrences on how to package my software, i downloaded some other vendors' linux SDK.
The thing confused me is if its vendor modified the linux kernel, instead of releasing the SDK with a dirty kernel directly they all have a original clean kernel along with a patch containing this modification.
So,that is why? To avoid license? Linux kernel license requires the kernel not be spreaded with personal modification?
Thanks
I would like to know is there any caveats in using sched_clock()? Any case when it is not safe to use? And is it okay if I use it very early in kernel.bootup?
Btw the Linux runs on ARM platform
Currently I am porting Linux kernel to a s3c6410 based development board, so I referred to mini6410, real6410 Linux kernel source, when it comes to the Nand Flash driver, I found s3c_nand.c file in drivers/mtd/nand/ which seems to be written by Samsung, however when I checked the official Linux kernel source, I can only find s3c2410.c file even in the newest version.
So my question is why s3c_nand.c is not included in the Linux kernel source and what is the difference between s3c_nand.c and s3c2410.c, or can I use s3c2410.c for my s3c6410board?
I am aware of windows kernel but new to linux kernel. I just need to know how its done in linux, i.e. the program development.
You can check there (free-electrons.com), it's a good informations source for kernel developement. (specialized in embedded linux, but most of the docs are available for standard development)
You have also the classical Linux Devices Drivers, which is very complete and detailled.
And last but not least, the Linux kernel documentation.
Linux does not have a stable kernel API. This is by design, so you should generally avoid writing kernel code if you can; it is unlikely to remain source-compatible indefinitely, and will definitely NOT be binary-compatible, even between minor releases.
This is less-or-more true for vendor kernels; Redhat etc DO maintain source & binary kernel compatibility between major revisions.
More work is gradually being done in the kernel to reduce the amount of kernel-code required to carry out various tasks, such as driver development (for example, USB drivers can typically be done in userspace with libusb), filesystem development (FUSE) and network filtering (NFQUEUE). However, there are still some cases where you need to; in particular, block devices still need to be in the kernel to be able to be usefully used for boot devices and swap.
What is kernel's KMS(kernel mode setting) API?
ModeSetting does refer to the graphic stack. It is the process of setting up the clocks and scanout buffers, initialize the chips, lighting up the displays and so on.
The kernel subsystem responsible for this is the DRM subsystem. It has a userspace library that is developed in lock-step with the kernel part and allows i.e. Xorg access to the userland facing part of the interface (normally called ABI). The hardware-facing side of the kernel interface is usually referred to as the API.
Specifically you can use the 'xrandr' binary to instruct XOrg via the randr-protocol to instruct the kernel to change the mode. That binary is installed alongside the X server and also gives you some information about the graphics card and the current mode.
The DRM ModeSetting API is IOCTL based and the following site gives an technical overview: http://dri.freedesktop.org/wiki/DrmModesetting
Also the documentation in the current linux-3.7 releases is quite improved. To check that out, you have to fetch the latest kernel sources, and then, in the kernel sourcetree do
$ make htmldocs
and then look at the generated file Documentation/DocBook/drm/index.html .
Hth
Mode setting is usually related to Graphics setup.
A reference article dated April 19, 2008 notes,
kernel mode-setting involves moving the mode-setting code for video adapters from the user-space X server drivers into the Linux kernel. This may seem like an uninteresting topic for end-users, but having the mode-setting done in the kernel allows for a cleaner and richer boot process, improved suspend and resume support, and more reliable VT switching (along with other advantages). Kernel mode-setting isn't yet in the mainline Linux kernel nor is the API for it frozen, but Fedora 9 shipping next month will be the first major distribution carrying this initial support. In this article we're looking more closely at kernel mode-setting with the Intel X.Org driver as well as showing videos of kernel-based mode-setting in action.
Here is a Fedora wiki KernelModesetting page.