<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/arc/kernel/time.c, branch v3.18</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.18</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.18'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2014-07-23T05:47:12Z</updated>
<entry>
<title>ARC: update some comments</title>
<updated>2014-07-23T05:47:12Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2014-06-25T11:44:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9a98e1849a201ce88b42fc177b449df576a92b4'/>
<id>urn:sha1:c9a98e1849a201ce88b42fc177b449df576a92b4</id>
<content type='text'>
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [SMP] unify cpu private IRQ requests (TIMER/IPI)</title>
<updated>2014-07-23T05:46:45Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2014-05-07T09:55:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2b75c0f93e395aa6130c20a08016b143e6ec8c53'/>
<id>urn:sha1:2b75c0f93e395aa6130c20a08016b143e6ec8c53</id>
<content type='text'>
The current cpu-private IRQ registration is ugly as it requires need to
expose arch_unmask_irq() outside of intc code.
So switch to percpu IRQ APIs:
  -request_percpu_irq [boot core]
  -enable_percpu_irq  [all cores]

Encapsulated in helper arc_request_percpu_irq()

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: arc_local_timer_setup() need not pass own cpu id</title>
<updated>2014-06-03T07:56:52Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2014-05-08T08:36:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2d4899f6bddfbeb88c01f2ec28f977e0d8c8d369'/>
<id>urn:sha1:2d4899f6bddfbeb88c01f2ec28f977e0d8c8d369</id>
<content type='text'>
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [clockevent] simplify timer ISR</title>
<updated>2014-03-26T09:01:30Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2014-01-24T19:12:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f8b34c3fd5a3fe7820952400ebbbc0528ec80686'/>
<id>urn:sha1:f8b34c3fd5a3fe7820952400ebbbc0528ec80686</id>
<content type='text'>
* Remove one liner IRQ ACK accessor, it was coming in the way of readability.

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [clockevent] can't be SoC specific</title>
<updated>2014-03-26T09:01:29Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2014-01-24T18:56:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=35571f4bdcae4bf2262fa0c94f56594dd0457f5a'/>
<id>urn:sha1:35571f4bdcae4bf2262fa0c94f56594dd0457f5a</id>
<content type='text'>
So no point keeping it weak

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: [SMP] Disallow RTSC</title>
<updated>2013-11-07T09:04:31Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-09-09T10:34:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7d0857a54aedbd47b3de503933d65ce462970bd6'/>
<id>urn:sha1:7d0857a54aedbd47b3de503933d65ce462970bd6</id>
<content type='text'>
RTSC is strictly incore and must not be allowed in SMP configs

Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>ARC: use __weak instead of __attribute__((weak))</title>
<updated>2013-11-06T05:10:37Z</updated>
<author>
<name>Vineet Gupta</name>
<email>vgupta@synopsys.com</email>
</author>
<published>2013-10-31T08:23:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=064a6269245655b15054ad9783bca9bfd8dc1f9e'/>
<id>urn:sha1:064a6269245655b15054ad9783bca9bfd8dc1f9e</id>
<content type='text'>
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>arc: Replace __get_cpu_var uses</title>
<updated>2013-11-06T05:10:37Z</updated>
<author>
<name>Christoph Lameter</name>
<email>cl@linux.com</email>
</author>
<published>2013-08-28T19:48:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6855e95ce3256cdb5f4fbc988fe8ee925b051ef7'/>
<id>urn:sha1:6855e95ce3256cdb5f4fbc988fe8ee925b051ef7</id>
<content type='text'>
__get_cpu_var() is used for multiple purposes in the kernel source. One of them is
address calculation via the form &amp;__get_cpu_var(x). This calculates the address for
the instance of the percpu variable of the current processor based on an offset.

Other use cases are for storing and retrieving data from the current processors percpu area.
__get_cpu_var() can be used as an lvalue when writing data or on the right side of an assignment.

__get_cpu_var() is defined as :

#define __get_cpu_var(var) (*this_cpu_ptr(&amp;(var)))

__get_cpu_var() always only does an address determination. However, store and retrieve operations
could use a segment prefix (or global register on other platforms) to avoid the address calculation.

