ieee1394: revert sbp2: enforce 32bit DMA mapping

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a9c2f18800753c82c45fc13b27bdc148849bdbb2
Commit: a9c2f18800753c82c45fc13b27bdc148849bdbb2
Parent: 1ed4395035a6791ebbbf618429a58ab9c207cc83
Author: Stefan Richter [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 20:30:36 2007 +0200
Committer:  Stefan Richter [EMAIL PROTECTED]
CommitDate: Thu Aug 2 20:34:16 2007 +0200

ieee1394: revert sbp2: enforce 32bit DMA mapping

Revert commit 0555659d63c285ceb7ead3115532e1b71b0f27a7 from 2.6.22-rc1.
The dma_set_mask call somehow failed on a PowerMac G5, PPC64:
http://lkml.org/lkml/2007/8/1/344

Should there ever occur a DMA mapping beyond the physical DMA range, a
proper SBP-2 firmware will report transport errors.  So let's leave it
at that.

Signed-off-by: Stefan Richter [EMAIL PROTECTED]
Tested-by: Olaf Hering [EMAIL PROTECTED]
---
 drivers/ieee1394/sbp2.c |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index e882cb9..47dbe8f 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -773,11 +773,6 @@ static struct sbp2_lu *sbp2_alloc_device(struct 
unit_directory *ud)
SBP2_ERR(failed to register lower 4GB address range);
goto failed_alloc;
}
-#else
-   if (dma_set_mask(hi-host-device.parent, DMA_32BIT_MASK)) {
-   SBP2_ERR(failed to set 4GB DMA mask);
-   goto failed_alloc;
-   }
 #endif
}
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ieee1394: sbp2: more correct Kconfig dependencies

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e4f8cac5e07528f7e0bc21d3682c16c9de993ecb
Commit: e4f8cac5e07528f7e0bc21d3682c16c9de993ecb
Parent: a9c2f18800753c82c45fc13b27bdc148849bdbb2
Author: Stefan Richter [EMAIL PROTECTED]
AuthorDate: Sat Jul 21 17:51:22 2007 +0200
Committer:  Stefan Richter [EMAIL PROTECTED]
CommitDate: Thu Aug 2 20:34:16 2007 +0200

ieee1394: sbp2: more correct Kconfig dependencies

Make the option SBP2_PHYS_DMA available on all architectures where it
compiles.  This includes x86-64 where I runtime-tested it successfully.

Signed-off-by: Stefan Richter [EMAIL PROTECTED]
---
 drivers/ieee1394/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ieee1394/Kconfig b/drivers/ieee1394/Kconfig
index 8012b3b..545663e 100644
--- a/drivers/ieee1394/Kconfig
+++ b/drivers/ieee1394/Kconfig
@@ -97,7 +97,7 @@ config IEEE1394_SBP2
 
 config IEEE1394_SBP2_PHYS_DMA
bool Enable replacement for physical DMA in SBP2
-   depends on IEEE1394  IEEE1394_SBP2  EXPERIMENTAL  (X86_32 || 
PPC_32)
+   depends on IEEE1394_SBP2  VIRT_TO_BUS  EXPERIMENTAL
help
  This builds sbp2 for use with non-OHCI host adapters which do not
  support physical DMA or for when ohci1394 is run with phys_dma=0.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


firewire: fw-sbp2: set correct maximum payload (fixes CardBus adapters)

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=25659f7183376c6b37661da6141d5eaa21479061
Commit: 25659f7183376c6b37661da6141d5eaa21479061
Parent: e4f8cac5e07528f7e0bc21d3682c16c9de993ecb
Author: Stefan Richter [EMAIL PROTECTED]
AuthorDate: Sat Jul 21 22:43:05 2007 +0200
Committer:  Stefan Richter [EMAIL PROTECTED]
CommitDate: Thu Aug 2 20:34:16 2007 +0200

firewire: fw-sbp2: set correct maximum payload (fixes CardBus adapters)

As far as I know, all CardBus FireWire 400 adapters have a maximum
payload of 1024 bytes which is less than the speed-dependent limit of
2048 bytes.  Fw-sbp2 has to take the host adapter's limit into account.

This apparently fixes Juju's incompatibility with my CardBus cards, a
NEC based card and a VIA based card.

Signed-off-by: Stefan Richter [EMAIL PROTECTED]
Acked-by: Kristian Høgsberg [EMAIL PROTECTED]
---
 drivers/firewire/fw-sbp2.c|5 -
 drivers/firewire/fw-transaction.h |2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 3e4a369..ba816ef 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -984,6 +984,7 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, 
scsi_done_fn_t done)
struct fw_unit *unit = sd-unit;
struct fw_device *device = fw_device(unit-device.parent);
struct sbp2_command_orb *orb;
+   unsigned max_payload;
 
/*
 * Bidirectional commands are not yet implemented, and unknown
@@ -1017,8 +1018,10 @@ static int sbp2_scsi_queuecommand(struct scsi_cmnd *cmd, 
scsi_done_fn_t done)
 * specifies the max payload size as 2 ^ (max_payload + 2), so
 * if we set this to max_speed + 7, we get the right value.
 */
+   max_payload = min(device-max_speed + 7,
+ device-card-max_receive - 1);
orb-request.misc =
-   COMMAND_ORB_MAX_PAYLOAD(device-max_speed + 7) |
+   COMMAND_ORB_MAX_PAYLOAD(max_payload) |
COMMAND_ORB_SPEED(device-max_speed) |
COMMAND_ORB_NOTIFY;
 
