Commit bc091c93 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'perf-urgent-for-linus' of...

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  extable, core_kernel_data(): Make sure all archs define _sdata
  core_kernel_data(): Fix architectures that do not define _sdata
parents 3ed4c058 a2d063ac
...@@ -46,6 +46,7 @@ SECTIONS ...@@ -46,6 +46,7 @@ SECTIONS
__init_end = .; __init_end = .;
/* Freed after init ends here */ /* Freed after init ends here */
_sdata = .; /* Start of rw data section */
_data = .; _data = .;
RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE)
......
...@@ -44,6 +44,7 @@ SECTIONS ...@@ -44,6 +44,7 @@ SECTIONS
EXCEPTION_TABLE(16) EXCEPTION_TABLE(16)
NOTES NOTES
_sdata = .; /* Start of data section */
RODATA RODATA
RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE) RW_DATA_SECTION(32, PAGE_SIZE, THREAD_SIZE)
_edata = .; /* End of data section */ _edata = .; /* End of data section */
......
...@@ -25,6 +25,8 @@ SECTIONS ...@@ -25,6 +25,8 @@ SECTIONS
EXCEPTION_TABLE(16) EXCEPTION_TABLE(16)
_sdata = .; /* Start of data section */
RODATA RODATA
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE)
......
...@@ -25,6 +25,7 @@ SECTIONS ...@@ -25,6 +25,7 @@ SECTIONS
_etext = .; /* End of text section */ _etext = .; /* End of text section */
EXCEPTION_TABLE(16) :data EXCEPTION_TABLE(16) :data
_sdata = .; /* Start of rw data section */
RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) :data RW_DATA_SECTION(16, PAGE_SIZE, THREAD_SIZE) :data
/* End of data goes *here* so that freeing init code works properly. */ /* End of data goes *here* so that freeing init code works properly. */
_edata = .; _edata = .;
......
...@@ -65,6 +65,7 @@ SECTIONS ...@@ -65,6 +65,7 @@ SECTIONS
NOTES :text :note NOTES :text :note
.dummy : { *(.dummy) } :text .dummy : { *(.dummy) } :text
_sdata = .; /* Start of data section */
RODATA RODATA
/* writeable */ /* writeable */
......
...@@ -69,6 +69,9 @@ SECTIONS ...@@ -69,6 +69,9 @@ SECTIONS
/* End of text section */ /* End of text section */
_etext = .; _etext = .;
/* Start of data section */
_sdata = .;
RODATA RODATA
/* writeable */ /* writeable */
......
...@@ -72,6 +72,16 @@ int core_kernel_text(unsigned long addr) ...@@ -72,6 +72,16 @@ int core_kernel_text(unsigned long addr)
return 0; return 0;
} }
/**
* core_kernel_data - tell if addr points to kernel data
* @addr: address to test
*
* Returns true if @addr passed in is from the core kernel data
* section.
*
* Note: On some archs it may return true for core RODATA, and false
* for others. But will always be true for core RW data.
*/
int core_kernel_data(unsigned long addr) int core_kernel_data(unsigned long addr)
{ {
if (addr >= (unsigned long)_sdata && if (addr >= (unsigned long)_sdata &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment