aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--drivers/ata/ahci.c3
-rw-r--r--drivers/ata/libata-core.c11
-rw-r--r--include/linux/libata.h1
-rw-r--r--scripts/bootgraph.pl46
5 files changed, 59 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 28331288341f..c06e250eca18 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 28 3SUBLEVEL = 29
4EXTRAVERSION = 4EXTRAVERSION = -rc1
5NAME = Erotic Pickled Herring 5NAME = Erotic Pickled Herring
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
index 7f701cbe14ab..96039671e3b9 100644
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2660,6 +2660,9 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2660 host->iomap = pcim_iomap_table(pdev); 2660 host->iomap = pcim_iomap_table(pdev);
2661 host->private_data = hpriv; 2661 host->private_data = hpriv;
2662 2662
2663 if (!(hpriv->cap & HOST_CAP_SSS))
2664 host->flags |= ATA_HOST_PARALLEL_SCAN;
2665
2663 if (pi.flags & ATA_FLAG_EM) 2666 if (pi.flags & ATA_FLAG_EM)
2664 ahci_reset_em(host); 2667 ahci_reset_em(host);
2665 2668
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index c507a9ac78f4..71218d76d75e 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5920,6 +5920,17 @@ static void async_port_probe(void *data, async_cookie_t cookie)
5920{ 5920{
5921 int rc; 5921 int rc;
5922 struct ata_port *ap = data; 5922 struct ata_port *ap = data;
5923
5924 /*
5925 * If we're not allowed to scan this host in parallel,
5926 * we need to wait until all previous scans have completed
5927 * before going further.
5928 * Jeff Garzik says this is only within a controller, so we
5929 * don't need to wait for port 0, only for later ports.
5930 */
5931 if (!(ap->host->flags & ATA_HOST_PARALLEL_SCAN) && ap->port_no != 0)
5932 async_synchronize_cookie(cookie);
5933
5923 /* probe */ 5934 /* probe */
5924 if (ap->ops->error_handler) { 5935 if (ap->ops->error_handler) {
5925 struct ata_eh_info *ehi = &ap->link.eh_info; 5936 struct ata_eh_info *ehi = &ap->link.eh_info;
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 4f7c8fb4d3fe..b6b8a7f3ec66 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -239,6 +239,7 @@ enum {
239 /* host set flags */ 239 /* host set flags */
240 ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */ 240 ATA_HOST_SIMPLEX = (1 << 0), /* Host is simplex, one DMA channel per host only */
241 ATA_HOST_STARTED = (1 << 1), /* Host started */ 241 ATA_HOST_STARTED = (1 << 1), /* Host started */
242 ATA_HOST_PARALLEL_SCAN = (1 << 2), /* Ports on this host can be scanned in parallel */
242 243
243 /* bits 24:31 of host->flags are reserved for LLD specific flags */ 244 /* bits 24:31 of host->flags are reserved for LLD specific flags */
244 245
diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl
index 0a498e33b30b..b0246307aac4 100644
--- a/scripts/bootgraph.pl
+++ b/scripts/bootgraph.pl
@@ -41,11 +41,13 @@ use strict;
41 41
42my %start; 42my %start;
43my %end; 43my %end;
44my %type;
44my $done = 0; 45my $done = 0;
45my $maxtime = 0; 46my $maxtime = 0;
46my $firsttime = 100; 47my $firsttime = 100;
47my $count = 0; 48my $count = 0;
48my %pids; 49my %pids;
50my %pidctr;
49 51
50while (<>) { 52while (<>) {
51 my $line = $_; 53 my $line = $_;
@@ -53,6 +55,7 @@ while (<>) {
53 my $func = $2; 55 my $func = $2;
54 if ($done == 0) { 56 if ($done == 0) {
55 $start{$func} = $1; 57 $start{$func} = $1;
58 $type{$func} = 0;
56 if ($1 < $firsttime) { 59 if ($1 < $firsttime) {
57 $firsttime = $1; 60 $firsttime = $1;
58 } 61 }
@@ -63,12 +66,40 @@ while (<>) {
63 $count = $count + 1; 66 $count = $count + 1;
64 } 67 }
65 68
69 if ($line =~ /([0-9\.]+)\] async_waiting @ ([0-9]+)/) {
70 my $pid = $2;
71 my $func;
72 if (!defined($pidctr{$pid})) {
73 $func = "wait_" . $pid . "_1";
74 $pidctr{$pid} = 1;
75 } else {
76 $pidctr{$pid} = $pidctr{$pid} + 1;
77 $func = "wait_" . $pid . "_" . $pidctr{$pid};
78 }
79 if ($done == 0) {
80 $start{$func} = $1;
81 $type{$func} = 1;
82 if ($1 < $firsttime) {
83 $firsttime = $1;
84 }
85 }
86 $pids{$func} = $pid;
87 $count = $count + 1;
88 }
89
66 if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_]+)\+.*returned/) { 90 if ($line =~ /([0-9\.]+)\] initcall ([a-zA-Z0-9\_]+)\+.*returned/) {
67 if ($done == 0) { 91 if ($done == 0) {
68 $end{$2} = $1; 92 $end{$2} = $1;
69 $maxtime = $1; 93 $maxtime = $1;
70 } 94 }
71 } 95 }
96
97 if ($line =~ /([0-9\.]+)\] async_continuing @ ([0-9]+)/) {
98 my $pid = $2;
99 my $func = "wait_" . $pid . "_" . $pidctr{$pid};
100 $end{$func} = $1;
101 $maxtime = $1;
102 }
72 if ($line =~ /Write protecting the/) { 103 if ($line =~ /Write protecting the/) {
73 $done = 1; 104 $done = 1;
74 } 105 }
@@ -105,6 +136,8 @@ $styles[9] = "fill:rgb(255,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0
105$styles[10] = "fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; 136$styles[10] = "fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
106$styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; 137$styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
107 138
139my $style_wait = "fill:rgb(128,128,128);fill-opacity:0.5;stroke-width:0;stroke:rgb(0,0,0)";
140
108my $mult = 1950.0 / ($maxtime - $firsttime); 141my $mult = 1950.0 / ($maxtime - $firsttime);
109my $threshold2 = ($maxtime - $firsttime) / 120.0; 142my $threshold2 = ($maxtime - $firsttime) / 120.0;
110my $threshold = $threshold2/10; 143my $threshold = $threshold2/10;
@@ -139,11 +172,16 @@ foreach my $key (@initcalls) {
139 $stylecounter = 0; 172 $stylecounter = 0;
140 }; 173 };
141 174
142 print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"145\" style=\"$style\"/>\n"; 175 if ($type{$key} == 1) {
143 if ($duration >= $threshold2) { 176 $y = $y + 15;
144 print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n"; 177 print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"115\" style=\"$style_wait\"/>\n";
145 } else { 178 } else {
146 print "<text transform=\"translate($s3,$y2) rotate(90)\" font-size=\"3pt\">$key</text>\n"; 179 print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"145\" style=\"$style\"/>\n";
180 if ($duration >= $threshold2) {
181 print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n";
182 } else {
183 print "<text transform=\"translate($s3,$y2) rotate(90)\" font-size=\"3pt\">$key</text>\n";
184 }
147 } 185 }
148 } 186 }
149} 187}