* [PATCH 07/13] timer: Remove last user of TIMER_INITIALIZER
From: Kees Cook @ 2017-10-04 23:27 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Kees Cook, Arnd Bergmann, Greg Kroah-Hartman, Mark Gross,
Andrew Morton, Benjamin Herrenschmidt, Chris Metcalf,
Geert Uytterhoeven, Guenter Roeck, Harish Patil, Heiko Carstens,
James E.J. Bottomley, John Stultz, Julian Wiedmann, Kalle Valo,
Lai Jiangshan, Len Brown, Manish Chopra, Martin K. Petersen,
Martin Schwidefsky, Michael Ellerman, Michael Reed, netdev,
Oleg Nesterov, Paul Mackerras, Pavel Machek, Petr Mladek,
Rafael J. Wysocki, Ralf Baechle, Sebastian Reichel,
Stefan Richter, Stephen Boyd, Sudip Mukherjee, Tejun Heo,
Ursula Braun, Viresh Kumar, Wim Van Sebroeck, linux1394-devel,
linux-mips, linux-pm, linuxppc-dev, linux-s390, linux-scsi,
linux-watchdog, linux-wireless, linux-kernel
In-Reply-To: <1507159627-127660-1-git-send-email-keescook@chromium.org>
Drops the last user of TIMER_INITIALIZER and adapts timer.h to use the
internal version.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Gross <mark.gross@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
drivers/char/tlclk.c | 12 +++++-------
include/linux/timer.h | 2 +-
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c
index 6210bff46341..8eeb4190207d 100644
--- a/drivers/char/tlclk.c
+++ b/drivers/char/tlclk.c
@@ -184,9 +184,8 @@ static unsigned int telclk_interrupt;
static int int_events; /* Event that generate a interrupt */
static int got_event; /* if events processing have been done */
-static void switchover_timeout(unsigned long data);
-static struct timer_list switchover_timer =
- TIMER_INITIALIZER(switchover_timeout , 0, 0);
+static void switchover_timeout(struct timer_list *t);
+static struct timer_list switchover_timer;
static unsigned long tlclk_timer_data;
static struct tlclk_alarms *alarm_events;
@@ -805,7 +804,7 @@ static int __init tlclk_init(void)
goto out3;
}
- init_timer(&switchover_timer);
+ timer_setup(&switchover_timer, switchover_timeout, 0);
ret = misc_register(&tlclk_miscdev);
if (ret < 0) {
@@ -855,9 +854,9 @@ static void __exit tlclk_cleanup(void)
}
-static void switchover_timeout(unsigned long data)
+static void switchover_timeout(struct timer_list *unused)
{
- unsigned long flags = *(unsigned long *) data;
+ unsigned long flags = tlclk_timer_data;
if ((flags & 1)) {
if ((inb(TLCLK_REG1) & 0x08) != (flags & 0x08))
@@ -922,7 +921,6 @@ static irqreturn_t tlclk_interrupt(int irq, void *dev_id)
/* TIMEOUT in ~10ms */
switchover_timer.expires = jiffies + msecs_to_jiffies(10);
tlclk_timer_data = inb(TLCLK_REG1);
- switchover_timer.data = (unsigned long) &tlclk_timer_data;
mod_timer(&switchover_timer, switchover_timer.expires);
} else {
got_event = 1;
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 10cc45ca5803..4f7476e4a727 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -87,7 +87,7 @@ struct timer_list {
#define DEFINE_TIMER(_name, _function, _expires, _data) \
struct timer_list _name = \
- TIMER_INITIALIZER(_function, _expires, _data)
+ __TIMER_INITIALIZER(_function, _expires, _data, 0)
void init_timer_key(struct timer_list *timer, unsigned int flags,
const char *name, struct lock_class_key *key);
--
2.7.4
^ permalink raw reply related
* [refpolicy] [PATCH v6] fc_sort: memory leakages
From: Chris PeBenito @ 2017-10-04 23:31 UTC (permalink / raw)
To: refpolicy
In-Reply-To: <1507150941.4555.5.camel@trentalancia.com>
On 10/04/2017 05:02 PM, Guido Trentalancia via refpolicy wrote:
> Avoid memory leakages in the fc_sort executable (now passes
> all valgrind AND Clang static analyzer tests fine).
>
> Some NULL pointer checks with or without associated error
> reporting.
>
> Some white space and comment formatting fixes.
>
> Optimization: avoid unnecessary operations (unnecessary
> memory allocation/deallocation and list copying).
>
> Reverts 7821eb6f37d785ab6ac3bbdc39282c799ad22393 as such
> trick is no longer needed, given that all memory leakages
> have now been fixed.
>
> This is the sixth version of this patch. Please do not use
> the first version as it introduces a serious bug.
>
> For reference, the original issue reported by the Cland
> static analyzer is as follows:
>
> support/fc_sort.c:494:6: warning: Potential leak of memory
> pointed to by 'head'
> malloc(sizeof(file_context_bucket_t));
Thanks, merged.
> Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
> Acked-by: William Roberts <william.c.roberts@intel.com>
> ---
> support/fc_sort.c | 108 ++++++++++++++++++++++++++++++++++--------------------
> 1 file changed, 69 insertions(+), 39 deletions(-)
>
> --- a/support/fc_sort.c 2017-09-30 02:44:18.137342226 +0200
> +++ b/support/fc_sort.c 2017-09-30 21:16:04.899069510 +0200
> @@ -46,6 +46,9 @@ typedef struct file_context_node {
>
> void file_context_node_destroy(file_context_node_t *x)
> {
> + if (!x)
> + return;
> +
> free(x->path);
> free(x->file_type);
> free(x->context);
> @@ -135,8 +138,6 @@ file_context_node_t *fc_merge(file_conte
> file_context_node_t *temp;
> file_context_node_t *jumpto;
>
> -
> -
> /* If a is a empty list, and b is not,
> * set a as b and proceed to the end. */
> if (!a && b)
> @@ -164,7 +165,6 @@ file_context_node_t *fc_merge(file_conte
> fc_compare(a_current->next,
> b_current) != -1) {
>
> -
> temp = a_current->next;
> a_current->next = b_current;
> b_current = b_current->next;
> @@ -177,7 +177,6 @@ file_context_node_t *fc_merge(file_conte
> a_current = jumpto;
> }
>
> -
> /* if there is anything left in b to be inserted,
> put it on the end */
> if (b_current) {
> @@ -209,11 +208,12 @@ file_context_node_t *fc_merge(file_conte
> */
> void fc_merge_sort(file_context_bucket_t *master)
> {
> -
> -
> file_context_bucket_t *current;
> file_context_bucket_t *temp;
>
> + if (!master)
> + return;
> +
> /* Loop until master is the only bucket left
> * so that this will stop when master contains
> * the sorted list. */
> @@ -222,28 +222,20 @@ void fc_merge_sort(file_context_bucket_t
>
> /* This loop merges buckets two-by-two. */
> while (current) {
> -
> if (current->next) {
> -
> current->data =
> fc_merge(current->data,
> current->next->data);
>
> -
> -
> temp = current->next;
> current->next = current->next->next;
>
> free(temp);
> -
> }
>
> -
> current = current->next;
> }
> }
> -
> -
> }
>
>
> @@ -307,6 +299,25 @@ void fc_fill_data(file_context_node_t *f
> }
> }
>
> +
> +
> +/* fc_free_file_context_node_list
> + * Free the memory allocated to the linked list and its elements.
> + */
> +void fc_free_file_context_node_list(struct file_context_node *node)
> +{
> + struct file_context_node *next;
> +
> + while (node) {
> + next = node->next;
> + file_context_node_destroy(node);
> + free(node);
> + node = next;
> + }
> +}
> +
> +
> +
> /* main
> * This program takes in two arguments, the input filename and the
> * output filename. The input file should be syntactically correct.
> @@ -328,7 +339,6 @@ int main(int argc, char *argv[])
>
> FILE *in_file, *out_file;
>
> -
> /* Check for the correct number of command line arguments. */
> if (argc < 2 || argc > 3) {
> fprintf(stderr, "Usage: %s <infile> [<outfile>]\n",argv[0]);
> @@ -348,24 +358,33 @@ int main(int argc, char *argv[])
>
> /* Initialize the head of the linked list. */
> head = current = (file_context_node_t*)malloc(sizeof(file_context_node_t));
> + if (!head) {
> + fprintf(stderr, "Error: failure allocating memory.\n");
> + return 1;
> + }
> head->next = NULL;
> + head->path = NULL;
> + head->file_type = NULL;
> + head->context = NULL;
>
> /* Parse the file into a file_context linked list. */
> line_buf = NULL;
>
> while ( getline(&line_buf, &buf_len, in_file) != -1 ){
> line_len = strlen(line_buf);
> +
> if( line_len == 0 || line_len == 1)
> continue;
> +
> /* Get rid of whitespace from the front of the line. */
> for (i = 0; i < line_len; i++) {
> if (!isspace(line_buf[i]))
> break;
> }
>
> -
> if (i >= line_len)
> continue;
> +
> /* Check if the line isn't empty and isn't a comment */
> if (line_buf[i] == '#')
> continue;
> @@ -373,7 +392,9 @@ int main(int argc, char *argv[])
> /* We have a valid line - allocate a new node. */
> temp = (file_context_node_t *)malloc(sizeof(file_context_node_t));
> if (!temp) {
> + free(line_buf);
> fprintf(stderr, "Error: failure allocating memory.\n");
> + fc_free_file_context_node_list(head);
> return 1;
> }
> temp->next = NULL;
> @@ -382,19 +403,15 @@ int main(int argc, char *argv[])
> /* Parse out the regular expression from the line. */
> start = i;
>
> -
> while (i < line_len && (!isspace(line_buf[i])))
> i++;
> finish = i;
>
> -
> regex_len = finish - start;
>
> if (regex_len == 0) {
> file_context_node_destroy(temp);
> free(temp);
> -
> -
> continue;
> }
>
> @@ -402,13 +419,14 @@ int main(int argc, char *argv[])
> if (!temp->path) {
> file_context_node_destroy(temp);
> free(temp);
> + free(line_buf);
> fprintf(stderr, "Error: failure allocating memory.\n");
> + fc_free_file_context_node_list(head);
> return 1;
> }
>
> /* Get rid of whitespace after the regular expression. */
> for (; i < line_len; i++) {
> -
> if (!isspace(line_buf[i]))
> break;
> }
> @@ -420,18 +438,21 @@ int main(int argc, char *argv[])
> }
>
> /* Parse out the type from the line (if it
> - * is there). */
> + * is there). */
> if (line_buf[i] == '-') {
> temp->file_type = (char *)malloc(sizeof(char) * 3);
> if (!(temp->file_type)) {
> + file_context_node_destroy(temp);
> + free(temp);
> + free(line_buf);
> fprintf(stderr, "Error: failure allocating memory.\n");
> + fc_free_file_context_node_list(head);
> return 1;
> }
>
> if( i + 2 >= line_len ) {
> file_context_node_destroy(temp);
> free(temp);
> -
> continue;
> }
>
> @@ -448,7 +469,6 @@ int main(int argc, char *argv[])
> }
>
> if (i == line_len) {
> -
> file_context_node_destroy(temp);
> free(temp);
> continue;
> @@ -467,24 +487,23 @@ int main(int argc, char *argv[])
> if (!temp->context) {
> file_context_node_destroy(temp);
> free(temp);
> + free(line_buf);
> fprintf(stderr, "Error: failure allocating memory.\n");
> + fc_free_file_context_node_list(head);
> return 1;
> }
>
> /* Set all the data about the regular
> - * expression. */
> + * expression. */
> fc_fill_data(temp);
>
> /* Link this line of code at the end of
> - * the linked list. */
> + * the linked list. */
> current->next = temp;
> current = current->next;
> lines++;
> -
> -
> - free(line_buf);
> - line_buf = NULL;
> }
> + free(line_buf);
> fclose(in_file);
>
> /* Create the bucket linked list from the earlier linked list. */
> @@ -492,6 +511,12 @@ int main(int argc, char *argv[])
> bcurrent = master =
> (file_context_bucket_t *)
> malloc(sizeof(file_context_bucket_t));
> + if (!bcurrent) {
> + printf
> + ("Error: failure allocating memory.\n");
> + fc_free_file_context_node_list(head);
> + return -1;
> + }
> bcurrent->next = NULL;
> bcurrent->data = NULL;
>
> @@ -512,25 +537,33 @@ int main(int argc, char *argv[])
> if (!(bcurrent->next)) {
> printf
> ("Error: failure allocating memory.\n");
> - exit(-1);
> + free(head);
> + fc_free_file_context_node_list(current);
> + fc_merge_sort(master);
> + fc_free_file_context_node_list(master->data);
> + free(master);
> + return -1;
> }
>
> /* Make sure the new bucket thinks it's the end of the
> - * list. */
> + * list. */
> bcurrent->next->next = NULL;
>
> bcurrent = bcurrent->next;
> }
> -
> }
>
> /* Sort the bucket list. */
> fc_merge_sort(master);
>
> + free(head);
> +
> /* Open the output file. */
> if (output_name) {
> if (!(out_file = fopen(output_name, "w"))) {
> printf("Error: failure opening output file for write.\n");
> + fc_free_file_context_node_list(master->data);
> + free(master);
> return -1;
> }
> } else {
> @@ -539,6 +572,7 @@ int main(int argc, char *argv[])
>
> /* Output the sorted file_context linked list to the output file. */
> current = master->data;
> +
> while (current) {
> /* Output the path. */
> fprintf(out_file, "%s\t\t", current->path);
> @@ -551,14 +585,10 @@ int main(int argc, char *argv[])
> /* Output the context. */
> fprintf(out_file, "%s\n", current->context);
>
> - /* Remove the node. */
> - temp = current;
> current = current->next;
> -
> - file_context_node_destroy(temp);
> - free(temp);
> -
> }
> +
> + fc_free_file_context_node_list(master->data);
> free(master);
>
> if (output_name) {
--
Chris PeBenito
^ permalink raw reply
* [kernel-hardening] Re: [PATCH RFC v4 1/3] gcc-plugins: Add STACKLEAK erasing the kernel stack at the end of syscalls
From: Kees Cook @ 2017-10-04 23:31 UTC (permalink / raw)
To: Alexander Popov
Cc: kernel-hardening@lists.openwall.com, PaX Team, Brad Spengler,
Tycho Andersen, Laura Abbott, Mark Rutland, Ard Biesheuvel,
Andy Lutomirski, x86@kernel.org
In-Reply-To: <1507157703-14972-2-git-send-email-alex.popov@linux.com>
On Wed, Oct 4, 2017 at 3:55 PM, Alexander Popov <alex.popov@linux.com> wrote:
> The STACKLEAK feature erases the kernel stack before returning from
> syscalls. That reduces the information which a kernel stack leak bug can
> reveal and blocks some uninitialized stack variable attacks. Moreover,
> STACKLEAK provides runtime checks for kernel stack overflow detection.
>
> This feature consists of:
> - the architecture-specific code filling the used part of the kernel
> stack with a poison value before returning to the userspace;
> - the STACKLEAK gcc plugin. It instruments the kernel code inserting
> the track_stack() call for tracking the lowest border of the kernel
> stack and check_alloca() call for checking alloca size.
>
> The STACKLEAK feature is ported from grsecurity/PaX. More information at:
> https://grsecurity.net/
> https://pax.grsecurity.net/
>
> This code is modified from Brad Spengler/PaX Team's code in the last
> public patch of grsecurity/PaX based on our understanding of the code.
> Changes or omissions from the original code are ours and don't reflect
> the original grsecurity/PaX code.
>
> Signed-off-by: Alexander Popov <alex.popov@linux.com>
Thanks for the continuing work on this!
If I can get some review from Andy or other x86 folks, I'd appreciate
it. If they're happy, I'll add this to the gcc-plugins tree...
-Kees
--
Kees Cook
Pixel Security
^ permalink raw reply
* [PATCH 10/13] timer: Remove expires and data arguments from DEFINE_TIMER
From: Kees Cook @ 2017-10-04 23:27 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Kees Cook, Andrew Morton, Arnd Bergmann, Benjamin Herrenschmidt,
Chris Metcalf, Geert Uytterhoeven, Greg Kroah-Hartman,
Guenter Roeck, Harish Patil, Heiko Carstens, James E.J. Bottomley,
John Stultz, Julian Wiedmann, Kalle Valo, Lai Jiangshan,
Len Brown, Manish Chopra, Mark Gross, Martin K. Petersen,
Martin Schwidefsky, Michael Ellerman, Michael Reed, netdev,
Oleg Nesterov, Paul Mackerras, Pavel Machek, Petr Mladek,
Rafael J. Wysocki, Ralf Baechle, Sebastian Reichel,
Stefan Richter, Stephen Boyd, Sudip Mukherjee, Tejun Heo,
Ursula Braun, Viresh Kumar, Wim Van Sebroeck, linux1394-devel,
linux-mips, linux-pm, linuxppc-dev, linux-s390, linux-scsi,
linux-watchdog, linux-wireless, linux-kernel
In-Reply-To: <1507159627-127660-1-git-send-email-keescook@chromium.org>
Drop the arguments from the macro and adjust all callers with the
following script:
perl -pi -e 's/DEFINE_TIMER\((.*), 0, 0\);/DEFINE_TIMER($1);/g;' \
$(git grep DEFINE_TIMER | cut -d: -f1 | sort -u | grep -v timer.h)
Signed-off-by: Kees Cook <keescook@chromium.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # for m68k parts
---
arch/arm/mach-ixp4xx/dsmg600-setup.c | 2 +-
arch/arm/mach-ixp4xx/nas100d-setup.c | 2 +-
arch/m68k/amiga/amisound.c | 2 +-
arch/m68k/mac/macboing.c | 2 +-
arch/mips/mti-malta/malta-display.c | 2 +-
arch/parisc/kernel/pdc_cons.c | 2 +-
arch/s390/mm/cmm.c | 2 +-
drivers/atm/idt77105.c | 4 ++--
drivers/atm/iphase.c | 2 +-
drivers/block/ataflop.c | 8 ++++----
drivers/char/dtlk.c | 2 +-
drivers/char/hangcheck-timer.c | 2 +-
drivers/char/nwbutton.c | 2 +-
drivers/char/rtc.c | 2 +-
drivers/input/touchscreen/s3c2410_ts.c | 2 +-
drivers/net/cris/eth_v10.c | 6 +++---
drivers/net/hamradio/yam.c | 2 +-
drivers/net/wireless/atmel/at76c50x-usb.c | 2 +-
drivers/staging/speakup/main.c | 2 +-
drivers/staging/speakup/synth.c | 2 +-
drivers/tty/cyclades.c | 2 +-
drivers/tty/isicom.c | 2 +-
drivers/tty/moxa.c | 2 +-
drivers/tty/rocket.c | 2 +-
drivers/tty/vt/keyboard.c | 2 +-
drivers/tty/vt/vt.c | 2 +-
drivers/watchdog/alim7101_wdt.c | 2 +-
drivers/watchdog/machzwd.c | 2 +-
drivers/watchdog/mixcomwd.c | 2 +-
drivers/watchdog/sbc60xxwdt.c | 2 +-
drivers/watchdog/sc520_wdt.c | 2 +-
drivers/watchdog/via_wdt.c | 2 +-
drivers/watchdog/w83877f_wdt.c | 2 +-
drivers/xen/grant-table.c | 2 +-
fs/pstore/platform.c | 2 +-
include/linux/timer.h | 4 ++--
kernel/irq/spurious.c | 2 +-
lib/random32.c | 2 +-
net/atm/mpc.c | 2 +-
net/decnet/dn_route.c | 2 +-
net/ipv6/ip6_flowlabel.c | 2 +-
net/netrom/nr_loopback.c | 2 +-
security/keys/gc.c | 2 +-
sound/oss/midibuf.c | 2 +-
sound/oss/soundcard.c | 2 +-
sound/oss/sys_timer.c | 2 +-
sound/oss/uart6850.c | 2 +-
47 files changed, 54 insertions(+), 54 deletions(-)
diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
index b3bd0e137f6d..b3689a141ec6 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -174,7 +174,7 @@ static int power_button_countdown;
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
static void dsmg600_power_handler(unsigned long data);
-static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler, 0, 0);
+static DEFINE_TIMER(dsmg600_power_timer, dsmg600_power_handler);
static void dsmg600_power_handler(unsigned long data)
{
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index 4e0f762bc651..562d05f9888e 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -197,7 +197,7 @@ static int power_button_countdown;
#define PBUTTON_HOLDDOWN_COUNT 4 /* 2 secs */
static void nas100d_power_handler(unsigned long data);
-static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler, 0, 0);
+static DEFINE_TIMER(nas100d_power_timer, nas100d_power_handler);
static void nas100d_power_handler(unsigned long data)
{
diff --git a/arch/m68k/amiga/amisound.c b/arch/m68k/amiga/amisound.c
index 90a60d758f8b..a23f48181fd6 100644
--- a/arch/m68k/amiga/amisound.c
+++ b/arch/m68k/amiga/amisound.c
@@ -66,7 +66,7 @@ void __init amiga_init_sound(void)
}
static void nosound( unsigned long ignored );
-static DEFINE_TIMER(sound_timer, nosound, 0, 0);
+static DEFINE_TIMER(sound_timer, nosound);
void amiga_mksound( unsigned int hz, unsigned int ticks )
{
diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c
index ffaa1f6439ae..9a52aff183d0 100644
--- a/arch/m68k/mac/macboing.c
+++ b/arch/m68k/mac/macboing.c
@@ -56,7 +56,7 @@ static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int );
/*
* our timer to start/continue/stop the bell
*/
-static DEFINE_TIMER(mac_sound_timer, mac_nosound, 0, 0);
+static DEFINE_TIMER(mac_sound_timer, mac_nosound);
/*
* Sort of initialize the sound chip (called from mac_mksound on the first
diff --git a/arch/mips/mti-malta/malta-display.c b/arch/mips/mti-malta/malta-display.c
index ac813158b9b8..063de44675ce 100644
--- a/arch/mips/mti-malta/malta-display.c
+++ b/arch/mips/mti-malta/malta-display.c
@@ -37,7 +37,7 @@ void mips_display_message(const char *str)
}
static void scroll_display_message(unsigned long unused);
-static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, 0, 0);
+static DEFINE_TIMER(mips_scroll_timer, scroll_display_message);
static void scroll_display_message(unsigned long unused)
{
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index 10a5ae9553fd..27a2dd616a7d 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -92,7 +92,7 @@ static int pdc_console_setup(struct console *co, char *options)
#define PDC_CONS_POLL_DELAY (30 * HZ / 1000)
static void pdc_console_poll(unsigned long unused);
-static DEFINE_TIMER(pdc_console_timer, pdc_console_poll, 0, 0);
+static DEFINE_TIMER(pdc_console_timer, pdc_console_poll);
static struct tty_port tty_port;
static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp)
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index 829c63dbc81a..2dbdcd85b68f 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -56,7 +56,7 @@ static DEFINE_SPINLOCK(cmm_lock);
static struct task_struct *cmm_thread_ptr;
static DECLARE_WAIT_QUEUE_HEAD(cmm_thread_wait);
-static DEFINE_TIMER(cmm_timer, NULL, 0, 0);
+static DEFINE_TIMER(cmm_timer, NULL);
static void cmm_timer_fn(unsigned long);
static void cmm_set_timer(void);
diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c
index 082aa02abc57..57af9fd198e4 100644
--- a/drivers/atm/idt77105.c
+++ b/drivers/atm/idt77105.c
@@ -49,8 +49,8 @@ static void idt77105_stats_timer_func(unsigned long);
static void idt77105_restart_timer_func(unsigned long);
-static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func, 0, 0);
-static DEFINE_TIMER(restart_timer, idt77105_restart_timer_func, 0, 0);
+static DEFINE_TIMER(stats_timer, idt77105_stats_timer_func);
+static DEFINE_TIMER(restart_timer, idt77105_restart_timer_func);
static int start_timer = 1;
static struct idt77105_priv *idt77105_all = NULL;
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index fc72b763fdd7..ad6b582c268e 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -76,7 +76,7 @@ static IADEV *ia_dev[8];
static struct atm_dev *_ia_dev[8];
static int iadev_count;
static void ia_led_timer(unsigned long arg);
-static DEFINE_TIMER(ia_timer, ia_led_timer, 0, 0);
+static DEFINE_TIMER(ia_timer, ia_led_timer);
static int IA_TX_BUF = DFL_TX_BUFFERS, IA_TX_BUF_SZ = DFL_TX_BUF_SZ;
static int IA_RX_BUF = DFL_RX_BUFFERS, IA_RX_BUF_SZ = DFL_RX_BUF_SZ;
static uint IADebugFlag = /* IF_IADBG_ERR | IF_IADBG_CBR| IF_IADBG_INIT_ADAPTER
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index 92da886180aa..ae596e55bcb6 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -373,10 +373,10 @@ static void floppy_release(struct gendisk *disk, fmode_t mode);
/************************* End of Prototypes **************************/
-static DEFINE_TIMER(motor_off_timer, fd_motor_off_timer, 0, 0);
-static DEFINE_TIMER(readtrack_timer, fd_readtrack_check, 0, 0);
-static DEFINE_TIMER(timeout_timer, fd_times_out, 0, 0);
-static DEFINE_TIMER(fd_timer, check_change, 0, 0);
+static DEFINE_TIMER(motor_off_timer, fd_motor_off_timer);
+static DEFINE_TIMER(readtrack_timer, fd_readtrack_check);
+static DEFINE_TIMER(timeout_timer, fd_times_out);
+static DEFINE_TIMER(fd_timer, check_change);
static void fd_end_request_cur(blk_status_t err)
{
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c
index 58471394beb9..1a0385ed6417 100644
--- a/drivers/char/dtlk.c
+++ b/drivers/char/dtlk.c
@@ -84,7 +84,7 @@ static int dtlk_has_indexing;
static unsigned int dtlk_portlist[] =
{0x25e, 0x29e, 0x2de, 0x31e, 0x35e, 0x39e, 0};
static wait_queue_head_t dtlk_process_list;
-static DEFINE_TIMER(dtlk_timer, dtlk_timer_tick, 0, 0);
+static DEFINE_TIMER(dtlk_timer, dtlk_timer_tick);
/* prototypes for file_operations struct */
static ssize_t dtlk_read(struct file *, char __user *,
diff --git a/drivers/char/hangcheck-timer.c b/drivers/char/hangcheck-timer.c
index 5406b90bf626..5b8db2ed844d 100644
--- a/drivers/char/hangcheck-timer.c
+++ b/drivers/char/hangcheck-timer.c
@@ -124,7 +124,7 @@ static unsigned long long hangcheck_tsc, hangcheck_tsc_margin;
static void hangcheck_fire(unsigned long);
-static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire, 0, 0);
+static DEFINE_TIMER(hangcheck_ticktock, hangcheck_fire);
static void hangcheck_fire(unsigned long data)
{
diff --git a/drivers/char/nwbutton.c b/drivers/char/nwbutton.c
index e6d0d271c58c..44006ed9558f 100644
--- a/drivers/char/nwbutton.c
+++ b/drivers/char/nwbutton.c
@@ -27,7 +27,7 @@ static void button_sequence_finished (unsigned long parameters);
static int button_press_count; /* The count of button presses */
/* Times for the end of a sequence */
-static DEFINE_TIMER(button_timer, button_sequence_finished, 0, 0);
+static DEFINE_TIMER(button_timer, button_sequence_finished);
static DECLARE_WAIT_QUEUE_HEAD(button_wait_queue); /* Used for blocking read */
static char button_output_buffer[32]; /* Stores data to write out of device */
static int bcount; /* The number of bytes in the buffer */
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index 974d48927b07..616871e68e09 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -137,7 +137,7 @@ static DECLARE_WAIT_QUEUE_HEAD(rtc_wait);
#ifdef RTC_IRQ
static void rtc_dropped_irq(unsigned long data);
-static DEFINE_TIMER(rtc_irq_timer, rtc_dropped_irq, 0, 0);
+static DEFINE_TIMER(rtc_irq_timer, rtc_dropped_irq);
#endif
static ssize_t rtc_read(struct file *file, char __user *buf,
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c
index 3b3db8c868e0..d3265b6b58b8 100644
--- a/drivers/input/touchscreen/s3c2410_ts.c
+++ b/drivers/input/touchscreen/s3c2410_ts.c
@@ -145,7 +145,7 @@ static void touch_timer_fire(unsigned long data)
}
}
-static DEFINE_TIMER(touch_timer, touch_timer_fire, 0, 0);
+static DEFINE_TIMER(touch_timer, touch_timer_fire);
/**
* stylus_irq - touchscreen stylus event interrupt
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
index 017f48cdcab9..1fcc86fa4e05 100644
--- a/drivers/net/cris/eth_v10.c
+++ b/drivers/net/cris/eth_v10.c
@@ -165,8 +165,8 @@ static unsigned int network_rec_config_shadow = 0;
static unsigned int network_tr_ctrl_shadow = 0;
/* Network speed indication. */
-static DEFINE_TIMER(speed_timer, NULL, 0, 0);
-static DEFINE_TIMER(clear_led_timer, NULL, 0, 0);
+static DEFINE_TIMER(speed_timer, NULL);
+static DEFINE_TIMER(clear_led_timer, NULL);
static int current_speed; /* Speed read from transceiver */
static int current_speed_selection; /* Speed selected by user */
static unsigned long led_next_time;
@@ -174,7 +174,7 @@ static int led_active;
static int rx_queue_len;
/* Duplex */
-static DEFINE_TIMER(duplex_timer, NULL, 0, 0);
+static DEFINE_TIMER(duplex_timer, NULL);
static int full_duplex;
static enum duplex current_duplex;
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index 7a7c5224a336..104f71fa9c5e 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -157,7 +157,7 @@ static struct net_device *yam_devs[NR_PORTS];
static struct yam_mcs *yam_data;
-static DEFINE_TIMER(yam_timer, NULL, 0, 0);
+static DEFINE_TIMER(yam_timer, NULL);
/* --------------------------------------------------------------------- */
diff --git a/drivers/net/wireless/atmel/at76c50x-usb.c b/drivers/net/wireless/atmel/at76c50x-usb.c
index 94bf01f8b2a8..ede89d4ffc88 100644
--- a/drivers/net/wireless/atmel/at76c50x-usb.c
+++ b/drivers/net/wireless/atmel/at76c50x-usb.c
@@ -519,7 +519,7 @@ static int at76_usbdfu_download(struct usb_device *udev, u8 *buf, u32 size,
/* LED trigger */
static int tx_activity;
static void at76_ledtrig_tx_timerfunc(unsigned long data);
-static DEFINE_TIMER(ledtrig_tx_timer, at76_ledtrig_tx_timerfunc, 0, 0);
+static DEFINE_TIMER(ledtrig_tx_timer, at76_ledtrig_tx_timerfunc);
DEFINE_LED_TRIGGER(ledtrig_tx);
static void at76_ledtrig_tx_timerfunc(unsigned long data)
diff --git a/drivers/staging/speakup/main.c b/drivers/staging/speakup/main.c
index 67956e24779c..b61e9becb612 100644
--- a/drivers/staging/speakup/main.c
+++ b/drivers/staging/speakup/main.c
@@ -1165,7 +1165,7 @@ static const int NUM_CTL_LABELS = (MSG_CTL_END - MSG_CTL_START + 1);
static void read_all_doc(struct vc_data *vc);
static void cursor_done(u_long data);
-static DEFINE_TIMER(cursor_timer, cursor_done, 0, 0);
+static DEFINE_TIMER(cursor_timer, cursor_done);
static void do_handle_shift(struct vc_data *vc, u_char value, char up_flag)
{
diff --git a/drivers/staging/speakup/synth.c b/drivers/staging/speakup/synth.c
index a1ca68c76579..6ddd3fc3f08d 100644
--- a/drivers/staging/speakup/synth.c
+++ b/drivers/staging/speakup/synth.c
@@ -158,7 +158,7 @@ static void thread_wake_up(u_long data)
wake_up_interruptible_all(&speakup_event);
}
-static DEFINE_TIMER(thread_timer, thread_wake_up, 0, 0);
+static DEFINE_TIMER(thread_timer, thread_wake_up);
void synth_start(void)
{
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index d272bc4e7fb5..dac8a1a8e4ac 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -283,7 +283,7 @@ static void cyz_poll(unsigned long);
/* The Cyclades-Z polling cycle is defined by this variable */
static long cyz_polling_cycle = CZ_DEF_POLL;
-static DEFINE_TIMER(cyz_timerlist, cyz_poll, 0, 0);
+static DEFINE_TIMER(cyz_timerlist, cyz_poll);
#else /* CONFIG_CYZ_INTR */
static void cyz_rx_restart(unsigned long);
diff --git a/drivers/tty/isicom.c b/drivers/tty/isicom.c
index 61ecdd6b2fc2..40af32108ff5 100644
--- a/drivers/tty/isicom.c
+++ b/drivers/tty/isicom.c
@@ -177,7 +177,7 @@ static struct tty_driver *isicom_normal;
static void isicom_tx(unsigned long _data);
static void isicom_start(struct tty_struct *tty);
-static DEFINE_TIMER(tx, isicom_tx, 0, 0);
+static DEFINE_TIMER(tx, isicom_tx);
/* baud index mappings from linux defns to isi */
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c
index 7f3d4cb0341b..93d37655d928 100644
--- a/drivers/tty/moxa.c
+++ b/drivers/tty/moxa.c
@@ -428,7 +428,7 @@ static const struct tty_port_operations moxa_port_ops = {
};
static struct tty_driver *moxaDriver;
-static DEFINE_TIMER(moxaTimer, moxa_poll, 0, 0);
+static DEFINE_TIMER(moxaTimer, moxa_poll);
/*
* HW init
diff --git a/drivers/tty/rocket.c b/drivers/tty/rocket.c
index 20d79a6007d5..aa695fda1084 100644
--- a/drivers/tty/rocket.c
+++ b/drivers/tty/rocket.c
@@ -111,7 +111,7 @@ static struct r_port *rp_table[MAX_RP_PORTS]; /* The main repository of
static unsigned int xmit_flags[NUM_BOARDS]; /* Bit significant, indicates port had data to transmit. */
/* eg. Bit 0 indicates port 0 has xmit data, ... */
static atomic_t rp_num_ports_open; /* Number of serial ports open */
-static DEFINE_TIMER(rocket_timer, rp_do_poll, 0, 0);
+static DEFINE_TIMER(rocket_timer, rp_do_poll);
static unsigned long board1; /* ISA addresses, retrieved from rocketport.conf */
static unsigned long board2;
diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
index f4166263bb3a..f974d6340d04 100644
--- a/drivers/tty/vt/keyboard.c
+++ b/drivers/tty/vt/keyboard.c
@@ -250,7 +250,7 @@ static void kd_nosound(unsigned long ignored)
input_handler_for_each_handle(&kbd_handler, &zero, kd_sound_helper);
}
-static DEFINE_TIMER(kd_mksound_timer, kd_nosound, 0, 0);
+static DEFINE_TIMER(kd_mksound_timer, kd_nosound);
void kd_mksound(unsigned int hz, unsigned int ticks)
{
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 2ebaba16f785..602d71630952 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -228,7 +228,7 @@ static int scrollback_delta;
*/
int (*console_blank_hook)(int);
-static DEFINE_TIMER(console_timer, blank_screen_t, 0, 0);
+static DEFINE_TIMER(console_timer, blank_screen_t);
static int blank_state;
static int blank_timer_expired;
enum {
diff --git a/drivers/watchdog/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c
index 3c1f6ac68ea9..18e896eeca62 100644
--- a/drivers/watchdog/alim7101_wdt.c
+++ b/drivers/watchdog/alim7101_wdt.c
@@ -71,7 +71,7 @@ MODULE_PARM_DESC(use_gpio,
"Use the gpio watchdog (required by old cobalt boards).");
static void wdt_timer_ping(unsigned long);
-static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
+static DEFINE_TIMER(timer, wdt_timer_ping);
static unsigned long next_heartbeat;
static unsigned long wdt_is_open;
static char wdt_expect_close;
diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c
index 9826b59ef734..8a616a57bb90 100644
--- a/drivers/watchdog/machzwd.c
+++ b/drivers/watchdog/machzwd.c
@@ -127,7 +127,7 @@ static int zf_action = GEN_RESET;
static unsigned long zf_is_open;
static char zf_expect_close;
static DEFINE_SPINLOCK(zf_port_lock);
-static DEFINE_TIMER(zf_timer, zf_ping, 0, 0);
+static DEFINE_TIMER(zf_timer, zf_ping);
static unsigned long next_heartbeat;
diff --git a/drivers/watchdog/mixcomwd.c b/drivers/watchdog/mixcomwd.c
index be86ea359eee..c9e38096ea91 100644
--- a/drivers/watchdog/mixcomwd.c
+++ b/drivers/watchdog/mixcomwd.c
@@ -105,7 +105,7 @@ static unsigned long mixcomwd_opened; /* long req'd for setbit --RR */
static int watchdog_port;
static int mixcomwd_timer_alive;
-static DEFINE_TIMER(mixcomwd_timer, mixcomwd_timerfun, 0, 0);
+static DEFINE_TIMER(mixcomwd_timer, mixcomwd_timerfun);
static char expect_close;
static bool nowayout = WATCHDOG_NOWAYOUT;
diff --git a/drivers/watchdog/sbc60xxwdt.c b/drivers/watchdog/sbc60xxwdt.c
index 2eef58a0cf05..8d589939bc84 100644
--- a/drivers/watchdog/sbc60xxwdt.c
+++ b/drivers/watchdog/sbc60xxwdt.c
@@ -113,7 +113,7 @@ MODULE_PARM_DESC(nowayout,
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
static void wdt_timer_ping(unsigned long);
-static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
+static DEFINE_TIMER(timer, wdt_timer_ping);
static unsigned long next_heartbeat;
static unsigned long wdt_is_open;
static char wdt_expect_close;
diff --git a/drivers/watchdog/sc520_wdt.c b/drivers/watchdog/sc520_wdt.c
index 1cfd3f6a13d5..3e9bbaa37bf4 100644
--- a/drivers/watchdog/sc520_wdt.c
+++ b/drivers/watchdog/sc520_wdt.c
@@ -124,7 +124,7 @@ MODULE_PARM_DESC(nowayout,
static __u16 __iomem *wdtmrctl;
static void wdt_timer_ping(unsigned long);
-static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
+static DEFINE_TIMER(timer, wdt_timer_ping);
static unsigned long next_heartbeat;
static unsigned long wdt_is_open;
static char wdt_expect_close;
diff --git a/drivers/watchdog/via_wdt.c b/drivers/watchdog/via_wdt.c
index 5f9cbc37520d..ad3c3be13b40 100644
--- a/drivers/watchdog/via_wdt.c
+++ b/drivers/watchdog/via_wdt.c
@@ -68,7 +68,7 @@ static struct resource wdt_res;
static void __iomem *wdt_mem;
static unsigned int mmio;
static void wdt_timer_tick(unsigned long data);
-static DEFINE_TIMER(timer, wdt_timer_tick, 0, 0);
+static DEFINE_TIMER(timer, wdt_timer_tick);
/* The timer that pings the watchdog */
static unsigned long next_heartbeat; /* the next_heartbeat for the timer */
diff --git a/drivers/watchdog/w83877f_wdt.c b/drivers/watchdog/w83877f_wdt.c
index f0483c75ed32..ba6b680af100 100644
--- a/drivers/watchdog/w83877f_wdt.c
+++ b/drivers/watchdog/w83877f_wdt.c
@@ -98,7 +98,7 @@ MODULE_PARM_DESC(nowayout,
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
static void wdt_timer_ping(unsigned long);
-static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
+static DEFINE_TIMER(timer, wdt_timer_ping);
static unsigned long next_heartbeat;
static unsigned long wdt_is_open;
static char wdt_expect_close;
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index 2c6a9114d332..a8721d718186 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -305,7 +305,7 @@ struct deferred_entry {
};
static LIST_HEAD(deferred_list);
static void gnttab_handle_deferred(unsigned long);
-static DEFINE_TIMER(deferred_timer, gnttab_handle_deferred, 0, 0);
+static DEFINE_TIMER(deferred_timer, gnttab_handle_deferred);
static void gnttab_handle_deferred(unsigned long unused)
{
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 2b21d180157c..ec7199e859d2 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -62,7 +62,7 @@ MODULE_PARM_DESC(update_ms, "milliseconds before pstore updates its content "
static int pstore_new_entry;
static void pstore_timefunc(unsigned long);
-static DEFINE_TIMER(pstore_timer, pstore_timefunc, 0, 0);
+static DEFINE_TIMER(pstore_timer, pstore_timefunc);
static void pstore_dowork(struct work_struct *);
static DECLARE_WORK(pstore_work, pstore_dowork);
diff --git a/include/linux/timer.h b/include/linux/timer.h
index a33220311361..91e5a2cc81b5 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -73,9 +73,9 @@ struct timer_list {
__FILE__ ":" __stringify(__LINE__)) \
}
-#define DEFINE_TIMER(_name, _function, _expires, _data) \
+#define DEFINE_TIMER(_name, _function) \
struct timer_list _name = \
- __TIMER_INITIALIZER(_function, _expires, _data, 0)
+ __TIMER_INITIALIZER(_function, 0, 0, 0)
void init_timer_key(struct timer_list *timer, unsigned int flags,
const char *name, struct lock_class_key *key);
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index 061ba7eed4ed..c805e8691c22 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -20,7 +20,7 @@ static int irqfixup __read_mostly;
#define POLL_SPURIOUS_IRQ_INTERVAL (HZ/10)
static void poll_spurious_irqs(unsigned long dummy);
-static DEFINE_TIMER(poll_spurious_irq_timer, poll_spurious_irqs, 0, 0);
+static DEFINE_TIMER(poll_spurious_irq_timer, poll_spurious_irqs);
static int irq_poll_cpu;
static atomic_t irq_poll_active;
diff --git a/lib/random32.c b/lib/random32.c
index fa594b1140e6..6e91b75c113f 100644
--- a/lib/random32.c
+++ b/lib/random32.c
@@ -214,7 +214,7 @@ core_initcall(prandom_init);
static void __prandom_timer(unsigned long dontcare);
-static DEFINE_TIMER(seed_timer, __prandom_timer, 0, 0);
+static DEFINE_TIMER(seed_timer, __prandom_timer);
static void __prandom_timer(unsigned long dontcare)
{
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 5677147209e8..63138c8c2269 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -121,7 +121,7 @@ static struct notifier_block mpoa_notifier = {
struct mpoa_client *mpcs = NULL; /* FIXME */
static struct atm_mpoa_qos *qos_head = NULL;
-static DEFINE_TIMER(mpc_timer, NULL, 0, 0);
+static DEFINE_TIMER(mpc_timer, NULL);
static struct mpoa_client *find_mpc_by_itfnum(int itf)
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 0bd3afd01dd2..6538632fbd03 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -131,7 +131,7 @@ static struct dn_rt_hash_bucket *dn_rt_hash_table;
static unsigned int dn_rt_hash_mask;
static struct timer_list dn_route_timer;
-static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush, 0, 0);
+static DEFINE_TIMER(dn_rt_flush_timer, dn_run_flush);
int decnet_dst_gc_interval = 2;
static struct dst_ops dn_dst_ops = {
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index 8081bafe441b..b39d0908be2e 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -47,7 +47,7 @@ static atomic_t fl_size = ATOMIC_INIT(0);
static struct ip6_flowlabel __rcu *fl_ht[FL_HASH_MASK+1];
static void ip6_fl_gc(unsigned long dummy);
-static DEFINE_TIMER(ip6_fl_gc_timer, ip6_fl_gc, 0, 0);
+static DEFINE_TIMER(ip6_fl_gc_timer, ip6_fl_gc);
/* FL hash table lock: it protects only of GC */
diff --git a/net/netrom/nr_loopback.c b/net/netrom/nr_loopback.c
index 94d4e922af53..989ae647825e 100644
--- a/net/netrom/nr_loopback.c
+++ b/net/netrom/nr_loopback.c
@@ -18,7 +18,7 @@
static void nr_loopback_timer(unsigned long);
static struct sk_buff_head loopback_queue;
-static DEFINE_TIMER(loopback_timer, nr_loopback_timer, 0, 0);
+static DEFINE_TIMER(loopback_timer, nr_loopback_timer);
void __init nr_loopback_init(void)
{
diff --git a/security/keys/gc.c b/security/keys/gc.c
index 87cb260e4890..8673f7f58ead 100644
--- a/security/keys/gc.c
+++ b/security/keys/gc.c
@@ -30,7 +30,7 @@ DECLARE_WORK(key_gc_work, key_garbage_collector);
* Reaper for links from keyrings to dead keys.
*/
static void key_gc_timer_func(unsigned long);
-static DEFINE_TIMER(key_gc_timer, key_gc_timer_func, 0, 0);
+static DEFINE_TIMER(key_gc_timer, key_gc_timer_func);
static time_t key_gc_next_run = LONG_MAX;
static struct key_type *key_gc_dead_keytype;
diff --git a/sound/oss/midibuf.c b/sound/oss/midibuf.c
index 701c7625c971..1277df815d5b 100644
--- a/sound/oss/midibuf.c
+++ b/sound/oss/midibuf.c
@@ -52,7 +52,7 @@ static struct midi_parms parms[MAX_MIDI_DEV];
static void midi_poll(unsigned long dummy);
-static DEFINE_TIMER(poll_timer, midi_poll, 0, 0);
+static DEFINE_TIMER(poll_timer, midi_poll);
static volatile int open_devs;
static DEFINE_SPINLOCK(lock);
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index b70c7c8f9c5d..4391062e5cfd 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -662,7 +662,7 @@ static void do_sequencer_timer(unsigned long dummy)
}
-static DEFINE_TIMER(seq_timer, do_sequencer_timer, 0, 0);
+static DEFINE_TIMER(seq_timer, do_sequencer_timer);
void request_sound_timer(int count)
{
diff --git a/sound/oss/sys_timer.c b/sound/oss/sys_timer.c
index d17019d25b99..8a4b5625dba6 100644
--- a/sound/oss/sys_timer.c
+++ b/sound/oss/sys_timer.c
@@ -28,7 +28,7 @@ static unsigned long prev_event_time;
static void poll_def_tmr(unsigned long dummy);
static DEFINE_SPINLOCK(lock);
-static DEFINE_TIMER(def_tmr, poll_def_tmr, 0, 0);
+static DEFINE_TIMER(def_tmr, poll_def_tmr);
static unsigned long
tmr2ticks(int tmr_value)
diff --git a/sound/oss/uart6850.c b/sound/oss/uart6850.c
index eda32d7eddbd..a9d3f7568525 100644
--- a/sound/oss/uart6850.c
+++ b/sound/oss/uart6850.c
@@ -78,7 +78,7 @@ static void (*midi_input_intr) (int dev, unsigned char data);
static void poll_uart6850(unsigned long dummy);
-static DEFINE_TIMER(uart6850_timer, poll_uart6850, 0, 0);
+static DEFINE_TIMER(uart6850_timer, poll_uart6850);
static void uart6850_input_loop(void)
{
--
2.7.4
^ permalink raw reply related
* [PATCH v2 2/9] ARM: dts: aspeed: Reorder ADC node
From: Andrew Jeffery @ 2017-10-04 23:31 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20171004064917.2498-3-joel@jms.id.au>
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> We try to keep the nodes in address order. The ADC node was out of
> place.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>
> ---
> v2:
> - Don't introduce new clk bindings
> ---
> arch/arm/boot/dts/aspeed-g4.dtsi | 16 ++++++++--------
> arch/arm/boot/dts/aspeed-g5.dtsi | 16 ++++++++--------
> 2 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
> index 1edd0cee6221..c2d96b8a5065 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -129,6 +129,14 @@
> };
> };
>
> + adc: adc at 1e6e9000 {
> + compatible = "aspeed,ast2400-adc";
> + reg = <0x1e6e9000 0xb0>;
> + clocks = <&clk_apb>;
> + #io-channel-cells = <1>;
> + status = "disabled";
> + };
> +
> sram at 1e720000 {
> compatible = "mmio-sram";
> reg = <0x1e720000 0x8000>; // 32K
> @@ -227,14 +235,6 @@
> no-loopback-test;
> status = "disabled";
> };
> -
> - adc: adc at 1e6e9000 {
> - compatible = "aspeed,ast2400-adc";
> - reg = <0x1e6e9000 0xb0>;
> - clocks = <&clk_apb>;
> - #io-channel-cells = <1>;
> - status = "disabled";
> - };
> };
> };
> };
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> index f56dd67efa50..9e71c2dac0ba 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -173,6 +173,14 @@
> reg-io-width = <4>;
> };
>
> + adc: adc at 1e6e9000 {
> + compatible = "aspeed,ast2500-adc";
> + reg = <0x1e6e9000 0xb0>;
> + clocks = <&clk_apb>;
> + #io-channel-cells = <1>;
> + status = "disabled";
> + };
> +
> sram at 1e720000 {
> compatible = "mmio-sram";
> reg = <0x1e720000 0x9000>; // 36K
> @@ -307,14 +315,6 @@
> no-loopback-test;
> status = "disabled";
> };
> -
> - adc: adc at 1e6e9000 {
> - compatible = "aspeed,ast2500-adc";
> - reg = <0x1e6e9000 0xb0>;
> - clocks = <&clk_apb>;
> - #io-channel-cells = <1>;
> - status = "disabled";
> - };
> };
> };
> };
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20171005/39023557/attachment.sig>
^ permalink raw reply
* [PATCH v2 2/9] ARM: dts: aspeed: Reorder ADC node
From: Andrew Jeffery @ 2017-10-04 23:31 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171004064917.2498-3-joel@jms.id.au>
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> We try to keep the nodes in address order. The ADC node was out of
> place.
>?
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>?
> ---
> v2:
> ?- Don't introduce new clk bindings
> ---
> ?arch/arm/boot/dts/aspeed-g4.dtsi | 16 ++++++++--------
> ?arch/arm/boot/dts/aspeed-g5.dtsi | 16 ++++++++--------
> ?2 files changed, 16 insertions(+), 16 deletions(-)
>?
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
> index 1edd0cee6221..c2d96b8a5065 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -129,6 +129,14 @@
> ? };
> ? };
> ?
> + adc: adc at 1e6e9000 {
> + compatible = "aspeed,ast2400-adc";
> + reg = <0x1e6e9000 0xb0>;
> + clocks = <&clk_apb>;
> + #io-channel-cells = <1>;
> + status = "disabled";
> + };
> +
> ? sram at 1e720000 {
> ? compatible = "mmio-sram";
> ? reg = <0x1e720000 0x8000>; // 32K
> @@ -227,14 +235,6 @@
> ? no-loopback-test;
> ? status = "disabled";
> ? };
> -
> - adc: adc at 1e6e9000 {
> - compatible = "aspeed,ast2400-adc";
> - reg = <0x1e6e9000 0xb0>;
> - clocks = <&clk_apb>;
> - #io-channel-cells = <1>;
> - status = "disabled";
> - };
> ? };
> ? };
> ?};
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> index f56dd67efa50..9e71c2dac0ba 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -173,6 +173,14 @@
> ? reg-io-width = <4>;
> ? };
> ?
> + adc: adc at 1e6e9000 {
> + compatible = "aspeed,ast2500-adc";
> + reg = <0x1e6e9000 0xb0>;
> + clocks = <&clk_apb>;
> + #io-channel-cells = <1>;
> + status = "disabled";
> + };
> +
> ? sram at 1e720000 {
> ? compatible = "mmio-sram";
> ? reg = <0x1e720000 0x9000>; // 36K
> @@ -307,14 +315,6 @@
> ? no-loopback-test;
> ? status = "disabled";
> ? };
> -
> - adc: adc at 1e6e9000 {
> - compatible = "aspeed,ast2500-adc";
> - reg = <0x1e6e9000 0xb0>;
> - clocks = <&clk_apb>;
> - #io-channel-cells = <1>;
> - status = "disabled";
> - };
> ? };
> ? };
> ?};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171005/39023557/attachment.sig>
^ permalink raw reply
* Re: [PATCH v2 2/9] ARM: dts: aspeed: Reorder ADC node
From: Andrew Jeffery @ 2017-10-04 23:31 UTC (permalink / raw)
To: Joel Stanley, Rob Herring, Mark Rutland
Cc: Russell King, devicetree, linux-arm-kernel, linux-kernel,
Rick Altherr, Brendan Higgins, Cédric Le Goater,
linux-aspeed
In-Reply-To: <20171004064917.2498-3-joel@jms.id.au>
[-- Attachment #1: Type: text/plain, Size: 2308 bytes --]
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> We try to keep the nodes in address order. The ADC node was out of
> place.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>
> ---
> v2:
> - Don't introduce new clk bindings
> ---
> arch/arm/boot/dts/aspeed-g4.dtsi | 16 ++++++++--------
> arch/arm/boot/dts/aspeed-g5.dtsi | 16 ++++++++--------
> 2 files changed, 16 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi b/arch/arm/boot/dts/aspeed-g4.dtsi
> index 1edd0cee6221..c2d96b8a5065 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -129,6 +129,14 @@
> };
> };
>
> + adc: adc@1e6e9000 {
> + compatible = "aspeed,ast2400-adc";
> + reg = <0x1e6e9000 0xb0>;
> + clocks = <&clk_apb>;
> + #io-channel-cells = <1>;
> + status = "disabled";
> + };
> +
> sram@1e720000 {
> compatible = "mmio-sram";
> reg = <0x1e720000 0x8000>; // 32K
> @@ -227,14 +235,6 @@
> no-loopback-test;
> status = "disabled";
> };
> -
> - adc: adc@1e6e9000 {
> - compatible = "aspeed,ast2400-adc";
> - reg = <0x1e6e9000 0xb0>;
> - clocks = <&clk_apb>;
> - #io-channel-cells = <1>;
> - status = "disabled";
> - };
> };
> };
> };
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> index f56dd67efa50..9e71c2dac0ba 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -173,6 +173,14 @@
> reg-io-width = <4>;
> };
>
> + adc: adc@1e6e9000 {
> + compatible = "aspeed,ast2500-adc";
> + reg = <0x1e6e9000 0xb0>;
> + clocks = <&clk_apb>;
> + #io-channel-cells = <1>;
> + status = "disabled";
> + };
> +
> sram@1e720000 {
> compatible = "mmio-sram";
> reg = <0x1e720000 0x9000>; // 36K
> @@ -307,14 +315,6 @@
> no-loopback-test;
> status = "disabled";
> };
> -
> - adc: adc@1e6e9000 {
> - compatible = "aspeed,ast2500-adc";
> - reg = <0x1e6e9000 0xb0>;
> - clocks = <&clk_apb>;
> - #io-channel-cells = <1>;
> - status = "disabled";
> - };
> };
> };
> };
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* [PATCH 09/13] timer: Remove users of expire and data arguments to DEFINE_TIMER
From: Kees Cook @ 2017-10-04 23:27 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Kees Cook, Ralf Baechle, Wim Van Sebroeck, Guenter Roeck,
Geert Uytterhoeven, linux-mips, linux-watchdog, Andrew Morton,
Arnd Bergmann, Benjamin Herrenschmidt, Chris Metcalf,
Greg Kroah-Hartman, Harish Patil, Heiko Carstens,
James E.J. Bottomley, John Stultz, Julian Wiedmann, Kalle Valo,
Lai Jiangshan, Len Brown, Manish Chopra, Mark Gross,
Martin K. Petersen, Martin Schwidefsky, Michael Ellerman,
Michael Reed, netdev, Oleg Nesterov, Paul Mackerras, Pavel Machek,
Petr Mladek, Rafael J. Wysocki, Sebastian Reichel, Stefan Richter,
Stephen Boyd, Sudip Mukherjee, Tejun Heo, Ursula Braun,
Viresh Kumar, linux1394-devel, linux-pm, linuxppc-dev, linux-s390,
linux-scsi, linux-wireless, linux-kernel
In-Reply-To: <1507159627-127660-1-git-send-email-keescook@chromium.org>
The expire and data arguments of DEFINE_TIMER are only used in two places
and are ignored by the code (malta-display.c only uses mod_timer(),
never add_timer(), so the preset expires value is ignored). Set both
sets of arguments to zero.
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-mips@linux-mips.org
Cc: linux-watchdog@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
---
arch/mips/mti-malta/malta-display.c | 6 +++---
drivers/watchdog/alim7101_wdt.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/mips/mti-malta/malta-display.c b/arch/mips/mti-malta/malta-display.c
index d4f807191ecd..ac813158b9b8 100644
--- a/arch/mips/mti-malta/malta-display.c
+++ b/arch/mips/mti-malta/malta-display.c
@@ -36,10 +36,10 @@ void mips_display_message(const char *str)
}
}
-static void scroll_display_message(unsigned long data);
-static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, HZ, 0);
+static void scroll_display_message(unsigned long unused);
+static DEFINE_TIMER(mips_scroll_timer, scroll_display_message, 0, 0);
-static void scroll_display_message(unsigned long data)
+static void scroll_display_message(unsigned long unused)
{
mips_display_message(&display_string[display_count++]);
if (display_count == max_display_count)
diff --git a/drivers/watchdog/alim7101_wdt.c b/drivers/watchdog/alim7101_wdt.c
index 665e0e7dfe1e..3c1f6ac68ea9 100644
--- a/drivers/watchdog/alim7101_wdt.c
+++ b/drivers/watchdog/alim7101_wdt.c
@@ -71,7 +71,7 @@ MODULE_PARM_DESC(use_gpio,
"Use the gpio watchdog (required by old cobalt boards).");
static void wdt_timer_ping(unsigned long);
-static DEFINE_TIMER(timer, wdt_timer_ping, 0, 1);
+static DEFINE_TIMER(timer, wdt_timer_ping, 0, 0);
static unsigned long next_heartbeat;
static unsigned long wdt_is_open;
static char wdt_expect_close;
@@ -87,7 +87,7 @@ MODULE_PARM_DESC(nowayout,
* Whack the dog
*/
-static void wdt_timer_ping(unsigned long data)
+static void wdt_timer_ping(unsigned long unused)
{
/* If we got a heartbeat pulse within the WDT_US_INTERVAL
* we agree to ping the WDT
--
2.7.4
^ permalink raw reply related
* [PATCH 11/13] timer: Remove expires argument from __TIMER_INITIALIZER()
From: Kees Cook @ 2017-10-04 23:27 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Kees Cook, Andrew Morton, Arnd Bergmann, Benjamin Herrenschmidt,
Chris Metcalf, Geert Uytterhoeven, Greg Kroah-Hartman,
Guenter Roeck, Harish Patil, Heiko Carstens, James E.J. Bottomley,
John Stultz, Julian Wiedmann, Kalle Valo, Lai Jiangshan,
Len Brown, Manish Chopra, Mark Gross, Martin K. Petersen,
Martin Schwidefsky, Michael Ellerman, Michael Reed, netdev,
Oleg Nesterov, Paul Mackerras, Pavel Machek, Petr Mladek,
Rafael J. Wysocki, Ralf Baechle, Sebastian Reichel,
Stefan Richter, Stephen Boyd, Sudip Mukherjee, Tejun Heo,
Ursula Braun, Viresh Kumar, Wim Van Sebroeck, linux1394-devel,
linux-mips, linux-pm, linuxppc-dev, linux-s390, linux-scsi,
linux-watchdog, linux-wireless, linux-kernel
In-Reply-To: <1507159627-127660-1-git-send-email-keescook@chromium.org>
The expires field is normally initialized during the first mod_timer()
call. It was unused by all callers, so remove it from the macro.
Signed-off-by: Kees Cook <keescook@chromium.org>
---
include/linux/kthread.h | 2 +-
include/linux/timer.h | 5 ++---
include/linux/workqueue.h | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 82e197eeac91..0d622b350d3f 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -117,7 +117,7 @@ struct kthread_delayed_work {
#define KTHREAD_DELAYED_WORK_INIT(dwork, fn) { \
.work = KTHREAD_WORK_INIT((dwork).work, (fn)), \
.timer = __TIMER_INITIALIZER(kthread_delayed_work_timer_fn, \
- 0, (unsigned long)&(dwork), \
+ (unsigned long)&(dwork), \
TIMER_IRQSAFE), \
}
diff --git a/include/linux/timer.h b/include/linux/timer.h
index 91e5a2cc81b5..10685c33e679 100644
--- a/include/linux/timer.h
+++ b/include/linux/timer.h
@@ -63,10 +63,9 @@ struct timer_list {
#define TIMER_TRACE_FLAGMASK (TIMER_MIGRATING | TIMER_DEFERRABLE | TIMER_PINNED | TIMER_IRQSAFE)
-#define __TIMER_INITIALIZER(_function, _expires, _data, _flags) { \
+#define __TIMER_INITIALIZER(_function, _data, _flags) { \
.entry = { .next = TIMER_ENTRY_STATIC }, \
.function = (_function), \
- .expires = (_expires), \
.data = (_data), \
.flags = (_flags), \
__TIMER_LOCKDEP_MAP_INITIALIZER( \
@@ -75,7 +74,7 @@ struct timer_list {
#define DEFINE_TIMER(_name, _function) \
struct timer_list _name = \
- __TIMER_INITIALIZER(_function, 0, 0, 0)
+ __TIMER_INITIALIZER(_function, 0, 0)
void init_timer_key(struct timer_list *timer, unsigned int flags,
const char *name, struct lock_class_key *key);
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index 1c49431f3121..f4960260feaf 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -176,7 +176,7 @@ struct execute_work {
#define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \
.work = __WORK_INITIALIZER((n).work, (f)), \
.timer = __TIMER_INITIALIZER(delayed_work_timer_fn, \
- 0, (unsigned long)&(n), \
+ (unsigned long)&(n), \
(tflags) | TIMER_IRQSAFE), \
}
--
2.7.4
^ permalink raw reply related
* [PATCH 13/13] workqueue: Convert callback to use from_timer()
From: Kees Cook @ 2017-10-04 23:27 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Kees Cook, Tejun Heo, Lai Jiangshan, Andrew Morton, Arnd Bergmann,
Benjamin Herrenschmidt, Chris Metcalf, Geert Uytterhoeven,
Greg Kroah-Hartman, Guenter Roeck, Harish Patil, Heiko Carstens,
James E.J. Bottomley, John Stultz, Julian Wiedmann, Kalle Valo,
Len Brown, Manish Chopra, Mark Gross, Martin K. Petersen,
Martin Schwidefsky, Michael Ellerman, Michael Reed, netdev,
Oleg Nesterov, Paul Mackerras, Pavel Machek, Petr Mladek,
Rafael J. Wysocki, Ralf Baechle, Sebastian Reichel,
Stefan Richter, Stephen Boyd, Sudip Mukherjee, Ursula Braun,
Viresh Kumar, Wim Van Sebroeck, linux1394-devel, linux-mips,
linux-pm, linuxppc-dev, linux-s390, linux-scsi, linux-watchdog,
linux-wireless, linux-kernel
In-Reply-To: <1507159627-127660-1-git-send-email-keescook@chromium.org>
In preparation for unconditionally passing the struct timer_list pointer
to all timer callbacks, switch workqueue to use from_timer() and pass the
timer pointer explicitly.
Cc: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
include/linux/workqueue.h | 15 ++++++++-------
kernel/workqueue.c | 7 +++----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index f4960260feaf..f3c47a05fd06 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -17,7 +17,7 @@ struct workqueue_struct;
struct work_struct;
typedef void (*work_func_t)(struct work_struct *work);
-void delayed_work_timer_fn(unsigned long __data);
+void delayed_work_timer_fn(struct timer_list *t);
/*
* The first word is the work queue pointer and the flags rolled into
@@ -175,8 +175,8 @@ struct execute_work {
#define __DELAYED_WORK_INITIALIZER(n, f, tflags) { \
.work = __WORK_INITIALIZER((n).work, (f)), \
- .timer = __TIMER_INITIALIZER(delayed_work_timer_fn, \
- (unsigned long)&(n), \
+ .timer = __TIMER_INITIALIZER((TIMER_FUNC_TYPE)delayed_work_timer_fn,\
+ (TIMER_DATA_TYPE)&(n.timer), \
(tflags) | TIMER_IRQSAFE), \
}
@@ -241,8 +241,9 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
#define __INIT_DELAYED_WORK(_work, _func, _tflags) \
do { \
INIT_WORK(&(_work)->work, (_func)); \
- __setup_timer(&(_work)->timer, delayed_work_timer_fn, \
- (unsigned long)(_work), \
+ __setup_timer(&(_work)->timer, \
+ (TIMER_FUNC_TYPE)delayed_work_timer_fn, \
+ (TIMER_DATA_TYPE)&(_work)->timer, \
(_tflags) | TIMER_IRQSAFE); \
} while (0)
@@ -250,8 +251,8 @@ static inline unsigned int work_static(struct work_struct *work) { return 0; }
do { \
INIT_WORK_ONSTACK(&(_work)->work, (_func)); \
__setup_timer_on_stack(&(_work)->timer, \
- delayed_work_timer_fn, \
- (unsigned long)(_work), \
+ (TIMER_FUNC_TYPE)delayed_work_timer_fn,\
+ (TIMER_DATA_TYPE)&(_work)->timer,\
(_tflags) | TIMER_IRQSAFE); \
} while (0)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index a5361fc6215d..c77fdf6bf24f 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1492,9 +1492,9 @@ bool queue_work_on(int cpu, struct workqueue_struct *wq,
}
EXPORT_SYMBOL(queue_work_on);
-void delayed_work_timer_fn(unsigned long __data)
+void delayed_work_timer_fn(struct timer_list *t)
{
- struct delayed_work *dwork = (struct delayed_work *)__data;
+ struct delayed_work *dwork = from_timer(dwork, t, timer);
/* should have been called from irqsafe timer with irq already off */
__queue_work(dwork->cpu, dwork->wq, &dwork->work);
@@ -1508,8 +1508,7 @@ static void __queue_delayed_work(int cpu, struct workqueue_struct *wq,
struct work_struct *work = &dwork->work;
WARN_ON_ONCE(!wq);
- WARN_ON_ONCE(timer->function != delayed_work_timer_fn ||
- timer->data != (unsigned long)dwork);
+ WARN_ON_ONCE(timer->function != (TIMER_FUNC_TYPE)delayed_work_timer_fn);
WARN_ON_ONCE(timer_pending(timer));
WARN_ON_ONCE(!list_empty(&work->entry));
--
2.7.4
^ permalink raw reply related
* [PATCH 12/13] kthread: Convert callback to use from_timer()
From: Kees Cook @ 2017-10-04 23:27 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Kees Cook, Andrew Morton, Petr Mladek, Tejun Heo, Oleg Nesterov,
Arnd Bergmann, Benjamin Herrenschmidt, Chris Metcalf,
Geert Uytterhoeven, Greg Kroah-Hartman, Guenter Roeck,
Harish Patil, Heiko Carstens, James E.J. Bottomley, John Stultz,
Julian Wiedmann, Kalle Valo, Lai Jiangshan, Len Brown,
Manish Chopra, Mark Gross, Martin K. Petersen, Martin Schwidefsky,
Michael Ellerman, Michael Reed, netdev, Paul Mackerras,
Pavel Machek, Rafael J. Wysocki, Ralf Baechle, Sebastian Reichel,
Stefan Richter, Stephen Boyd, Sudip Mukherjee, Ursula Braun,
Viresh Kumar, Wim Van Sebroeck, linux1394-devel, linux-mips,
linux-pm, linuxppc-dev, linux-s390, linux-scsi, linux-watchdog,
linux-wireless, linux-kernel
In-Reply-To: <1507159627-127660-1-git-send-email-keescook@chromium.org>
In preparation for unconditionally passing the struct timer_list pointer
to all timer callbacks, switch kthread to use from_timer() and pass the
timer pointer explicitly.
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
---
include/linux/kthread.h | 10 +++++-----
kernel/kthread.c | 10 ++++------
2 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 0d622b350d3f..35cbe3b0ce5b 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -75,7 +75,7 @@ extern int tsk_fork_get_node(struct task_struct *tsk);
*/
struct kthread_work;
typedef void (*kthread_work_func_t)(struct kthread_work *work);
-void kthread_delayed_work_timer_fn(unsigned long __data);
+void kthread_delayed_work_timer_fn(struct timer_list *t);
enum {
KTW_FREEZABLE = 1 << 0, /* freeze during suspend */
@@ -116,8 +116,8 @@ struct kthread_delayed_work {
#define KTHREAD_DELAYED_WORK_INIT(dwork, fn) { \
.work = KTHREAD_WORK_INIT((dwork).work, (fn)), \
- .timer = __TIMER_INITIALIZER(kthread_delayed_work_timer_fn, \
- (unsigned long)&(dwork), \
+ .timer = __TIMER_INITIALIZER((TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn,\
+ (TIMER_DATA_TYPE)&(dwork.timer), \
TIMER_IRQSAFE), \
}
@@ -164,8 +164,8 @@ extern void __kthread_init_worker(struct kthread_worker *worker,
do { \
kthread_init_work(&(dwork)->work, (fn)); \
__setup_timer(&(dwork)->timer, \
- kthread_delayed_work_timer_fn, \
- (unsigned long)(dwork), \
+ (TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn,\
+ (TIMER_DATA_TYPE)&(dwork)->timer, \
TIMER_IRQSAFE); \
} while (0)
diff --git a/kernel/kthread.c b/kernel/kthread.c
index 1c19edf82427..ba3992c8c375 100644
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -798,15 +798,14 @@ EXPORT_SYMBOL_GPL(kthread_queue_work);
/**
* kthread_delayed_work_timer_fn - callback that queues the associated kthread
* delayed work when the timer expires.
- * @__data: pointer to the data associated with the timer
+ * @t: pointer to the expired timer
*
* The format of the function is defined by struct timer_list.
* It should have been called from irqsafe timer with irq already off.
*/
-void kthread_delayed_work_timer_fn(unsigned long __data)
+void kthread_delayed_work_timer_fn(struct timer_list *t)
{
- struct kthread_delayed_work *dwork =
- (struct kthread_delayed_work *)__data;
+ struct kthread_delayed_work *dwork = from_timer(dwork, t, timer);
struct kthread_work *work = &dwork->work;
struct kthread_worker *worker = work->worker;
@@ -837,8 +836,7 @@ void __kthread_queue_delayed_work(struct kthread_worker *worker,
struct timer_list *timer = &dwork->timer;
struct kthread_work *work = &dwork->work;
- WARN_ON_ONCE(timer->function != kthread_delayed_work_timer_fn ||
- timer->data != (unsigned long)dwork);
+ WARN_ON_ONCE(timer->function != (TIMER_FUNC_TYPE)kthread_delayed_work_timer_fn);
/*
* If @delay is 0, queue @dwork->work immediately. This is for
--
2.7.4
^ permalink raw reply related
* [PATCH v2 4/9] ARM: dts: aspeed-romulus: Add I2C devices
From: Andrew Jeffery @ 2017-10-04 23:35 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20171004064917.2498-5-joel@jms.id.au>
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> Enable the buses that are in use and the devices that are attached.
> Currently that is just the battery backed RTC.
>
> Some of these buses are for hotplugged cards, such as PCIe cards. Others
> do not yet have upstream drivers, so there are no devices attached.
>
> Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> v2:
> - Use okay not enabled for the status
> ---
> arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 54 ++++++++++++++++++++++++++++
> 1 file changed, 54 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index 1190fec1b5d0..8b96baf7c4de 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -79,3 +79,57 @@
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_rmii1_default>;
> };
> +
> +&i2c2 {
> + status = "okay";
> +};
> +
> +&i2c3 {
> + status = "okay";
> +};
> +
> +&i2c4 {
> + status = "okay";
> +};
> +
> +&i2c5 {
> + status = "okay";
> +};
> +
> +&i2c6 {
> + /* PCIe slot 1 (x8) */
> + status = "okay";
> +};
> +
> +&i2c7 {
> + /* PCIe slot 2 (x16) */
> + status = "okay";
> +};
> +
> +&i2c8 {
> + /* PCIe slot 3 (x16) */
> + status = "okay";
> +};
> +
> +&i2c9 {
> + /* PCIe slot 4 (x16) */
> + status = "okay";
> +};
> +
> +&i2c10 {
> + /* PCIe slot 5 (x8) */
> + status = "okay";
> +};
> +
> +&i2c11 {
> + status = "okay";
> +
> + rtc at 32 {
> + compatible = "epson,rx8900";
> + reg = <0x32>;
> + };
> +};
> +
> +&i2c12 {
> + status = "okay";
> +};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20171005/0c718a9d/attachment.sig>
^ permalink raw reply
* [PATCH v2 4/9] ARM: dts: aspeed-romulus: Add I2C devices
From: Andrew Jeffery @ 2017-10-04 23:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171004064917.2498-5-joel@jms.id.au>
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> Enable the buses that are in use and the devices that are attached.
> Currently that is just the battery backed RTC.
>?
> Some of these buses are for hotplugged cards, such as PCIe cards. Others
> do not yet have upstream drivers, so there are no devices attached.
>?
> Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> v2:
> ?- Use okay not enabled for the status
> ---
> ?arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 54 ++++++++++++++++++++++++++++
> ?1 file changed, 54 insertions(+)
>?
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index 1190fec1b5d0..8b96baf7c4de 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -79,3 +79,57 @@
> ? pinctrl-names = "default";
> ? pinctrl-0 = <&pinctrl_rmii1_default>;
> ?};
> +
> +&i2c2 {
> + status = "okay";
> +};
> +
> +&i2c3 {
> + status = "okay";
> +};
> +
> +&i2c4 {
> + status = "okay";
> +};
> +
> +&i2c5 {
> + status = "okay";
> +};
> +
> +&i2c6 {
> + /* PCIe slot 1 (x8) */
> + status = "okay";
> +};
> +
> +&i2c7 {
> + /* PCIe slot 2 (x16) */
> + status = "okay";
> +};
> +
> +&i2c8 {
> + /* PCIe slot 3 (x16) */
> + status = "okay";
> +};
> +
> +&i2c9 {
> + /* PCIe slot 4 (x16) */
> + status = "okay";
> +};
> +
> +&i2c10 {
> + /* PCIe slot 5 (x8) */
> + status = "okay";
> +};
> +
> +&i2c11 {
> + status = "okay";
> +
> + rtc at 32 {
> + compatible = "epson,rx8900";
> + reg = <0x32>;
> + };
> +};
> +
> +&i2c12 {
> + status = "okay";
> +};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171005/0c718a9d/attachment.sig>
^ permalink raw reply
* Re: [PATCH v2 4/9] ARM: dts: aspeed-romulus: Add I2C devices
From: Andrew Jeffery @ 2017-10-04 23:35 UTC (permalink / raw)
To: Joel Stanley, Rob Herring, Mark Rutland
Cc: Russell King, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rick Altherr,
Brendan Higgins, Cédric Le Goater,
linux-aspeed-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <20171004064917.2498-5-joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> Enable the buses that are in use and the devices that are attached.
> Currently that is just the battery backed RTC.
>
> Some of these buses are for hotplugged cards, such as PCIe cards. Others
> do not yet have upstream drivers, so there are no devices attached.
>
> Reviewed-by: Brendan Higgins <brendanhiggins-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Joel Stanley <joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org>
Reviewed-by: Andrew Jeffery <andrew-zrmu5oMJ5Fs@public.gmane.org>
> ---
> v2:
> - Use okay not enabled for the status
> ---
> arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 54 ++++++++++++++++++++++++++++
> 1 file changed, 54 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index 1190fec1b5d0..8b96baf7c4de 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -79,3 +79,57 @@
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_rmii1_default>;
> };
> +
> +&i2c2 {
> + status = "okay";
> +};
> +
> +&i2c3 {
> + status = "okay";
> +};
> +
> +&i2c4 {
> + status = "okay";
> +};
> +
> +&i2c5 {
> + status = "okay";
> +};
> +
> +&i2c6 {
> + /* PCIe slot 1 (x8) */
> + status = "okay";
> +};
> +
> +&i2c7 {
> + /* PCIe slot 2 (x16) */
> + status = "okay";
> +};
> +
> +&i2c8 {
> + /* PCIe slot 3 (x16) */
> + status = "okay";
> +};
> +
> +&i2c9 {
> + /* PCIe slot 4 (x16) */
> + status = "okay";
> +};
> +
> +&i2c10 {
> + /* PCIe slot 5 (x8) */
> + status = "okay";
> +};
> +
> +&i2c11 {
> + status = "okay";
> +
> + rtc@32 {
> + compatible = "epson,rx8900";
> + reg = <0x32>;
> + };
> +};
> +
> +&i2c12 {
> + status = "okay";
> +};
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH v2 4/9] ARM: dts: aspeed-romulus: Add I2C devices
From: Andrew Jeffery @ 2017-10-04 23:35 UTC (permalink / raw)
To: Joel Stanley, Rob Herring, Mark Rutland
Cc: Russell King, devicetree, linux-arm-kernel, linux-kernel,
Rick Altherr, Brendan Higgins, Cédric Le Goater,
linux-aspeed
In-Reply-To: <20171004064917.2498-5-joel@jms.id.au>
[-- Attachment #1: Type: text/plain, Size: 1782 bytes --]
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> Enable the buses that are in use and the devices that are attached.
> Currently that is just the battery backed RTC.
>
> Some of these buses are for hotplugged cards, such as PCIe cards. Others
> do not yet have upstream drivers, so there are no devices attached.
>
> Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> v2:
> - Use okay not enabled for the status
> ---
> arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 54 ++++++++++++++++++++++++++++
> 1 file changed, 54 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index 1190fec1b5d0..8b96baf7c4de 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -79,3 +79,57 @@
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_rmii1_default>;
> };
> +
> +&i2c2 {
> + status = "okay";
> +};
> +
> +&i2c3 {
> + status = "okay";
> +};
> +
> +&i2c4 {
> + status = "okay";
> +};
> +
> +&i2c5 {
> + status = "okay";
> +};
> +
> +&i2c6 {
> + /* PCIe slot 1 (x8) */
> + status = "okay";
> +};
> +
> +&i2c7 {
> + /* PCIe slot 2 (x16) */
> + status = "okay";
> +};
> +
> +&i2c8 {
> + /* PCIe slot 3 (x16) */
> + status = "okay";
> +};
> +
> +&i2c9 {
> + /* PCIe slot 4 (x16) */
> + status = "okay";
> +};
> +
> +&i2c10 {
> + /* PCIe slot 5 (x8) */
> + status = "okay";
> +};
> +
> +&i2c11 {
> + status = "okay";
> +
> + rtc@32 {
> + compatible = "epson,rx8900";
> + reg = <0x32>;
> + };
> +};
> +
> +&i2c12 {
> + status = "okay";
> +};
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* [PATCH v2 8/9] ARM: dts: aspeed: Correctly order UART nodes
From: Andrew Jeffery @ 2017-10-04 23:37 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <20171004064917.2498-9-joel@jms.id.au>
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> Order them all by address.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> arch/arm/boot/dts/aspeed-g4.dtsi | 48 +++++++++++++++---------------
> -
> arch/arm/boot/dts/aspeed-g5.dtsi | 61 ++++++++++++++++++++--------
> ------------
> 2 files changed, 54 insertions(+), 55 deletions(-)
>
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi
> b/arch/arm/boot/dts/aspeed-g4.dtsi
> index a549413bda3f..4125e07f22f9 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -183,6 +183,27 @@
> clock-names = "PCLK";
> };
>
> + uart1: serial at 1e783000 {
> + compatible = "ns16550a";
> + reg = <0x1e783000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <9>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> + uart5: serial at 1e784000 {
> + compatible = "ns16550a";
> + reg = <0x1e784000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + current-speed = <38400>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> wdt1: wdt at 1e785000 {
> compatible = "aspeed,ast2400-wdt";
> reg = <0x1e785000 0x1c>;
> @@ -197,11 +218,11 @@
> status = "disabled";
> };
>
> - uart1: serial at 1e783000 {
> + uart6: serial at 1e787000 {
> compatible = "ns16550a";
> - reg = <0x1e783000 0x1000>;
> + reg = <0x1e787000 0x1000>;
> reg-shift = <2>;
> - interrupts = <9>;
> + interrupts = <10>;
> clocks = <&clk_uart>;
> no-loopback-test;
> status = "disabled";
> @@ -237,27 +258,6 @@
> status = "disabled";
> };
>
> - uart5: serial at 1e784000 {
> - compatible = "ns16550a";
> - reg = <0x1e784000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - current-speed = <38400>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> - uart6: serial at 1e787000 {
> - compatible = "ns16550a";
> - reg = <0x1e787000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> i2c: i2c at 1e78a000 {
> compatible = "simple-bus";
> #address-cells = <1>;
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi
> b/arch/arm/boot/dts/aspeed-g5.dtsi
> index de2dafa71651..61cc2d25143a 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -227,6 +227,26 @@
> clock-names = "PCLK";
> };
>
> + uart1: serial at 1e783000 {
> + compatible = "ns16550a";
> + reg = <0x1e783000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <9>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> + uart5: serial at 1e784000 {
> + compatible = "ns16550a";
> + reg = <0x1e784000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + current-speed = <38400>;
> + no-loopback-test;
> + status = "disabled";
> + };
>
> wdt1: wdt at 1e785000 {
> compatible = "aspeed,ast2500-wdt";
> @@ -247,16 +267,6 @@
> status = "disabled";
> };
>
> - uart1: serial at 1e783000 {
> - compatible = "ns16550a";
> - reg = <0x1e783000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <9>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> lpc: lpc at 1e789000 {
> compatible = "aspeed,ast2500-lpc",
> "simple-mfd";
> reg = <0x1e789000 0x1000>;
> @@ -287,6 +297,16 @@
> };
> };
>
> + uart6: serial at 1e787000 {
> + compatible = "ns16550a";
> + reg = <0x1e787000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> uart2: serial at 1e78d000 {
> compatible = "ns16550a";
> reg = <0x1e78d000 0x1000>;
> @@ -317,27 +337,6 @@
> status = "disabled";
> };
>
> - uart5: serial at 1e784000 {
> - compatible = "ns16550a";
> - reg = <0x1e784000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - current-speed = <38400>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> - uart6: serial at 1e787000 {
> - compatible = "ns16550a";
> - reg = <0x1e787000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> i2c: i2c at 1e78a000 {
> compatible = "simple-bus";
> #address-cells = <1>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20171005/a288ad9d/attachment.sig>
^ permalink raw reply
* [PATCH v2 8/9] ARM: dts: aspeed: Correctly order UART nodes
From: Andrew Jeffery @ 2017-10-04 23:37 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171004064917.2498-9-joel@jms.id.au>
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> Order them all by address.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> ?arch/arm/boot/dts/aspeed-g4.dtsi | 48 +++++++++++++++---------------
> -
> ?arch/arm/boot/dts/aspeed-g5.dtsi | 61 ++++++++++++++++++++--------
> ------------
> ?2 files changed, 54 insertions(+), 55 deletions(-)
>
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi
> b/arch/arm/boot/dts/aspeed-g4.dtsi
> index a549413bda3f..4125e07f22f9 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -183,6 +183,27 @@
> ? clock-names = "PCLK";
> ? };
> ?
> + uart1: serial at 1e783000 {
> + compatible = "ns16550a";
> + reg = <0x1e783000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <9>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> + uart5: serial at 1e784000 {
> + compatible = "ns16550a";
> + reg = <0x1e784000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + current-speed = <38400>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> ? wdt1: wdt at 1e785000 {
> ? compatible = "aspeed,ast2400-wdt";
> ? reg = <0x1e785000 0x1c>;
> @@ -197,11 +218,11 @@
> ? status = "disabled";
> ? };
> ?
> - uart1: serial at 1e783000 {
> + uart6: serial at 1e787000 {
> ? compatible = "ns16550a";
> - reg = <0x1e783000 0x1000>;
> + reg = <0x1e787000 0x1000>;
> ? reg-shift = <2>;
> - interrupts = <9>;
> + interrupts = <10>;
> ? clocks = <&clk_uart>;
> ? no-loopback-test;
> ? status = "disabled";
> @@ -237,27 +258,6 @@
> ? status = "disabled";
> ? };
> ?
> - uart5: serial at 1e784000 {
> - compatible = "ns16550a";
> - reg = <0x1e784000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - current-speed = <38400>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> - uart6: serial at 1e787000 {
> - compatible = "ns16550a";
> - reg = <0x1e787000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> ? i2c: i2c at 1e78a000 {
> ? compatible = "simple-bus";
> ? #address-cells = <1>;
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi
> b/arch/arm/boot/dts/aspeed-g5.dtsi
> index de2dafa71651..61cc2d25143a 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -227,6 +227,26 @@
> ? clock-names = "PCLK";
> ? };
> ?
> + uart1: serial at 1e783000 {
> + compatible = "ns16550a";
> + reg = <0x1e783000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <9>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> + uart5: serial at 1e784000 {
> + compatible = "ns16550a";
> + reg = <0x1e784000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + current-speed = <38400>;
> + no-loopback-test;
> + status = "disabled";
> + };
> ?
> ? wdt1: wdt at 1e785000 {
> ? compatible = "aspeed,ast2500-wdt";
> @@ -247,16 +267,6 @@
> ? status = "disabled";
> ? };
> ?
> - uart1: serial at 1e783000 {
> - compatible = "ns16550a";
> - reg = <0x1e783000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <9>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> ? lpc: lpc at 1e789000 {
> ? compatible = "aspeed,ast2500-lpc",
> "simple-mfd";
> ? reg = <0x1e789000 0x1000>;
> @@ -287,6 +297,16 @@
> ? };
> ? };
> ?
> + uart6: serial at 1e787000 {
> + compatible = "ns16550a";
> + reg = <0x1e787000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> ? uart2: serial at 1e78d000 {
> ? compatible = "ns16550a";
> ? reg = <0x1e78d000 0x1000>;
> @@ -317,27 +337,6 @@
> ? status = "disabled";
> ? };
> ?
> - uart5: serial at 1e784000 {
> - compatible = "ns16550a";
> - reg = <0x1e784000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - current-speed = <38400>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> - uart6: serial at 1e787000 {
> - compatible = "ns16550a";
> - reg = <0x1e787000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> ? i2c: i2c at 1e78a000 {
> ? compatible = "simple-bus";
> ? #address-cells = <1>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171005/a288ad9d/attachment-0001.sig>
^ permalink raw reply
* Re: [PATCH v2 8/9] ARM: dts: aspeed: Correctly order UART nodes
From: Andrew Jeffery @ 2017-10-04 23:37 UTC (permalink / raw)
To: Joel Stanley, Rob Herring, Mark Rutland
Cc: Russell King, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rick Altherr,
Brendan Higgins, Cédric Le Goater,
linux-aspeed-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <20171004064917.2498-9-joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 4964 bytes --]
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> Order them all by address.
>
> Signed-off-by: Joel Stanley <joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org>
Reviewed-by: Andrew Jeffery <andrew-zrmu5oMJ5Fs@public.gmane.org>
> ---
> arch/arm/boot/dts/aspeed-g4.dtsi | 48 +++++++++++++++---------------
> -
> arch/arm/boot/dts/aspeed-g5.dtsi | 61 ++++++++++++++++++++--------
> ------------
> 2 files changed, 54 insertions(+), 55 deletions(-)
>
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi
> b/arch/arm/boot/dts/aspeed-g4.dtsi
> index a549413bda3f..4125e07f22f9 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -183,6 +183,27 @@
> clock-names = "PCLK";
> };
>
> + uart1: serial@1e783000 {
> + compatible = "ns16550a";
> + reg = <0x1e783000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <9>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> + uart5: serial@1e784000 {
> + compatible = "ns16550a";
> + reg = <0x1e784000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + current-speed = <38400>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> wdt1: wdt@1e785000 {
> compatible = "aspeed,ast2400-wdt";
> reg = <0x1e785000 0x1c>;
> @@ -197,11 +218,11 @@
> status = "disabled";
> };
>
> - uart1: serial@1e783000 {
> + uart6: serial@1e787000 {
> compatible = "ns16550a";
> - reg = <0x1e783000 0x1000>;
> + reg = <0x1e787000 0x1000>;
> reg-shift = <2>;
> - interrupts = <9>;
> + interrupts = <10>;
> clocks = <&clk_uart>;
> no-loopback-test;
> status = "disabled";
> @@ -237,27 +258,6 @@
> status = "disabled";
> };
>
> - uart5: serial@1e784000 {
> - compatible = "ns16550a";
> - reg = <0x1e784000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - current-speed = <38400>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> - uart6: serial@1e787000 {
> - compatible = "ns16550a";
> - reg = <0x1e787000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> i2c: i2c@1e78a000 {
> compatible = "simple-bus";
> #address-cells = <1>;
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi
> b/arch/arm/boot/dts/aspeed-g5.dtsi
> index de2dafa71651..61cc2d25143a 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -227,6 +227,26 @@
> clock-names = "PCLK";
> };
>
> + uart1: serial@1e783000 {
> + compatible = "ns16550a";
> + reg = <0x1e783000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <9>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> + uart5: serial@1e784000 {
> + compatible = "ns16550a";
> + reg = <0x1e784000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + current-speed = <38400>;
> + no-loopback-test;
> + status = "disabled";
> + };
>
> wdt1: wdt@1e785000 {
> compatible = "aspeed,ast2500-wdt";
> @@ -247,16 +267,6 @@
> status = "disabled";
> };
>
> - uart1: serial@1e783000 {
> - compatible = "ns16550a";
> - reg = <0x1e783000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <9>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> lpc: lpc@1e789000 {
> compatible = "aspeed,ast2500-lpc",
> "simple-mfd";
> reg = <0x1e789000 0x1000>;
> @@ -287,6 +297,16 @@
> };
> };
>
> + uart6: serial@1e787000 {
> + compatible = "ns16550a";
> + reg = <0x1e787000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> uart2: serial@1e78d000 {
> compatible = "ns16550a";
> reg = <0x1e78d000 0x1000>;
> @@ -317,27 +337,6 @@
> status = "disabled";
> };
>
> - uart5: serial@1e784000 {
> - compatible = "ns16550a";
> - reg = <0x1e784000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - current-speed = <38400>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> - uart6: serial@1e787000 {
> - compatible = "ns16550a";
> - reg = <0x1e787000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> i2c: i2c@1e78a000 {
> compatible = "simple-bus";
> #address-cells = <1>;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH v2 8/9] ARM: dts: aspeed: Correctly order UART nodes
From: Andrew Jeffery @ 2017-10-04 23:37 UTC (permalink / raw)
To: Joel Stanley, Rob Herring, Mark Rutland
Cc: Russell King, devicetree, linux-arm-kernel, linux-kernel,
Rick Altherr, Brendan Higgins, Cédric Le Goater,
linux-aspeed
In-Reply-To: <20171004064917.2498-9-joel@jms.id.au>
[-- Attachment #1: Type: text/plain, Size: 4914 bytes --]
On Wed, 2017-10-04 at 17:19 +1030, Joel Stanley wrote:
> Order them all by address.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> arch/arm/boot/dts/aspeed-g4.dtsi | 48 +++++++++++++++---------------
> -
> arch/arm/boot/dts/aspeed-g5.dtsi | 61 ++++++++++++++++++++--------
> ------------
> 2 files changed, 54 insertions(+), 55 deletions(-)
>
> diff --git a/arch/arm/boot/dts/aspeed-g4.dtsi
> b/arch/arm/boot/dts/aspeed-g4.dtsi
> index a549413bda3f..4125e07f22f9 100644
> --- a/arch/arm/boot/dts/aspeed-g4.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g4.dtsi
> @@ -183,6 +183,27 @@
> clock-names = "PCLK";
> };
>
> + uart1: serial@1e783000 {
> + compatible = "ns16550a";
> + reg = <0x1e783000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <9>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> + uart5: serial@1e784000 {
> + compatible = "ns16550a";
> + reg = <0x1e784000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + current-speed = <38400>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> wdt1: wdt@1e785000 {
> compatible = "aspeed,ast2400-wdt";
> reg = <0x1e785000 0x1c>;
> @@ -197,11 +218,11 @@
> status = "disabled";
> };
>
> - uart1: serial@1e783000 {
> + uart6: serial@1e787000 {
> compatible = "ns16550a";
> - reg = <0x1e783000 0x1000>;
> + reg = <0x1e787000 0x1000>;
> reg-shift = <2>;
> - interrupts = <9>;
> + interrupts = <10>;
> clocks = <&clk_uart>;
> no-loopback-test;
> status = "disabled";
> @@ -237,27 +258,6 @@
> status = "disabled";
> };
>
> - uart5: serial@1e784000 {
> - compatible = "ns16550a";
> - reg = <0x1e784000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - current-speed = <38400>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> - uart6: serial@1e787000 {
> - compatible = "ns16550a";
> - reg = <0x1e787000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> i2c: i2c@1e78a000 {
> compatible = "simple-bus";
> #address-cells = <1>;
> diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi
> b/arch/arm/boot/dts/aspeed-g5.dtsi
> index de2dafa71651..61cc2d25143a 100644
> --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> @@ -227,6 +227,26 @@
> clock-names = "PCLK";
> };
>
> + uart1: serial@1e783000 {
> + compatible = "ns16550a";
> + reg = <0x1e783000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <9>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> + uart5: serial@1e784000 {
> + compatible = "ns16550a";
> + reg = <0x1e784000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + current-speed = <38400>;
> + no-loopback-test;
> + status = "disabled";
> + };
>
> wdt1: wdt@1e785000 {
> compatible = "aspeed,ast2500-wdt";
> @@ -247,16 +267,6 @@
> status = "disabled";
> };
>
> - uart1: serial@1e783000 {
> - compatible = "ns16550a";
> - reg = <0x1e783000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <9>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> lpc: lpc@1e789000 {
> compatible = "aspeed,ast2500-lpc",
> "simple-mfd";
> reg = <0x1e789000 0x1000>;
> @@ -287,6 +297,16 @@
> };
> };
>
> + uart6: serial@1e787000 {
> + compatible = "ns16550a";
> + reg = <0x1e787000 0x1000>;
> + reg-shift = <2>;
> + interrupts = <10>;
> + clocks = <&clk_uart>;
> + no-loopback-test;
> + status = "disabled";
> + };
> +
> uart2: serial@1e78d000 {
> compatible = "ns16550a";
> reg = <0x1e78d000 0x1000>;
> @@ -317,27 +337,6 @@
> status = "disabled";
> };
>
> - uart5: serial@1e784000 {
> - compatible = "ns16550a";
> - reg = <0x1e784000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - current-speed = <38400>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> - uart6: serial@1e787000 {
> - compatible = "ns16550a";
> - reg = <0x1e787000 0x1000>;
> - reg-shift = <2>;
> - interrupts = <10>;
> - clocks = <&clk_uart>;
> - no-loopback-test;
> - status = "disabled";
> - };
> -
> i2c: i2c@1e78a000 {
> compatible = "simple-bus";
> #address-cells = <1>;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* [PATCH v2 9/9] ARM: dts: aspeed: Clean up UART nodes
From: Andrew Jeffery @ 2017-10-04 23:39 UTC (permalink / raw)
To: linux-aspeed
In-Reply-To: <CACPK8XcQB6PQhGxESV0owo_sAg2+4KV7hsyT-TJOpuOCXmTcdw@mail.gmail.com>
On Wed, 2017-10-04 at 16:22 +0930, Joel Stanley wrote:
> > On Wed, Oct 4, 2017 at 4:19 PM, Joel Stanley <joel@jms.id.au> wrote:
>
> > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> > index 61cc2d25143a..cef51dcc1002 100644
> > --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> > @@ -297,9 +297,9 @@
> > };
> > };
> >
> > - uart6: serial at 1e787000 {
> > - compatible = "ns16550a";
> > - reg = <0x1e787000 0x1000>;
> > + vuart: vuart at 1e787000 {
>
> Doh. I'll fix this up when I apply, assuming I don't need to send a v3.
In that case:
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>
>
> > + compatible = "aspeed,ast2500-vuart";
> > + reg = <0x1e787000 0x40>;
> > reg-shift = <2>;
> > interrupts = <10>;
> > clocks = <&clk_uart>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linux-aspeed/attachments/20171005/b69c0c02/attachment-0001.sig>
^ permalink raw reply
* [PATCH v2 9/9] ARM: dts: aspeed: Clean up UART nodes
From: Andrew Jeffery @ 2017-10-04 23:39 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CACPK8XcQB6PQhGxESV0owo_sAg2+4KV7hsyT-TJOpuOCXmTcdw@mail.gmail.com>
On Wed, 2017-10-04 at 16:22 +0930, Joel Stanley wrote:
> > On Wed, Oct 4, 2017 at 4:19 PM, Joel Stanley <joel@jms.id.au> wrote:
>
> > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> > index 61cc2d25143a..cef51dcc1002 100644
> > --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> > @@ -297,9 +297,9 @@
> > ????????????????????????????????};
> > ????????????????????????};
> >
> > -???????????????????????uart6: serial at 1e787000 {
> > -???????????????????????????????compatible = "ns16550a";
> > -???????????????????????????????reg = <0x1e787000 0x1000>;
> > +???????????????????????vuart: vuart at 1e787000 {
>
> Doh. I'll fix this up when I apply, assuming I don't need to send a v3.
In that case:
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>
>
> > +???????????????????????????????compatible = "aspeed,ast2500-vuart";
> > +???????????????????????????????reg = <0x1e787000 0x40>;
> > ????????????????????????????????reg-shift = <2>;
> > ????????????????????????????????interrupts = <10>;
> > ????????????????????????????????clocks = <&clk_uart>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171005/b69c0c02/attachment.sig>
^ permalink raw reply
* Re: [PATCH v2 9/9] ARM: dts: aspeed: Clean up UART nodes
From: Andrew Jeffery @ 2017-10-04 23:39 UTC (permalink / raw)
To: Joel Stanley, Rob Herring, Mark Rutland
Cc: Russell King, devicetree, Linux ARM, Linux Kernel Mailing List,
Rick Altherr, Brendan Higgins, Cédric Le Goater,
linux-aspeed-uLR06cmDAlY/bJ5BZ2RsiQ
In-Reply-To: <CACPK8XcQB6PQhGxESV0owo_sAg2+4KV7hsyT-TJOpuOCXmTcdw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]
On Wed, 2017-10-04 at 16:22 +0930, Joel Stanley wrote:
> > On Wed, Oct 4, 2017 at 4:19 PM, Joel Stanley <joel@jms.id.au> wrote:
>
> > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> > index 61cc2d25143a..cef51dcc1002 100644
> > --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> > @@ -297,9 +297,9 @@
> > };
> > };
> >
> > - uart6: serial@1e787000 {
> > - compatible = "ns16550a";
> > - reg = <0x1e787000 0x1000>;
> > + vuart: vuart@1e787000 {
>
> Doh. I'll fix this up when I apply, assuming I don't need to send a v3.
In that case:
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>
>
> > + compatible = "aspeed,ast2500-vuart";
> > + reg = <0x1e787000 0x40>;
> > reg-shift = <2>;
> > interrupts = <10>;
> > clocks = <&clk_uart>;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH v2 9/9] ARM: dts: aspeed: Clean up UART nodes
From: Andrew Jeffery @ 2017-10-04 23:39 UTC (permalink / raw)
To: Joel Stanley, Rob Herring, Mark Rutland
Cc: Russell King, devicetree, Linux ARM, Linux Kernel Mailing List,
Rick Altherr, Brendan Higgins, Cédric Le Goater,
linux-aspeed
In-Reply-To: <CACPK8XcQB6PQhGxESV0owo_sAg2+4KV7hsyT-TJOpuOCXmTcdw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1441 bytes --]
On Wed, 2017-10-04 at 16:22 +0930, Joel Stanley wrote:
> > On Wed, Oct 4, 2017 at 4:19 PM, Joel Stanley <joel@jms.id.au> wrote:
>
> > diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
> > index 61cc2d25143a..cef51dcc1002 100644
> > --- a/arch/arm/boot/dts/aspeed-g5.dtsi
> > +++ b/arch/arm/boot/dts/aspeed-g5.dtsi
> > @@ -297,9 +297,9 @@
> > };
> > };
> >
> > - uart6: serial@1e787000 {
> > - compatible = "ns16550a";
> > - reg = <0x1e787000 0x1000>;
> > + vuart: vuart@1e787000 {
>
> Doh. I'll fix this up when I apply, assuming I don't need to send a v3.
In that case:
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
>
>
> > + compatible = "aspeed,ast2500-vuart";
> > + reg = <0x1e787000 0x40>;
> > reg-shift = <2>;
> > interrupts = <10>;
> > clocks = <&clk_uart>;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: [PATCH] eal/x86: use cpuid builtin
From: Ferruh Yigit @ 2017-10-04 23:39 UTC (permalink / raw)
To: Sergio Gonzalez Monroy, dev; +Cc: konstantin.ananyev, bruce.richardson
In-Reply-To: <20170823150027.70565-2-sergio.gonzalez.monroy@intel.com>
On 8/23/2017 4:00 PM, Sergio Gonzalez Monroy wrote:
> GCC does have the __get_cpuid_count builtin which checks for maximum
> supported leaf, but implementations differ between CLANG and GCC.
>
> This change provides an implementation compatible with both GCC and
> CLANG 3.4+.
>
> Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
^ permalink raw reply
* [rcu:rcu/next 31/31] kernel/rcu/tree.c:764:75: error: macro "trace_rcu_dyntick" passed 4 arguments, but takes just 3
From: kbuild test robot @ 2017-10-04 23:40 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: kbuild-all, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 5825 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git rcu/next
head: ff423bbbe3d93b15a89d14de24a90937814cda16
commit: ff423bbbe3d93b15a89d14de24a90937814cda16 [31/31] rcu: Add ->dynticks field to rcu_dyntick trace event
config: i386-randconfig-x001-201740 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
git checkout ff423bbbe3d93b15a89d14de24a90937814cda16
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
kernel/rcu/tree.c: In function 'rcu_eqs_enter_common':
>> kernel/rcu/tree.c:764:75: error: macro "trace_rcu_dyntick" passed 4 arguments, but takes just 3
trace_rcu_dyntick(TPS("Start"), rdtp->dynticks_nesting, 0, rdtp->dynticks);
^
>> kernel/rcu/tree.c:764:2: error: 'trace_rcu_dyntick' undeclared (first use in this function)
trace_rcu_dyntick(TPS("Start"), rdtp->dynticks_nesting, 0, rdtp->dynticks);
^~~~~~~~~~~~~~~~~
kernel/rcu/tree.c:764:2: note: each undeclared identifier is reported only once for each function it appears in
kernel/rcu/tree.c:770:100: error: macro "trace_rcu_dyntick" passed 4 arguments, but takes just 3
trace_rcu_dyntick(TPS("Error on entry: not idle task"), rdtp->dynticks_nesting, 0, rdtp->dynticks);
^
kernel/rcu/tree.c: In function 'rcu_nmi_exit':
kernel/rcu/tree.c:883:107: error: macro "trace_rcu_dyntick" passed 4 arguments, but takes just 3
trace_rcu_dyntick(TPS("--="), rdtp->dynticks_nmi_nesting, rdtp->dynticks_nmi_nesting - 2, rdtp->dynticks);
^
kernel/rcu/tree.c:883:3: error: 'trace_rcu_dyntick' undeclared (first use in this function)
trace_rcu_dyntick(TPS("--="), rdtp->dynticks_nmi_nesting, rdtp->dynticks_nmi_nesting - 2, rdtp->dynticks);
^~~~~~~~~~~~~~~~~
kernel/rcu/tree.c:890:82: error: macro "trace_rcu_dyntick" passed 4 arguments, but takes just 3
trace_rcu_dyntick(TPS("Startirq"), rdtp->dynticks_nmi_nesting, 0, rdtp->dynticks);
^
kernel/rcu/tree.c: In function 'rcu_eqs_exit_common':
kernel/rcu/tree.c:956:78: error: macro "trace_rcu_dyntick" passed 4 arguments, but takes just 3
trace_rcu_dyntick(TPS("End"), rdtp->dynticks_nesting, newval, rdtp->dynticks);
^
kernel/rcu/tree.c:956:2: error: 'trace_rcu_dyntick' undeclared (first use in this function)
trace_rcu_dyntick(TPS("End"), rdtp->dynticks_nesting, newval, rdtp->dynticks);
^~~~~~~~~~~~~~~~~
kernel/rcu/tree.c:962:104: error: macro "trace_rcu_dyntick" passed 4 arguments, but takes just 3
trace_rcu_dyntick(TPS("Error on exit: not idle task"), rdtp->dynticks_nesting, newval, rdtp->dynticks);
^
kernel/rcu/tree.c: In function 'rcu_nmi_enter':
kernel/rcu/tree.c:1064:56: error: macro "trace_rcu_dyntick" passed 4 arguments, but takes just 3
rdtp->dynticks_nmi_nesting + incby, rdtp->dynticks);
^
kernel/rcu/tree.c:1062:2: error: 'trace_rcu_dyntick' undeclared (first use in this function)
trace_rcu_dyntick(incby == 1 ? TPS("Endirq") : TPS("++="),
^~~~~~~~~~~~~~~~~
vim +/trace_rcu_dyntick +764 kernel/rcu/tree.c
750
751 /*
752 * rcu_eqs_enter_common - current CPU is entering an extended quiescent state
753 *
754 * Enter idle, doing appropriate accounting. The caller must have
755 * disabled interrupts.
756 */
757 static void rcu_eqs_enter_common(bool user)
758 {
759 struct rcu_state *rsp;
760 struct rcu_data *rdp;
761 struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
762
763 RCU_LOCKDEP_WARN(!irqs_disabled(), "rcu_eqs_enter_common() invoked with irqs enabled!!!");
> 764 trace_rcu_dyntick(TPS("Start"), rdtp->dynticks_nesting, 0, rdtp->dynticks);
765 if (IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
766 !user && !is_idle_task(current)) {
767 struct task_struct *idle __maybe_unused =
768 idle_task(smp_processor_id());
769
770 trace_rcu_dyntick(TPS("Error on entry: not idle task"), rdtp->dynticks_nesting, 0, rdtp->dynticks);
771 rcu_ftrace_dump(DUMP_ORIG);
772 WARN_ONCE(1, "Current pid: %d comm: %s / Idle pid: %d comm: %s",
773 current->pid, current->comm,
774 idle->pid, idle->comm); /* must be idle task! */
775 }
776 for_each_rcu_flavor(rsp) {
777 rdp = this_cpu_ptr(rsp->rda);
778 do_nocb_deferred_wakeup(rdp);
779 }
780 rcu_prepare_for_idle();
781 rdtp->dynticks_nesting = 0;
782 rcu_dynticks_eqs_enter();
783 rcu_dynticks_task_enter();
784
785 /*
786 * It is illegal to enter an extended quiescent state while
787 * in an RCU read-side critical section.
788 */
789 RCU_LOCKDEP_WARN(lock_is_held(&rcu_lock_map),
790 "Illegal idle entry in RCU read-side critical section.");
791 RCU_LOCKDEP_WARN(lock_is_held(&rcu_bh_lock_map),
792 "Illegal idle entry in RCU-bh read-side critical section.");
793 RCU_LOCKDEP_WARN(lock_is_held(&rcu_sched_lock_map),
794 "Illegal idle entry in RCU-sched read-side critical section.");
795 }
796
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34831 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.