this_cpu_write() and this_cpu_read() can directly take an offset into a percpu area and use
optimized assembly code to read and write per cpu variables.

This patch converts __get_cpu_var into either an explicit address calculation using this_cpu_ptr()
or into a use of this_cpu operations that use the offset. Thereby address calcualtions are avoided
and less registers are used when code is generated.

At the end of the patchset all uses of __get_cpu_var have been removed so the macro is removed too.

The patchset includes passes over all arches as well. Once these operations are used throughout then
specialized macros can be defined in non -x86 arches as well in order to optimize per cpu access by
f.e. using a global register that may be set to the per cpu base.

Transformations done to __get_cpu_var()

1. Determine the address of the percpu instance of the current processor.

	DEFINE_PER_CPU(int, y);
	int *x = &amp;__get_cpu_var(y);

    Converts to

	int *x = this_cpu_ptr(&amp;y);

2. Same as #1 but this time an array structure is involved.

	DEFINE_PER_CPU(int, y[20]);
	int *x = __get_cpu_var(y);

    Converts to

	int *x = this_cpu_ptr(y);

3. Retrieve the content of the current processors instance of a per cpu variable.

	DEFINE_PER_CPU(int, u);
	int x = __get_cpu_var(y)

   Converts to

	int x = __this_cpu_read(y);

4. Retrieve the content of a percpu struct

	DEFINE_PER_CPU(struct mystruct, y);
	struct mystruct x = __get_cpu_var(y);

   Converts to

	memcpy(this_cpu_ptr(&amp;x), y, sizeof(x));

5. Assignment to a per cpu variable

	DEFINE_PER_CPU(int, y)
	__get_cpu_var(y) = x;

   Converts to

	this_cpu_write(y, x);

6. Increment/Decrement etc of a per cpu variable

	DEFINE_PER_CPU(int, y);
	__get_cpu_var(y)++

   Converts to

	this_cpu_inc(y)

Acked-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Signed-off-by: Christoph Lameter &lt;cl@linux.com&gt;
</content>
</entry>
<entry>
<title>ARC: Use clockevents_config_and_register over clockevents_register_device</title>
<updated>2013-09-27T10:58:48Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2013-09-24T21:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55c2e26204276b27f2b7a63123b701c950e45d89'/>
<id>urn:sha1:55c2e26204276b27f2b7a63123b701c950e45d89</id>
<content type='text'>
clockevents_config_and_register is more clever and correct than doing it
by hand; so use it.

[vgupta: fixed build failure due to missing ; in patch]

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
<entry>
<title>arc: delete __cpuinit usage from all arc files</title>
<updated>2013-06-27T09:07:58Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2013-06-24T19:30:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ce7599567e27eabc1003e35b6f05579268dafecd'/>
<id>urn:sha1:ce7599567e27eabc1003e35b6f05579268dafecd</id>
<content type='text'>
The __cpuinit type of throwaway sections might have made sense
some time ago when RAM was more constrained, but now the savings
do not offset the cost and complications.  For example, the fix in
commit 5e427ec2d0 ("x86: Fix bit corruption at CPU resume time")
is a good example of the nasty type of bugs that can be created
with improper use of the various __init prefixes.

After a discussion on LKML[1] it was decided that cpuinit should go
the way of devinit and be phased out.  Once all the users are gone,
we can then finally remove the macros themselves from linux/init.h.

Note that some harmless section mismatch warnings may result, since
notify_cpu_starting() and cpu_up() are arch independent (kernel/cpu.c)
are flagged as __cpuinit  -- so if we remove the __cpuinit from
arch specific callers, we will also get section mismatch warnings.
As an intermediate step, we intend to turn the linux/init.h cpuinit
content into no-ops as early as possible, since that will get rid
of these warnings.  In any case, they are temporary and harmless.

This removes all the arch/arc uses of the __cpuinit macros from
all C files.  Currently arc does not have any __CPUINIT used in
assembly files.

[1] https://lkml.org/lkml/2013/5/20/589

Cc: Vineet Gupta &lt;vgupta@synopsys.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Vineet Gupta &lt;vgupta@synopsys.com&gt;
</content>
</entry>
</feed>
