Skip to content

__cpuinitconst and __devinitconst

Jan Beulich lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4introduce __cpuinitconstdrivers/acpi/processor_idle.c include/linux/init.h+3 -12 replies
2/4use __cpuinitconst for x86arch/x86/kernel/cpu/amd.c arch/x86/kernel/cpu/centaur.c arch/x86/kernel/cpu/common.c +7 more+29 -290 replies
3/4introduce __devinitconstdrivers/i2c/busses/i2c-piix4.c drivers/ide/pci/piix.c drivers/video/aty/aty128fb.c +1 more+6 -42 replies
3/4use __devinitconst on x86arch/x86/pci/acpi.c arch/x86/pci/common.c arch/x86/pci/fixup.c+4 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] __cpuinitconst and __devinitconst

Since __cpuinitdata/__devinitdata don't allow const to be specified with them (otherwise .init.data sections with and without the writeable attribute will be generated by the compiler), and since __devinitdata except for embedded systems evaluates to <empty> unconditionally and __cpuinitdata at least in most production kernel configurations also likely evaluates to <empty>, it seems appropriate to add an additional attribute allowing the respective objects to end up in .rodata rather than .data when not used at initialization time only.

Patch 1 introduces __cpuinitconst and a single common code consumer. Patch 2 adds a number of x86 consumers of __cpuinitconst. Patch 3 introduces __devinitconst and common code consumers. Patch 4 adds a number of x86 consumers of __devinitconst.