diff --git a/drivers/firewire/fw-transaction.h 
b/drivers/firewire/fw-transaction.h
index 5ceaccd..fa7967b 100644
--- a/drivers/firewire/fw-transaction.h
+++ b/drivers/firewire/fw-transaction.h
@@ -231,7 +231,7 @@ struct fw_card {
unsigned long reset_jiffies;
 
unsigned long long guid;
-   int max_receive;
+   unsigned max_receive;
int link_speed;
int config_rom_generation;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


firewire: fw-ohci: dma_free_coherent needs IRQs enabled

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4eaff7d63052d781732de9eff4d2287c8e00348f
Commit: 4eaff7d63052d781732de9eff4d2287c8e00348f
Parent: 25659f7183376c6b37661da6141d5eaa21479061
Author: Stefan Richter [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 19:18:08 2007 +0200
Committer:  Stefan Richter [EMAIL PROTECTED]
CommitDate: Thu Aug 2 20:34:17 2007 +0200

firewire: fw-ohci: dma_free_coherent needs IRQs enabled

Signed-off-by: Stefan Richter [EMAIL PROTECTED]
---
 drivers/firewire/fw-ohci.c |   20 +---
 1 files changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index db70375..7e427b4 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -907,6 +907,8 @@ static void bus_reset_tasklet(unsigned long data)
int self_id_count, i, j, reg;
int generation, new_generation;
unsigned long flags;
+   void *free_rom = NULL;
+   dma_addr_t free_rom_bus = 0;
 
reg = reg_read(ohci, OHCI1394_NodeID);
if (!(reg  OHCI1394_NodeID_idValid)) {
@@ -970,8 +972,8 @@ static void bus_reset_tasklet(unsigned long data)
 */
 
if (ohci-next_config_rom != NULL) {
-   dma_free_coherent(ohci-card.device, CONFIG_ROM_SIZE,
- ohci-config_rom, ohci-config_rom_bus);
+   free_rom = ohci-config_rom;
+   free_rom_bus = ohci-config_rom_bus;
ohci-config_rom  = ohci-next_config_rom;
ohci-config_rom_bus  = ohci-next_config_rom_bus;
ohci-next_config_rom = NULL;
@@ -990,6 +992,10 @@ static void bus_reset_tasklet(unsigned long data)
 
spin_unlock_irqrestore(ohci-lock, flags);
 
+   if (free_rom)
+   dma_free_coherent(ohci-card.device, CONFIG_ROM_SIZE,
+ free_rom, free_rom_bus);
+
fw_core_handle_bus_reset(ohci-card, ohci-node_id, generation,
 self_id_count, ohci-self_id_buffer);
 }
@@ -1186,7 +1192,7 @@ ohci_set_config_rom(struct fw_card *card, u32 
*config_rom, size_t length)
 {
struct fw_ohci *ohci;
unsigned long flags;
-   int retval = 0;
+   int retval = -EBUSY;
__be32 *next_config_rom;
dma_addr_t next_config_rom_bus;
 
@@ -1240,10 +1246,7 @@ ohci_set_config_rom(struct fw_card *card, u32 
*config_rom, size_t length)
 
reg_write(ohci, OHCI1394_ConfigROMmap,
  ohci-next_config_rom_bus);
-   } else {
-   dma_free_coherent(ohci-card.device, CONFIG_ROM_SIZE,
- next_config_rom, next_config_rom_bus);
-   retval = -EBUSY;
+   retval = 0;
}
 
spin_unlock_irqrestore(ohci-lock, flags);
@@ -1257,6 +1260,9 @@ ohci_set_config_rom(struct fw_card *card, u32 
*config_rom, size_t length)
 */
if (retval == 0)
fw_core_initiate_bus_reset(ohci-card, 1);
+   else
+   dma_free_coherent(ohci-card.device, CONFIG_ROM_SIZE,
+ next_config_rom, next_config_rom_bus);
 
return retval;
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


firewire: fw-core: make two variables static

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ae57988f68acdc9fbee649765148f15eb7a1b991
Commit: ae57988f68acdc9fbee649765148f15eb7a1b991
Parent: 4eaff7d63052d781732de9eff4d2287c8e00348f
Author: Stefan Richter [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 20:34:17 2007 +0200
Committer:  Stefan Richter [EMAIL PROTECTED]
CommitDate: Thu Aug 2 20:34:17 2007 +0200

firewire: fw-core: make two variables static

Signed-off-by: Stefan Richter [EMAIL PROTECTED]
---
 drivers/firewire/fw-transaction.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/firewire/fw-transaction.c 
b/drivers/firewire/fw-transaction.c
index 3ce8e2f..3e1cb12 100644
--- a/drivers/firewire/fw-transaction.c
+++ b/drivers/firewire/fw-transaction.c
@@ -734,7 +734,7 @@ fw_core_handle_response(struct fw_card *card, struct 
fw_packet *p)
 }
 EXPORT_SYMBOL(fw_core_handle_response);
 
-const struct fw_address_region topology_map_region =
+static const struct fw_address_region topology_map_region =
{ .start = 0xf0001000ull, .end = 0xf0001400ull, };
 
 static void
@@ -772,7 +772,7 @@ static struct fw_address_handler topology_map = {
.address_callback   = handle_topology_map,
 };
 
-const struct fw_address_region registers_region =
+static const struct fw_address_region registers_region =
{ .start = 0xf000ull, .end = 0xf400ull, };
 
 static void
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[NET]: Removal of duplicated include net/wanrouter/wanmain.c

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2f0812350e0e34f583919470b0517c2e368ee048
Commit: 2f0812350e0e34f583919470b0517c2e368ee048
Parent: 7a883eaf62f4b943ebec738ce3b0796c67ef5d32
Author: Michal Piotrowski [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 21:50:44 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:42:22 2007 -0700

[NET]: Removal of duplicated include net/wanrouter/wanmain.c

Signed-off-by: Michal Piotrowski [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/wanrouter/wanmain.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
index 849cc06..9ab31a3 100644
--- a/net/wanrouter/wanmain.c
+++ b/net/wanrouter/wanmain.c
@@ -46,7 +46,6 @@
 #include linux/capability.h
 #include linux/errno.h   /* return codes */
 #include linux/kernel.h
-#include linux/init.h
 #include linux/module.h  /* support for loadable modules */
 #include linux/slab.h/* kmalloc(), kfree() */
 #include linux/mm.h
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[NETFILTER] nf_conntrack_l3proto_ipv4_compat.c: kmalloc + memset conversion to kzalloc

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8adc5465525f28be1f728b6fa600d327e1d49f55
Commit: 8adc5465525f28be1f728b6fa600d327e1d49f55
Parent: 9f0d1a004d8d8c33d337d2b1cc9f0dc941cab627
Author: Mariusz Kozlowski [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 21:53:24 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:42:24 2007 -0700

[NETFILTER] nf_conntrack_l3proto_ipv4_compat.c: kmalloc + memset conversion 
to kzalloc

Signed-off-by: Mariusz Kozlowski [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 .../netfilter/nf_conntrack_l3proto_ipv4_compat.c   |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c 
b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
index 27c7918..b3dd5de 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
@@ -294,15 +294,14 @@ static int exp_open(struct inode *inode, struct file 
*file)
struct ct_expect_iter_state *st;
int ret;
 
-   st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
-   if (st == NULL)
+   st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
+   if (!st)
return -ENOMEM;
ret = seq_open(file, exp_seq_ops);
if (ret)
goto out_free;
seq  = file-private_data;
seq-private = st;
-   memset(st, 0, sizeof(struct ct_expect_iter_state));
return ret;
 out_free:
kfree(st);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[NETFILTER] nf_conntrack_expect.c: kmalloc + memset conversion to kzalloc

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9f0d1a004d8d8c33d337d2b1cc9f0dc941cab627
Commit: 9f0d1a004d8d8c33d337d2b1cc9f0dc941cab627
Parent: 2f0812350e0e34f583919470b0517c2e368ee048
Author: Mariusz Kozlowski [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 21:52:34 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:42:23 2007 -0700

[NETFILTER] nf_conntrack_expect.c: kmalloc + memset conversion to kzalloc

Signed-off-by: Mariusz Kozlowski [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/netfilter/nf_conntrack_expect.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/netfilter/nf_conntrack_expect.c 
b/net/netfilter/nf_conntrack_expect.c
index eb6695d..3ac64e2 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -477,15 +477,14 @@ static int exp_open(struct inode *inode, struct file 
*file)
struct ct_expect_iter_state *st;
int ret;
 
-   st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
-   if (st == NULL)
+   st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
+   if (!st)
return -ENOMEM;
ret = seq_open(file, exp_seq_ops);
if (ret)
goto out_free;
seq  = file-private_data;
seq-private = st;
-   memset(st, 0, sizeof(struct ct_expect_iter_state));
return ret;
 out_free:
kfree(st);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IPV4] route.c: mostly kmalloc + memset conversion to k[cz]alloc

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1bcabbdb0bdfe8b15b05150a7857646430aaa7f8
Commit: 1bcabbdb0bdfe8b15b05150a7857646430aaa7f8
Parent: 4487b2f657a4d204c35a7afaa45fc8569c9069ca
Author: Mariusz Kozlowski [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 21:54:27 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:42:27 2007 -0700

[IPV4] route.c: mostly kmalloc + memset conversion to k[cz]alloc

Signed-off-by: Mariusz Kozlowski [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/route.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index df42b7f..c7ca94b 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -374,8 +374,9 @@ static int rt_cache_seq_open(struct inode *inode, struct 
file *file)
 {
struct seq_file *seq;
int rc = -ENOMEM;
-   struct rt_cache_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
+   struct rt_cache_iter_state *s;
 
+   s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
rc = seq_open(file, rt_cache_seq_ops);
@@ -383,7 +384,6 @@ static int rt_cache_seq_open(struct inode *inode, struct 
file *file)
goto out_kfree;
seq  = file-private_data;
seq-private = s;
-   memset(s, 0, sizeof(*s));
 out:
return rc;
 out_kfree:
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IPV4] raw.c: kmalloc + memset conversion to kzalloc

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4487b2f657a4d204c35a7afaa45fc8569c9069ca
Commit: 4487b2f657a4d204c35a7afaa45fc8569c9069ca
Parent: 8adc5465525f28be1f728b6fa600d327e1d49f55
Author: Mariusz Kozlowski [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 21:53:57 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:42:26 2007 -0700

[IPV4] raw.c: kmalloc + memset conversion to kzalloc

Signed-off-by: Mariusz Kozlowski [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/raw.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 24d7c9f..c6d7152 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -900,8 +900,9 @@ static int raw_seq_open(struct inode *inode, struct file 
*file)
 {
struct seq_file *seq;
int rc = -ENOMEM;
-   struct raw_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL);
+   struct raw_iter_state *s;
 
+   s = kzalloc(sizeof(*s), GFP_KERNEL);
if (!s)
goto out;
rc = seq_open(file, raw_seq_ops);
@@ -910,7 +911,6 @@ static int raw_seq_open(struct inode *inode, struct file 
*file)
 
seq = file-private_data;
seq-private = s;
-   memset(s, 0, sizeof(*s));
 out:
return rc;
 out_kfree:
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PF_KEY]: Fix ipsec not working in 2.6.23-rc1-git10

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4a4b6271a8df417e328aed4c8a7e04e0b282207e
Commit: 4a4b6271a8df417e328aed4c8a7e04e0b282207e
Parent: 3516ffb0fef710749daf288c0fe146503e0cf9d4
Author: Joy Latten [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 19:25:43 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:42:29 2007 -0700

[PF_KEY]: Fix ipsec not working in 2.6.23-rc1-git10

Although an ipsec SA was established, kernel couldn't seem to find it.

I think since we are now using x-sel.family instead of family in
the xfrm_selector_match() called in xfrm_state_find(), af_key needs to
set this field too, just as xfrm_user.

In af_key.c, x-sel.family only gets set when there's an
ext_hdrs[SADB_EXT_ADDRESS_PROXY-1] which I think is for tunnel.

I think pfkey needs to also set the x-sel.family field when it is 0.

Tested with below patch, and ipsec worked when using pfkey.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/key/af_key.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/key/af_key.c b/net/key/af_key.c
index 7b0a95a..5502df1 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -1206,6 +1206,9 @@ static struct xfrm_state * pfkey_msg2xfrm_state(struct 
sadb_msg *hdr,
x-sel.prefixlen_s = addr-sadb_address_prefixlen;
}
 
+   if (!x-sel.family)
+   x-sel.family = x-props.family;
+
if (ext_hdrs[SADB_X_EXT_NAT_T_TYPE-1]) {
struct sadb_x_nat_t_type* n_type;
struct xfrm_encap_tmpl *natt;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[TCP]: Invoke tcp_sendmsg() directly, do not use inet_sendmsg().

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3516ffb0fef710749daf288c0fe146503e0cf9d4
Commit: 3516ffb0fef710749daf288c0fe146503e0cf9d4
Parent: 1bcabbdb0bdfe8b15b05150a7857646430aaa7f8
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 19:23:56 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:42:28 2007 -0700

[TCP]: Invoke tcp_sendmsg() directly, do not use inet_sendmsg().

As discovered by Evegniy Polyakov, if we try to sendmsg after
a connection reset, we can do incredibly stupid things.

The core issue is that inet_sendmsg() tries to autobind the
socket, but we should never do that for TCP.  Instead we should
just go straight into TCP's sendmsg() code which will do all
of the necessary state and pending socket error checks.

TCP's sendpage already directly vectors to tcp_sendpage(), so this
merely brings sendmsg() in line with that.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/net/tcp.h   |2 +-
 net/ipv4/af_inet.c  |2 +-
 net/ipv4/tcp.c  |3 ++-
 net/ipv4/tcp_ipv4.c |1 -
 net/ipv6/af_inet6.c |2 +-
 net/ipv6/tcp_ipv6.c |1 -
 6 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/net/tcp.h b/include/net/tcp.h
index c209361..185c7ec 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -281,7 +281,7 @@ extern int  tcp_v4_remember_stamp(struct 
sock *sk);
 
 extern int tcp_v4_tw_remember_stamp(struct 
inet_timewait_sock *tw);
 
-extern int tcp_sendmsg(struct kiocb *iocb, struct sock *sk,
+extern int tcp_sendmsg(struct kiocb *iocb, struct socket 
*sock,
struct msghdr *msg, size_t size);
 extern ssize_t tcp_sendpage(struct socket *sock, struct page 
*page, int offset, size_t size, int flags);
 
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 06c08e5..e681034 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -831,7 +831,7 @@ const struct proto_ops inet_stream_ops = {
.shutdown  = inet_shutdown,
.setsockopt= sock_common_setsockopt,
.getsockopt= sock_common_getsockopt,
-   .sendmsg   = inet_sendmsg,
+   .sendmsg   = tcp_sendmsg,
.recvmsg   = sock_common_recvmsg,
.mmap  = sock_no_mmap,
.sendpage  = tcp_sendpage,
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index da4c0b6..7e74011 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -658,9 +658,10 @@ static inline int select_size(struct sock *sk)
return tmp;
 }
 
-int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+int tcp_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg,
size_t size)
 {
+   struct sock *sk = sock-sk;
struct iovec *iov;
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb;
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 3f5f742..9c94627 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2425,7 +2425,6 @@ struct proto tcp_prot = {
.shutdown   = tcp_shutdown,
.setsockopt = tcp_setsockopt,
.getsockopt = tcp_getsockopt,
-   .sendmsg= tcp_sendmsg,
.recvmsg= tcp_recvmsg,
.backlog_rcv= tcp_v4_do_rcv,
.hash   = tcp_v4_hash,
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index eed0937..b5f9637 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -484,7 +484,7 @@ const struct proto_ops inet6_stream_ops = {
.shutdown  = inet_shutdown, /* ok   */
.setsockopt= sock_common_setsockopt,/* ok   */
.getsockopt= sock_common_getsockopt,/* ok   */
-   .sendmsg   = inet_sendmsg,  /* ok   */
+   .sendmsg   = tcp_sendmsg,   /* ok   */
.recvmsg   = sock_common_recvmsg,   /* ok   */
.mmap  = sock_no_mmap,
.sendpage  = tcp_sendpage,
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index f10f368..cbdb784 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -2115,7 +2115,6 @@ struct proto tcpv6_prot = {
.shutdown   = tcp_shutdown,
.setsockopt = tcp_setsockopt,
.getsockopt = tcp_getsockopt,
-   .sendmsg= tcp_sendmsg,
.recvmsg= tcp_recvmsg,
.backlog_rcv= tcp_v6_do_rcv,
.hash   = tcp_v6_hash,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo 

[TIPC]: Fix two minor sparse warnings.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d788d8056fd913defa48bd94f18dc53de98cd7a6
Commit: d788d8056fd913defa48bd94f18dc53de98cd7a6
Parent: 248bbf38215fd5ce45a31c65c5e5511d9b611e5a
Author: Florian Westphal [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 19:28:06 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:42:31 2007 -0700

[TIPC]: Fix two minor sparse warnings.

fix two warnings generated by sparse:

link.c:2386 symbol 'msgcount' shadows an earlier one
node.c:244 symbol 'addr_string' shadows an earlier one

Signed-off-by: Florian Westphal [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/tipc/link.c |2 +-
 net/tipc/node.c |2 --
 2 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/tipc/link.c b/net/tipc/link.c
index 1d674e0..1b17fec 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -2383,10 +2383,10 @@ void tipc_link_changeover(struct link *l_ptr)
struct tipc_msg *msg = buf_msg(crs);
 
if ((msg_user(msg) == MSG_BUNDLER)  split_bundles) {
-   u32 msgcount = msg_msgcnt(msg);
struct tipc_msg *m = msg_get_wrapped(msg);
unchar* pos = (unchar*)m;
 
+   msgcount = msg_msgcnt(msg);
while (msgcount--) {
msg_set_seqno(m,msg_seqno(msg));
tipc_link_tunnel(l_ptr, tunnel_hdr, m,
diff --git a/net/tipc/node.c b/net/tipc/node.c
index e2e452a..598f4d3 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -241,8 +241,6 @@ struct node *tipc_node_attach_link(struct link *l_ptr)
char addr_string[16];
 
if (n_ptr-link_cnt = 2) {
-   char addr_string[16];
-
err(Attempt to create third link to %s\n,
addr_string_fill(addr_string, n_ptr-addr));
return NULL;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[TIPC]: Make function tipc_nameseq_subscribe static.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=248bbf38215fd5ce45a31c65c5e5511d9b611e5a
Commit: 248bbf38215fd5ce45a31c65c5e5511d9b611e5a
Parent: 4a4b6271a8df417e328aed4c8a7e04e0b282207e
Author: Florian Westphal [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 19:26:23 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:42:30 2007 -0700

[TIPC]: Make function tipc_nameseq_subscribe static.

make needlessly global function tipc_nameseq_subscribe static.

Signed-off-by: Florian Westphal [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/tipc/name_table.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index d8473ee..ac7dfdd 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -501,7 +501,7 @@ end_node:
  * sequence overlapping with the requested sequence
  */
 
-void tipc_nameseq_subscribe(struct name_seq *nseq, struct subscription *s)
+static void tipc_nameseq_subscribe(struct name_seq *nseq, struct subscription 
*s)
 {
struct sub_seq *sseq = nseq-sseqs;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sctp: move global declaration to header file.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a5fcb9cf8e5c3fabaab1c20668f58fe85d7c70d
Commit: 0a5fcb9cf8e5c3fabaab1c20668f58fe85d7c70d
Parent: 046752104c7090e3679b09274f02d8fd2aa0b4b2
Author: [EMAIL PROTECTED] [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 23:21:32 2007 +0200
Committer:  Vlad Yasevich [EMAIL PROTECTED]
CommitDate: Wed Aug 1 11:19:06 2007 -0400

sctp: move global declaration to header file.

sctp_chunk_cachep  sctp_bucket_cachep is used module global, so move it
to a header file.

Signed-off-by: Sebastian Siewior [EMAIL PROTECTED]
Signed-off-by: Vlad Yasevich [EMAIL PROTECTED]
---
 include/net/sctp/sctp.h  |   10 ++
 net/sctp/sm_make_chunk.c |2 --
 net/sctp/socket.c|2 --
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 16baef4..d529045 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -190,6 +190,16 @@ void sctp_assocs_proc_exit(void);
 
 
 /*
+ * Module global variables
+ */
+
+ /*
+  * sctp/protocol.c
+  */
+extern struct kmem_cache *sctp_chunk_cachep __read_mostly;
+extern struct kmem_cache *sctp_bucket_cachep __read_mostly;
+
+/*
  *  Section:  Macros, externs, and inlines
  */
 
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 8d18f57..ad02311 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -65,8 +65,6 @@
 #include net/sctp/sctp.h
 #include net/sctp/sm.h
 
-extern struct kmem_cache *sctp_chunk_cachep;
-
 SCTP_STATIC
 struct sctp_chunk *sctp_make_chunk(const struct sctp_association *asoc,
   __u8 type, __u8 flags, int paylen);
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index f8bacc8..f8de0eb 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -107,8 +107,6 @@ static void sctp_sock_migrate(struct sock *, struct sock *,
  struct sctp_association *, sctp_socket_type_t);
 static char *sctp_hmac_alg = SCTP_COOKIE_HMAC_ALG;
 
-extern struct kmem_cache *sctp_bucket_cachep;
-
 /* Get the sndbuf space available at the time on the association.  */
 static inline int sctp_wspace(struct sctp_association *asoc)
 {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sctp: make locally used function static

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=046752104c7090e3679b09274f02d8fd2aa0b4b2
Commit: 046752104c7090e3679b09274f02d8fd2aa0b4b2
Parent: fc34f6c617bf2a845d793af12b96bcc0afd472c4
Author: [EMAIL PROTECTED] [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 23:21:31 2007 +0200
Committer:  Vlad Yasevich [EMAIL PROTECTED]
CommitDate: Wed Aug 1 11:19:05 2007 -0400

sctp: make locally used function static

Forward declarion is static, the function itself is not. Make it
consistent.

Signed-off-by: Sebastian Siewior [EMAIL PROTECTED]
Signed-off-by: Vlad Yasevich [EMAIL PROTECTED]
---
 net/sctp/input.c  |2 +-
 net/sctp/socket.c |6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/sctp/input.c b/net/sctp/input.c
index d57ff7f..47e5601 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -590,7 +590,7 @@ out_unlock:
  * Return 0 - If further processing is needed.
  * Return 1 - If the packet can be discarded right away.
  */
-int sctp_rcv_ootb(struct sk_buff *skb)
+static int sctp_rcv_ootb(struct sk_buff *skb)
 {
sctp_chunkhdr_t *ch;
__u8 *ch_end;
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index ee88f2e..f8bacc8 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -433,7 +433,7 @@ out:
  *
  * Only sctp_setsockopt_bindx() is supposed to call this function.
  */
-int sctp_bindx_add(struct sock *sk, struct sockaddr *addrs, int addrcnt)
+static int sctp_bindx_add(struct sock *sk, struct sockaddr *addrs, int addrcnt)
 {
int cnt;
int retval = 0;
@@ -602,7 +602,7 @@ out:
  *
  * Only sctp_setsockopt_bindx() is supposed to call this function.
  */
-int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
+static int sctp_bindx_rem(struct sock *sk, struct sockaddr *addrs, int addrcnt)
 {
struct sctp_sock *sp = sctp_sk(sk);
struct sctp_endpoint *ep = sp-ep;
@@ -5964,7 +5964,7 @@ static int sctp_wait_for_accept(struct sock *sk, long 
timeo)
return err;
 }
 
-void sctp_wait_for_close(struct sock *sk, long timeout)
+static void sctp_wait_for_close(struct sock *sk, long timeout)
 {
DEFINE_WAIT(wait);
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sctp: try to fix readlock

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d6f9fdaf643eca8fb49fffdd6269b78f4ef1ef86
Commit: d6f9fdaf643eca8fb49fffdd6269b78f4ef1ef86
Parent: c86dabcf00f3ca167df59f3526a53b3da3ede2c8
Author: Sebastian Siewior [EMAIL PROTECTED]
AuthorDate: Fri Jul 27 22:55:59 2007 +0200
Committer:  Vlad Yasevich [EMAIL PROTECTED]
CommitDate: Wed Aug 1 11:19:06 2007 -0400

sctp: try to fix readlock

unlock the reader lock in error case.

Signed-off-by: Sebastian Siewior [EMAIL PROTECTED]
Signed-off-by: Vlad Yasevich [EMAIL PROTECTED]
---
 net/sctp/socket.c |   16 +++-
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index b31be09..be743d4 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4350,7 +4350,7 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, 
int len,
space_left, bytes_copied);
if (cnt  0) {
err = cnt;
-   goto error;
+   goto error_lock;
}
goto copy_getaddrs;
}
@@ -4364,7 +4364,7 @@ static int sctp_getsockopt_local_addrs(struct sock *sk, 
int len,
addrlen = sctp_get_af_specific(temp.sa.sa_family)-sockaddr_len;
if (space_left  addrlen) {
err =  -ENOMEM; /*fixme: right error?*/
-   goto error;
+   goto error_lock;
}
memcpy(buf, temp, addrlen);
buf += addrlen;
@@ -4378,15 +4378,21 @@ copy_getaddrs:
 
if (copy_to_user(to, addrs, bytes_copied)) {
err = -EFAULT;
-   goto error;
+   goto out;
}
if (put_user(cnt, ((struct sctp_getaddrs __user *)optval)-addr_num)) {
err = -EFAULT;
-   goto error;
+   goto out;
}
if (put_user(bytes_copied, optlen))
err = -EFAULT;
-error:
+
+   goto out;
+
+error_lock:
+   sctp_read_unlock(addr_lock);
+
+out:
kfree(addrs);
return err;
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sctp: remove shadowed symbols

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c86dabcf00f3ca167df59f3526a53b3da3ede2c8
Commit: c86dabcf00f3ca167df59f3526a53b3da3ede2c8
Parent: 0a5fcb9cf8e5c3fabaab1c20668f58fe85d7c70d
Author: [EMAIL PROTECTED] [EMAIL PROTECTED]
AuthorDate: Thu Jul 26 23:21:33 2007 +0200
Committer:  Vlad Yasevich [EMAIL PROTECTED]
CommitDate: Wed Aug 1 11:19:06 2007 -0400

sctp: remove shadowed symbols

Fixes the following sparse warnings:
net/sctp/sm_make_chunk.c:1457:9: warning: symbol 'len' shadows an earlier 
one
net/sctp/sm_make_chunk.c:1356:23: originally declared here
net/sctp/socket.c:1534:22: warning: symbol 'chunk' shadows an earlier one
net/sctp/socket.c:1387:20: originally declared here

Signed-off-by: Sebastian Siewior [EMAIL PROTECTED]
Signed-off-by: Vlad Yasevich [EMAIL PROTECTED]
---
 net/sctp/sm_make_chunk.c |1 -
 net/sctp/socket.c|1 -
 2 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index ad02311..ba76cec 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1452,7 +1452,6 @@ no_hmac:
do_gettimeofday(tv);
 
if (!asoc  tv_lt(bear_cookie-expiration, tv)) {
-   __u16 len;
/*
 * Section 3.3.10.3 Stale Cookie Error (3)
 *
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index f8de0eb..b31be09 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -1529,7 +1529,6 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct 
sock *sk,
goto out_unlock;
}
if (sinfo_flags  SCTP_ABORT) {
-   struct sctp_chunk *chunk;
 
chunk = sctp_make_abort_user(asoc, msg, msg_len);
if (!chunk) {
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sctp: fix shadow symbol in net/sctp/tsnmap.c

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc121fa87a0ce356c23fb4d7358310e747cad8cc
Commit: cc121fa87a0ce356c23fb4d7358310e747cad8cc
Parent: d6f9fdaf643eca8fb49fffdd6269b78f4ef1ef86
Author: Sebastian Siewior [EMAIL PROTECTED]
AuthorDate: Fri Jul 27 22:59:49 2007 +0200
Committer:  Vlad Yasevich [EMAIL PROTECTED]
CommitDate: Wed Aug 1 11:19:06 2007 -0400

sctp: fix shadow symbol in net/sctp/tsnmap.c

net/sctp/tsnmap.c:164:16: warning: symbol '_end' shadows an earlier one
include/asm-generic/sections.h:13:13: originally declared here

Renamed renamed _end to end_ and _start (for consistence).

Signed-off-by: Sebastian Siewior [EMAIL PROTECTED]
Signed-off-by: Vlad Yasevich [EMAIL PROTECTED]
---
 net/sctp/tsnmap.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/net/sctp/tsnmap.c b/net/sctp/tsnmap.c
index d3192a1..1ff0daa 100644
--- a/net/sctp/tsnmap.c
+++ b/net/sctp/tsnmap.c
@@ -161,7 +161,7 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct 
sctp_tsnmap *map,
 __u16 *start, __u16 *end)
 {
int started, ended;
-   __u16 _start, _end, offset;
+   __u16 start_, end_, offset;
 
/* We haven't found a gap yet.  */
started = ended = 0;
@@ -175,7 +175,7 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct 
sctp_tsnmap *map,
 
offset = iter-start - map-base_tsn;
sctp_tsnmap_find_gap_ack(map-tsn_map, offset, map-len, 0,
-started, _start, ended, _end);
+started, start_, ended, end_);
}
 
/* Do we need to check the overflow map? */
@@ -193,8 +193,8 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct 
sctp_tsnmap *map,
 offset,
 map-len,
 map-len,
-started, _start,
-ended, _end);
+started, start_,
+ended, end_);
}
 
/* The Gap Ack Block happens to end at the end of the
@@ -202,7 +202,7 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct 
sctp_tsnmap *map,
 */
if (started  !ended) {
ended++;
-   _end = map-len + map-len - 1;
+   end_ = map-len + map-len - 1;
}
 
/* If we found a Gap Ack Block, return the start and end and
@@ -215,8 +215,8 @@ SCTP_STATIC int sctp_tsnmap_next_gap_ack(const struct 
sctp_tsnmap *map,
int gap = map-cumulative_tsn_ack_point -
map-base_tsn;
 
-   *start = _start - gap;
-   *end = _end - gap;
+   *start = start_ - gap;
+   *end = end_ - gap;
 
/* Move the iterator forward.  */
iter-start = map-cumulative_tsn_ack_point + *end + 1;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: IPv4 mapped addr not returned in SCTPv6 accept()

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b225b884a18a1932db5414abd3ef94a45e4e348e
Commit: b225b884a18a1932db5414abd3ef94a45e4e348e
Parent: cc121fa87a0ce356c23fb4d7358310e747cad8cc
Author: Dave Johnson [EMAIL PROTECTED]
AuthorDate: Wed Jul 25 19:49:29 2007 -0400
Committer:  Vlad Yasevich [EMAIL PROTECTED]
CommitDate: Wed Aug 1 11:19:06 2007 -0400

SCTP: IPv4 mapped addr not returned in SCTPv6 accept()

An accept() call on a SCTPv6 socket that returns due to connection of
a IPv4 mapped peer will fill out the 'struct sockaddr' with a zero
IPv6 address instead of the IPv4 mapped address of the peer.

This is due to the v4mapped flag not getting copied into the new
socket on accept() as well as a missing check for INET6 socket type in
sctp_v4_to_sk_*addr().

Signed-off-by: Dave Johnson [EMAIL PROTECTED]
Cc: Srinivas Akkipeddi [EMAIL PROTECTED]
Signed-off-by: Vlad Yasevich [EMAIL PROTECTED]
---
 net/sctp/ipv6.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index 2c29394..f8aa23d 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -641,6 +641,8 @@ static struct sock *sctp_v6_create_accept_sk(struct sock 
*sk,
newsctp6sk = (struct sctp6_sock *)newsk;
inet_sk(newsk)-pinet6 = newsctp6sk-inet6;
 
+   sctp_sk(newsk)-v4mapped = sctp_sk(sk)-v4mapped;
+
newinet = inet_sk(newsk);
newnp = inet6_sk(newsk);
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: IPv4 mapped addr not returned in SCTPv6 accept()

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e4d1feab5df035312494ce3037ac5f041d0f5fc9
Commit: e4d1feab5df035312494ce3037ac5f041d0f5fc9
Parent: b225b884a18a1932db5414abd3ef94a45e4e348e
Author: Vlad Yasevich [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 10:56:43 2007 -0400
Committer:  Vlad Yasevich [EMAIL PROTECTED]
CommitDate: Wed Aug 1 11:19:06 2007 -0400

SCTP: IPv4 mapped addr not returned in SCTPv6 accept()

When issuing a connect call on an AF_INET6 sctp socket with
a IPv4-mapped destination, the peer address that is returned
by getpeeraddr() should be v4-mapped as well.

Signed-off-by: Vlad Yasevich [EMAIL PROTECTED]
---
 net/sctp/socket.c |   20 +++-
 1 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index be743d4..01c6364 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -975,7 +975,7 @@ static int __sctp_connect(struct sock* sk,
int err = 0;
int addrcnt = 0;
int walk_size = 0;
-   union sctp_addr *sa_addr;
+   union sctp_addr *sa_addr = NULL;
void *addr_buf;
unsigned short port;
unsigned int f_flags = 0;
@@ -1009,7 +1009,10 @@ static int __sctp_connect(struct sock* sk,
goto out_free;
}
 
-   err = sctp_verify_addr(sk, sa_addr, af-sockaddr_len);
+   /* Save current address so we can work with it */
+   memcpy(to, sa_addr, af-sockaddr_len);
+
+   err = sctp_verify_addr(sk, to, af-sockaddr_len);
if (err)
goto out_free;
 
@@ -1019,12 +1022,11 @@ static int __sctp_connect(struct sock* sk,
if (asoc  asoc-peer.port  asoc-peer.port != port)
goto out_free;
 
-   memcpy(to, sa_addr, af-sockaddr_len);
 
/* Check if there already is a matching association on the
 * endpoint (other than the one created here).
 */
-   asoc2 = sctp_endpoint_lookup_assoc(ep, sa_addr, transport);
+   asoc2 = sctp_endpoint_lookup_assoc(ep, to, transport);
if (asoc2  asoc2 != asoc) {
if (asoc2-state = SCTP_STATE_ESTABLISHED)
err = -EISCONN;
@@ -1037,7 +1039,7 @@ static int __sctp_connect(struct sock* sk,
 * make sure that there is no peeled-off association matching
 * the peer address even on another socket.
 */
-   if (sctp_endpoint_is_peeled_off(ep, sa_addr)) {
+   if (sctp_endpoint_is_peeled_off(ep, to)) {
err = -EADDRNOTAVAIL;
goto out_free;
}
@@ -1068,7 +1070,7 @@ static int __sctp_connect(struct sock* sk,
}
}
 
-   scope = sctp_scope(sa_addr);
+   scope = sctp_scope(to);
asoc = sctp_association_new(ep, sk, scope, GFP_KERNEL);
if (!asoc) {
err = -ENOMEM;
@@ -1077,7 +1079,7 @@ static int __sctp_connect(struct sock* sk,
}
 
/* Prime the peer's transport structures.  */
-   transport = sctp_assoc_add_peer(asoc, sa_addr, GFP_KERNEL,
+   transport = sctp_assoc_add_peer(asoc, to, GFP_KERNEL,
SCTP_UNKNOWN);
if (!transport) {
err = -ENOMEM;
@@ -1101,8 +1103,8 @@ static int __sctp_connect(struct sock* sk,
 
/* Initialize sk's dport and daddr for getpeername() */
inet_sk(sk)-dport = htons(asoc-peer.port);
-   af = sctp_get_af_specific(to.sa.sa_family);
-   af-to_sk_daddr(to, sk);
+   af = sctp_get_af_specific(sa_addr-sa.sa_family);
+   af-to_sk_daddr(sa_addr, sk);
sk-sk_err = 0;
 
/* in-kernel sockets don't generally have a file allocated to them
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


SCTP: drop SACK if ctsn is not less than the next tsn of assoc

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aecedeab6fcf914929cd8ff6fa0b8ae9bfdf3d30
Commit: aecedeab6fcf914929cd8ff6fa0b8ae9bfdf3d30
Parent: e4d1feab5df035312494ce3037ac5f041d0f5fc9
Author: Wei Yongjun [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 16:57:44 2007 +0800
Committer:  Vlad Yasevich [EMAIL PROTECTED]
CommitDate: Thu Aug 2 10:41:18 2007 -0400

SCTP: drop SACK if ctsn is not less than the next tsn of assoc

We need to drop the SACK if the peer is attempting to acknowledge
unset data, i.e.  the CTSN in the SACK is greater or equal to the
next TSN we will send.

Example:
Endpoint A  Endpoint B
 ---   DATA (TSN=1)
SACK(TSN=1) ---
 ---   DATA (TSN=2)
 ---   DATA (TSN=3)
 ---   DATA (TSN=4)
 ---   DATA (TSN=5)
SACK(TSN=1000) ---
 ---   DATA (TSN=6)
 ---   DATA (TSN=7)

Signed-off-by: Wei Yongjun [EMAIL PROTECTED]
Signed-off-by: Vlad Yasevich [EMAIL PROTECTED]
---
 net/sctp/sm_statefuns.c |  103 +++---
 1 files changed, 78 insertions(+), 25 deletions(-)

diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c
index fd2dfdd..71cad56 100644
--- a/net/sctp/sm_statefuns.c
+++ b/net/sctp/sm_statefuns.c
@@ -97,6 +97,13 @@ static sctp_disposition_t 
sctp_stop_t1_and_abort(sctp_cmd_seq_t *commands,
   const struct sctp_association *asoc,
   struct sctp_transport *transport);
 
+static sctp_disposition_t sctp_sf_abort_violation(
+const struct sctp_association *asoc,
+void *arg,
+sctp_cmd_seq_t *commands,
+const __u8 *payload,
+const size_t paylen);
+
 static sctp_disposition_t sctp_sf_violation_chunklen(
 const struct sctp_endpoint *ep,
 const struct sctp_association *asoc,
@@ -104,6 +111,13 @@ static sctp_disposition_t sctp_sf_violation_chunklen(
 void *arg,
 sctp_cmd_seq_t *commands);
 
+static sctp_disposition_t sctp_sf_violation_ctsn(
+const struct sctp_endpoint *ep,
+const struct sctp_association *asoc,
+const sctp_subtype_t type,
+void *arg,
+sctp_cmd_seq_t *commands);
+
 /* Small helper function that checks if the chunk length
  * is of the appropriate length.  The 'required_length' argument
  * is set to be the size of a specific chunk we are testing.
@@ -2880,6 +2894,13 @@ sctp_disposition_t sctp_sf_eat_sack_6_2(const struct 
sctp_endpoint *ep,
return SCTP_DISPOSITION_DISCARD;
}
 
+   /* If Cumulative TSN Ack beyond the max tsn currently
+* send, terminating the association and respond to the
+* sender with an ABORT.
+*/
+   if (!TSN_lt(ctsn, asoc-next_tsn))
+   return sctp_sf_violation_ctsn(ep, asoc, type, arg, commands);
+
/* Return this SACK for further processing.  */
sctp_add_cmd_sf(commands, SCTP_CMD_PROCESS_SACK, SCTP_SACKH(sackh));
 
@@ -3691,40 +3712,21 @@ sctp_disposition_t sctp_sf_violation(const struct 
sctp_endpoint *ep,
return SCTP_DISPOSITION_VIOLATION;
 }
 
-
 /*
- * Handle a protocol violation when the chunk length is invalid.
- * Invalid length is identified as smaller then the minimal length a
- * given chunk can be.  For example, a SACK chunk has invalid length
- * if it's length is set to be smaller then the size of sctp_sack_chunk_t.
- *
- * We inform the other end by sending an ABORT with a Protocol Violation
- * error code.
- *
- * Section: Not specified
- * Verification Tag:  Nothing to do
- * Inputs
- * (endpoint, asoc, chunk)
- *
- * Outputs
- * (reply_msg, msg_up, counters)
- *
- * Generate an  ABORT chunk and terminate the association.
+ * Common function to handle a protocol violation.
  */
-static sctp_disposition_t sctp_sf_violation_chunklen(
-const struct sctp_endpoint *ep,
+static sctp_disposition_t sctp_sf_abort_violation(
 const struct sctp_association *asoc,
-const sctp_subtype_t type,
 void *arg,
-sctp_cmd_seq_t 

SCTP: remove useless code in function sctp_init_cause

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5f8f1c3c87e44f1bd0180cf19d0e7c83d062b4dc
Commit: 5f8f1c3c87e44f1bd0180cf19d0e7c83d062b4dc
Parent: aecedeab6fcf914929cd8ff6fa0b8ae9bfdf3d30
Author: Wei Yongjun [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 17:02:29 2007 +0800
Committer:  Vlad Yasevich [EMAIL PROTECTED]
CommitDate: Thu Aug 2 10:56:07 2007 -0400

SCTP: remove useless code in function sctp_init_cause

Some code in function sctp_init_cause() seem useless, this patch remove
them.

Signed-off-by: Wei Yongjun [EMAIL PROTECTED]
Signed-off-by: Vlad Yasevich [EMAIL PROTECTED]
---
 net/sctp/sm_make_chunk.c |3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index ba76cec..51c4d7f 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -113,15 +113,12 @@ void  sctp_init_cause(struct sctp_chunk *chunk, __be16 
cause_code,
  const void *payload, size_t paylen)
 {
sctp_errhdr_t err;
-   int padlen;
__u16 len;
 
/* Cause code constants are now defined in network order.  */
err.cause = cause_code;
len = sizeof(sctp_errhdr_t) + paylen;
-   padlen = len % 4;
err.length  = htons(len);
-   len += padlen;
chunk-subh.err_hdr = sctp_addto_chunk(chunk, sizeof(sctp_errhdr_t), 
err);
sctp_addto_chunk(chunk, paylen, payload);
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[TCP]: Also handle snd_una changes in tcp_cwnd_down

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2e6052941ae1f2f875d7d9092acb8836af1e0193
Commit: 2e6052941ae1f2f875d7d9092acb8836af1e0193
Parent: 3a97aeb5c199070f136c085f8b0f9338d19c4148
Author: Ilpo Järvinen [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 19:46:58 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:46:58 2007 -0700

[TCP]: Also handle snd_una changes in tcp_cwnd_down

tcp_cwnd_down must check for it too as it should be conservative
in case of collapse stuff and also when receiver is trying to
lie (though that wouldn't be very successful/useful anyway).

Note:
- Separated also is_dupack and do_lost in fast_retransalert
* Much cleaner look-and-feel now
* This time it really fixes cumulative ACK with many new
  SACK blocks recovery entry (I claimed this fixes with
  last patch but it wasn't). TCP will now call
  tcp_update_scoreboard regardless of is_dupack when
  in recovery as long as there is enough fackets_out.
- Introduce FLAG_SND_UNA_ADVANCED
* Some prior_snd_una arguments are unnecessary after it
- Added helper FLAG_ANY_PROGRESS to avoid long FLAG...|FLAG...
  constructs

Signed-off-by: Ilpo Järvinen [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/tcp_input.c |   34 ++
 1 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 378ca8a..c3124e6 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -102,11 +102,13 @@ int sysctl_tcp_abc __read_mostly;
 #define FLAG_DATA_LOST 0x80 /* SACK detected data lossage. 
*/
 #define FLAG_SLOWPATH  0x100 /* Do not skip RFC checks for window 
update.*/
 #define FLAG_ONLY_ORIG_SACKED  0x200 /* SACKs only non-rexmit sent before RTO 
*/
+#define FLAG_SND_UNA_ADVANCED  0x400 /* Snd_una was changed (!= 
FLAG_DATA_ACKED) */
 
 #define FLAG_ACKED (FLAG_DATA_ACKED|FLAG_SYN_ACKED)
 #define FLAG_NOT_DUP   (FLAG_DATA|FLAG_WIN_UPDATE|FLAG_ACKED)
 #define FLAG_CA_ALERT  (FLAG_DATA_SACKED|FLAG_ECE)
 #define FLAG_FORWARD_PROGRESS  (FLAG_ACKED|FLAG_DATA_SACKED)
+#define FLAG_ANY_PROGRESS  (FLAG_FORWARD_PROGRESS|FLAG_SND_UNA_ADVANCED)
 
 #define IsReno(tp) ((tp)-rx_opt.sack_ok == 0)
 #define IsFack(tp) ((tp)-rx_opt.sack_ok  2)
@@ -1856,7 +1858,7 @@ static void tcp_cwnd_down(struct sock *sk, int flag)
struct tcp_sock *tp = tcp_sk(sk);
int decr = tp-snd_cwnd_cnt + 1;
 
-   if ((flagFLAG_FORWARD_PROGRESS) ||
+   if ((flagFLAG_ANY_PROGRESS) ||
(IsReno(tp)  !(flagFLAG_NOT_DUP))) {
tp-snd_cwnd_cnt = decr1;
decr = 1;
@@ -2107,15 +2109,13 @@ static void tcp_mtup_probe_success(struct sock *sk, 
struct sk_buff *skb)
  * tcp_xmit_retransmit_queue().
  */
 static void
-tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
- int prior_packets, int flag)
+tcp_fastretrans_alert(struct sock *sk, int prior_packets, int flag)
 {
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
-   int is_dupack = (tp-snd_una == prior_snd_una 
-(!(flagFLAG_NOT_DUP) ||
- ((flagFLAG_DATA_SACKED) 
-  (tp-fackets_out  tp-reordering;
+   int is_dupack = !(flag(FLAG_SND_UNA_ADVANCED|FLAG_NOT_DUP));
+   int do_lost = is_dupack || ((flagFLAG_DATA_SACKED) 
+   (tp-fackets_out  tp-reordering));
 
/* Some technical things:
 * 1. Reno does not count dupacks (sacked_out) automatically. */
@@ -2192,14 +2192,14 @@ tcp_fastretrans_alert(struct sock *sk, u32 
prior_snd_una,
/* F. Process state. */
switch (icsk-icsk_ca_state) {
case TCP_CA_Recovery:
-   if (prior_snd_una == tp-snd_una) {
+   if (!(flag  FLAG_SND_UNA_ADVANCED)) {
if (IsReno(tp)  is_dupack)
tcp_add_reno_sack(sk);
} else {
int acked = prior_packets - tp-packets_out;
if (IsReno(tp))
tcp_remove_reno_sacks(sk, acked);
-   is_dupack = tcp_try_undo_partial(sk, acked);
+   do_lost = tcp_try_undo_partial(sk, acked);
}
break;
case TCP_CA_Loss:
@@ -2215,7 +2215,7 @@ tcp_fastretrans_alert(struct sock *sk, u32 prior_snd_una,
/* Loss is undone; fall through to processing in Open state. */
default:
if (IsReno(tp)) {
-   if (tp-snd_una != prior_snd_una)
+   if (flag  FLAG_SND_UNA_ADVANCED)
tcp_reset_reno_sack(tp);
 

[TCP]: DSACK signals data receival, be conservative

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=49ff4bb4cd4c04acf8f9e3d3ec2148305a1db445
Commit: 49ff4bb4cd4c04acf8f9e3d3ec2148305a1db445
Parent: 2e6052941ae1f2f875d7d9092acb8836af1e0193
Author: Ilpo Järvinen [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 19:47:59 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Thu Aug 2 19:47:59 2007 -0700

[TCP]: DSACK signals data receival, be conservative

In case a DSACK is received, it's better to lower cwnd as it's
a sign of data receival.

Signed-off-by: Ilpo Järvinen [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/tcp_input.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index c3124e6..f030435 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -103,6 +103,7 @@ int sysctl_tcp_abc __read_mostly;
 #define FLAG_SLOWPATH  0x100 /* Do not skip RFC checks for window 
update.*/
 #define FLAG_ONLY_ORIG_SACKED  0x200 /* SACKs only non-rexmit sent before RTO 
*/
 #define FLAG_SND_UNA_ADVANCED  0x400 /* Snd_una was changed (!= 
FLAG_DATA_ACKED) */
+#define FLAG_DSACKING_ACK  0x800 /* SACK blocks contained DSACK info */
 
 #define FLAG_ACKED (FLAG_DATA_ACKED|FLAG_SYN_ACKED)
 #define FLAG_NOT_DUP   (FLAG_DATA|FLAG_WIN_UPDATE|FLAG_ACKED)
@@ -966,12 +967,14 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff 
*ack_skb, u32 prior_snd_
 
/* Check for D-SACK. */
if (before(ntohl(sp[0].start_seq), TCP_SKB_CB(ack_skb)-ack_seq)) {
+   flag |= FLAG_DSACKING_ACK;
found_dup_sack = 1;
tp-rx_opt.sack_ok |= 4;
NET_INC_STATS_BH(LINUX_MIB_TCPDSACKRECV);
} else if (num_sacks  1 
!after(ntohl(sp[0].end_seq), ntohl(sp[1].end_seq)) 
!before(ntohl(sp[0].start_seq), 
ntohl(sp[1].start_seq))) {
+   flag |= FLAG_DSACKING_ACK;
found_dup_sack = 1;
tp-rx_opt.sack_ok |= 4;
NET_INC_STATS_BH(LINUX_MIB_TCPDSACKOFORECV);
@@ -1858,7 +1861,7 @@ static void tcp_cwnd_down(struct sock *sk, int flag)
struct tcp_sock *tp = tcp_sk(sk);
int decr = tp-snd_cwnd_cnt + 1;
 
-   if ((flagFLAG_ANY_PROGRESS) ||
+   if ((flag(FLAG_ANY_PROGRESS|FLAG_DSACKING_ACK)) ||
(IsReno(tp)  !(flagFLAG_NOT_DUP))) {
tp-snd_cwnd_cnt = decr1;
decr = 1;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SPARC64]: Add missing dma_sync_single_range_for_*().

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=63213196fd4b05b9c3539cbe34775c60f1f6fad0
Commit: 63213196fd4b05b9c3539cbe34775c60f1f6fad0
Parent: 7a883eaf62f4b943ebec738ce3b0796c67ef5d32
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Tue Jul 31 20:43:17 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Fri Aug 3 14:08:20 2007 -0700

[SPARC64]: Add missing dma_sync_single_range_for_*().

Reported by Andrew Morton.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc64/dma-mapping.h |   19 +++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/include/asm-sparc64/dma-mapping.h 
b/include/asm-sparc64/dma-mapping.h
index a72a5f2..1fc6554 100644
--- a/include/asm-sparc64/dma-mapping.h
+++ b/include/asm-sparc64/dma-mapping.h
@@ -108,6 +108,25 @@ static inline void dma_sync_single_for_device(struct 
device *dev,
dma_ops-sync_single_for_device(dev, dma_handle, size, direction);
 }
 
+static inline void dma_sync_single_range_for_cpu(struct device *dev,
+dma_addr_t dma_handle,
+unsigned long offset,
+size_t size,
+enum dma_data_direction 
direction)
+{
+   dma_sync_single_for_cpu(dev, dma_handle+offset, size, direction);
+}
+
+static inline void dma_sync_single_range_for_device(struct device *dev,
+   dma_addr_t dma_handle,
+   unsigned long offset,
+   size_t size,
+   enum dma_data_direction 
direction)
+{
+   dma_sync_single_for_device(dev, dma_handle+offset, size, direction);
+}
+
+
 static inline void dma_sync_sg_for_cpu(struct device *dev,
   struct scatterlist *sg, int nelems,
   enum dma_data_direction direction)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[CG6]: fix memory size detection

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3fc701d5d459f3b83ba874613048d36e91debca2
Commit: 3fc701d5d459f3b83ba874613048d36e91debca2
Parent: 63213196fd4b05b9c3539cbe34775c60f1f6fad0
Author: Krzysztof Helt [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 21:39:32 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Fri Aug 3 14:08:26 2007 -0700

[CG6]: fix memory size detection

This patch fixes memory size detection on the CG6 card.
The 1MB TGX card has dblbuf property set to 0.

Signed-off-by: Krzysztof Helt [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 drivers/video/cg6.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 87c7471..ee9046d 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -677,6 +677,7 @@ static int __devinit cg6_probe(struct of_device *op, const 
struct of_device_id *
struct fb_info *info;
struct cg6_par *par;
int linebytes, err;
+   int dblbuf;
 
info = framebuffer_alloc(sizeof(struct cg6_par), op-dev);
 
@@ -698,7 +699,9 @@ static int __devinit cg6_probe(struct of_device *op, const 
struct of_device_id *
linebytes = of_getintprop_default(dp, linebytes,
  info-var.xres);
par-fbsize = PAGE_ALIGN(linebytes * info-var.yres);
-   if (of_find_property(dp, dblbuf, NULL))
+
+   dblbuf = of_getintprop_default(dp, dblbuf, 0);
+   if (dblbuf)
par-fbsize *= 4;
 
par-fbc = of_ioremap(op-resource[0], CG6_FBC_OFFSET,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[SOUND] CS4231 SBus: Two fixes.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3daadf33013a1c4d7abf4a65b24644cdd8ae896a
Commit: 3daadf33013a1c4d7abf4a65b24644cdd8ae896a
Parent: 3fc701d5d459f3b83ba874613048d36e91debca2
Author: Georg Chini [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 21:55:58 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Fri Aug 3 14:08:33 2007 -0700

[SOUND] CS4231 SBus: Two fixes.

Remove unnecessary sbus_dma_reset function and change sbus_dma_enable
to avoid occasional system crashes when stopping recording.

Signed-off-by: Georg Chini [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 sound/sparc/cs4231.c |   42 +-
 1 files changed, 5 insertions(+), 37 deletions(-)

diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index dca0344..f2950ca 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -74,7 +74,6 @@ struct cs4231_dma_control {
 void   (*enable)(struct cs4231_dma_control *dma_cont, int on);
 int(*request)(struct cs4231_dma_control *dma_cont, 
dma_addr_t bus_addr, size_t len);
 unsigned int   (*address)(struct cs4231_dma_control *dma_cont);
-void   (*reset)(struct snd_cs4231 *chip); 
 void   (*preallocate)(struct snd_cs4231 *chip, struct snd_pcm 
*pcm); 
 #ifdef EBUS_SUPPORT
struct  ebus_dma_info   ebus_info;
@@ -1214,10 +1213,6 @@ static int __init snd_cs4231_probe(struct snd_cs4231 
*chip)
 
spin_lock_irqsave(chip-lock, flags);
 
-
-   /* Reset DMA engine (sbus only).  */
-   chip-p_dma.reset(chip);
-
__cs4231_readb(chip, CS4231P(chip, STATUS));/* clear any pendings 
IRQ */
__cs4231_writeb(chip, 0, CS4231P(chip, STATUS));
mb();
@@ -1861,14 +1856,13 @@ static void sbus_dma_enable(struct cs4231_dma_control 
*dma_cont, int on)
if (!on) {
sbus_writel(0, base-regs + base-dir + APCNC);
sbus_writel(0, base-regs + base-dir + APCNVA);
-   sbus_writel(0, base-regs + base-dir + APCC);
-   sbus_writel(0, base-regs + base-dir + APCVA);
+   if ( base-dir == APC_PLAY ) {
+   sbus_writel(0, base-regs + base-dir + APCC);
+   sbus_writel(0, base-regs + base-dir + APCVA);
+   }
 
-   /* ACK any APC interrupts. */
-   csr = sbus_readl(base-regs + APCCSR);
-   sbus_writel(csr, base-regs + APCCSR);
+   udelay(1200);
} 
-   udelay(1000);
csr = sbus_readl(base-regs + APCCSR);
shift = 0;
if ( base-dir == APC_PLAY )
@@ -1894,23 +1888,6 @@ static unsigned int sbus_dma_addr(struct 
cs4231_dma_control *dma_cont)
 return sbus_readl(base-regs + base-dir + APCVA);
 }
 
-static void sbus_dma_reset(struct snd_cs4231 *chip)
-{
-sbus_writel(APC_CHIP_RESET, chip-port + APCCSR);
-sbus_writel(0x00, chip-port + APCCSR);
-sbus_writel(sbus_readl(chip-port + APCCSR) | APC_CDC_RESET,
-   chip-port + APCCSR);
-  
-udelay(20);
-  
-sbus_writel(sbus_readl(chip-port + APCCSR)  ~APC_CDC_RESET,
-   chip-port + APCCSR);
-sbus_writel(sbus_readl(chip-port + APCCSR) | (APC_XINT_ENA |
-  APC_XINT_PENA |
-  APC_XINT_CENA),
-  chip-port + APCCSR);
-}
-
 static void sbus_dma_preallocate(struct snd_cs4231 *chip, struct snd_pcm *pcm)
 {
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_SBUS,
@@ -1986,14 +1963,12 @@ static int __init snd_cs4231_sbus_create(struct 
snd_card *card,
chip-p_dma.enable = sbus_dma_enable;
chip-p_dma.request = sbus_dma_request;
chip-p_dma.address = sbus_dma_addr;
-   chip-p_dma.reset = sbus_dma_reset;
chip-p_dma.preallocate = sbus_dma_preallocate;
 
chip-c_dma.prepare = sbus_dma_prepare;
chip-c_dma.enable = sbus_dma_enable;
chip-c_dma.request = sbus_dma_request;
chip-c_dma.address = sbus_dma_addr;
-   chip-c_dma.reset = sbus_dma_reset;
chip-c_dma.preallocate = sbus_dma_preallocate;
 
if (request_irq(sdev-irqs[0], snd_cs4231_sbus_interrupt,
@@ -2087,11 +2062,6 @@ static unsigned int _ebus_dma_addr(struct 
cs4231_dma_control *dma_cont)
return ebus_dma_addr(dma_cont-ebus_info);
 }
 
-static void _ebus_dma_reset(struct snd_cs4231 *chip)
-{
-   return;
-}
-
 static void _ebus_dma_preallocate(struct snd_cs4231 *chip, struct snd_pcm *pcm)
 {
snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
@@ -2171,14 +2141,12 @@ static int __init snd_cs4231_ebus_create(struct 
snd_card *card,
chip-p_dma.enable = _ebus_dma_enable;
chip-p_dma.request = _ebus_dma_request;
chip-p_dma.address = _ebus_dma_addr;
-   chip-p_dma.reset = 

[SPARC32]: Fix modular build of floppy driver.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0a808a3131b2a6656475d82219f5e5d25edd7160
Commit: 0a808a3131b2a6656475d82219f5e5d25edd7160
Parent: 3daadf33013a1c4d7abf4a65b24644cdd8ae896a
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 00:19:14 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Fri Aug 3 14:08:42 2007 -0700

[SPARC32]: Fix modular build of floppy driver.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 arch/sparc/kernel/entry.S   |7 +--
 arch/sparc/kernel/irq.c |   84 +++---
 arch/sparc/kernel/sparc_ksyms.c |1 -
 include/asm-sparc/floppy.h  |   20 +
 include/asm-sparc/irq.h |7 +--
 5 files changed, 75 insertions(+), 44 deletions(-)

diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index eac3838..88d2cef 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -1,7 +1,6 @@
-/* $Id: entry.S,v 1.170 2001/11/13 00:57:05 davem Exp $
- * arch/sparc/kernel/entry.S:  Sparc trap low-level entry points.
+/* arch/sparc/kernel/entry.S:  Sparc trap low-level entry points.
  *
- * Copyright (C) 1995 David S. Miller ([EMAIL PROTECTED])
+ * Copyright (C) 1995, 2007 David S. Miller ([EMAIL PROTECTED])
  * Copyright (C) 1996 Eddie C. Dost   ([EMAIL PROTECTED])
  * Copyright (C) 1996 Miguel de Icaza ([EMAIL PROTECTED])
  * Copyright (C) 1996-1999 Jakub Jelinek   ([EMAIL PROTECTED])
@@ -129,7 +128,7 @@ trap_low:
RESTORE_ALL
 #endif
 
-#ifdef CONFIG_BLK_DEV_FD
+#if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE)
.text
.align  4
.globl  floppy_hardint
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 75b2240..b76dc03 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -351,34 +351,14 @@ void handler_irq(int irq, struct pt_regs * regs)
set_irq_regs(old_regs);
 }
 
-#ifdef CONFIG_BLK_DEV_FD
-extern void floppy_interrupt(int irq, void *dev_id);
-
-void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
-{
-   struct pt_regs *old_regs;
-   int cpu = smp_processor_id();
-
-   old_regs = set_irq_regs(regs);
-   disable_pil_irq(irq);
-   irq_enter();
-   kstat_cpu(cpu).irqs[irq]++;
-   floppy_interrupt(irq, dev_id);
-   irq_exit();
-   enable_pil_irq(irq);
-   set_irq_regs(old_regs);
-   // XXX Eek, it's totally changed with preempt_count() and such
-   // if (softirq_pending(cpu))
-   //  do_softirq();
-}
-#endif
+#if defined(CONFIG_BLK_DEV_FD) || defined(CONFIG_BLK_DEV_FD_MODULE)
 
 /* Fast IRQs on the Sparc can only have one routine attached to them,
  * thus no sharing possible.
  */
-int request_fast_irq(unsigned int irq,
-irq_handler_t handler,
-unsigned long irqflags, const char *devname)
+static int request_fast_irq(unsigned int irq,
+   void (*handler)(void),
+   unsigned long irqflags, const char *devname)
 {
struct irqaction *action;
unsigned long flags;
@@ -457,7 +437,6 @@ int request_fast_irq(unsigned int irq,
 */
flush_cache_all();
 
-   action-handler = handler;
action-flags = irqflags;
cpus_clear(action-mask);
action-name = devname;
@@ -475,6 +454,61 @@ out:
return ret;
 }
 
+/* These variables are used to access state from the assembler
+ * interrupt handler, floppy_hardint, so we cannot put these in
+ * the floppy driver image because that would not work in the
+ * modular case.
+ */
+volatile unsigned char *fdc_status;
+EXPORT_SYMBOL(fdc_status);
+
+char *pdma_vaddr;
+EXPORT_SYMBOL(pdma_vaddr);
+
+unsigned long pdma_size;
+EXPORT_SYMBOL(pdma_size);
+
+volatile int doing_pdma;
+EXPORT_SYMBOL(doing_pdma);
+
+char *pdma_base;
+EXPORT_SYMBOL(pdma_base);
+
+unsigned long pdma_areasize;
+EXPORT_SYMBOL(pdma_areasize);
+
+extern void floppy_hardint(void);
+
+static irqreturn_t (*floppy_irq_handler)(int irq, void *dev_id);
+
+void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
+{
+   struct pt_regs *old_regs;
+   int cpu = smp_processor_id();
+
+   old_regs = set_irq_regs(regs);
+   disable_pil_irq(irq);
+   irq_enter();
+   kstat_cpu(cpu).irqs[irq]++;
+   floppy_irq_handler(irq, dev_id);
+   irq_exit();
+   enable_pil_irq(irq);
+   set_irq_regs(old_regs);
+   // XXX Eek, it's totally changed with preempt_count() and such
+   // if (softirq_pending(cpu))
+   //  do_softirq();
+}
+
+int sparc_floppy_request_irq(int irq, unsigned long flags,
+irqreturn_t (*irq_handler)(int irq, void *))
+{
+   floppy_irq_handler = irq_handler;
+   return request_fast_irq(irq, floppy_hardint, flags, floppy);
+}
+EXPORT_SYMBOL(sparc_floppy_request_irq);
+
+#endif
+
 int request_irq(unsigned int 

[SPARC]: Fix O_CLOEXEC values.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6ba60d2195cd65d72eaf7ce3903a707c5bf20c7b
Commit: 6ba60d2195cd65d72eaf7ce3903a707c5bf20c7b
Parent: 0a808a3131b2a6656475d82219f5e5d25edd7160
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 14:24:17 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Fri Aug 3 14:24:17 2007 -0700

[SPARC]: Fix O_CLOEXEC values.

The one choosen by asm-generic/fcntl.h is not appropriate
for this platform.

Noticed by Ulrich Drepper.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 include/asm-sparc/fcntl.h   |2 +-
 include/asm-sparc64/fcntl.h |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-sparc/fcntl.h b/include/asm-sparc/fcntl.h
index 5db60b5..7bbdfc7 100644
--- a/include/asm-sparc/fcntl.h
+++ b/include/asm-sparc/fcntl.h
@@ -16,6 +16,7 @@
 #define O_LARGEFILE0x4
 #define O_DIRECT0x10 /* direct disk access hint */
 #define O_NOATIME  0x20
+#define O_CLOEXEC  0x40
 
 #define F_GETOWN   5   /*  for sockets. */
 #define F_SETOWN   6   /*  for sockets. */
@@ -31,6 +32,5 @@
 #define __ARCH_FLOCK_PAD   short __unused;
 #define __ARCH_FLOCK64_PAD short __unused;
 
-#include asm-generic/fcntl.h
 
 #endif
diff --git a/include/asm-sparc64/fcntl.h b/include/asm-sparc64/fcntl.h
index b2aecf0..111f6b3 100644
--- a/include/asm-sparc64/fcntl.h
+++ b/include/asm-sparc64/fcntl.h
@@ -16,7 +16,7 @@
 #define O_LARGEFILE0x4
 #define O_DIRECT0x10 /* direct disk access hint */
 #define O_NOATIME  0x20
-
+#define O_CLOEXEC  0x40
 
 #define F_GETOWN   5   /*  for sockets. */
 #define F_SETOWN   6   /*  for sockets. */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


serial: fix 8250 early console setup

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b6b1d87785712474d0ed80689c17107d616a1171
Commit: b6b1d87785712474d0ed80689c17107d616a1171
Parent: 1a3f2ea336b784d7df750a7821f514f3dea69e29
Author: Daniel Ritz [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 16:07:43 2007 +0200
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Fri Aug 3 15:02:56 2007 -0700

serial: fix 8250 early console setup

the early setup function serial8250_console_early_setup() can be called
from non __init code (eg. hotpluggable serial ports like serial_cs) so
remove the __init from the call chain to avoid crashes.

Signed-off-by: Daniel Ritz [EMAIL PROTECTED]
Cc: Yinghai Lu [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/8250.c   |2 +-
 drivers/serial/8250_early.c |2 +-
 kernel/printk.c |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 2f5a5ac..3013130 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2514,7 +2514,7 @@ static int __init serial8250_console_setup(struct console 
*co, char *options)
return uart_set_options(port, co, baud, parity, bits, flow);
 }
 
-static int __init serial8250_console_early_setup(void)
+static int serial8250_console_early_setup(void)
 {
return serial8250_find_port_for_earlycon();
 }
diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c
index 150cad5..4d4c9f0 100644
--- a/drivers/serial/8250_early.c
+++ b/drivers/serial/8250_early.c
@@ -227,7 +227,7 @@ int __init setup_early_serial8250_console(char *cmdline)
return 0;
 }
 
-int __init serial8250_find_port_for_earlycon(void)
+int serial8250_find_port_for_earlycon(void)
 {
struct early_serial8250_device *device = early_device;
struct uart_port *port = device-port;
diff --git a/kernel/printk.c b/kernel/printk.c
index 051d27e..bd2cd06 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -732,7 +732,7 @@ int __init add_preferred_console(char *name, int idx, char 
*options)
return 0;
 }
 
-int __init update_console_cmdline(char *name, int idx, char *name_new, int 
idx_new, char *options)
+int update_console_cmdline(char *name, int idx, char *name_new, int idx_new, 
char *options)
 {
struct console_cmdline *c;
int i;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Kill some obsolete sub-thread-ptrace stuff

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=247284481ca40288bd120cf0707681c3bdbee78f
Commit: 247284481ca40288bd120cf0707681c3bdbee78f
Parent: b6b1d87785712474d0ed80689c17107d616a1171
Author: Oleg Nesterov [EMAIL PROTECTED]
AuthorDate: Sat Aug 4 01:04:41 2007 +0400
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Fri Aug 3 15:06:33 2007 -0700

Kill some obsolete sub-thread-ptrace stuff

There is a couple of subtle checks which were needed to handle ptracing from
the same thread group. This was deprecated a long ago, imho this code just
complicates the understanding.

And, the -parent-signal-flags  SIGNAL_GROUP_EXIT check in 
exit_notify()
is not right. SIGNAL_GROUP_EXIT can mean exec(), not exit_group(). This 
means
ptracer can lose a ptraced zombie on exec(). Minor problem, but still the 
bug.

Signed-off-by: Oleg Nesterov [EMAIL PROTECTED]
Acked-by: Roland McGrath [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/exit.c   |8 ++--
 kernel/signal.c |4 
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index 464c2b1..9578c1a 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -813,7 +813,7 @@ static void exit_notify(struct task_struct *tsk)
__kill_pgrp_info(SIGCONT, SEND_SIG_PRIV, pgrp);
}
 
-   /* Let father know we died 
+   /* Let father know we died
 *
 * Thread signals are configurable, but you aren't going to use
 * that to send signals to arbitary processes. 
@@ -826,9 +826,7 @@ static void exit_notify(struct task_struct *tsk)
 * If our self_exec id doesn't match our parent_exec_id then
 * we have changed execution domain as these two values started
 * the same after a fork.
-*  
 */
-   
if (tsk-exit_signal != SIGCHLD  tsk-exit_signal != -1 
( tsk-parent_exec_id != t-self_exec_id  ||
  tsk-self_exec_id != tsk-parent_exec_id)
@@ -848,9 +846,7 @@ static void exit_notify(struct task_struct *tsk)
}
 
state = EXIT_ZOMBIE;
-   if (tsk-exit_signal == -1 
-   (likely(tsk-ptrace == 0) ||
-unlikely(tsk-parent-signal-flags  SIGNAL_GROUP_EXIT)))
+   if (tsk-exit_signal == -1  likely(!tsk-ptrace))
state = EXIT_DEAD;
tsk-exit_state = state;
 
diff --git a/kernel/signal.c b/kernel/signal.c
index ef8156a..b27c01a 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1561,10 +1561,6 @@ static inline int may_ptrace_stop(void)
(current-ptrace  PT_ATTACHED)))
return 0;
 
-   if (unlikely(current-signal == current-parent-signal) 
-   unlikely(current-signal-flags  SIGNAL_GROUP_EXIT))
-   return 0;
-
/*
 * Are we in the middle of do_coredump?
 * If so and our tracer is also part of the coredump stopping
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sh: Fix lockdep debugging oops on SH-3/4.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c347d12cd1642ba193f55bdab29395d639c5efc2
Commit: c347d12cd1642ba193f55bdab29395d639c5efc2
Parent: 8d4fbcfbe0a4bfc73e7f0297c59ae514e1f1436f
Author: Paul Mundt [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 16:17:07 2007 +0900
Committer:  Paul Mundt [EMAIL PROTECTED]
CommitDate: Wed Aug 1 16:17:07 2007 +0900

sh: Fix lockdep debugging oops on SH-3/4.

In the SH-3/4 TLB access violation path we were enabling IRQs before
the call in to trace_hardirqs_on(), which ended up triggering:

if (DEBUG_LOCKS_WARN_ON(!irqs_disabled()))
return;

in kernel/lockdep.c:2031. Fix this up by removing the early re-enable,
we were already re-enabling IRQs post-trace_hardirqs_on() already, so
the semantics are now as was initially intended.

Signed-off-by: Paul Mundt [EMAIL PROTECTED]
---
 arch/sh/kernel/cpu/sh3/entry.S |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/sh/kernel/cpu/sh3/entry.S b/arch/sh/kernel/cpu/sh3/entry.S
index d8e1229..0d12a12 100644
--- a/arch/sh/kernel/cpu/sh3/entry.S
+++ b/arch/sh/kernel/cpu/sh3/entry.S
@@ -149,8 +149,7 @@ call_dpf:
 ldsr10, pr
rts
 nop
-0: sti
-   mov.l   3f, r0
+0: mov.l   3f, r0
mov r9, r6
mov r8, r5
jmp @r0
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sh: Fix irqflags tracing for SH-3/4 nommu.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c71799433aa4d6378502f781a155321e77da73aa
Commit: c71799433aa4d6378502f781a155321e77da73aa
Parent: c347d12cd1642ba193f55bdab29395d639c5efc2
Author: Paul Mundt [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 16:19:49 2007 +0900
Committer:  Paul Mundt [EMAIL PROTECTED]
CommitDate: Wed Aug 1 16:19:49 2007 +0900

sh: Fix irqflags tracing for SH-3/4 nommu.

We were missing the trace_hardirqs_on() instrumentation in the nommu
case, resync with the MMU version of the page fault handler to have
this behaving consistently. Also explicitly re-enable IRQs now that
the assembly code isn't doing it for us any more.

Signed-off-by: Paul Mundt [EMAIL PROTECTED]
---
 arch/sh/mm/fault-nommu.c |   47 ++---
 1 files changed, 15 insertions(+), 32 deletions(-)

diff --git a/arch/sh/mm/fault-nommu.c b/arch/sh/mm/fault-nommu.c
index 923cb45..c6f5b51 100644
--- a/arch/sh/mm/fault-nommu.c
+++ b/arch/sh/mm/fault-nommu.c
@@ -1,47 +1,33 @@
-/* 
+/*
  * arch/sh/mm/fault-nommu.c
  *
- * Copyright (C) 2002 Paul Mundt
+ * Copyright (C) 2002 - 2007 Paul Mundt
  *
  * Based on linux/arch/sh/mm/fault.c:
  *  Copyright (C) 1999  Niibe Yutaka
  *
  * Released under the terms of the GNU GPL v2.0.
  */
-
-#include linux/signal.h
-#include linux/sched.h
 #include linux/kernel.h
-#include linux/errno.h
-#include linux/string.h
-#include linux/types.h
-#include linux/ptrace.h
-#include linux/mman.h
 #include linux/mm.h
-#include linux/smp.h
-#include linux/interrupt.h
-
+#include linux/hardirq.h
+#include linux/kprobes.h
 #include asm/system.h
-#include asm/io.h
-#include asm/uaccess.h
-#include asm/pgalloc.h
-#include asm/mmu_context.h
-#include asm/cacheflush.h
-
-#if defined(CONFIG_SH_KGDB)
+#include asm/ptrace.h
 #include asm/kgdb.h
-#endif
-
-extern void die(const char *,struct pt_regs *,long);
 
 /*
  * This routine handles page faults.  It determines the address,
  * and the problem, and then passes it off to one of the appropriate
  * routines.
  */
-asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
- unsigned long address)
+asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
+   unsigned long writeaccess,
+   unsigned long address)
 {
+   trace_hardirqs_on();
+   local_irq_enable();
+
 #if defined(CONFIG_SH_KGDB)
if (kgdb_nofault  kgdb_bus_err_hook)
kgdb_bus_err_hook();
@@ -65,17 +51,14 @@ asmlinkage void do_page_fault(struct pt_regs *regs, 
unsigned long writeaccess,
do_exit(SIGKILL);
 }
 
-asmlinkage int __do_page_fault(struct pt_regs *regs, unsigned long writeaccess,
-  unsigned long address)
+asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
+unsigned long writeaccess,
+unsigned long address)
 {
 #if defined(CONFIG_SH_KGDB)
if (kgdb_nofault  kgdb_bus_err_hook)
kgdb_bus_err_hook();
 #endif
 
-   if (address = TASK_SIZE)
-   return 1;
-
-   return 0;
+   return (address = TASK_SIZE);
 }
-
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sh: Don't include fault-nommu on SH-2/SH-2A.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=56c74c733cdd101832c4bbf9af8a009a9eaec784
Commit: 56c74c733cdd101832c4bbf9af8a009a9eaec784
Parent: c71799433aa4d6378502f781a155321e77da73aa
Author: Paul Mundt [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 16:26:21 2007 +0900
Committer:  Paul Mundt [EMAIL PROTECTED]
CommitDate: Wed Aug 1 16:26:21 2007 +0900

sh: Don't include fault-nommu on SH-2/SH-2A.

fault-nommu defines the page fault handler stubs for SH-3/4 parts,
but is not needed on SH-2/SH-2A now that the entry code has been
logically separated.

Add it in for SH-3 and SH-4 explicitly.

Signed-off-by: Paul Mundt [EMAIL PROTECTED]
---
 arch/sh/mm/Makefile |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/sh/mm/Makefile b/arch/sh/mm/Makefile
index d677d7f..4061e89 100644
--- a/arch/sh/mm/Makefile
+++ b/arch/sh/mm/Makefile
@@ -8,7 +8,9 @@ obj-$(CONFIG_CPU_SH2)   += cache-sh2.o
 obj-$(CONFIG_CPU_SH3)  += cache-sh3.o
 obj-$(CONFIG_CPU_SH4)  += cache-sh4.o
 
-mmu-y  := fault-nommu.o tlb-nommu.o pg-nommu.o
+mmu-y  := tlb-nommu.o pg-nommu.o
+mmu-$(CONFIG_CPU_SH3)  += fault-nommu.o
+mmu-$(CONFIG_CPU_SH4)  += fault-nommu.o
 mmu-$(CONFIG_MMU)  := fault.o clear_page.o copy_page.o tlb-flush.o \
   ioremap.o
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sh: Fix pgd mismatch from cached TTB in unhandled fault.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=06f862c8ce0893b5525ce90f39168eaf4608ecc6
Commit: 06f862c8ce0893b5525ce90f39168eaf4608ecc6
Parent: 56c74c733cdd101832c4bbf9af8a009a9eaec784
Author: Paul Mundt [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 16:39:51 2007 +0900
Committer:  Paul Mundt [EMAIL PROTECTED]
CommitDate: Wed Aug 1 16:39:51 2007 +0900

sh: Fix pgd mismatch from cached TTB in unhandled fault.

When reading the cached TTB value and extracting the pgd, we
accidentally applied a __va() to it and bumped it off in to bogus
space which ended up causing multiple faults in the error path.

Fix it up so unhandled faults don't do strange and highly unorthodox
things when oopsing.

Signed-off-by: Paul Mundt [EMAIL PROTECTED]
---
 arch/sh/mm/fault.c |3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c
index 964c676..04a39aa 100644
--- a/arch/sh/mm/fault.c
+++ b/arch/sh/mm/fault.c
@@ -184,8 +184,7 @@ no_context:
printk(KERN_ALERT pc = %08lx\n, regs-pc);
page = (unsigned long)get_TTB();
if (page) {
-   page = ((__typeof__(page) *) __va(page))[address 
-PGDIR_SHIFT];
+   page = ((__typeof__(page) *)page)[address  
PGDIR_SHIFT];
printk(KERN_ALERT *pde = %08lx\n, page);
if (page  _PAGE_PRESENT) {
page = PAGE_MASK;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sh: update snapgear defconfig.

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=49dd3ff3a5f39d4300a4bc85e42756e286e28654
Commit: 49dd3ff3a5f39d4300a4bc85e42756e286e28654
Parent: e0a3647fd7729bee1ed9667ce5d8eb88f0604138
Author: David McCullough [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 10:14:09 2007 +0900
Committer:  Paul Mundt [EMAIL PROTECTED]
CommitDate: Fri Aug 3 10:14:09 2007 +0900

sh: update snapgear defconfig.

Updated the snapgear defconfig to get a booting kernel.

Signed-off-by: David McCullough [EMAIL PROTECTED]
Signed-off-by: Paul Mundt [EMAIL PROTECTED]
---
 arch/sh/configs/snapgear_defconfig |  587 +++-
 1 files changed, 239 insertions(+), 348 deletions(-)

diff --git a/arch/sh/configs/snapgear_defconfig 
b/arch/sh/configs/snapgear_defconfig
index 98503f1..e4e5d21 100644
--- a/arch/sh/configs/snapgear_defconfig
+++ b/arch/sh/configs/snapgear_defconfig
@@ -1,15 +1,24 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18
-# Tue Oct  3 12:55:47 2006
+# Linux kernel version: 2.6.23-rc1
+# Thu Jul 26 11:49:11 2007
 #
 CONFIG_SUPERH=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_BUG=y
 CONFIG_GENERIC_FIND_NEXT_BIT=y
 CONFIG_GENERIC_HWEIGHT=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_SYS_SUPPORTS_PCI=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_ARCH_NO_VIRT_TO_BUS=y
 CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
 
 #
@@ -24,15 +33,18 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 #
 CONFIG_LOCALVERSION=
 CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
+# CONFIG_SWAP is not set
 # CONFIG_SYSVIPC is not set
 # CONFIG_POSIX_MQUEUE is not set
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
+# CONFIG_USER_NS is not set
 # CONFIG_AUDIT is not set
 # CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_SYSFS_DEPRECATED is not set
 # CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
@@ -47,27 +59,25 @@ CONFIG_BUG=y
 CONFIG_ELF_CORE=y
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_TIMERFD=y
+CONFIG_EVENTFD=y
 CONFIG_SHMEM=y
-CONFIG_SLAB=y
 CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
 CONFIG_RT_MUTEXES=y
 # CONFIG_TINY_SHMEM is not set
 CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
 # CONFIG_MODULES is not set
-
-#
-# Block layer
-#
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
 # CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
 
 #
 # IO Schedulers
@@ -85,122 +95,103 @@ CONFIG_DEFAULT_IOSCHED=anticipatory
 #
 # System type
 #
-# CONFIG_SH_SOLUTION_ENGINE is not set
-# CONFIG_SH_7751_SOLUTION_ENGINE is not set
-# CONFIG_SH_7300_SOLUTION_ENGINE is not set
-# CONFIG_SH_7343_SOLUTION_ENGINE is not set
-# CONFIG_SH_73180_SOLUTION_ENGINE is not set
-# CONFIG_SH_7751_SYSTEMH is not set
-# CONFIG_SH_HP6XX is not set
-# CONFIG_SH_EC3104 is not set
-# CONFIG_SH_SATURN is not set
-# CONFIG_SH_DREAMCAST is not set
-# CONFIG_SH_BIGSUR is not set
-# CONFIG_SH_MPC1211 is not set
-# CONFIG_SH_SH03 is not set
-CONFIG_SH_SECUREEDGE5410=y
-# CONFIG_SH_HS7751RVOIP is not set
-# CONFIG_SH_7710VOIPGW is not set
-# CONFIG_SH_RTS7751R2D is not set
-# CONFIG_SH_R7780RP is not set
-# CONFIG_SH_EDOSK7705 is not set
-# CONFIG_SH_SH4202_MICRODEV is not set
-# CONFIG_SH_LANDISK is not set
-# CONFIG_SH_TITAN is not set
-# CONFIG_SH_SHMIN is not set
-# CONFIG_SH_UNKNOWN is not set
-
-#
-# Processor selection
-#
 CONFIG_CPU_SH4=y
-
-#
-# SH-2 Processor Support
-#
-# CONFIG_CPU_SUBTYPE_SH7604 is not set
-
-#
-# SH-3 Processor Support
-#
-# CONFIG_CPU_SUBTYPE_SH7300 is not set
+# CONFIG_CPU_SUBTYPE_SH7619 is not set
+# CONFIG_CPU_SUBTYPE_SH7206 is not set
 # CONFIG_CPU_SUBTYPE_SH7705 is not set
 # CONFIG_CPU_SUBTYPE_SH7706 is not set
 # CONFIG_CPU_SUBTYPE_SH7707 is not set
 # CONFIG_CPU_SUBTYPE_SH7708 is not set
 # CONFIG_CPU_SUBTYPE_SH7709 is not set
 # CONFIG_CPU_SUBTYPE_SH7710 is not set
-
-#
-# SH-4 Processor Support
-#
+# CONFIG_CPU_SUBTYPE_SH7712 is not set
 # CONFIG_CPU_SUBTYPE_SH7750 is not set
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
-
-#
-# ST40 Processor Support
-#
 # CONFIG_CPU_SUBTYPE_ST40STB1 is not set
 # CONFIG_CPU_SUBTYPE_ST40GX1 is not set
-
-#
-# SH-4A Processor Support
-#
 # CONFIG_CPU_SUBTYPE_SH7770 is not set
 # CONFIG_CPU_SUBTYPE_SH7780 is not set

sh: update r2d defconfig

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a3b3e23015061814bffd733dbd9c4452b81ca6aa
Commit: a3b3e23015061814bffd733dbd9c4452b81ca6aa
Parent: 49dd3ff3a5f39d4300a4bc85e42756e286e28654
Author: Magnus Damm [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 10:15:53 2007 +0900
Committer:  Paul Mundt [EMAIL PROTECTED]
CommitDate: Fri Aug 3 10:15:53 2007 +0900

sh: update r2d defconfig

- Disable CONFIG_SH_DMA to avoid boot up freeze on R2D-1
- Disable CONFIG_SH_STANDARD_BIOS to support R2D-PLUS boot loaders

Signed-off-by: Magnus Damm [EMAIL PROTECTED]
Signed-off-by: Paul Mundt [EMAIL PROTECTED]
---
 arch/sh/configs/rts7751r2d_defconfig |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/sh/configs/rts7751r2d_defconfig 
b/arch/sh/configs/rts7751r2d_defconfig
index f1e979b..b64f73b 100644
--- a/arch/sh/configs/rts7751r2d_defconfig
+++ b/arch/sh/configs/rts7751r2d_defconfig
@@ -243,8 +243,8 @@ CONFIG_SH_PCLK_FREQ=6000
 #
 # DMA support
 #
-CONFIG_SH_DMA=y
-CONFIG_NR_ONCHIP_DMA_CHANNELS=8
+# CONFIG_SH_DMA is not set
+# CONFIG_NR_ONCHIP_DMA_CHANNELS is not set
 # CONFIG_NR_DMA_CHANNELS_BOOL is not set
 
 #
@@ -280,7 +280,7 @@ CONFIG_ZERO_PAGE_OFFSET=0x0001
 CONFIG_BOOT_LINK_OFFSET=0x0080
 # CONFIG_UBC_WAKEUP is not set
 CONFIG_CMDLINE_BOOL=y
-CONFIG_CMDLINE=console=tty0 console=ttySC0,115200 root=/dev/sda1 
earlyprintk=bios
+CONFIG_CMDLINE=console=tty0 console=ttySC0,115200 root=/dev/sda1 
earlyprintk=serial
 
 #
 # Bus options
@@ -1323,7 +1323,7 @@ CONFIG_ENABLE_MUST_CHECK=y
 # CONFIG_DEBUG_KERNEL is not set
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_DEBUG_BUGVERBOSE is not set
-CONFIG_SH_STANDARD_BIOS=y
+# CONFIG_SH_STANDARD_BIOS is not set
 CONFIG_EARLY_SCIF_CONSOLE=y
 CONFIG_EARLY_SCIF_CONSOLE_PORT=0xffe8
 CONFIG_EARLY_PRINTK=y
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sh: fix cf support on r2d boards

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5ca95c48f1bd006d1aafe2f8bf1a859262d6d7b1
Commit: 5ca95c48f1bd006d1aafe2f8bf1a859262d6d7b1
Parent: a3b3e23015061814bffd733dbd9c4452b81ca6aa
Author: Magnus Damm [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 10:16:29 2007 +0900
Committer:  Paul Mundt [EMAIL PROTECTED]
CommitDate: Fri Aug 3 10:16:29 2007 +0900

sh: fix cf support on r2d boards

This patch makes sure cf support is enabled on R2D-PLUS but disabled
on R2D-1. Without this fix R2D-1 boards hang on bootup.

Signed-off-by: Magnus Damm [EMAIL PROTECTED]
Signed-off-by: Paul Mundt [EMAIL PROTECTED]
---
 arch/sh/boards/renesas/rts7751r2d/setup.c |9 -
 include/asm-sh/rts7751r2d.h   |2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c 
b/arch/sh/boards/renesas/rts7751r2d/setup.c
index e165d85..6f7029d 100644
--- a/arch/sh/boards/renesas/rts7751r2d/setup.c
+++ b/arch/sh/boards/renesas/rts7751r2d/setup.c
@@ -140,12 +140,19 @@ static struct platform_device sm501_device = {
 static struct platform_device *rts7751r2d_devices[] __initdata = {
uart_device,
heartbeat_device,
-   cf_ide_device,
sm501_device,
 };
 
 static int __init rts7751r2d_devices_setup(void)
 {
+   int ret;
+
+   if (ctrl_inw(PA_BVERREG) == 0x10) { /* only working on R2D-PLUS */
+   ret = platform_device_register(cf_ide_device);
+   if (ret)
+   return ret;
+   }
+
return platform_add_devices(rts7751r2d_devices,
ARRAY_SIZE(rts7751r2d_devices));
 }
diff --git a/include/asm-sh/rts7751r2d.h b/include/asm-sh/rts7751r2d.h
index 10565ac..5d7800a 100644
--- a/include/asm-sh/rts7751r2d.h
+++ b/include/asm-sh/rts7751r2d.h
@@ -37,7 +37,7 @@
 #define PA_VERREG  0xa432  /* FPGA Version Register */
 #define PA_INPORT  0xa434  /* KEY Input Port control */
 #define PA_OUTPORT 0xa436  /* LED control */
-#define PA_DMPORT  0xa438  /* DM270 Output Port control */
+#define PA_BVERREG 0xa438  /* Board Revision Register */
 
 #define PA_AX88796L0xaa000400  /* AX88796L Area */
 #define PA_VOYAGER 0xab00  /* VOYAGER GX Area */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sh: fix defconfigs for sh7751r boards

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cc6f33db30c4fcf7915270619e81a91d6190b6c8
Commit: cc6f33db30c4fcf7915270619e81a91d6190b6c8
Parent: 5ca95c48f1bd006d1aafe2f8bf1a859262d6d7b1
Author: Magnus Damm [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 10:17:47 2007 +0900
Committer:  Paul Mundt [EMAIL PROTECTED]
CommitDate: Fri Aug 3 10:17:47 2007 +0900

sh: fix defconfigs for sh7751r boards

This patch fixes up the defconfig for various sh7751r based boards
by updating them to the single cpu subtype CONFIG_CPU_SUBTYPE_SH7751R.
The following sh4 boards are updated: hs7751rvoip, landisk, lboxre2,
systemh, titan.

The current defconfigs with two subtypes defined trigger a configuration
bug which result in kernel configurations with missing board support
code. We end up with kernels without board code and with generic machvec
only.

So we need this patch to make sure the board code gets compiled in.

Signed-off-by: Magnus Damm [EMAIL PROTECTED]
Signed-off-by: Paul Mundt [EMAIL PROTECTED]
---
 arch/sh/configs/hs7751rvoip_defconfig |2 +-
 arch/sh/configs/landisk_defconfig |2 +-
 arch/sh/configs/lboxre2_defconfig |2 +-
 arch/sh/configs/systemh_defconfig |2 +-
 arch/sh/configs/titan_defconfig   |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/sh/configs/hs7751rvoip_defconfig 
b/arch/sh/configs/hs7751rvoip_defconfig
index e1a886d..5d9da5a 100644
--- a/arch/sh/configs/hs7751rvoip_defconfig
+++ b/arch/sh/configs/hs7751rvoip_defconfig
@@ -145,7 +145,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
diff --git a/arch/sh/configs/landisk_defconfig 
b/arch/sh/configs/landisk_defconfig
index 07310fa..f52db12 100644
--- a/arch/sh/configs/landisk_defconfig
+++ b/arch/sh/configs/landisk_defconfig
@@ -156,7 +156,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
diff --git a/arch/sh/configs/lboxre2_defconfig 
b/arch/sh/configs/lboxre2_defconfig
index fa09d68..9fa66d9 100644
--- a/arch/sh/configs/lboxre2_defconfig
+++ b/arch/sh/configs/lboxre2_defconfig
@@ -159,7 +159,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
diff --git a/arch/sh/configs/systemh_defconfig 
b/arch/sh/configs/systemh_defconfig
index c16350d..af921b5 100644
--- a/arch/sh/configs/systemh_defconfig
+++ b/arch/sh/configs/systemh_defconfig
@@ -141,7 +141,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig
index 41049cf..0686ed6 100644
--- a/arch/sh/configs/titan_defconfig
+++ b/arch/sh/configs/titan_defconfig
@@ -147,7 +147,7 @@ CONFIG_CPU_SH4=y
 # CONFIG_CPU_SUBTYPE_SH7091 is not set
 # CONFIG_CPU_SUBTYPE_SH7750R is not set
 # CONFIG_CPU_SUBTYPE_SH7750S is not set
-CONFIG_CPU_SUBTYPE_SH7751=y
+# CONFIG_CPU_SUBTYPE_SH7751 is not set
 CONFIG_CPU_SUBTYPE_SH7751R=y
 # CONFIG_CPU_SUBTYPE_SH7760 is not set
 # CONFIG_CPU_SUBTYPE_SH4_202 is not set
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Don't compile the PMU power driver on 64-bit PowerPC

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a1da5f4f1beb8cae83104a65f36afe527184a4ef
Commit: a1da5f4f1beb8cae83104a65f36afe527184a4ef
Parent: f695baf2df9e0413d3521661070103711545207a
Author: Paul Mackerras [EMAIL PROTECTED]
AuthorDate: Sun Jul 22 10:41:39 2007 +1000
Committer:  David Woodhouse [EMAIL PROTECTED]
CommitDate: Mon Jul 23 12:42:45 2007 +0100

Don't compile the PMU power driver on 64-bit PowerPC

As reported by Stephen Rothwell, an allmodconfig build on 64-bit
PowerPC reports these errors:

ERROR: pmu_batteries [drivers/power/pmu_battery.ko] undefined!
ERROR: pmu_battery_count [drivers/power/pmu_battery.ko] undefined!
ERROR: pmu_power_flags [drivers/power/pmu_battery.ko] undefined!

This fixes the problem by not building pmu_battery.ko on ppc64.  There
are no battery-powered ppc64 machines with an Apple PMU, and we can be
reasonably confident there never will be.

Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
Signed-off-by: David Woodhouse [EMAIL PROTECTED]
---
 drivers/power/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 3f6e176..58c806e 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -38,7 +38,7 @@ config BATTERY_DS2760
 
 config BATTERY_PMU
tristate Apple PMU battery
-   depends on ADB_PMU
+   depends on PPC32  ADB_PMU
help
  Say Y here to expose battery information on Apple machines
  through the generic battery class.
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MTD] Makefile fix for mtdsuper

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bec494775600b1cd7c144d31a09e1f46df9c6324
Commit: bec494775600b1cd7c144d31a09e1f46df9c6324
Parent: 7a883eaf62f4b943ebec738ce3b0796c67ef5d32
Author: Satyam Sharma [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 08:27:13 2007 +0530
Committer:  David Woodhouse [EMAIL PROTECTED]
CommitDate: Fri Aug 3 12:42:40 2007 +0100

[MTD] Makefile fix for mtdsuper

We want drivers/mtd/{mtdcore, mtdsuper, mtdpart}.c to be built and linked
into the same mtd.ko module. Fix the Makefile to ensure this, and remove
duplicate MODULE_ declarations in mtdpart.c, as mtdcore.c already has them.

Signed-off-by: Satyam Sharma [EMAIL PROTECTED]
Signed-off-by: David Woodhouse [EMAIL PROTECTED]
---
 drivers/mtd/Makefile  |2 +-
 drivers/mtd/mtdpart.c |4 
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 451adcc..6d958a4 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -3,9 +3,9 @@
 #
 
 # Core functionality.
+obj-$(CONFIG_MTD)  += mtd.o
 mtd-y  := mtdcore.o mtdsuper.o
 mtd-$(CONFIG_MTD_PARTITIONS)   += mtdpart.o
-obj-$(CONFIG_MTD)  += $(mtd-y)
 
 obj-$(CONFIG_MTD_CONCAT)   += mtdconcat.o
 obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 9c62368..6174a97 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -560,7 +560,3 @@ int parse_mtd_partitions(struct mtd_info *master, const 
char **types,
 EXPORT_SYMBOL_GPL(parse_mtd_partitions);
 EXPORT_SYMBOL_GPL(register_mtd_parser);
 EXPORT_SYMBOL_GPL(deregister_mtd_parser);
-
-MODULE_LICENSE(GPL);
-MODULE_AUTHOR(Nicolas Pitre [EMAIL PROTECTED]);
-MODULE_DESCRIPTION(Generic support for partitioning of MTD devices);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


fix s2io regression

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3e847423bf029c2170692c75580a856debed617b
Commit: 3e847423bf029c2170692c75580a856debed617b
Parent: c73d83473e47415e943c398e6612f65f6da5b3c9
Author: Al Viro [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 19:21:30 2007 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Fri Aug 3 15:10:44 2007 -0700

fix s2io regression

 * wrong argument passed to pci_unmap_single() on failure
   exit paths
 * leak in the same area

Signed-off-by: Al Viro [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/net/s2io.c |9 ++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 2be0a0f..24feb00 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -2430,7 +2430,7 @@ static int fill_rx_buffers(struct s2io_nic *nic, int 
ring_no)
(rxdp3-Buffer1_ptr == DMA_ERROR_CODE)) 
{
pci_unmap_single
(nic-pdev,
-   (dma_addr_t)skb-data,
+   (dma_addr_t)rxdp3-Buffer2_ptr,
dev-mtu + 4,
PCI_DMA_FROMDEVICE);
goto pci_map_failed;
@@ -6211,7 +6211,7 @@ static int set_rxd_buffer_pointer(struct s2io_nic *sp, 
struct RxD_t *rxdp,
if( (rxdp3-Buffer0_ptr == 0) ||
(rxdp3-Buffer0_ptr == DMA_ERROR_CODE)) {
pci_unmap_single (sp-pdev,
-   (dma_addr_t)(*skb)-data,
+   (dma_addr_t)rxdp3-Buffer2_ptr,
dev-mtu + 4, PCI_DMA_FROMDEVICE);
goto memalloc_failed;
}
@@ -6224,7 +6224,10 @@ static int set_rxd_buffer_pointer(struct s2io_nic *sp, 
struct RxD_t *rxdp,
if( (rxdp3-Buffer1_ptr == 0) ||
(rxdp3-Buffer1_ptr == DMA_ERROR_CODE)) {
pci_unmap_single (sp-pdev,
-   (dma_addr_t)(*skb)-data,
+   (dma_addr_t)rxdp3-Buffer0_ptr,
+   BUF0_LEN, PCI_DMA_FROMDEVICE);
+   pci_unmap_single (sp-pdev,
+   (dma_addr_t)rxdp3-Buffer2_ptr,
dev-mtu + 4, PCI_DMA_FROMDEVICE);
goto memalloc_failed;
}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Expand RPN field to 34 bits when using 64k pages

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c0f7c6cb5dbb6d90e0334e62376dbc6ac3d1d315
Commit: c0f7c6cb5dbb6d90e0334e62376dbc6ac3d1d315
Parent: 7a883eaf62f4b943ebec738ce3b0796c67ef5d32
Author: Paul Mackerras [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 14:08:24 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Fri Aug 3 14:08:24 2007 +1000

[POWERPC] Expand RPN field to 34 bits when using 64k pages

The real page number field in our PTEs when configured for 64kB pages
is currently 32 bits, which turns out to be not quite enough for the
resources that the eHCA driver wants to map.  This expands the RPN
field to include 2 adjacent, previously-unused bits.

Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
Acked-by: Benjamin Herrenschmidt [EMAIL PROTECTED]
---
 include/asm-powerpc/pgtable-64k.h |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/include/asm-powerpc/pgtable-64k.h 
b/include/asm-powerpc/pgtable-64k.h
index 31cbd3d..33ae901 100644
--- a/include/asm-powerpc/pgtable-64k.h
+++ b/include/asm-powerpc/pgtable-64k.h
@@ -49,12 +49,10 @@
 
 /* Shift to put page number into pte.
  *
- * That gives us a max RPN of 32 bits, which means a max of 48 bits
- * of addressable physical space.
- * We could get 3 more bits here by setting PTE_RPN_SHIFT to 29 but
- * 32 makes PTEs more readable for debugging for now :)
+ * That gives us a max RPN of 34 bits, which means a max of 50 bits
+ * of addressable physical space, or 46 bits for the special 4k PFNs.
  */
-#define PTE_RPN_SHIFT  (32)
+#define PTE_RPN_SHIFT  (30)
 #define PTE_RPN_MAX(1UL  (64 - PTE_RPN_SHIFT))
 #define PTE_RPN_MASK   (~((1ULPTE_RPN_SHIFT)-1))
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Fix special PTE code for secondary hash bucket

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=430404ed9c2f202ca9d3c8072699b2b0279e4dfe
Commit: 430404ed9c2f202ca9d3c8072699b2b0279e4dfe
Parent: c0f7c6cb5dbb6d90e0334e62376dbc6ac3d1d315
Author: Paul Mackerras [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 19:16:11 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Fri Aug 3 19:16:11 2007 +1000

[POWERPC] Fix special PTE code for secondary hash bucket

The code for mapping special 4k pages on kernels using a 64kB base
page size was missing the code for doing the RPN (real page number)
manipulation when inserting the hardware PTE in the secondary hash
bucket.  It needs the same code as has already been added to the
code that inserts the HPTE in the primary hash bucket.  This adds it.

Spotted by Ben Herrenschmidt.

Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/mm/hash_low_64.S |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S
index 4762ff7..35eabfb 100644
--- a/arch/powerpc/mm/hash_low_64.S
+++ b/arch/powerpc/mm/hash_low_64.S
@@ -472,10 +472,12 @@ _GLOBAL(htab_call_hpte_insert1)
/* Now try secondary slot */
 
/* real page number in r5, PTE RPN value + index */
-   rldicl  r5,r31,64-PTE_RPN_SHIFT,PTE_RPN_SHIFT
+   andis.  r0,r31,[EMAIL PROTECTED]
+   srdir5,r31,PTE_RPN_SHIFT
+   bne-3f
sldir5,r5,PAGE_SHIFT-HW_PAGE_SHIFT
add r5,r5,r25
-   sldir5,r5,HW_PAGE_SHIFT
+3: sldir5,r5,HW_PAGE_SHIFT
 
/* Calculate secondary group hash */
andcr0,r27,r28
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] spufs: Fix affinity after introduction of node_allowed() calls

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=683e3ab2b54a7190ec8517705880171cc8ac1d92
Commit: 683e3ab2b54a7190ec8517705880171cc8ac1d92
Parent: 430404ed9c2f202ca9d3c8072699b2b0279e4dfe
Author: Andre Detsch [EMAIL PROTECTED]
AuthorDate: Tue Jul 31 09:48:11 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Fri Aug 3 19:18:10 2007 +1000

[POWERPC] spufs: Fix affinity after introduction of node_allowed() calls

This patch fixes affinity reference point placement, which was not being
done in some situations, after the introduction of node_allowed() calls.

The previously used parameter, 'ctx', is just the iterator of the
previous list_for_each_entry_reverse loop, and its value might be
invalid at the end of the loop. Also, the right context to seek
for information when defining the reference ctx location
_is_ the reference ctx.

Signed-off-by: Andre Detsch [EMAIL PROTECTED]
Signed-off-by: Arnd Bergmann [EMAIL PROTECTED]
Signed-off-by: Jeremy Kerr [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/platforms/cell/spufs/sched.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c 
b/arch/powerpc/platforms/cell/spufs/sched.c
index 758a80a..c784edd 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -351,7 +351,8 @@ static void aff_set_ref_point_location(struct spu_gang 
*gang)
lowest_offset = ctx-aff_offset;
}
 
-   gang-aff_ref_spu = aff_ref_location(ctx, mem_aff, gs, lowest_offset);
+   gang-aff_ref_spu = aff_ref_location(gang-aff_ref_ctx, mem_aff, gs,
+   lowest_offset);
 }
 
 static struct spu *ctx_location(struct spu *ref, int offset, int node)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] ps3: Fix section mismatch in ps3/setup.c

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cba684f56d7e8b82b08d4372375a42d6ebeab47d
Commit: cba684f56d7e8b82b08d4372375a42d6ebeab47d
Parent: 683e3ab2b54a7190ec8517705880171cc8ac1d92
Author: Stephen Rothwell [EMAIL PROTECTED]
AuthorDate: Tue Jul 31 17:22:00 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Fri Aug 3 19:36:00 2007 +1000

[POWERPC] ps3: Fix section mismatch in ps3/setup.c

WARNING: vmlinux.o(.text+0x605d4): Section mismatch: reference to
.init.text:.__alloc_bootmem (between '.prealloc' and '.ps3_power_save')

Signed-off-by: Stephen Rothwell [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/platforms/ps3/setup.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/ps3/setup.c 
b/arch/powerpc/platforms/ps3/setup.c
index aa05288..2952b22 100644
--- a/arch/powerpc/platforms/ps3/setup.c
+++ b/arch/powerpc/platforms/ps3/setup.c
@@ -109,7 +109,7 @@ static void ps3_panic(char *str)
 
 #if defined(CONFIG_FB_PS3) || defined(CONFIG_FB_PS3_MODULE) || \
 defined(CONFIG_PS3_FLASH) || defined(CONFIG_PS3_FLASH_MODULE)
-static void prealloc(struct ps3_prealloc *p)
+static void __init prealloc(struct ps3_prealloc *p)
 {
if (!p-size)
return;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Fix num_cpus calculation in smp_call_function_map()

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=17aa3a82aa2173a22405f862c656f0494a3f
Commit: 17aa3a82aa2173a22405f862c656f0494a3f
Parent: cba684f56d7e8b82b08d4372375a42d6ebeab47d
Author: Kevin Corry [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 06:19:46 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Fri Aug 3 19:36:00 2007 +1000

[POWERPC] Fix num_cpus calculation in smp_call_function_map()

In smp_call_function_map(), num_cpus is set to the number of online
CPUs minus one.  However, if the CPU mask does not include all CPUs
(except the one we're running on), the routine will hang in the first
while() loop until the 8 second timeout occurs.

The num_cpus should be set to the number of CPUs specified in the mask
passed into the routine, after we've made any modifications to the
mask.  With this change, we can also get rid of the call to
cpus_empty() and avoid adding another pass through the bitmask.

Signed-off-by: Kevin Corry [EMAIL PROTECTED]
Signed-off-by: Carl Love [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/smp.c |9 +++--
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 087c92f..1ea4316 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -212,11 +212,6 @@ int smp_call_function_map(void (*func) (void *info), void 
*info, int nonatomic,
atomic_set(data.finished, 0);
 
spin_lock(call_lock);
-   /* Must grab online cpu count with preempt disabled, otherwise
-* it can change. */
-   num_cpus = num_online_cpus() - 1;
-   if (!num_cpus)
-   goto done;
 
/* remove 'self' from the map */
if (cpu_isset(smp_processor_id(), map))
@@ -224,7 +219,9 @@ int smp_call_function_map(void (*func) (void *info), void 
*info, int nonatomic,
 
/* sanity check the map, remove any non-online processors. */
cpus_and(map, map, cpu_online_map);
-   if (cpus_empty(map))
+
+   num_cpus = cpus_weight(map);
+   if (!num_cpus)
goto done;
 
call_data = data;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Fix parse_drconf_memory() for 64-bit start addresses

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b9c3fdb0f0fe02ba33e87ef947f23cd12e6196fe
Commit: b9c3fdb0f0fe02ba33e87ef947f23cd12e6196fe
Parent: 17aa3a82aa2173a22405f862c656f0494a3f
Author: Michael Ellerman [EMAIL PROTECTED]
AuthorDate: Wed Aug 1 11:34:38 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Fri Aug 3 19:36:00 2007 +1000

[POWERPC] Fix parse_drconf_memory() for 64-bit start addresses

Some new machines use the ibm,dynamic-reconfiguration-memory property
to provide memory layout information, rather than via memory nodes.

There is a bug in the code to parse this property for start addresses
over 4GB; we store the start address in an unsigned int, which means
we throw away the high bits and add apparently duplicate regions.
This results in a BUG() in free_bootmem_core().  This fixes it by
using an unsigned long instead.

Signed-off-by: Michael Ellerman [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/mm/numa.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index de45aa8..c12adc3 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -307,9 +307,9 @@ static void __init parse_drconf_memory(struct device_node 
*memory)
const unsigned int *lm, *dm, *aa;
unsigned int ls, ld, la;
unsigned int n, aam, aalen;
-   unsigned long lmb_size, size;
+   unsigned long lmb_size, size, start;
int nid, default_nid = 0;
-   unsigned int start, ai, flags;
+   unsigned int ai, flags;
 
lm = of_get_property(memory, ibm,lmb-size, ls);
dm = of_get_property(memory, ibm,dynamic-memory, ld);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Fix a compile warning in pci_32.c

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3a77d291be53fbc619f14a6199b9b4cac036c476
Commit: 3a77d291be53fbc619f14a6199b9b4cac036c476
Parent: b9c3fdb0f0fe02ba33e87ef947f23cd12e6196fe
Author: Segher Boessenkool [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 01:41:13 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Fri Aug 3 19:36:01 2007 +1000

[POWERPC] Fix a compile warning in pci_32.c

__must_check, so do so.

Signed-off-by: Segher Boessenkool [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/pci_32.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index cd35c96..04a3109 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -581,8 +581,11 @@ pcibios_assign_resources(void)
if ((r-flags  IORESOURCE_UNSET)  r-end 
(!ppc_md.pcibios_enable_device_hook ||
 !ppc_md.pcibios_enable_device_hook(dev, 1))) {
+   int rc;
+
r-flags = ~IORESOURCE_UNSET;
-   pci_assign_resource(dev, idx);
+   rc = pci_assign_resource(dev, idx);
+   BUG_ON(rc);
}
}
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Fix a compile warning in powermac/feature.c

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5628244059976009151d41c2798855290753d8d5
Commit: 5628244059976009151d41c2798855290753d8d5
Parent: 3a77d291be53fbc619f14a6199b9b4cac036c476
Author: Segher Boessenkool [EMAIL PROTECTED]
AuthorDate: Thu Aug 2 01:41:14 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Fri Aug 3 19:36:01 2007 +1000

[POWERPC] Fix a compile warning in powermac/feature.c

...by using the pci_get API instead of the deprecated old stuff.

Signed-off-by: Segher Boessenkool [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/platforms/powermac/feature.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/feature.c 
b/arch/powerpc/platforms/powermac/feature.c
index f29705f..ba931be 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -826,13 +826,15 @@ core99_ata100_enable(struct device_node *node, long value)
 
if (value) {
if (pci_device_from_OF_node(node, pbus, pid) == 0)
-   pdev = pci_find_slot(pbus, pid);
+   pdev = pci_get_bus_and_slot(pbus, pid);
if (pdev == NULL)
return 0;
rc = pci_enable_device(pdev);
+   if (rc == 0)
+   pci_set_master(pdev);
+   pci_dev_put(pdev);
if (rc)
return rc;
-   pci_set_master(pdev);
}
return 0;
 }
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[POWERPC] Fixes for the SLB shadow buffer code

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=67439b76f29cb278bb3412fc873b980fc65110c9
Commit: 67439b76f29cb278bb3412fc873b980fc65110c9
Parent: 5628244059976009151d41c2798855290753d8d5
Author: Michael Neuling [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 11:55:39 2007 +1000
Committer:  Paul Mackerras [EMAIL PROTECTED]
CommitDate: Fri Aug 3 19:36:01 2007 +1000

[POWERPC] Fixes for the SLB shadow buffer code

On a machine with hardware 64kB pages and a kernel configured for a
64kB base page size, we need to change the vmalloc segment from 64kB
pages to 4kB pages if some driver creates a non-cacheable mapping in
the vmalloc area.  However, we never updated with SLB shadow buffer.
This fixes it.  Thanks to paulus for finding this.

Also added some write barriers to ensure the shadow buffer contents
are always consistent.

Signed-off-by: Michael Neuling [EMAIL PROTECTED]
Signed-off-by: Paul Mackerras [EMAIL PROTECTED]
---
 arch/powerpc/kernel/entry_64.S   |3 +++
 arch/powerpc/mm/hash_utils_64.c  |2 +-
 arch/powerpc/mm/slb.c|   28 ++--
 include/asm-powerpc/mmu-hash64.h |1 +
 4 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 9ef28da..952eba6 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -389,8 +389,11 @@ BEGIN_FTR_SECTION
ld  r9,PACA_SLBSHADOWPTR(r13)
li  r12,0
std r12,SLBSHADOW_STACKESID(r9) /* Clear ESID */
+   eieio
std r7,SLBSHADOW_STACKVSID(r9)  /* Save VSID */
+   eieio
std r0,SLBSHADOW_STACKESID(r9)  /* Save ESID */
+   eieio
 
slbie   r6
slbie   r6  /* Workaround POWER5  DD2.1 issue */
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index bc7b0ce..f178957 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -759,7 +759,7 @@ int hash_page(unsigned long ea, unsigned long access, 
unsigned long trap)
   mmu_psize_defs[mmu_vmalloc_psize].sllp) {
get_paca()-vmalloc_sllp =
mmu_psize_defs[mmu_vmalloc_psize].sllp;
-   slb_flush_and_rebolt();
+   slb_vmalloc_update();
}
 #endif /* CONFIG_PPC_64K_PAGES */
 
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 304375a..b069701 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -53,7 +53,8 @@ static inline unsigned long mk_vsid_data(unsigned long ea, 
unsigned long flags)
return (get_kernel_vsid(ea)  SLB_VSID_SHIFT) | flags;
 }
 
-static inline void slb_shadow_update(unsigned long esid, unsigned long vsid,
+static inline void slb_shadow_update(unsigned long ea,
+unsigned long flags,
 unsigned long entry)
 {
/*
@@ -61,11 +62,11 @@ static inline void slb_shadow_update(unsigned long esid, 
unsigned long vsid,
 * updating it.
 */
get_slb_shadow()-save_area[entry].esid = 0;
-   barrier();
-   get_slb_shadow()-save_area[entry].vsid = vsid;
-   barrier();
-   get_slb_shadow()-save_area[entry].esid = esid;
-
+   smp_wmb();
+   get_slb_shadow()-save_area[entry].vsid = mk_vsid_data(ea, flags);
+   smp_wmb();
+   get_slb_shadow()-save_area[entry].esid = mk_esid_data(ea, entry);
+   smp_wmb();
 }
 
 static inline void create_shadowed_slbe(unsigned long ea, unsigned long flags,
@@ -76,8 +77,7 @@ static inline void create_shadowed_slbe(unsigned long ea, 
unsigned long flags,
 * we don't get a stale entry here if we get preempted by PHYP
 * between these two statements.
 */
-   slb_shadow_update(mk_esid_data(ea, entry), mk_vsid_data(ea, flags),
- entry);
+   slb_shadow_update(ea, flags, entry);
 
asm volatile(slbmte  %0,%1 :
 : r (mk_vsid_data(ea, flags)),
@@ -104,8 +104,7 @@ void slb_flush_and_rebolt(void)
ksp_esid_data = ~SLB_ESID_V;
 
/* Only third entry (stack) may change here so only resave that */
-   slb_shadow_update(ksp_esid_data,
- mk_vsid_data(ksp_esid_data, lflags), 2);
+   slb_shadow_update(get_paca()-kstack, lflags, 2);
 
/* We need to do this all in asm, so we're sure we don't touch
 * the stack between the slbia and rebolting it. */
@@ -123,6 +122,15 @@ void slb_flush_and_rebolt(void)
 : memory);
 }
 
+void slb_vmalloc_update(void)
+{
+   unsigned long vflags;
+
+   vflags = SLB_VSID_KERNEL | mmu_psize_defs[mmu_vmalloc_psize].sllp;
+   slb_shadow_update(VMALLOC_START, vflags, 1);
+   slb_flush_and_rebolt();
+}
+
 /* Flush all user entries from the segment table of the current processor. 

Linux 2.6.23-rc2

2007-08-03 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d4ac2477fad0f2680e84ec12e387ce67682c5c13
Commit: d4ac2477fad0f2680e84ec12e387ce67682c5c13
Parent: 22da317629bad23816f3fa26d657fb46e7af21c7
Author: Linus Torvalds [EMAIL PROTECTED]
AuthorDate: Fri Aug 3 19:49:55 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Fri Aug 3 19:49:55 2007 -0700

Linux 2.6.23-rc2
---
 Makefile |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index dfe3d16..91759a6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 23
-EXTRAVERSION =-rc1
+EXTRAVERSION =-rc2
 NAME = Holy Dancing Manatees, Batman!
 
 # *DOCUMENTATION*
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html