<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/tile/kernel/time.c, branch v3.13</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/arch/tile/kernel/time.c?h=v3.13</id>
<link rel='self' href='https://git.amat.us/linux/atom/arch/tile/kernel/time.c?h=v3.13'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-09-06T18:14:33Z</updated>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile</title>
<updated>2013-09-06T18:14:33Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-09-06T18:14:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4de9ad9bc08b4953fc03336ad38908496e2f8826'/>
<id>urn:sha1:4de9ad9bc08b4953fc03336ad38908496e2f8826</id>
<content type='text'>
Pull Tile arch updates from Chris Metcalf:
 "These changes bring in a bunch of new functionality that has been
  maintained internally at Tilera over the last year, plus other stray
  bits of work that I've taken into the tile tree from other folks.

  The changes include some PCI root complex work, interrupt-driven
  console support, support for performing fast-path unaligned data
  fixups by kernel-based JIT code generation, CONFIG_PREEMPT support,
  vDSO support for gettimeofday(), a serial driver for the tilegx
  on-chip UART, KGDB support, more optimized string routines, support
  for ftrace and kprobes, improved ASLR, and many bug fixes.

  We also remove support for the old TILE64 chip, which is no longer
  buildable"

* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: (85 commits)
  tile: refresh tile defconfig files
  tile: rework &lt;asm/cmpxchg.h&gt;
  tile PCI RC: make default consistent DMA mask 32-bit
  tile: add null check for kzalloc in tile/kernel/setup.c
  tile: make __write_once a synonym for __read_mostly
  tile: remove support for TILE64
  tile: use asm-generic/bitops/builtin-*.h
  tile: eliminate no-op "noatomichash" boot argument
  tile: use standard tile_bundle_bits type in traps.c
  tile: simplify code referencing hypervisor API addresses
  tile: change &lt;asm/system.h&gt; to &lt;asm/switch_to.h&gt; in comments
  tile: mark pcibios_init() as __init
  tile: check for correct compiler earlier in asm-offsets.c
  tile: use standard 'generic-y' model for &lt;asm/hw_irq.h&gt;
  tile: use asm-generic version of &lt;asm/local64.h&gt;
  tile PCI RC: add comment about "PCI hole" problem
  tile: remove DEBUG_EXTRA_FLAGS kernel config option
  tile: add virt_to_kpte() API and clean up and document behavior
  tile: support FRAME_POINTER
  tile: support reporting Tilera hypervisor statistics
  ...
</content>
</entry>
<entry>
<title>tile: implement gettimeofday() via vDSO</title>
<updated>2013-08-13T20:26:21Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2013-08-07T19:33:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4a556f4f56da3110b27e265b79f0e7582115445c'/>
<id>urn:sha1:4a556f4f56da3110b27e265b79f0e7582115445c</id>
<content type='text'>
This change creates the framework for vDSO calls, makes the existing
rt_sigreturn() mechanism use it, and adds a fast gettimeofday().
Now that we need to expose the vDSO address to userspace, we add
AT_SYSINFO_EHDR to the set of aux entries provided to userspace.
(You can disable any extra vDSO support by booting with vdso=0,
but the rt_sigreturn vDSO page will still be provided.)

Note that glibc has supported the tile vDSO since release 2.17.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>tile: delete __cpuinit usage from all tile files</title>
<updated>2013-07-14T23:36:54Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2013-06-18T21:28:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=18f894c145e8515c26da09dd95e06d6b1158775c'/>
<id>urn:sha1:18f894c145e8515c26da09dd95e06d6b1158775c</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/tile uses of the __cpuinit macros from
all C files.  Currently tile does not have any __CPUINIT used in
assembly files.

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

Cc: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>tile: ns2cycles should use __raw_get_cpu_var</title>
<updated>2013-03-26T17:52:16Z</updated>
<author>
<name>Henrik Austad</name>
<email>haustad@cisco.com</email>
</author>
<published>2013-03-26T07:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=39e8202bb3b83a826e5825b1a07bbbf30ae9a140'/>
<id>urn:sha1:39e8202bb3b83a826e5825b1a07bbbf30ae9a140</id>
<content type='text'>
ns2cycles use per_cpu variables, and will, eventually, find its way into
smp_processor_id(). This is not safe in a preemptible kernel;
preemption should ideally be disabled.

BUG: using smp_processor_id() in preemptible [00000000] code:
systemd-modules/367
caller is ns2cycles+0x40/0xb8

Starting stack dump of tid 367, pid 367 (systemd-modules) on cpu 2 at
cycle 20969956421
 frame 0: 0xfffffff70004b860 dump_stack+0x0/0x20 (sp 0xfffffe407993fa90)
 frame 1: 0xfffffff7006abc28 debug_smp_processor_id+0x1a8/0x1e0 (sp
0xfffffe407993fa90)
 frame 2: 0xfffffff7004d7b40 ns2cycles+0x40/0xb8 (sp 0xfffffe407993fab8)
 frame 3: 0xfffffff7004dc578 __ndelay+0x38/0x80 (sp 0xfffffe407993fae0)

However, in this case:

- the frequency is the same accross all cores
- we use the data read-only
- we do not scale the frequency

Which means that we can use the __raw_get_cpu_var instead.

