You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'perf/urgent' into perf/core
Merge reason: Upcoming patch is dependent on a fix in perf/urgent. Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
What: /sys/class/backlight/<backlight>/bl_power
|
||||
Date: April 2005
|
||||
KernelVersion: 2.6.12
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Control BACKLIGHT power, values are FB_BLANK_* from fb.h
|
||||
- FB_BLANK_UNBLANK (0) : power on.
|
||||
- FB_BLANK_POWERDOWN (4) : power off
|
||||
Users: HAL
|
||||
|
||||
What: /sys/class/backlight/<backlight>/brightness
|
||||
Date: April 2005
|
||||
KernelVersion: 2.6.12
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Control the brightness for this <backlight>. Values
|
||||
are between 0 and max_brightness. This file will also
|
||||
show the brightness level stored in the driver, which
|
||||
may not be the actual brightness (see actual_brightness).
|
||||
Users: HAL
|
||||
|
||||
What: /sys/class/backlight/<backlight>/actual_brightness
|
||||
Date: March 2006
|
||||
KernelVersion: 2.6.17
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Show the actual brightness by querying the hardware.
|
||||
Users: HAL
|
||||
|
||||
What: /sys/class/backlight/<backlight>/max_brightness
|
||||
Date: April 2005
|
||||
KernelVersion: 2.6.12
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Maximum brightness for <backlight>.
|
||||
Users: HAL
|
||||
@@ -0,0 +1,23 @@
|
||||
What: /sys/class/lcd/<lcd>/lcd_power
|
||||
Date: April 2005
|
||||
KernelVersion: 2.6.12
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Control LCD power, values are FB_BLANK_* from fb.h
|
||||
- FB_BLANK_UNBLANK (0) : power on.
|
||||
- FB_BLANK_POWERDOWN (4) : power off
|
||||
|
||||
What: /sys/class/lcd/<lcd>/contrast
|
||||
Date: April 2005
|
||||
KernelVersion: 2.6.12
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Current contrast of this LCD device. Value is between 0 and
|
||||
/sys/class/lcd/<lcd>/max_contrast.
|
||||
|
||||
What: /sys/class/lcd/<lcd>/max_contrast
|
||||
Date: April 2005
|
||||
KernelVersion: 2.6.12
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Maximum contrast for this LCD device.
|
||||
@@ -0,0 +1,28 @@
|
||||
What: /sys/class/leds/<led>/brightness
|
||||
Date: March 2006
|
||||
KernelVersion: 2.6.17
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Set the brightness of the LED. Most LEDs don't
|
||||
have hardware brightness support so will just be turned on for
|
||||
non-zero brightness settings. The value is between 0 and
|
||||
/sys/class/leds/<led>/max_brightness.
|
||||
|
||||
What: /sys/class/leds/<led>/max_brightness
|
||||
Date: March 2006
|
||||
KernelVersion: 2.6.17
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Maximum brightness level for this led, default is 255 (LED_FULL).
|
||||
|
||||
What: /sys/class/leds/<led>/trigger
|
||||
Date: March 2006
|
||||
KernelVersion: 2.6.17
|
||||
Contact: Richard Purdie <rpurdie@rpsys.net>
|
||||
Description:
|
||||
Set the trigger for this LED. A trigger is a kernel based source
|
||||
of led events.
|
||||
You can change triggers in a similar manner to the way an IO
|
||||
scheduler is chosen. Trigger specific parameters can appear in
|
||||
/sys/class/leds/<led> once a given trigger is selected.
|
||||
|
||||
@@ -19,6 +19,7 @@ Description:
|
||||
/gpioN ... for each exported GPIO #N
|
||||
/value ... always readable, writes fail for input GPIOs
|
||||
/direction ... r/w as: in, out (default low); write: high, low
|
||||
/edge ... r/w as: none, falling, rising, both
|
||||
/gpiochipN ... for each gpiochip; #N is its first GPIO
|
||||
/base ... (r/o) same as N
|
||||
/label ... (r/o) descriptive, not necessarily unique
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
What: /sys/devices/platform/asus-laptop/display
|
||||
Date: January 2007
|
||||
KernelVersion: 2.6.20
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
This file allows display switching. The value
|
||||
is composed by 4 bits and defined as follow:
|
||||
4321
|
||||
|||`- LCD
|
||||
||`-- CRT
|
||||
|`--- TV
|
||||
`---- DVI
|
||||
Ex: - 0 (0000b) means no display
|
||||
- 3 (0011b) CRT+LCD.
|
||||
|
||||
What: /sys/devices/platform/asus-laptop/gps
|
||||
Date: January 2007
|
||||
KernelVersion: 2.6.20
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
Control the gps device. 1 means on, 0 means off.
|
||||
Users: Lapsus
|
||||
|
||||
What: /sys/devices/platform/asus-laptop/ledd
|
||||
Date: January 2007
|
||||
KernelVersion: 2.6.20
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
Some models like the W1N have a LED display that can be
|
||||
used to display several informations.
|
||||
To control the LED display, use the following :
|
||||
echo 0x0T000DDD > /sys/devices/platform/asus-laptop/
|
||||
where T control the 3 letters display, and DDD the 3 digits display.
|
||||
The DDD table can be found in Documentation/laptops/asus-laptop.txt
|
||||
|
||||
What: /sys/devices/platform/asus-laptop/bluetooth
|
||||
Date: January 2007
|
||||
KernelVersion: 2.6.20
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
Control the bluetooth device. 1 means on, 0 means off.
|
||||
This may control the led, the device or both.
|
||||
Users: Lapsus
|
||||
|
||||
What: /sys/devices/platform/asus-laptop/wlan
|
||||
Date: January 2007
|
||||
KernelVersion: 2.6.20
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
Control the bluetooth device. 1 means on, 0 means off.
|
||||
This may control the led, the device or both.
|
||||
Users: Lapsus
|
||||
@@ -0,0 +1,50 @@
|
||||
What: /sys/devices/platform/eeepc-laptop/disp
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
This file allows display switching.
|
||||
- 1 = LCD
|
||||
- 2 = CRT
|
||||
- 3 = LCD+CRT
|
||||
If you run X11, you should use xrandr instead.
|
||||
|
||||
What: /sys/devices/platform/eeepc-laptop/camera
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
Control the camera. 1 means on, 0 means off.
|
||||
|
||||
What: /sys/devices/platform/eeepc-laptop/cardr
|
||||
Date: May 2008
|
||||
KernelVersion: 2.6.26
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
Control the card reader. 1 means on, 0 means off.
|
||||
|
||||
What: /sys/devices/platform/eeepc-laptop/cpufv
|
||||
Date: Jun 2009
|
||||
KernelVersion: 2.6.31
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
Change CPU clock configuration.
|
||||
On the Eee PC 1000H there are three available clock configuration:
|
||||
* 0 -> Super Performance Mode
|
||||
* 1 -> High Performance Mode
|
||||
* 2 -> Power Saving Mode
|
||||
On Eee PC 701 there is only 2 available clock configurations.
|
||||
Available configuration are listed in available_cpufv file.
|
||||
Reading this file will show the raw hexadecimal value which
|
||||
is defined as follow:
|
||||
| 8 bit | 8 bit |
|
||||
| `---- Current mode
|
||||
`------------ Availables modes
|
||||
For example, 0x301 means: mode 1 selected, 3 available modes.
|
||||
|
||||
What: /sys/devices/platform/eeepc-laptop/available_cpufv
|
||||
Date: Jun 2009
|
||||
KernelVersion: 2.6.31
|
||||
Contact: "Corentin Chary" <corentincj@iksaif.net>
|
||||
Description:
|
||||
List available cpufv modes.
|
||||
@@ -568,7 +568,7 @@ static void board_select_chip (struct mtd_info *mtd, int chip)
|
||||
<para>
|
||||
The blocks in which the tables are stored are procteted against
|
||||
accidental access by marking them bad in the memory bad block
|
||||
table. The bad block table managment functions are allowed
|
||||
table. The bad block table management functions are allowed
|
||||
to circumvernt this protection.
|
||||
</para>
|
||||
<para>
|
||||
|
||||
@@ -317,7 +317,7 @@
|
||||
<para>
|
||||
The SAS transport class contains common code to deal with SAS HBAs,
|
||||
an aproximated representation of SAS topologies in the driver model,
|
||||
and various sysfs attributes to expose these topologies and managment
|
||||
and various sysfs attributes to expose these topologies and management
|
||||
interfaces to userspace.
|
||||
</para>
|
||||
<para>
|
||||
|
||||
@@ -56,11 +56,7 @@ Graphics Problems?
|
||||
------------------
|
||||
If you encounter issues with graphics devices, you can try adding
|
||||
option intel_iommu=igfx_off to turn off the integrated graphics engine.
|
||||
|
||||
If it happens to be a PCI device included in the INCLUDE_ALL Engine,
|
||||
then try enabling CONFIG_DMAR_GFX_WA to setup a 1-1 map. We hear
|
||||
graphics drivers may be in process of using DMA api's in the near
|
||||
future and at that time this option can be yanked out.
|
||||
If this fixes anything, please ensure you file a bug reporting the problem.
|
||||
|
||||
Some exceptions to IOVA
|
||||
-----------------------
|
||||
|
||||
@@ -183,7 +183,7 @@ the MAN-PAGES maintainer (as listed in the MAINTAINERS file)
|
||||
a man-pages patch, or at least a notification of the change,
|
||||
so that some information makes its way into the manual pages.
|
||||
|
||||
Even if the maintainer did not respond in step #4, make sure to ALWAYS
|
||||
Even if the maintainer did not respond in step #5, make sure to ALWAYS
|
||||
copy the maintainer when you change their code.
|
||||
|
||||
For small patches you may want to CC the Trivial Patch Monkey
|
||||
|
||||
@@ -116,7 +116,7 @@ error:
|
||||
}
|
||||
|
||||
|
||||
int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
|
||||
static int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
|
||||
__u8 genl_cmd, __u16 nla_type,
|
||||
void *nla_data, int nla_len)
|
||||
{
|
||||
@@ -160,7 +160,7 @@ int send_cmd(int sd, __u16 nlmsg_type, __u32 nlmsg_pid,
|
||||
* Probe the controller in genetlink to find the family id
|
||||
* for the TASKSTATS family
|
||||
*/
|
||||
int get_family_id(int sd)
|
||||
static int get_family_id(int sd)
|
||||
{
|
||||
struct {
|
||||
struct nlmsghdr n;
|
||||
@@ -190,7 +190,7 @@ int get_family_id(int sd)
|
||||
return id;
|
||||
}
|
||||
|
||||
void print_delayacct(struct taskstats *t)
|
||||
static void print_delayacct(struct taskstats *t)
|
||||
{
|
||||
printf("\n\nCPU %15s%15s%15s%15s\n"
|
||||
" %15llu%15llu%15llu%15llu\n"
|
||||
@@ -216,7 +216,7 @@ void print_delayacct(struct taskstats *t)
|
||||
(unsigned long long)t->freepages_delay_total);
|
||||
}
|
||||
|
||||
void task_context_switch_counts(struct taskstats *t)
|
||||
static void task_context_switch_counts(struct taskstats *t)
|
||||
{
|
||||
printf("\n\nTask %15s%15s\n"
|
||||
" %15llu%15llu\n",
|
||||
@@ -224,7 +224,7 @@ void task_context_switch_counts(struct taskstats *t)
|
||||
(unsigned long long)t->nvcsw, (unsigned long long)t->nivcsw);
|
||||
}
|
||||
|
||||
void print_cgroupstats(struct cgroupstats *c)
|
||||
static void print_cgroupstats(struct cgroupstats *c)
|
||||
{
|
||||
printf("sleeping %llu, blocked %llu, running %llu, stopped %llu, "
|
||||
"uninterruptible %llu\n", (unsigned long long)c->nr_sleeping,
|
||||
@@ -235,7 +235,7 @@ void print_cgroupstats(struct cgroupstats *c)
|
||||
}
|
||||
|
||||
|
||||
void print_ioacct(struct taskstats *t)
|
||||
static void print_ioacct(struct taskstats *t)
|
||||
{
|
||||
printf("%s: read=%llu, write=%llu, cancelled_write=%llu\n",
|
||||
t->ac_comm,
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
ARM TCM (Tightly-Coupled Memory) handling in Linux
|
||||
----
|
||||
Written by Linus Walleij <linus.walleij@stericsson.com>
|
||||
|
||||
Some ARM SoC:s have a so-called TCM (Tightly-Coupled Memory).
|
||||
This is usually just a few (4-64) KiB of RAM inside the ARM
|
||||
processor.
|
||||
|
||||
Due to being embedded inside the CPU The TCM has a
|
||||
Harvard-architecture, so there is an ITCM (instruction TCM)
|
||||
and a DTCM (data TCM). The DTCM can not contain any
|
||||
instructions, but the ITCM can actually contain data.
|
||||
The size of DTCM or ITCM is minimum 4KiB so the typical
|
||||
minimum configuration is 4KiB ITCM and 4KiB DTCM.
|
||||
|
||||
ARM CPU:s have special registers to read out status, physical
|
||||
location and size of TCM memories. arch/arm/include/asm/cputype.h
|
||||
defines a CPUID_TCM register that you can read out from the
|
||||
system control coprocessor. Documentation from ARM can be found
|
||||
at http://infocenter.arm.com, search for "TCM Status Register"
|
||||
to see documents for all CPUs. Reading this register you can
|
||||
determine if ITCM (bit 0) and/or DTCM (bit 16) is present in the
|
||||
machine.
|
||||
|
||||
There is further a TCM region register (search for "TCM Region
|
||||
Registers" at the ARM site) that can report and modify the location
|
||||
size of TCM memories at runtime. This is used to read out and modify
|
||||
TCM location and size. Notice that this is not a MMU table: you
|
||||
actually move the physical location of the TCM around. At the
|
||||
place you put it, it will mask any underlying RAM from the
|
||||
CPU so it is usually wise not to overlap any physical RAM with
|
||||
the TCM. The TCM memory exists totally outside the MMU and will
|
||||
override any MMU mappings.
|
||||
|
||||
Code executing inside the ITCM does not "see" any MMU mappings
|
||||
and e.g. register accesses must be made to physical addresses.
|
||||
|
||||
TCM is used for a few things:
|
||||
|
||||
- FIQ and other interrupt handlers that need deterministic
|
||||
timing and cannot wait for cache misses.
|
||||
|
||||
- Idle loops where all external RAM is set to self-refresh
|
||||
retention mode, so only on-chip RAM is accessible by
|
||||
the CPU and then we hang inside ITCM waiting for an
|
||||
interrupt.
|
||||
|
||||
- Other operations which implies shutting off or reconfiguring
|
||||
the external RAM controller.
|
||||
|
||||
There is an interface for using TCM on the ARM architecture
|
||||
in <asm/tcm.h>. Using this interface it is possible to:
|
||||
|
||||
- Define the physical address and size of ITCM and DTCM.
|
||||
|
||||
- Tag functions to be compiled into ITCM.
|
||||
|
||||
- Tag data and constants to be allocated to DTCM and ITCM.
|
||||
|
||||
- Have the remaining TCM RAM added to a special
|
||||
allocation pool with gen_pool_create() and gen_pool_add()
|
||||
and provice tcm_alloc() and tcm_free() for this
|
||||
memory. Such a heap is great for things like saving
|
||||
device state when shutting off device power domains.
|
||||
|
||||
A machine that has TCM memory shall select HAVE_TCM in
|
||||
arch/arm/Kconfig for itself, and then the
|
||||
rest of the functionality will depend on the physical
|
||||
location and size of ITCM and DTCM to be defined in
|
||||
mach/memory.h for the machine. Code that needs to use
|
||||
TCM shall #include <asm/tcm.h> If the TCM is not located
|
||||
at the place given in memory.h it will be moved using
|
||||
the TCM Region registers.
|
||||
|
||||
Functions to go into itcm can be tagged like this:
|
||||
int __tcmfunc foo(int bar);
|
||||
|
||||
Variables to go into dtcm can be tagged like this:
|
||||
int __tcmdata foo;
|
||||
|
||||
Constants can be tagged like this:
|
||||
int __tcmconst foo;
|
||||
|
||||
To put assembler into TCM just use
|
||||
.section ".tcm.text" or .section ".tcm.data"
|
||||
respectively.
|
||||
|
||||
Example code:
|
||||
|
||||
#include <asm/tcm.h>
|
||||
|
||||
/* Uninitialized data */
|
||||
static u32 __tcmdata tcmvar;
|
||||
/* Initialized data */
|
||||
static u32 __tcmdata tcmassigned = 0x2BADBABEU;
|
||||
/* Constant */
|
||||
static const u32 __tcmconst tcmconst = 0xCAFEBABEU;
|
||||
|
||||
static void __tcmlocalfunc tcm_to_tcm(void)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 100; i++)
|
||||
tcmvar ++;
|
||||
}
|
||||
|
||||
static void __tcmfunc hello_tcm(void)
|
||||
{
|
||||
/* Some abstract code that runs in ITCM */
|
||||
int i;
|
||||
for (i = 0; i < 100; i++) {
|
||||
tcmvar ++;
|
||||
}
|
||||
tcm_to_tcm();
|
||||
}
|
||||
|
||||
static void __init test_tcm(void)
|
||||
{
|
||||
u32 *tcmem;
|
||||
int i;
|
||||
|
||||
hello_tcm();
|
||||
printk("Hello TCM executed from ITCM RAM\n");
|
||||
|
||||
printk("TCM variable from testrun: %u @ %p\n", tcmvar, &tcmvar);
|
||||
tcmvar = 0xDEADBEEFU;
|
||||
printk("TCM variable: 0x%x @ %p\n", tcmvar, &tcmvar);
|
||||
|
||||
printk("TCM assigned variable: 0x%x @ %p\n", tcmassigned, &tcmassigned);
|
||||
|
||||
printk("TCM constant: 0x%x @ %p\n", tcmconst, &tcmconst);
|
||||
|
||||
/* Allocate some TCM memory from the pool */
|
||||
tcmem = tcm_alloc(20);
|
||||
if (tcmem) {
|
||||
printk("TCM Allocated 20 bytes of TCM @ %p\n", tcmem);
|
||||
tcmem[0] = 0xDEADBEEFU;
|
||||
tcmem[1] = 0x2BADBABEU;
|
||||
tcmem[2] = 0xCAFEBABEU;
|
||||
tcmem[3] = 0xDEADBEEFU;
|
||||
tcmem[4] = 0x2BADBABEU;
|
||||
for (i = 0; i < 5; i++)
|
||||
printk("TCM tcmem[%d] = %08x\n", i, tcmem[i]);
|
||||
tcm_free(tcmem, 20);
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,7 @@ unsigned char cfag12864b_buffer[CFAG12864B_SIZE];
|
||||
* Unable to open: return = -1
|
||||
* Unable to mmap: return = -2
|
||||
*/
|
||||
int cfag12864b_init(char *path)
|
||||
static int cfag12864b_init(char *path)
|
||||
{
|
||||
cfag12864b_fd = open(path, O_RDWR);
|
||||
if (cfag12864b_fd == -1)
|
||||
@@ -81,7 +81,7 @@ int cfag12864b_init(char *path)
|
||||
/*
|
||||
* exit a cfag12864b framebuffer device
|
||||
*/
|
||||
void cfag12864b_exit(void)
|
||||
static void cfag12864b_exit(void)
|
||||
{
|
||||
munmap(cfag12864b_mem, CFAG12864B_SIZE);
|
||||
close(cfag12864b_fd);
|
||||
@@ -90,7 +90,7 @@ void cfag12864b_exit(void)
|
||||
/*
|
||||
* set (x, y) pixel
|
||||
*/
|
||||
void cfag12864b_set(unsigned char x, unsigned char y)
|
||||
static void cfag12864b_set(unsigned char x, unsigned char y)
|
||||
{
|
||||
if (CFAG12864B_CHECK(x, y))
|
||||
cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] |=
|
||||
@@ -100,7 +100,7 @@ void cfag12864b_set(unsigned char x, unsigned char y)
|
||||
/*
|
||||
* unset (x, y) pixel
|
||||
*/
|
||||
void cfag12864b_unset(unsigned char x, unsigned char y)
|
||||
static void cfag12864b_unset(unsigned char x, unsigned char y)
|
||||
{
|
||||
if (CFAG12864B_CHECK(x, y))
|
||||
cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &=
|
||||
@@ -113,7 +113,7 @@ void cfag12864b_unset(unsigned char x, unsigned char y)
|
||||
* Pixel off: return = 0
|
||||
* Pixel on: return = 1
|
||||
*/
|
||||
unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
|
||||
static unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
|
||||
{
|
||||
if (CFAG12864B_CHECK(x, y))
|
||||
if (cfag12864b_buffer[CFAG12864B_ADDRESS(x, y)] &
|
||||
@@ -126,7 +126,7 @@ unsigned char cfag12864b_isset(unsigned char x, unsigned char y)
|
||||
/*
|
||||
* not (x, y) pixel
|
||||
*/
|
||||
void cfag12864b_not(unsigned char x, unsigned char y)
|
||||
static void cfag12864b_not(unsigned char x, unsigned char y)
|
||||
{
|
||||
if (cfag12864b_isset(x, y))
|
||||
cfag12864b_unset(x, y);
|
||||
@@ -137,7 +137,7 @@ void cfag12864b_not(unsigned char x, unsigned char y)
|
||||
/*
|
||||
* fill (set all pixels)
|
||||
*/
|
||||
void cfag12864b_fill(void)
|
||||
static void cfag12864b_fill(void)
|
||||
{
|
||||
unsigned short i;
|
||||
|
||||
@@ -148,7 +148,7 @@ void cfag12864b_fill(void)
|
||||
/*
|
||||
* clear (unset all pixels)
|
||||
*/
|
||||
void cfag12864b_clear(void)
|
||||
static void cfag12864b_clear(void)
|
||||
{
|
||||
unsigned short i;
|
||||
|
||||
@@ -162,7 +162,7 @@ void cfag12864b_clear(void)
|
||||
* Pixel off: src[i] = 0
|
||||
* Pixel on: src[i] > 0
|
||||
*/
|
||||
void cfag12864b_format(unsigned char * matrix)
|
||||
static void cfag12864b_format(unsigned char * matrix)
|
||||
{
|
||||
unsigned char i, j, n;
|
||||
|
||||
@@ -182,7 +182,7 @@ void cfag12864b_format(unsigned char * matrix)
|
||||
/*
|
||||
* blit buffer to lcd
|
||||
*/
|
||||
void cfag12864b_blit(void)
|
||||
static void cfag12864b_blit(void)
|
||||
{
|
||||
memcpy(cfag12864b_mem, cfag12864b_buffer, CFAG12864B_SIZE);
|
||||
}
|
||||
@@ -194,11 +194,10 @@ void cfag12864b_blit(void)
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define EXAMPLES 6
|
||||
|
||||
void example(unsigned char n)
|
||||
static void example(unsigned char n)
|
||||
{
|
||||
unsigned short i, j;
|
||||
unsigned char matrix[CFAG12864B_WIDTH * CFAG12864B_HEIGHT];
|
||||
|
||||
@@ -408,6 +408,26 @@ You can attach the current shell task by echoing 0:
|
||||
|
||||
# echo 0 > tasks
|
||||
|
||||
2.3 Mounting hierarchies by name
|
||||
--------------------------------
|
||||
|
||||
Passing the name=<x> option when mounting a cgroups hierarchy
|
||||
associates the given name with the hierarchy. This can be used when
|
||||
mounting a pre-existing hierarchy, in order to refer to it by name
|
||||
rather than by its set of active subsystems. Each hierarchy is either
|
||||
nameless, or has a unique name.
|
||||
|
||||
The name should match [\w.-]+
|
||||
|
||||
When passing a name=<x> option for a new hierarchy, you need to
|
||||
specify subsystems manually; the legacy behaviour of mounting all
|
||||
subsystems when none are explicitly specified is not supported when
|
||||
you give a subsystem a name.
|
||||
|
||||
The name of the subsystem appears as part of the hierarchy description
|
||||
in /proc/mounts and /proc/<pid>/cgroups.
|
||||
|
||||
|
||||
3. Kernel API
|
||||
=============
|
||||
|
||||
@@ -501,7 +521,7 @@ rmdir() will fail with it. From this behavior, pre_destroy() can be
|
||||
called multiple times against a cgroup.
|
||||
|
||||
int can_attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||
struct task_struct *task)
|
||||
struct task_struct *task, bool threadgroup)
|
||||
(cgroup_mutex held by caller)
|
||||
|
||||
Called prior to moving a task into a cgroup; if the subsystem
|
||||
@@ -509,14 +529,20 @@ returns an error, this will abort the attach operation. If a NULL
|
||||
task is passed, then a successful result indicates that *any*
|
||||
unspecified task can be moved into the cgroup. Note that this isn't
|
||||
called on a fork. If this method returns 0 (success) then this should
|
||||
remain valid while the caller holds cgroup_mutex.
|
||||
remain valid while the caller holds cgroup_mutex. If threadgroup is
|
||||
true, then a successful result indicates that all threads in the given
|
||||
thread's threadgroup can be moved together.
|
||||
|
||||
void attach(struct cgroup_subsys *ss, struct cgroup *cgrp,
|
||||
struct cgroup *old_cgrp, struct task_struct *task)
|
||||
struct cgroup *old_cgrp, struct task_struct *task,
|
||||
bool threadgroup)
|
||||
(cgroup_mutex held by caller)
|
||||
|
||||
Called after the task has been attached to the cgroup, to allow any
|
||||
post-attachment activity that requires memory allocations or blocking.
|
||||
If threadgroup is true, the subsystem should take care of all threads
|
||||
in the specified thread's threadgroup. Currently does not support any
|
||||
subsystem that might need the old_cgrp for every thread in the group.
|
||||
|
||||
void fork(struct cgroup_subsy *ss, struct task_struct *task)
|
||||
|
||||
|
||||
@@ -179,6 +179,9 @@ The reclaim algorithm has not been modified for cgroups, except that
|
||||
pages that are selected for reclaiming come from the per cgroup LRU
|
||||
list.
|
||||
|
||||
NOTE: Reclaim does not work for the root cgroup, since we cannot set any
|
||||
limits on the root cgroup.
|
||||
|
||||
2. Locking
|
||||
|
||||
The memory controller uses the following hierarchy
|
||||
@@ -210,6 +213,7 @@ We can alter the memory limit:
|
||||
NOTE: We can use a suffix (k, K, m, M, g or G) to indicate values in kilo,
|
||||
mega or gigabytes.
|
||||
NOTE: We can write "-1" to reset the *.limit_in_bytes(unlimited).
|
||||
NOTE: We cannot set limits on the root cgroup any more.
|
||||
|
||||
# cat /cgroups/0/memory.limit_in_bytes
|
||||
4194304
|
||||
@@ -375,7 +379,42 @@ cgroups created below it.
|
||||
|
||||
NOTE2: This feature can be enabled/disabled per subtree.
|
||||
|
||||
7. TODO
|
||||
7. Soft limits
|
||||
|
||||
Soft limits allow for greater sharing of memory. The idea behind soft limits
|
||||
is to allow control groups to use as much of the memory as needed, provided
|
||||
|
||||
a. There is no memory contention
|
||||
b. They do not exceed their hard limit
|
||||
|
||||
When the system detects memory contention or low memory control groups
|
||||
are pushed back to their soft limits. If the soft limit of each control
|
||||
group is very high, they are pushed back as much as possible to make
|
||||
sure that one control group does not starve the others of memory.
|
||||
|
||||
Please note that soft limits is a best effort feature, it comes with
|
||||
no guarantees, but it does its best to make sure that when memory is
|
||||
heavily contended for, memory is allocated based on the soft limit
|
||||
hints/setup. Currently soft limit based reclaim is setup such that
|
||||
it gets invoked from balance_pgdat (kswapd).
|
||||
|
||||
7.1 Interface
|
||||
|
||||
Soft limits can be setup by using the following commands (in this example we
|
||||
assume a soft limit of 256 megabytes)
|
||||
|
||||
# echo 256M > memory.soft_limit_in_bytes
|
||||
|
||||
If we want to change this to 1G, we can at any time use
|
||||
|
||||
# echo 1G > memory.soft_limit_in_bytes
|
||||
|
||||
NOTE1: Soft limits take effect over a long period of time, since they involve
|
||||
reclaiming memory for balancing between memory cgroups
|
||||
NOTE2: It is recommended to set the soft limit always below the hard limit,
|
||||
otherwise the hard limit will take precedence.
|
||||
|
||||
8. TODO
|
||||
|
||||
1. Add support for accounting huge pages (as a separate controller)
|
||||
2. Make per-cgroup scanner reclaim not-shared pages first
|
||||
|
||||
@@ -54,20 +54,23 @@ features surfaced as a result:
|
||||
|
||||
3.1 General format of the API:
|
||||
struct dma_async_tx_descriptor *
|
||||
async_<operation>(<op specific parameters>,
|
||||
enum async_tx_flags flags,
|
||||
struct dma_async_tx_descriptor *dependency,
|
||||
dma_async_tx_callback callback_routine,
|
||||
void *callback_parameter);
|
||||
async_<operation>(<op specific parameters>, struct async_submit ctl *submit)
|
||||
|
||||
3.2 Supported operations:
|
||||
memcpy - memory copy between a source and a destination buffer
|
||||
memset - fill a destination buffer with a byte value
|
||||
xor - xor a series of source buffers and write the result to a
|
||||
destination buffer
|
||||
xor_zero_sum - xor a series of source buffers and set a flag if the
|
||||
result is zero. The implementation attempts to prevent
|
||||
writes to memory
|
||||
memcpy - memory copy between a source and a destination buffer
|
||||
memset - fill a destination buffer with a byte value
|
||||
xor - xor a series of source buffers and write the result to a
|
||||
destination buffer
|
||||
xor_val - xor a series of source buffers and set a flag if the
|
||||
result is zero. The implementation attempts to prevent
|
||||
writes to memory
|
||||
pq - generate the p+q (raid6 syndrome) from a series of source buffers
|
||||
pq_val - validate that a p and or q buffer are in sync with a given series of
|
||||
sources
|
||||
datap - (raid6_datap_recov) recover a raid6 data block and the p block
|
||||
from the given sources
|
||||
2data - (raid6_2data_recov) recover 2 raid6 data blocks from the given
|
||||
sources
|
||||
|
||||
3.3 Descriptor management:
|
||||
The return value is non-NULL and points to a 'descriptor' when the operation
|
||||
@@ -80,8 +83,8 @@ acknowledged by the application before the offload engine driver is allowed to
|
||||
recycle (or free) the descriptor. A descriptor can be acked by one of the
|
||||
following methods:
|
||||
1/ setting the ASYNC_TX_ACK flag if no child operations are to be submitted
|
||||
2/ setting the ASYNC_TX_DEP_ACK flag to acknowledge the parent
|
||||
descriptor of a new operation.
|
||||
2/ submitting an unacknowledged descriptor as a dependency to another
|
||||
async_tx call will implicitly set the acknowledged state.
|
||||
3/ calling async_tx_ack() on the descriptor.
|
||||
|
||||
3.4 When does the operation execute?
|
||||
@@ -119,30 +122,42 @@ of an operation.
|
||||
Perform a xor->copy->xor operation where each operation depends on the
|
||||
result from the previous operation:
|
||||
|
||||
void complete_xor_copy_xor(void *param)
|
||||
void callback(void *param)
|
||||
{
|
||||
printk("complete\n");
|
||||
struct completion *cmp = param;
|
||||
|
||||
complete(cmp);
|
||||
}
|
||||
|
||||
int run_xor_copy_xor(struct page **xor_srcs,
|
||||
int xor_src_cnt,
|
||||
struct page *xor_dest,
|
||||
size_t xor_len,
|
||||
struct page *copy_src,
|
||||
struct page *copy_dest,
|
||||
size_t copy_len)
|
||||
void run_xor_copy_xor(struct page **xor_srcs,
|
||||
int xor_src_cnt,
|
||||
struct page *xor_dest,
|
||||
size_t xor_len,
|
||||
struct page *copy_src,
|
||||
struct page *copy_dest,
|
||||
size_t copy_len)
|
||||
{
|
||||
struct dma_async_tx_descriptor *tx;
|
||||
addr_conv_t addr_conv[xor_src_cnt];
|
||||
struct async_submit_ctl submit;
|
||||
addr_conv_t addr_conv[NDISKS];
|
||||
struct completion cmp;
|
||||
|
||||
tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len,
|
||||
ASYNC_TX_XOR_DROP_DST, NULL, NULL, NULL);
|
||||
tx = async_memcpy(copy_dest, copy_src, 0, 0, copy_len,
|
||||
ASYNC_TX_DEP_ACK, tx, NULL, NULL);
|
||||
tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len,
|
||||
ASYNC_TX_XOR_DROP_DST | ASYNC_TX_DEP_ACK | ASYNC_TX_ACK,
|
||||
tx, complete_xor_copy_xor, NULL);
|
||||
init_async_submit(&submit, ASYNC_TX_XOR_DROP_DST, NULL, NULL, NULL,
|
||||
addr_conv);
|
||||
tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len, &submit)
|
||||
|
||||
submit->depend_tx = tx;
|
||||
tx = async_memcpy(copy_dest, copy_src, 0, 0, copy_len, &submit);
|
||||
|
||||
init_completion(&cmp);
|
||||
init_async_submit(&submit, ASYNC_TX_XOR_DROP_DST | ASYNC_TX_ACK, tx,
|
||||
callback, &cmp, addr_conv);
|
||||
tx = async_xor(xor_dest, xor_srcs, 0, xor_src_cnt, xor_len, &submit);
|
||||
|
||||
async_tx_issue_pending_all();
|
||||
|
||||
wait_for_completion(&cmp);
|
||||
}
|
||||
|
||||
See include/linux/async_tx.h for more information on the flags. See the
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
================================
|
||||
Driver for EP93xx LCD controller
|
||||
================================
|
||||
|
||||
The EP93xx LCD controller can drive both standard desktop monitors and
|
||||
embedded LCD displays. If you have a standard desktop monitor then you
|
||||
can use the standard Linux video mode database. In your board file:
|
||||
|
||||
static struct ep93xxfb_mach_info some_board_fb_info = {
|
||||
.num_modes = EP93XXFB_USE_MODEDB,
|
||||
.bpp = 16,
|
||||
};
|
||||
|
||||
If you have an embedded LCD display then you need to define a video
|
||||
mode for it as follows:
|
||||
|
||||
static struct fb_videomode some_board_video_modes[] = {
|
||||
{
|
||||
.name = "some_lcd_name",
|
||||
/* Pixel clock, porches, etc */
|
||||
},
|
||||
};
|
||||
|
||||
Note that the pixel clock value is in pico-seconds. You can use the
|
||||
KHZ2PICOS macro to convert the pixel clock value. Most other values
|
||||
are in pixel clocks. See Documentation/fb/framebuffer.txt for further
|
||||
details.
|
||||
|
||||
The ep93xxfb_mach_info structure for your board should look like the
|
||||
following:
|
||||
|
||||
static struct ep93xxfb_mach_info some_board_fb_info = {
|
||||
.num_modes = ARRAY_SIZE(some_board_video_modes),
|
||||
.modes = some_board_video_modes,
|
||||
.default_mode = &some_board_video_modes[0],
|
||||
.bpp = 16,
|
||||
};
|
||||
|
||||
The framebuffer device can be registered by adding the following to
|
||||
your board initialisation function:
|
||||
|
||||
ep93xx_register_fb(&some_board_fb_info);
|
||||
|
||||
=====================
|
||||
Video Attribute Flags
|
||||
=====================
|
||||
|
||||
The ep93xxfb_mach_info structure has a flags field which can be used
|
||||
to configure the controller. The video attributes flags are fully
|
||||
documented in section 7 of the EP93xx users' guide. The following
|
||||
flags are available:
|
||||
|
||||
EP93XXFB_PCLK_FALLING Clock data on the falling edge of the
|
||||
pixel clock. The default is to clock
|
||||
data on the rising edge.
|
||||
|
||||
EP93XXFB_SYNC_BLANK_HIGH Blank signal is active high. By
|
||||
default the blank signal is active low.
|
||||
|
||||
EP93XXFB_SYNC_HORIZ_HIGH Horizontal sync is active high. By
|
||||
default the horizontal sync is active low.
|
||||
|
||||
EP93XXFB_SYNC_VERT_HIGH Vertical sync is active high. By
|
||||
default the vertical sync is active high.
|
||||
|
||||
The physical address of the framebuffer can be controlled using the
|
||||
following flags:
|
||||
|
||||
EP93XXFB_USE_SDCSN0 Use SDCSn[0] for the framebuffer. This
|
||||
is the default setting.
|
||||
|
||||
EP93XXFB_USE_SDCSN1 Use SDCSn[1] for the framebuffer.
|
||||
|
||||
EP93XXFB_USE_SDCSN2 Use SDCSn[2] for the framebuffer.
|
||||
|
||||
EP93XXFB_USE_SDCSN3 Use SDCSn[3] for the framebuffer.
|
||||
|
||||
==================
|
||||
Platform callbacks
|
||||
==================
|
||||
|
||||
The EP93xx framebuffer driver supports three optional platform
|
||||
callbacks: setup, teardown and blank. The setup and teardown functions
|
||||
are called when the framebuffer driver is installed and removed
|
||||
respectively. The blank function is called whenever the display is
|
||||
blanked or unblanked.
|
||||
|
||||
The setup and teardown devices pass the platform_device structure as
|
||||
an argument. The fb_info and ep93xxfb_mach_info structures can be
|
||||
obtained as follows:
|
||||
|
||||
static int some_board_fb_setup(struct platform_device *pdev)
|
||||
{
|
||||
struct ep93xxfb_mach_info *mach_info = pdev->dev.platform_data;
|
||||
struct fb_info *fb_info = platform_get_drvdata(pdev);
|
||||
|
||||
/* Board specific framebuffer setup */
|
||||
}
|
||||
|
||||
======================
|
||||
Setting the video mode
|
||||
======================
|
||||
|
||||
The video mode is set using the following syntax:
|
||||
|
||||
video=XRESxYRES[-BPP][@REFRESH]
|
||||
|
||||
If the EP93xx video driver is built-in then the video mode is set on
|
||||
the Linux kernel command line, for example:
|
||||
|
||||
video=ep93xx-fb:800x600-16@60
|
||||
|
||||
If the EP93xx video driver is built as a module then the video mode is
|
||||
set when the module is installed:
|
||||
|
||||
modprobe ep93xx-fb video=320x240
|
||||
|
||||
==============
|
||||
Screenpage bug
|
||||
==============
|
||||
|
||||
At least on the EP9315 there is a silicon bug which causes bit 27 of
|
||||
the VIDSCRNPAGE (framebuffer physical offset) to be tied low. There is
|
||||
an unofficial errata for this bug at:
|
||||
http://marc.info/?l=linux-arm-kernel&m=110061245502000&w=2
|
||||
|
||||
By default the EP93xx framebuffer driver checks if the allocated physical
|
||||
address has bit 27 set. If it does, then the memory is freed and an
|
||||
error is returned. The check can be disabled by adding the following
|
||||
option when loading the driver:
|
||||
|
||||
ep93xx-fb.check_screenpage_bug=0
|
||||
|
||||
In some cases it may be possible to reconfigure your SDRAM layout to
|
||||
avoid this bug. See section 13 of the EP93xx users' guide for details.
|
||||
@@ -186,9 +186,7 @@ noinverse - show true colors on screen. It is default.
|
||||
dev:X - bind driver to device X. Driver numbers device from 0 up to N,
|
||||
where device 0 is first `known' device found, 1 second and so on.
|
||||
lspci lists devices in this order.
|
||||
Default is `every' known device for driver with multihead support
|
||||
and first working device (usually dev:0) for driver without
|
||||
multihead support.
|
||||
Default is `every' known device.
|
||||
nohwcursor - disables hardware cursor (use software cursor instead).
|
||||
hwcursor - enables hardware cursor. It is default. If you are using
|
||||
non-accelerated mode (`noaccel' or `fbset -accel false'), software
|
||||
|
||||
@@ -354,14 +354,6 @@ Who: Krzysztof Piotr Oledzki <ole@ans.pl>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: fscher and fscpos drivers
|
||||
When: June 2009
|
||||
Why: Deprecated by the new fschmd driver.
|
||||
Who: Hans de Goede <hdegoede@redhat.com>
|
||||
Jean Delvare <khali@linux-fr.org>
|
||||
|
||||
---------------------------
|
||||
|
||||
What: sysfs ui for changing p4-clockmod parameters
|
||||
When: September 2009
|
||||
Why: See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and
|
||||
|
||||
@@ -18,11 +18,11 @@ the 9p client is available in the form of a USENIX paper:
|
||||
|
||||
Other applications are described in the following papers:
|
||||
* XCPU & Clustering
|
||||
http://www.xcpu.org/xcpu-talk.pdf
|
||||
http://xcpu.org/papers/xcpu-talk.pdf
|
||||
* KVMFS: control file system for KVM
|
||||
http://www.xcpu.org/kvmfs.pdf
|
||||
* CellFS: A New ProgrammingModel for the Cell BE
|
||||
http://www.xcpu.org/cellfs-talk.pdf
|
||||
http://xcpu.org/papers/kvmfs.pdf
|
||||
* CellFS: A New Programming Model for the Cell BE
|
||||
http://xcpu.org/papers/cellfs-talk.pdf
|
||||
* PROSE I/O: Using 9p to enable Application Partitions
|
||||
http://plan9.escet.urjc.es/iwp9/cready/PROSE_iwp9_2006.pdf
|
||||
|
||||
@@ -48,6 +48,7 @@ OPTIONS
|
||||
(see rfdno and wfdno)
|
||||
virtio - connect to the next virtio channel available
|
||||
(from lguest or KVM with trans_virtio module)
|
||||
rdma - connect to a specified RDMA channel
|
||||
|
||||
uname=name user name to attempt mount as on the remote server. The
|
||||
server may override or ignore this value. Certain user
|
||||
@@ -59,16 +60,22 @@ OPTIONS
|
||||
cache=mode specifies a caching policy. By default, no caches are used.
|
||||
loose = no attempts are made at consistency,
|
||||
intended for exclusive, read-only mounts
|
||||
fscache = use FS-Cache for a persistent, read-only
|
||||
cache backend.
|
||||
|
||||
debug=n specifies debug level. The debug level is a bitmask.
|
||||
0x01 = display verbose error messages
|
||||
0x02 = developer debug (DEBUG_CURRENT)
|
||||
0x04 = display 9p trace
|
||||
0x08 = display VFS trace
|
||||
0x10 = display Marshalling debug
|
||||
0x20 = display RPC debug
|
||||
0x40 = display transport debug
|
||||
0x80 = display allocation debug
|
||||
0x01 = display verbose error messages
|
||||
0x02 = developer debug (DEBUG_CURRENT)
|
||||
0x04 = display 9p trace
|
||||
0x08 = display VFS trace
|
||||
0x10 = display Marshalling debug
|
||||
0x20 = display RPC debug
|
||||
0x40 = display transport debug
|
||||
0x80 = display allocation debug
|
||||
0x100 = display protocol message debug
|
||||
0x200 = display Fid debug
|
||||
0x400 = display packet debug
|
||||
0x800 = display fscache tracing debug
|
||||
|
||||
rfdno=n the file descriptor for reading with trans=fd
|
||||
|
||||
@@ -100,6 +107,10 @@ OPTIONS
|
||||
any = v9fs does single attach and performs all
|
||||
operations as one user
|
||||
|
||||
cachetag cache tag to use the specified persistent cache.
|
||||
cache tags for existing cache sessions can be listed at
|
||||
/sys/fs/9p/caches. (applies only to cache=fscache)
|
||||
|
||||
RESOURCES
|
||||
=========
|
||||
|
||||
@@ -118,7 +129,7 @@ and export.
|
||||
A Linux version of the 9p server is now maintained under the npfs project
|
||||
on sourceforge (http://sourceforge.net/projects/npfs). The currently
|
||||
maintained version is the single-threaded version of the server (named spfs)
|
||||
available from the same CVS repository.
|
||||
available from the same SVN repository.
|
||||
|
||||
There are user and developer mailing lists available through the v9fs project
|
||||
on sourceforge (http://sourceforge.net/projects/v9fs).
|
||||
@@ -126,7 +137,8 @@ on sourceforge (http://sourceforge.net/projects/v9fs).
|
||||
A stand-alone version of the module (which should build for any 2.6 kernel)
|
||||
is available via (http://github.com/ericvh/9p-sac/tree/master)
|
||||
|
||||
News and other information is maintained on SWiK (http://swik.net/v9fs).
|
||||
News and other information is maintained on SWiK (http://swik.net/v9fs)
|
||||
and the Wiki (http://sf.net/apps/mediawiki/v9fs/index.php).
|
||||
|
||||
Bug reports may be issued through the kernel.org bugzilla
|
||||
(http://bugzilla.kernel.org)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user