lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <48276B51.100@seznam.cz>
Date:	Sun, 11 May 2008 23:55:29 +0200
From:	Michal Simek <monstr@...nam.cz>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	linux-kernel@...r.kernel.org, arnd@...db.de,
	linux-arch@...r.kernel.org, stephen.neuendorffer@...inx.com,
	John.Linn@...inx.com, john.williams@...alogix.com, matthew@....cx,
	will.newton@...il.com, drepper@...hat.com,
	microblaze-uclinux@...e.uq.edu.au, grant.likely@...retlab.ca,
	Michal Simek <monstr@...str.eu>
Subject: Re: [PATCH 08/56] microblaze_v2: Interrupt handling, timer support,
 supported function

Hi Thomas,

> Michal,
> 
> On Sun, 11 May 2008, Michal Simek wrote:
>>> Please split this modification code out into a separate function. The
>>> same code is used below.
>> Add Macro.
> 
> Please use a (inline) function whenever possible. Macros are harder to
> read and not type safe.

I'll try it.

>>> Can you please move a new architecture to clockevents / clocksource
>>> right from the beginning ? No need to invent another incompatible set
>>> of time(r) related functions.
>> I move whole code to GENERIC_TIME. Did you meant any others changes?
> 
> GENERIC_TIME and GENERIC_CLOCKEVENTS. You get high resolution timers
> and dynamic ticks for free when your timer hardware allows it.

About CLOCKEVENTS. I looked at arm/mach-versatile/

and I found I need implement:
loading current timer value - clocksource.read

clock_event_device.set_mode - set one from fourth modes
clock_event_device.set_next_event - the same mode with new init timer value
(this is little bit mess for me because arm do this that only change actual
counting value - I hope I do that too).

Supported modes are:
CLOCK_EVT_MODE_PERIODIC - reload and timer interrupt
CLOCK_EVT_MODE_ONESHOT - one interrupt at zero value and end - no others interrupts.
CLOCK_EVT_MODE_UNUSED: What is it?
CLOCK_EVT_MODE_SHUTDOWN: What is it?
CLOCK_EVT_MODE_RESUME: What is it?


I hope I can use only one timer(adding extra timers is not problem).
We have one timer with two timebase (that's one option in IP core).

And there is necessary to fill some value in timer initializing
timer0_clockevent.mult - nanosecond to cycles multiplier ?
timer0_clockevent.shift - nanoseconds to cycles divisor (power of two)?
timer0_clockevent.irq - irq from our intc.
timer0_clockevent.min_delta_ns - minimal timer resolution (I think this value
have to be sensible for system)
timer0_clockevent.max_delta_ns - maximal timer resolution
timer0_clockevent.cpumask = 0 for 1 cpu

I hope others is set by general code.

and change handler function to calling evt->enent_handler;

I found that archs use sys for showing values.

I hope I can see that this systems works via /proc/interrupts and from sysfs.

Am I right?

Thanks,
Michal

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