Signed-off-by: Henrik Austad &lt;haustad@cisco.com&gt;
Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>clocksource: tile: convert to use clocksource_register_hz</title>
<updated>2011-06-03T21:26:21Z</updated>
<author>
<name>John Stultz</name>
<email>johnstul@us.ibm.com</email>
</author>
<published>2011-06-01T07:32:50Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9f14517bd6f38cf4b48d742a0ac5db9d17edecba'/>
<id>urn:sha1:9f14517bd6f38cf4b48d742a0ac5db9d17edecba</id>
<content type='text'>
Convert tile to use clocksource_register_hz.

CC: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: John Stultz &lt;johnstul@us.ibm.com&gt;
Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>arch/tile: various header improvements for building drivers</title>
<updated>2011-05-04T18:40:54Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2011-05-02T20:06:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=28d717411badb78df71ecf087a07b93caf418f59'/>
<id>urn:sha1:28d717411badb78df71ecf087a07b93caf418f59</id>
<content type='text'>
This change adds a number of missing headers in asm (fb.h, parport.h,
serial.h, and vga.h) using the minimal generic versions.

It also adds a number of missing interfaces that showed up as build
failures when trying to build various drivers not normally included in the
"tile" distribution: ioremap_wc(), memset_io(), io{read,write}{16,32}be(),
virt_to_bus(), bus_to_virt(), irq_canonicalize(), __pte(), __pgd(),
and __pmd().  I also added a cast in virt_to_page() since not all callers
pass a pointer.

I fixed &lt;asm/stat.h&gt; to properly include a __KERNEL__ guard for the
__ARCH_WANT_STAT64 symbol, and &lt;asm/swab.h&gt; to use __builtin_bswap32()
even for our 64-bit architecture, since the same code is produced.

I added an export for get_cycles(), since it's used in some modules.

And I made &lt;arch/spr_def.h&gt; properly include the __KERNEL__ guard,
even though it's not yet exported, since it likely will be soon.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>arch/tile: fix __ndelay etc to work better</title>
<updated>2011-03-01T21:20:04Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2011-02-28T18:21:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=13371731487896a6ef158b1cd74297f40a3da4bb'/>
<id>urn:sha1:13371731487896a6ef158b1cd74297f40a3da4bb</id>
<content type='text'>
The current implementations of __ndelay and __udelay call a hypervisor
service to delay, but the hypervisor service isn't actually implemented
very well, and the consensus is that Linux should handle figuring this
out natively and not use a hypervisor service.

By converting nanoseconds to cycles, and then spinning until the
cycle counter reaches the desired cycle, we get several benefits:
first, we are sensitive to the actual clock speed; second, we use
less power by issuing a slow SPR read once every six cycles while
we delay; and third, we properly handle the case of an interrupt by
exiting at the target time rather than after some number of cycles.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>arch/tile: bomb raw_local_irq_ to arch_local_irq_</title>
<updated>2010-11-01T19:30:42Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2010-11-01T19:24:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5d966115de84c22cd4df029cb00be0e51fab6c10'/>
<id>urn:sha1:5d966115de84c22cd4df029cb00be0e51fab6c10</id>
<content type='text'>
This completes the tile migration to the new naming scheme for
the architecture-specific irq management code.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>arch/tile: Use separate, better minsec values for clocksource and sched_clock.</title>
<updated>2010-08-13T12:24:22Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2010-08-13T12:24:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=749dc6f252b57d5cb9c1f4c1c4aafe4c92a28207'/>
<id>urn:sha1:749dc6f252b57d5cb9c1f4c1c4aafe4c92a28207</id>
<content type='text'>
We were using the same 5-sec minsec for the clocksource and sched_clock
that we were using for the clock_event_device.  For the clock_event_device
that's exactly right since it has a short maximum countdown time.
But for sched_clock we want to avoid wraparound when converting from
ticks to nsec over a much longer window, so we force a shift of 10.
And for clocksource it seems dodgy to use a 5-sec minsec as well, so we
copy some other platforms and force a shift of 22.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
</content>
</entry>
<entry>
<title>arch/tile: Miscellaneous cleanup changes.</title>
<updated>2010-07-06T17:41:51Z</updated>
<author>
<name>Chris Metcalf</name>
<email>cmetcalf@tilera.com</email>
</author>
<published>2010-06-25T21:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0707ad30d10110aebc01a5a64fb63f4b32d20b73'/>
<id>urn:sha1:0707ad30d10110aebc01a5a64fb63f4b32d20b73</id>
<content type='text'>
This commit is primarily changes caused by reviewing "sparse"
and "checkpatch" output on our sources, so is somewhat noisy, since
things like "printk() -&gt; pr_err()" (or whatever) throughout the
codebase tend to get tedious to read.  Rather than trying to tease
apart precisely which things changed due to which type of code
review, this commit includes various cleanups in the code:

- sparse: Add declarations in headers for globals.
- sparse: Fix __user annotations.
- sparse: Using gfp_t consistently instead of int.
- sparse: removing functions not actually used.
- checkpatch: Clean up printk() warnings by using pr_info(), etc.;
  also avoid partial-line printks except in bootup code.
  - checkpatch: Use exposed structs rather than typedefs.
  - checkpatch: Change some C99 comments to C89 comments.

In addition, a couple of minor other changes are rolled in
to this commit:

- Add support for a "raise" instruction to cause SIGFPE, etc., to be raised.
- Remove some compat code that is unnecessary when we fully eliminate
  some of the deprecated syscalls from the generic syscall ABI.
- Update the tile_defconfig to reflect current config contents.

Signed-off-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
</content>
</entry>
</feed>
